PageSourceSearch

https://vmeste.utmn.ru/assets/js/ckeditor/ckeditor.js

js utmn.ru collected 2026-10-03 17:34:12 UTC 1,155,640 bytes, 32,851 lines download raw bytes

1/*
2Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
3For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4*/
5(function() {
6  if (window.CKEDITOR && window.CKEDITOR.dom) return;
7  window.CKEDITOR ||
8    (window.CKEDITOR = (function() {
9      var a = /(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,
10        d = {
11          timestamp: "I2QI",
12          version: "4.9.1",
13          revision: "72a83a5",
14          rnd: Math.floor(900 * Math.random()) + 100,
15          _: { pending: [], basePathSrcPattern: a },
16          status: "unloaded",
17          basePath: (function() {
18            var b = window.CKEDITOR_BASEPATH || "";
19            if (!b)
20              for (var c = document.getElementsByTagName("script"), d = 0; d < c.length; d++) {
21                var g = c[d].src.match(a);
22                if (g) {
23                  b = g[1];
24                  break;
25                }
26              }
27            -1 == b.indexOf(":/") &&
28              "//" != b.slice(0, 2) &&
29              (b =
30                0 === b.indexOf("/")
31                  ? location.href.match(/^.*?:\/\/[^\/]*/)[0] + b
32                  : location.href.match(/^[^\?]*\/(?:)/)[0] + b);
33            if (!b)
34              throw 'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';
35            return b;
36          })(),
37          getUrl: function(a) {
38            -1 == a.indexOf(":/") && 0 !== a.indexOf("/") && (a = this.basePath + a);
39            this.timestamp &&
40              "/" != a.charAt(a.length - 1) &&
41              !/[&?]t=/.test(a) &&
42              (a += (0 <= a.indexOf("?") ? "\x26" : "?") + "t\x3d" + this.timestamp);
43            return a;
44          },
45          domReady: (function() {
46            function a() {
47              try {
48                document.addEventListener
49                  ? (document.removeEventListener("DOMContentLoaded", a, !1), b())
50                  : document.attachEvent &&
51                    "complete" === document.readyState &&
52                    (document.detachEvent("onreadystatechange", a), b());
53              } catch (c) {}
54            }
55            function b() {
56              for (var a; (a = c.shift()); ) a();
57            }
58            var c = [];
59            return function(b) {
60              function d() {
61                try {
62                  document.documentElement.doScroll("left");
63                } catch (e) {
64                  setTimeout(d, 1);
65                  return;
66                }
67                a();
68              }
69              c.push(b);
70              "complete" === document.readyState && setTimeout(a, 1);
71              if (1 == c.length)
72                if (document.addEventListener)
73                  document.addEventListener("DOMContentLoaded", a, !1),
74                    window.addEventListener("load", a, !1);
75                else if (document.attachEvent) {
76                  document.attachEvent("onreadystatechange", a);
77                  window.attachEvent("onload", a);
78                  b = !1;
79                  try {
80                    b = !window.frameElement;
81                  } catch (r) {}
82                  document.documentElement.doScroll && b && d();
83                }
84            };
85          })(),
86        },
87        b = window.CKEDITOR_GETURL;
88      if (b) {
89        var c = d.getUrl;
90        d.getUrl = function(a) {
91          return b.call(d, a) || c.call(d, a);
92        };
93      }
94      return d;
95    })());
96  CKEDITOR.event ||
97    ((CKEDITOR.event = function() {}),
98    (CKEDITOR.event.implementOn = function(a) {
99      var d = CKEDITOR.event.prototype,
100        b;
101      for (b in d) null == a[b] && (a[b] = d[b]);
102    }),
103    (CKEDITOR.event.prototype = (function() {
104      function a(a) {
105        var f = d(this);
106        return f[a] || (f[a] = new b(a));
107      }
108      var d = function(a) {
109          a = (a.getPrivate && a.getPrivate()) || a._ || (a._ = {});
110          return a.events || (a.events = {});
111        },
112        b = function(a) {
113          this.name = a;
114          this.listeners = [];
115        };
116      b.prototype = {
117        getListenerIndex: function(a) {
118          for (var b = 0, d = this.listeners; b < d.length; b++) if (d[b].fn == a) return b;
119          return -1;
120        },
121      };
122      return {
123        define: function(b, d) {
124          var h = a.call(this, b);
125          CKEDITOR.tools.extend(h, d, !0);
126        },
127        on: function(b, d, h, k, g) {
128          function m(e, a, y, x) {
129            e = {
130              name: b,
131              sender: this,
132              editor: e,
133              data: a,
134              listenerData: k,
135              stop: y,
136              cancel: x,
137              removeListener: r,
138            };
139            return !1 === d.call(h, e) ? !1 : e.data;
140          }
141          function r() {
142            y.removeListener(b, d);
143          }
144          var e = a.call(this, b);
145          if (0 > e.getListenerIndex(d)) {
146            e = e.listeners;
147            h || (h = this);
148            isNaN(g) && (g = 10);
149            var y = this;
150            m.fn = d;
151            m.priority = g;
152            for (var x = e.length - 1; 0 <= x; x--)
153              if (e[x].priority <= g) return e.splice(x + 1, 0, m), { removeListener: r };
154            e.unshift(m);
155          }
156          return { removeListener: r };
157        },
158        once: function() {
159          var a = Array.prototype.slice.call(arguments),
160            b = a[1];
161          a[1] = function(a) {
162            a.removeListener();
163            return b.apply(this, arguments);
164          };
165          return this.on.apply(this, a);
166        },
167        capture: function() {
168          CKEDITOR.event.useCapture = 1;
169          var a = this.on.apply(this, arguments);
170          CKEDITOR.event.useCapture = 0;
171          return a;
172        },
173        fire: (function() {
174          var a = 0,
175            b = function() {
176              a = 1;
177            },
178            h = 0,
179            k = function() {
180              h = 1;
181            };
182          return function(g, m, r) {
183            var e = d(this)[g];
184            g = a;
185            var y = h;
186            a = h = 0;
187            if (e) {
188              var x = e.listeners;
189              if (x.length)
190                for (var x = x.slice(0), B, D = 0; D < x.length; D++) {
191                  if (e.errorProof)
192                    try {
193                      B = x[D].call(this, r, m, b, k);
194                    } catch (w) {}
195                  else B = x[D].call(this, r, m, b, k);
196                  !1 === B ? (h = 1) : "undefined" != typeof B && (m = B);
197                  if (a || h) break;
198                }
199            }
200            m = h ? !1 : "undefined" == typeof m ? !0 : m;
201            a = g;
202            h = y;
203            return m;
204          };
205        })(),
206        fireOnce: function(a, b, h) {
207          b = this.fire(a, b, h);
208          delete d(this)[a];
209          return b;
210        },
211        removeListener: function(a, b) {
212          var h = d(this)[a];
213          if (h) {
214            var k = h.getListenerIndex(b);
215            0 <= k && h.listeners.splice(k, 1);
216          }
217        },
218        removeAllListeners: function() {
219          var a = d(this),
220            b;
221          for (b in a) delete a[b];
222        },
223        hasListeners: function(a) {
224          return (a = d(this)[a]) && 0 < a.listeners.length;
225        },
226      };
227    })()));
228  CKEDITOR.editor ||
229    ((CKEDITOR.editor = function() {
230      CKEDITOR._.pending.push([this, arguments]);
231      CKEDITOR.event.call(this);
232    }),
233    (CKEDITOR.editor.prototype.fire = function(a, d) {
234      a in { instanceReady: 1, loaded: 1 } && (this[a] = !0);
235      return CKEDITOR.event.prototype.fire.call(this, a, d, this);
236    }),
237    (CKEDITOR.editor.prototype.fireOnce = function(a, d) {
238      a in { instanceReady: 1, loaded: 1 } && (this[a] = !0);
239      return CKEDITOR.event.prototype.fireOnce.call(this, a, d, this);
240    }),
241    CKEDITOR.event.implementOn(CKEDITOR.editor.prototype));
242  CKEDITOR.env ||
243    (CKEDITOR.env = (function() {
244      var a = navigator.userAgent.toLowerCase(),
245        d = a.match(/edge[ \/](\d+.?\d*)/),
246        b = -1 < a.indexOf("trident/"),
247        b = !(!d && !b),
248        b = {
249          ie: b,
250          edge: !!d,
251          webkit: !b && -1 < a.indexOf(" applewebkit/"),
252          air: -1 < a.indexOf(" adobeair/"),
253          mac: -1 < a.indexOf("macintosh"),
254          quirks:
255            "BackCompat" == document.compatMode &&
256            (!document.documentMode || 10 > document.documentMode),
257          mobile: -1 < a.indexOf("mobile"),
258          iOS: /(ipad|iphone|ipod)/.test(a),
259          isCustomDomain: function() {
260            if (!this.ie) return !1;
261            var a = document.domain,
262              b = window.location.hostname;
263            return a != b && a != "[" + b + "]";
264          },
265          secure: "https:" == location.protocol,
266        };
267      b.gecko = "Gecko" == navigator.product && !b.webkit && !b.ie;
268      b.webkit && (-1 < a.indexOf("chrome") ? (b.chrome = !0) : (b.safari = !0));
269      var c = 0;
270      b.ie &&
271        ((c = d
272          ? parseFloat(d[1])
273          : b.quirks || !document.documentMode
274            ? parseFloat(a.match(/msie (\d+)/)[1])
275            : document.documentMode),
276        (b.ie9Compat = 9 == c),
277        (b.ie8Compat = 8 == c),
278        (b.ie7Compat = 7 == c),
279        (b.ie6Compat = 7 > c || b.quirks));
280      b.gecko &&
281        (d = a.match(/rv:([\d\.]+)/)) &&
282        ((d = d[1].split(".")), (c = 1e4 * d[0] + 100 * (d[1] || 0) + 1 * (d[2] || 0)));
283      b.air && (c = parseFloat(a.match(/ adobeair\/(\d+)/)[1]));
284      b.webkit && (c = parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));
285      b.version = c;
286      b.isCompatible = !(b.ie && 7 > c) && !(b.gecko && 4e4 > c) && !(b.webkit && 534 > c);
287      b.hidpi = 2 <= window.devicePixelRatio;
288      b.needsBrFiller = b.gecko || b.webkit || (b.ie && 10 < c);
289      b.needsNbspFiller = b.ie && 11 > c;
290      b.cssClass =
291        "cke_browser_" + (b.ie ? "ie" : b.gecko ? "gecko" : b.webkit ? "webkit" : "unknown");
292      b.quirks && (b.cssClass += " cke_browser_quirks");
293      b.ie && (b.cssClass += " cke_browser_ie" + (b.quirks ? "6 cke_browser_iequirks" : b.version));
294      b.air && (b.cssClass += " cke_browser_air");
295      b.iOS && (b.cssClass += " cke_browser_ios");
296      b.hidpi && (b.cssClass += " cke_hidpi");
297      return b;
298    })());
299  "unloaded" == CKEDITOR.status &&
300    (function() {
301      CKEDITOR.event.implementOn(CKEDITOR);
302      CKEDITOR.loadFullCore = function() {
303        if ("basic_ready" != CKEDITOR.status) CKEDITOR.loadFullCore._load = 1;
304        else {
305          delete CKEDITOR.loadFullCore;
306          var a = document.createElement("script");
307          a.type = "text/javascript";
308          a.src = CKEDITOR.basePath + "ckeditor.js";
309          document.getElementsByTagName("head")[0].appendChild(a);
310        }
311      };
312      CKEDITOR.loadFullCoreTimeout = 0;
313      CKEDITOR.add = function(a) {
314        (this._.pending || (this._.pending = [])).push(a);
315      };
316      (function() {
317        CKEDITOR.domReady(function() {
318          var a = CKEDITOR.loadFullCore,
319            d = CKEDITOR.loadFullCoreTimeout;
320          a &&
321            ((CKEDITOR.status = "basic_ready"),
322            a && a._load
323              ? a()
324              : d &&
325                setTimeout(function() {
326                  CKEDITOR.loadFullCore && CKEDITOR.loadFullCore();
327                }, 1e3 * d));
328        });
329      })();
330      CKEDITOR.status = "basic_loaded";
331    })();
332  ("use strict");
333  CKEDITOR.VERBOSITY_WARN = 1;
334  CKEDITOR.VERBOSITY_ERROR = 2;
335  CKEDITOR.verbosity = CKEDITOR.VERBOSITY_WARN | CKEDITOR.VERBOSITY_ERROR;
336  CKEDITOR.warn = function(a, d) {
337    CKEDITOR.verbosity & CKEDITOR.VERBOSITY_WARN &&
338      CKEDITOR.fire("log", { type: "warn", errorCode: a, additionalData: d });
339  };
340  CKEDITOR.error = function(a, d) {
341    CKEDITOR.verbosity & CKEDITOR.VERBOSITY_ERROR &&
342      CKEDITOR.fire("log", { type: "error", errorCode: a, additionalData: d });
343  };
344  CKEDITOR.on(
345    "log",
346    function(a) {
347      if (window.console && window.console.log) {
348        var d = console[a.data.type] ? a.data.type : "log",
349          b = a.data.errorCode;
350        if ((a = a.data.additionalData)) console[d]("[CKEDITOR] Error c
350ode: " + b + ".", a);
351        else console[d]("[CKEDITOR] Error code: " + b + ".");
352        console[d](
353          "[CKEDITOR] For more information about this error go to https://docs.ckeditor.com/ckeditor4/docs/#!/guide/dev_errors-section-" +
354            b,
355        );
356      }
357    },
358    null,
359    null,
360    999,
361  );
362  CKEDITOR.dom = {};
363  (function() {
364    var a = [],
365      d = CKEDITOR.env.gecko
366        ? "-moz-"
367        : CKEDITOR.env.webkit ? "-webkit-" : CKEDITOR.env.ie ? "-ms-" : "",
368      b = /&/g,
369      c = />/g,
370      f = /</g,
371      h = /"/g,
372      k = /&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,
373      g = { lt: "\x3c", gt: "\x3e", amp: "\x26", quot: '"', nbsp: " ", shy: "­" },
374      m = function(a, e) {
375        return "#" == e[0] ? String.fromCharCode(parseInt(e.slice(1), 10)) : g[e];
376      };
377    CKEDITOR.on("reset", function() {
378      a = [];
379    });
380    CKEDITOR.tools = {
381      arrayCompare: function(a, e) {
382        if (!a && !e) return !0;
383        if (!a || !e || a.length != e.length) return !1;
384        for (var b = 0; b < a.length; b++) if (a[b] != e[b]) return !1;
385        return !0;
386      },
387      getIndex: function(a, e) {
388        for (var b = 0; b < a.length; ++b) if (e(a[b])) return b;
389        return -1;
390      },
391      clone: function(a) {
392        var e;
393        if (a && a instanceof Array) {
394          e = [];
395          for (var b = 0; b < a.length; b++) e[b] = CKEDITOR.tools.clone(a[b]);
396          return e;
397        }
398        if (
399          null === a ||
400          "object" != typeof a ||
401          a instanceof String ||
402          a instanceof Number ||
403          a instanceof Boolean ||
404          a instanceof Date ||
405          a instanceof RegExp ||
406          a.nodeType ||
407          a.window === a
408        )
409          return a;
410        e = new a.constructor();
411        for (b in a) e[b] = CKEDITOR.tools.clone(a[b]);
412        return e;
413      },
414      capitalize: function(a, e) {
415        return a.charAt(0).toUpperCase() + (e ? a.slice(1) : a.slice(1).toLowerCase());
416      },
417      extend: function(a) {
418        var e = arguments.length,
419          b,
420          c;
421        "boolean" == typeof (b = arguments[e - 1])
422          ? e--
423          : "boolean" == typeof (b = arguments[e - 2]) && ((c = arguments[e - 1]), (e -= 2));
424        for (var g = 1; g < e; g++) {
425          var d = arguments[g],
426            m;
427          for (m in d) if (!0 === b || null == a[m]) if (!c || m in c) a[m] = d[m];
428        }
429        return a;
430      },
431      prototypedCopy: function(a) {
432        var e = function() {};
433        e.prototype = a;
434        return new e();
435      },
436      copy: function(a) {
437        var e = {},
438          b;
439        for (b in a) e[b] = a[b];
440        return e;
441      },
442      isArray: function(a) {
443        return "[object Array]" == Object.prototype.toString.call(a);
444      },
445      isEmpty: function(a) {
446        for (var e in a) if (a.hasOwnProperty(e)) return !1;
447        return !0;
448      },
449      cssVendorPrefix: function(a, e, b) {
450        if (b) return d + a + ":" + e + ";" + a + ":" + e;
451        b = {};
452        b[a] = e;
453        b[d + a] = e;
454        return b;
455      },
456      cssStyleToDomStyle: (function() {
457        var a = document.createElement("div").style,
458          e =
459            "undefined" != typeof a.cssFloat
460              ? "cssFloat"
461              : "undefined" != typeof a.styleFloat ? "styleFloat" : "float";
462        return function(a) {
463          return "float" == a
464            ? e
465            : a.replace(/-./g, function(a) {
466                return a.substr(1).toUpperCase();
467              });
468        };
469      })(),
470      buildStyleHtml: function(a) {
471        a = [].concat(a);
472        for (var e, b = [], c = 0; c < a.length; c++)
473          if ((e = a[c]))
474            /@import|[{}]/.test(e)
475              ? b.push("\x3cstyle\x3e" + e + "\x3c/style\x3e")
476              : b.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"' + e + '"\x3e');
477        return b.join("");
478      },
479      htmlEncode: function(a) {
480        return void 0 === a || null === a
481          ? ""
482          : String(a)
483              .replace(b, "\x26amp;")
484              .replace(c, "\x26gt;")
485              .replace(f, "\x26lt;");
486      },
487      htmlDecode: function(a) {
488        return a.replace(k, m);
489      },
490      htmlEncodeAttr: function(a) {
491        return CKEDITOR.tools.htmlEncode(a).replace(h, "\x26quot;");
492      },
493      htmlDecodeAttr: function(a) {
494        return CKEDITOR.tools.htmlDecode(a);
495      },
496      transformPlainTextToHtml: function(a, e) {
497        var b = e == CKEDITOR.ENTER_BR,
498          c = this.htmlEncode(a.replace(/\r\n/g, "\n")),
499          c = c.replace(/\t/g, "\x26nbsp;\x26nbsp; \x26nbsp;"),
500          g = e == CKEDITOR.ENTER_P ? "p" : "div";
501        if (!b) {
502          var d = /\n{2}/g;
503          if (d.test(c))
504            var m = "\x3c" + g + "\x3e",
505              p = "\x3c/" + g + "\x3e",
506              c =
507                m +
508                c.replace(d, function() {
509                  return p + m;
510                }) +
511                p;
512        }
513        c = c.replace(/\n/g, "\x3cbr\x3e");
514        b ||
515          (c = c.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/" + g + "\x3e)"), function(a) {
516            return CKEDITOR.tools.repeat(a, 2);
517          }));
518        c = c.replace(/^ | $/g, "\x26nbsp;");
519        return (c = c
520          .replace(/(>|\s) /g, function(a, e) {
521            return e + "\x26nbsp;";
522          })
523          .replace(/ (?=<)/g, "\x26nbsp;"));
524      },
525      getNextNumber: (function() {
526        var a = 0;
527        return function() {
528          return ++a;
529        };
530      })(),
531      getNextId: function() {
532        return "cke_" + this.getNextNumber();
533      },
534      getUniqueId: function() {
535        for (var a = "e", e = 0; 8 > e; e++)
536          a += Math.floor(65536 * (1 + Math.random()))
537            .toString(16)
538            .substring(1);
539        return a;
540      },
541      override: function(a, e) {
542        var b = e(a);
543        b.prototype = a.prototype;
544        return b;
545      },
546      setTimeout: function(a, e, b, c, g) {
547        g || (g = window);
548        b || (b = g);
549        return g.setTimeout(function() {
550          c ? a.apply(b, [].concat(c)) : a.apply(b);
551        }, e || 0);
552      },
553      trim: (function() {
554        var a = /(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;
555        return function(e) {
556          return e.replace(a, "");
557        };
558      })(),
559      ltrim: (function() {
560        var a = /^[ \t\n\r]+/g;
561        return function(e) {
562          return e.replace(a, "");
563        };
564      })(),
565      rtrim: (function() {
566        var a = /[ \t\n\r]+$/g;
567        return function(e) {
568          return e.replace(a, "");
569        };
570      })(),
571      indexOf: function(a, e) {
572        if ("function" == typeof e)
573          for (var b = 0, c = a.length; b < c; b++) {
574            if (e(a[b])) return b;
575          }
576        else {
577          if (a.indexOf) return a.indexOf(e);
578          b = 0;
579          for (c = a.length; b < c; b++) if (a[b] === e) return b;
580        }
581        return -1;
582      },
583      search: function(a, e) {
584        var b = CKEDITOR.tools.indexOf(a, e);
585        return 0 <= b ? a[b] : null;
586      },
587      bind: function(a, e) {
588        return function() {
589          return a.apply(e, arguments);
590        };
591      },
592      createClass: function(a) {
593        var e = a.$,
594          b = a.base,
595          c = a.privates || a._,
596          g = a.proto;
597        a = a.statics;
598        !e &&
599          (e = function() {
600            b && this.base.apply(this, arguments);
601          });
602        if (c)
603          var d = e,
604            e = function() {
605              var a = this._ || (this._ = {}),
606                e;
607              for (e in c) {
608                var b = c[e];
609                a[e] = "function" == typeof b ? CKEDITOR.tools.bind(b, this) : b;
610              }
611              d.apply(this, arguments);
612            };
613        b &&
614          ((e.prototype = this.prototypedCopy(b.prototype)),
615          (e.prototype.constructor = e),
616          (e.base = b),
617          (e.baseProto = b.prototype),
618          (e.prototype.base = function() {
619            this.base = b.prototype.base;
620            b.apply(this, arguments);
621            this.base = arguments.callee;
622          }));
623        g && this.extend(e.prototype, g, !0);
624        a && this.extend(e, a, !0);
625        return e;
626      },
627      addFunction: function(b, e) {
628        return (
629          a.push(function() {
630            return b.apply(e || this, arguments);
631          }) - 1
632        );
633      },
634      removeFunction: function(b) {
635        a[b] = null;
636      },
637      callFunction: function(b) {
638        var e = a[b];
639        return e && e.apply(window, Array.prototype.slice.call(arguments, 1));
640      },
641      cssLength: (function() {
642        var a = /^-?\d+\.?\d*px$/,
643          e;
644        return function(b) {
645          e = CKEDITOR.tools.trim(b + "") + "px";
646          return a.test(e) ? e : b || "";
647        };
648      })(),
649      convertToPx: (function() {
650        var a;
651        return function(e) {
652          a ||
653            ((a = CKEDITOR.dom.element.createFromHtml(
654              '\x3cdiv style\x3d"position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"\x3e\x3c/div\x3e',
655              CKEDITOR.document,
656            )),
657            CKEDITOR.document.getBody().append(a));
658          return /%$/.test(e) ? e : (a.setStyle("width", e), a.$.clientWidth);
659        };
660      })(),
661      repeat: function(a, e) {
662        return Array(e + 1).join(a);
663      },
664      tryThese: function() {
665        for (var a, e = 0, b = arguments.length; e < b; e++) {
666          var c = arguments[e];
667          try {
668            a = c();
669            break;
670          } catch (g) {}
671        }
672        return a;
673      },
674      genKey: function() {
675        return Array.prototype.slice.call(arguments).join("-");
676      },
677      defer: function(a) {
678        return function() {
679          var e = arguments,
680            b = this;
681          window.setTimeout(function() {
682            a.apply(b, e);
683          }, 0);
684        };
685      },
686      normalizeCssText: function(a, e) {
687        var b = [],
688          c,
689          g = CKEDITOR.tools.parseCssText(a, !0, e);
690        for (c in g) b.push(c + ":" + g[c]);
691        b.sort();
692        return b.length ? b.join(";") + ";" : "";
693      },
694      convertRgbToHex: function(a) {
695        return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi, function(a, b, c, g) {
696          a = [b, c, g];
697          for (b = 0; 3 > b; b++) a[b] = ("0" + parseInt(a[b], 10).toString(16)).slice(-2);
698          return "#" + a.join("");
699        });
700      },
701      normalizeHex: function(a) {
702        return a.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi, function(a, b, c, g) {
703          a = b.toLowerCase();
704          3 == a.length && ((a = a.split("")), (a = [a[0], a[0], a[1], a[1], a[2], a[2]].join("")));
705          return "#" + a + g;
706        });
707      },
708      parseCssText: function(a, e, b) {
709        var c = {};
710        b &&
711          (a =
712            new CKEDITOR.dom.element("span").setAttribute("style", a).getAttribute("style") || "");
713        a && (a = CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(a)));
714        if (!a || ";" == a) return c;
715        a
716          .replace(/&quot;/g, '"')
717          .replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g, function(a, b, g) {
718            e &&
719              ((b = b.toLowerCase()),
720              "font-family" == b && (g = g.replace(/\s*,\s*/g, ",")),
721              (g = CKEDITOR.tools.trim(g)));
722            c[b] = g;
723          });
724        return c;
725      },
726      writeCssText: function(a, e) {
727        var b,
728          c = [];
729        for (b in a) c.push(b + ":" + a[b]);
730        e && c.sort();
731        return c.join("; ");
732      },
733      objectCompare: function(a, e, b) {
734        var c;
735        if (!a && !e) return !0;
736        if (!a || !e) return !1;
737        for (c in a) if (a[c] != e[c]) return !1;
738        if (!b) for (c in e) if (a[c] != e[c]) return !1;
739        return !0;
740      },
741      objectKeys: function(a) {
742        var e = [],
743          b;
744        for (b in a) e.push(b);
745        return e;
746      },
747      convertArrayToObject: function(a, e) {
748        var b = {};
749        1 == arguments.length && (e = !0);
750        for (var c = 0, g = a.length; c < g; ++c) b[a[c]] = e;
751        return b;
752      },
753      fixDomain: function() {
754        for (var a; ; )
755          try {
756            a = window.parent.document.domain;
757            break;
758          } catch (e) {
759            a = a ? a.replace(/.+?(?:\.|$)/, "") : document.domain;
760            if (!a) break;
761            document.domain = a;
762          }
763        return !!a;
764      },
765      eventsBuffer: function(a, e, b) {
766        function c() {
767          d = new Date().getTime();
768          g = !1;
769          b ? e.call(b) : e();
770        }
771        var g,
772          d = 0;
773        return {
774          input: function() {
775            if (!g) {
776              var e = new Date().getTime() - d;
777              e < a ? (g = setTimeout(c, a - e)) : c();
778            }
779          },
780          reset: function() {
781            g && clearTimeout(g);
782            g = d = 0;
783          },
784        };
785      },
786      enableHtml5Elements: function(a, e) {
787        for (
788          var b = "abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video".split(
789              " ",
790            ),
791            c = b.length,
792            g;
793          c--;
794
795        )
796          (g = a.createElement(b[c])), e && a.appendChild(g);
797      },
798      checkIfAnyArrayItemMatches: function(a, e) {
799        for (var b = 0, c = a.length; b < c; ++b) if (a[b].match(e)) return !0;
800        return !1;
801      },
802      checkIfAnyObjectPropertyMatches: function(a, e) {
803        for (var b in a) if (b.match(e)) return !0;
804        return !1;
805      },
806      keystrokeToString: function(a, e) {
807        var b = this.keystrokeToArray(a, e);
808        b.display = b.display.join("+");
809        b.aria = b.aria.join("+");
810        return b;
811      },
812      keystrokeToArray: function(a, e) {
813        var b = e & 16711680,
814          c = e & 65535,
815          g = CKEDITOR.env.mac,
816          d = [],
817          m = [];
818        b & CKEDITOR.CTRL && (d.push(g ? "⌘" : a[17]), m.push(g ? a[224] : a[17]));
819        b & CKEDITOR.ALT && (d.push(g ? "⌥" : a[18]), m.push(a[18]));
820        b & CKEDITOR.SHIFT && (d.push(g ? "⇧" : a[16]), m.push(a[16]));
821        c &&
822          (a[c]
823            ? (d.push(a[c]), m.push(a[c]))
824            : (d.push(String.fromCharCode(c)), m.push(String.fromCharCode(c))));
825        return { display: d, aria: m };
826      },
827      transparentImageData:
828        "data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",
829      getCookie: function(a) {
830        a = a.toLowerCase();
831        for (var e = document.cookie.split(";"), b, c, g = 0; g < e.length; g++)
832          if (
833            ((b = e[g].split("\x3d")),
834            (c = decodeURIComponent(CKEDITOR.tools.trim(b[0]).toLowerCase())),
835            c === a)
836          )
837            return decodeURIComponent(1 < b.length ? b[1] : "");
838        return null;
839      },
840      setCookie: function(a, b) {
841        document.cookie = encodeURIComponent(a) + "\x3d" + encodeURIComponent(b) + ";path\x3d/";
842      },
843      getCsrfToken: function() {
844        var a = CKEDITOR.tools.getCookie("ckCsrfToken");
845        if (!a || 40 != a.length) {
846          var a = [],
847            b = "";
848          if (window.crypto && window.crypto.getRandomValues)
849            (a = new Uint8Array(40)), window.crypto.getRandomValues(a);
850          else for (var c = 0; 40 > c; c++) a.push(Math.floor(256 * Math.random()));
851          for (c = 0; c < a.length; c++)
852            var g = "abcdefghijklmnopqrstuvwxyz0123456789".charAt(a[c] % 36),
853              b = b + (0.5 < Math.random() ? g.toUpperCase() : g);
854          a = b;
855          CKEDITOR.tools.setCookie("ckCsrfToken", a);
856        }
857        return a;
858      },
859      escapeCss: function(a) {
860        return a
861          ? window.CSS && CSS.escape
862            ? CSS.escape(a)
863            : isNaN(parseInt(a.charAt(0), 10))
864              ? a
865              : "\\3" + a.charAt(0) + " " + a.substring(1, a.length)
866          : "";
867      },
868      getMouseButton: function(a) {
869        var b = (a = a.data) && a.$;
870        return a && b
871          ? CKEDITOR.env.ie && 9 > CKEDITOR.env.version
872            ? 4 === b.button
873              ? CKEDITOR.MOUSE_BUTTON_MIDDLE
874              : 1 === b.button ? CKEDITOR.MOUSE_BUTTON_LEFT : CKEDITOR.MOUSE_BUTTON_RIGHT
875            : b.button
876          : !1;
877      },
878      convertHexStringToBytes: function(a) {
879        var b = [],
880          c = a.length / 2,
881          g;
882        for (g = 0; g < c; g++) b.push(parseInt(a.substr(2 * g, 2), 16));
883        return b;
884      },
885      convertBytesToBase64: function(a) {
886        var b = "",
887          c = a.length,
888          g;
889        for (g = 0; g < c; g += 3) {
890          var d = a.slice(g, g + 3),
891            m = d.length,
892            f = [],
893            p;
894          if (3 > m) for (p = m; 3 > p; p++) d[p] = 0;
895          f[0] = (d[0] & 252) >> 2;
896          f[1] = ((d[0] & 3) << 4) | (d[1] >> 4);
897          f[2] = ((d[1] & 15) << 2) | ((d[2] & 192) >> 6);
898          f[3] = d[2] & 63;
899          for (p = 0; 4 > p; p++)
900            b =
901              p <= m
902                ? b +
903                  "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f[p])
904                : b + "\x3d";
905        }
906        return b;
907      },
908      style: {
909        parse: {
910          _colors: {
911            aliceblue: "#F0F8FF",
912            antiquewhite: "#FAEBD7",
913            aqua: "#00FFFF",
914            aquamarine: "#7FFFD4",
915            azure: "#F0FFFF",
916            beige: "#F5F5DC",
917            bisque: "#FFE4C4",
918            black: "#000000",
919            blanchedalmond: "#FFEBCD",
920            blue: "#0000FF",
921            blueviolet: "#8A2BE2",
922            brown: "#A52A2A",
923            burlywood: "#DEB887",
924            cadetblue: "#5F9EA0",
925            chartreuse: "#7FFF00",
926            chocolate: "#D2691E",
927            coral: "#FF7F50",
928            cornflowerblue: "#6495ED",
929            cornsilk: "#FFF8DC",
930            crimson: "#DC143C",
931            cyan: "#00FFFF",
932            darkblue: "#00008B",
933            darkcyan: "#008B8B",
934            darkgoldenrod: "#B8860B",
935            darkgray: "#A9A9A9",
936            darkgreen: "#006400",
937            darkgrey: "#A9A9A9",
938            darkkhaki: "#BDB76B",
939            darkmagenta: "#8B008B",
940            darkolivegreen: "#556B2F",
941            darkorange: "#FF8C00",
942            darkorchid: "#9932CC",
943            darkred: "#8B0000",
944            darksalmon: "#E9967A",
945            darkseagreen: "#8FBC8F",
946            darkslateblue: "#483D8B",
947            darkslategray: "#2F4F4F",
948            darkslategrey: "#2F4F4F",
949            darkturquoise: "#00CED1",
950            darkviolet: "#9400D3",
951            deeppink: "#FF1493",
952            deepskyblue: "#00BFFF",
953            dimgray: "#696969",
954            dimgrey: "#696969",
955            dodgerblue: "#1E90FF",
956            firebrick: "#B22222",
957            floralwhite: "#FFFAF0",
958            forestgreen: "#228B22",
959            fuchsia: "#FF00FF",
960            gainsboro: "#DCDCDC",
961            ghostwhite: "#F8F8FF",
962            gold: "#FFD700",
963            goldenrod: "#DAA520",
964            gray: "#808080",
965            green: "#008000",
966            greenyellow: "#ADFF2F",
967            grey: "#808080",
968            honeydew: "#F0FFF0",
969            hotpink: "#FF69B4",
970            indianred: "#CD5C5C",
971            indigo: "#4B0082",
972            ivory: "#FFFFF0",
973            khaki: "#F0E68C",
974            lavender: "#E6E6FA",
975            lavenderblush: "#FFF0F5",
976            lawngreen: "#7CFC00",
977            lemonchiffon: "#FFFACD",
978            lightblue: "#ADD8E6",
979            lightcoral: "#F08080",
980            lightcyan: "#E0FFFF",
981            lightgoldenrodyellow: "#FAFAD2",
982            lightgray: "#D3D3D3",
983            lightgreen: "#90EE90",
984            lightgrey: "#D3D3D3",
985            lightpink: "#FFB6C1",
986            lightsalmon: "#FFA07A",
987            lightseagreen: "#20B2AA",
988            lightskyblue: "#87CEFA",
989            lightslategray: "#778899",
990            lightslategrey: "#778899",
991            lightsteelblue: "#B0C4DE",
992            lightyellow: "#FFFFE0",
993            lime: "#00FF00",
994            limegreen: "#32CD32",
995            linen: "#FAF0E6",
996            magenta: "#FF00FF",
997            maroon: "#800000",
998            mediumaquamarine: "#66CDAA",
999            mediumblue: "#0000CD",
1000            mediumorchid: "#BA55D3",
1001            mediumpurple: "#9370DB",
1002            mediumseagreen: "#3CB371",
1003            mediumslateblue: "#7B68EE",
1004            mediumspringgreen: "#00FA9A",
1005            mediumturquoise: "#48D1CC",
1006            mediumvioletred: "#C71585",
1007            midnightblue: "#191970",
1008            mintcream: "#F5FFFA",
1009            mistyrose: "#FFE4E1",
1010            moccasin: "#FFE4B5",
1011            navajowhite: "#FFDEAD",
1012            navy: "#000080",
1013            oldlace: "#FDF5E6",
1014            olive: "#808000",
1015            olivedrab: "#6B8E23",
1016            orange: "#FFA500",
1017            orangered: "#FF4500",
1018            orchid: "#DA70D6",
1019            palegoldenrod: "#EEE8AA",
1020            palegreen: "#98FB98",
1021            paleturquoise: "#AFEEEE",
1022            palevioletred: "#DB7093",
1023            papayawhip: "#FFEFD5",
1024            peachpuff: "#FFDAB9",
1025            peru: "#CD853F",
1026            pink: "#FFC0CB",
1027            plum: "#DDA0DD",
1028            powderblue: "#B0E0E6",
1029            purple: "#800080",
1030            rebeccapurple: "#663399",
1031            red: "#FF0000",
1032            rosybrown: "#BC8F8F",
1033            royalblue: "#4169E1",
1034            saddlebrown: "#8B4513",
1035            salmon: "#FA8072",
1036            sandybrown: "#F4A460",
1037            seagreen: "#2E8B57",
1038            seashell: "#FFF5EE",
1039            sienna: "#A0522D",
1040            silver: "#C0C0C0",
1041            skyblue: "#87CEEB",
1042            slateblue: "#6A5ACD",
1043            slategray: "#708090",
1044            slategrey: "#708090",
1045            snow: "#FFFAFA",
1046            springgreen: "#00FF7F",
1047            steelblue: "#4682B4",
1048            tan: "#D2B48C",
1049            teal: "#008080",
1050            thistle: "#D8BFD8",
1051            tomato: "#FF6347",
1052            turquoise: "#40E0D0",
1053            violet: "#EE82EE",
1054            wheat: "#F5DEB3",
1055            white: "#FFFFFF",
1056            whitesmoke: "#F5F5F5",
1057            yellow: "#FFFF00",
1058            yellowgreen: "#9ACD32",
1059          },
1060          _borderStyle: "none hidden dotted dashed solid double groove ridge inset outset".split(
1061            " ",
1062          ),
1063          _widthRegExp: /^(thin|medium|thick|[\+-]?\d+(\.\d+)?[a-z%]+|[\+-]?0+(\.0+)?|\.\d+[a-z%]+)$/,
1064          _rgbaRegExp: /rgba?\(\s*\d+%?\s*,\s*\d+%?\s*,\s*\d+%?\s*(?:,\s*[0-9.]+\s*)?\)/gi,
1065          _hslaRegExp: /hsla?\(\s*[0-9.]+\s*,\s*\d+%\s*,\s*\d+%\s*(?:,\s*[0-9.]+\s*)?\)/gi,
1066          background: function(a) {
1067            var b = {},
1068              c = this._findColor(a);
1069            c.length &&
1070              ((b.color = c[0]),
1071              CKEDITOR.tools.array.forEach(c, function(b) {
1072                a = a.replace(b, "");
1073              }));
1074            if ((a = CKEDITOR.tools.trim(a))) b.unprocessed = a;
1075            return b;
1076          },
1077          margin: function(a) {
1078            function b(a) {
1079              c.top = g[a[0]];
1080              c.right = g[a[1]];
1081              c.bottom = g[a[2]];
1082              c.left = g[a[3]];
1083            }
1084            var c = {},
1085              g = a.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset)/g) || ["0px"];
1086            switch (g.length) {
1087              case 1:
1088                b([0, 0, 0, 0]);
1089                break;
1090              case 2:
1091                b([0, 1, 0, 1]);
1092                break;
1093              case 3:
1094                b([0, 1, 2, 1]);
1095                break;
1096              case 4:
1097                b([0, 1, 2, 3]);
1098            }
1099            return c;
1100          },
1101          border: function(a) {
1102            var b = {},
1103              c = a.split(/\s+/g);
1104            a = CKEDITOR.tools.style.parse._findColor(a);
1105            a.length && (b.color = a[0]);
1106            CKEDITOR.tools.array.forEach(c, function(a) {
1107              b.style || -1 === CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle, a)
1108                ? !b.width && CKEDITOR.tools.style.parse._widthRegExp.test(a) && (b.width = a)
1109                : (b.style = a);
1110            });
1111            return b;
1112          },
1113          _findColor: function(a) {
1114            var b = [],
1115              c = CKEDITOR.tools.array,
1116              b = b.concat(a.match(this._rgbaRegExp) || []),
1117              b = b.concat(a.match(this._hslaRegExp) || []);
1118            return (b = b.concat(
1119              c.filter(a.split(/\s+/), function(a) {
1120                return a.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)
1121                  ? !0
1122                  : a.toLowerCase() in CKEDITOR.tools.style.parse._colors;
1123              }),
1124            ));
1125          },
1126        },
1127      },
1128      array: {
1129        filter: function(a, b, c) {
1130          var g = [];
1131          this.forEach(a, function(d, m) {
1132            b.call(c, d, m, a) && g.push(d);
1133          });
1134          return g;
1135        },
1136        forEach: function(a, b, c) {
1137          var g = a.length,
1138            d;
1139          for (d = 0; d < g; d++) b.call(c, a[d], d, a);
1140        },
1141        map: function(a, b, c) {
1142          for (var g = [], d = 0; d < a.length; d++) g.push(b.call(c, a[d], d, a));
1143          return g;
1144        },
1145        reduce: function(a, b, c, g) {
1146          for (var d = 0; d < a.length; d++) c = b.call(g, c, a[d], d, a);
1147          return c;
1148        },
1149        every: function(a, b, c) {
1150          if (!a.length) return !0;
1151          b = this.filter(a, b, c);
1152          return a.length === b.length;
1153        },
1154      },
1155      object: {
1156        findKey: function(a, b) {
1157          if ("object" !== typeof a) return null;
1158          for (var c in a) if (a[c] === b) return c;
1159          return null;
1160        },
1161        merge: function(a, b) {
1162          var c = CKEDITOR.tools,
1163            g = c.clone(a),
1164            d = c.clone(b);
1165          c.array.forEach(c.objectKeys(d), function(a) {
1166            g[a] =
1167              "object" === typeof d[a] && "object" === typeof g[a]
1168                ? c.object.merge(g[a], d[a])
1169                : d[a];
1170          });
1171          return g;
1172        },
1173      },
1174    };
1175    CKEDITOR.tools.array.indexOf = CKEDITOR.tools.indexOf;
1176    CKEDITOR.tools.array.isArray = CKEDITOR.tools.isArray;
1177    CKEDITOR.MOUSE_BUTTON_LEFT = 0;
1178    CKEDITOR.MOUSE_BUTTON_MIDDLE = 1;
1179    CKEDITOR.MOUSE_BUTTON_RIGHT = 2;
1180  })();
1181  CKEDITOR.dtd = (function() {
1182    var a = CKEDITOR.tools.extend,
1183      d = function(a, b) {
1184        for (var c = CKEDITOR.tools.clone(a), g = 1; g < arguments.length; g++) {
1185          b = arguments[g];
1186          for (var d in b) delete c[d];
1187        }
1188        return c;
1189      },
1190      b = {},
1191      c = {},
1192      f = {
1193        address: 1,
1194        article: 1,
1195        aside: 1,
1196        blockquote: 1,
1197        details: 1,
1198        div: 1,
1199        dl: 1,
1200        fieldset: 1,
1201        figure: 1,
1202        footer: 1,
1203        form: 1,
1204        h1: 1,
1205        h2: 1,
1206        h3: 1,
1207        h4: 1,
1208        h5: 1,
1209        h6: 1,
1210        header: 1,
1211        hgroup: 1,
1212        hr: 1,
1213        main: 1,
1214        menu: 1,
1215        nav: 1,
1216        ol: 1,
1217        p: 1,
1218        pre: 1,
1219        section: 1,
1220        table: 1,
1221        ul: 1,
1222      },
1223      h = { command: 1, link: 1, meta: 1, noscript: 1, script: 1, style: 1 },
1224      k = {},
1225      g = { "#": 1 },
1226      m = { center: 1, dir: 1, noframes: 1 };
1227    a(
1228      b,
1229      {
1230        a: 1,
1231        abbr: 1,
1232        area: 1,
1233        audio: 1,
1234        b: 1,
1235        bdi: 1,
1236        bdo: 1,
1237        br: 1,
1238        button: 1,
1239        canvas: 1,
1240        cite: 1,
1241        code: 1,
1242        command: 1,
1243        datalist: 1,
1244        del: 1,
1245        dfn: 1,
1246        em: 1,
1247        embed: 1,
1248        i: 1,
1249        iframe: 1,
1250        img: 1,
1251        input: 1,
1252        ins: 1,
1253        kbd: 1,
1254        keygen: 1,
1255        label: 1,
1256        map: 1,
1257        mark: 1,
1258        meter: 1,
1259        noscript: 1,
1260        object: 1,
1261        output: 1,
1262        progress: 1,
1263        q: 1,
1264        ruby: 1,
1265        s: 1,
1266        samp: 1,
1267        script: 1,
1268        select: 1,
1269        small: 1,
1270        span: 1,
1271        strong: 1,
1272        sub: 1,
1273        sup: 1,
1274        textarea: 1,
1275        time: 1,
1276        u: 1,
1277        var: 1,
1278        video: 1,
1279        wbr: 1,
1280      },
1281      g,
1282      {
1283        acronym: 1,
1284        applet: 1,
1285        basefont: 1,
1286        big: 1,
1287        font: 1,
1288        isindex: 1,
1289        strike: 1,
1290        style: 1,
1291        tt: 1,
1292      },
1293    );
1294    a(c, f, b, m);
1295    d = {
1296      a: d(b, { a: 1, button: 1 }),
1297      abbr: b,
1298      address: c,
1299      area: k,
1300      article: c,
1301      aside: c,
1302      audio: a({ source: 1, track: 1 }, c),
1303      b: b,
1304      base: k,
1305      bdi: b,
1306      bdo: b,
1307      blockquote: c,
1308      body: c,
1309      br: k,
1310      button: d(b, { a: 1, button: 1 }),
1311      canvas: b,
1312      caption: c,
1313      cite: b,
1314      code: b,
1315      col: k,
1316      colgroup: { col: 1 },
1317      command: k,
1318      datalist: a({ option: 1 }, b),
1319      dd: c,
1320      del: b,
1321      details: a({ summary: 1 }, c),
1322      dfn: b,
1323      div: c,
1324      dl: { dt: 1, dd: 1 },
1325      dt: c,
1326      em: b,
1327      embed: k,
1328      fieldset: a({ legend: 1 }, c),
1329      figcaption: c,
1330      figure: a({ figcaption: 1 }, c),
1331      footer: c,
1332      form: c,
1333      h1: b,
1334      h2: b,
1335      h3: b,
1336      h4: b,
1337      h5: b,
1338      h6: b,
1339      head: a({ title: 1, base: 1 }, h),
1340      header: c,
1341      hgroup: { h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1 },
1342      hr: k,
1343      html: a(
1344        {
1345          head: 1,
1346          body: 1,
1347        },
1348        c,
1349        h,
1350      ),
1351      i: b,
1352      iframe: g,
1353      img: k,
1354      input: k,
1355      ins: b,
1356      kbd: b,
1357      keygen: k,
1358      label: b,
1359      legend: b,
1360      li: c,
1361      link: k,
1362      main: c,
1363      map: c,
1364      mark: b,
1365      menu: a({ li: 1 }, c),
1366      meta: k,
1367      meter: d(b, { meter: 1 }),
1368      nav: c,
1369      noscript: a({ link: 1, meta: 1, style: 1 }, b),
1370      object: a({ param: 1 }, b),
1371      ol: { li: 1 },
1372      optgroup: { option: 1 },
1373      option: g,
1374      output: b,
1375      p: b,
1376      param: k,
1377      pre: b,
1378      progress: d(b, { progress: 1 }),
1379      q: b,
1380      rp: b,
1381      rt: b,
1382      ruby: a({ rp: 1, rt: 1 }, b),
1383      s: b,
1384      samp: b,
1385      script: g,
1386      section: c,
1387      select: { optgroup: 1, option: 1 },
1388      small: b,
1389      source: k,
1390      span: b,
1391      strong: b,
1392      style: g,
1393      sub: b,
1394      summary: a({ h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1 }, b),
1395      sup: b,
1396      table: { caption: 1, colgroup: 1, thead: 1, tfoot: 1, tbody: 1, tr: 1 },
1397      tbody: { tr: 1 },
1398      td: c,
1399      textarea: g,
1400      tfoot: { tr: 1 },
1401      th: c,
1402      thead: { tr: 1 },
1403      time: d(b, { time: 1 }),
1404      title: g,
1405      tr: { th: 1, td: 1 },
1406      track: k,
1407      u: b,
1408      ul: { li: 1 },
1409      var: b,
1410      video: a({ source: 1, track: 1 }, c),
1411      wbr: k,
1412      acronym: b,
1413      applet: a({ param: 1 }, c),
1414      basefont: k,
1415      big: b,
1416      center: c,
1417      dialog: k,
1418      dir: { li: 1 },
1419      font: b,
1420      isindex: k,
1421      noframes: c,
1422      strike: b,
1423      tt: b,
1424    };
1425    a(d, {
1426      $block: a({ audio: 1, dd: 1, dt: 1, figcaption: 1, li: 1, video: 1 }, f, m),
1427      $blockLimit: {
1428        article: 1,
1429        aside: 1,
1430        audio: 1,
1431        body: 1,
1432        caption: 1,
1433        details: 1,
1434        dir: 1,
1435        div: 1,
1436        dl: 1,
1437        fieldset: 1,
1438        figcaption: 1,
1439        figure: 1,
1440        footer: 1,
1441        form: 1,
1442        header: 1,
1443        hgroup: 1,
1444        main: 1,
1445        menu: 1,
1446        nav: 1,
1447        ol: 1,
1448        section: 1,
1449        table: 1,
1450        td: 1,
1451        th: 1,
1452        tr: 1,
1453        ul: 1,
1454        video: 1,
1455      },
1456      $cdata: { script: 1, style: 1 },
1457      $editable: {
1458        address: 1,
1459        article: 1,
1460        aside: 1,
1461        blockquote: 1,
1462        body: 1,
1463        details: 1,
1464        div: 1,
1465        fieldset: 1,
1466        figcaption: 1,
1467        footer: 1,
1468        form: 1,
1469        h1: 1,
1470        h2: 1,
1471        h3: 1,
1472        h4: 1,
1473        h5: 1,
1474        h6: 1,
1475        header: 1,
1476        hgroup: 1,
1477        main: 1,
1478        nav: 1,
1479        p: 1,
1480        pre: 1,
1481        section: 1,
1482      },
1483      $empty: {
1484        area: 1,
1485        base: 1,
1486        basefont: 1,
1487        br: 1,
1488        col: 1,
1489        command: 1,
1490        dialog: 1,
1491        embed: 1,
1492        hr: 1,
1493        img: 1,
1494        input: 1,
1495        isindex: 1,
1496        keygen: 1,
1497        link: 1,
1498        meta: 1,
1499        param: 1,
1500        source: 1,
1501        track: 1,
1502        wbr: 1,
1503      },
1504      $inline: b,
1505      $list: { dl: 1, ol: 1, ul: 1 },
1506      $listItem: { dd: 1, dt: 1, li: 1 },
1507      $nonBodyContent: a({ body: 1, head: 1, html: 1 }, d.head),
1508      $nonEditable: {
1509        applet: 1,
1510        audio: 1,
1511        button: 1,
1512        embed: 1,
1513        iframe: 1,
1514        map: 1,
1515        object: 1,
1516        option: 1,
1517        param: 1,
1518        script: 1,
1519        textarea: 1,
1520        video: 1,
1521      },
1522      $object: {
1523        applet: 1,
1524        audio: 1,
1525        button: 1,
1526        hr: 1,
1527        iframe: 1,
1528        img: 1,
1529        input: 1,
1530        object: 1,
1531        select: 1,
1532        table: 1,
1533        textarea: 1,
1534        video: 1,
1535      },
1536      $removeEmpty: {
1537        abbr: 1,
1538        acronym: 1,
1539        b: 1,
1540        bdi: 1,
1541        bdo: 1,
1542        big: 1,
1543        cite: 1,
1544        code: 1,
1545        del: 1,
1546        dfn: 1,
1547        em: 1,
1548        font: 1,
1549        i: 1,
1550        ins: 1,
1551        label: 1,
1552        kbd: 1,
1553        mark: 1,
1554        meter: 1,
1555        output: 1,
1556        q: 1,
1557        ruby: 1,
1558        s: 1,
1559        samp: 1,
1560        small: 1,
1561        span: 1,
1562        strike: 1,
1563        strong: 1,
1564        sub: 1,
1565        sup: 1,
1566        time: 1,
1567        tt: 1,
1568        u: 1,
1569        var: 1,
1570      },
1571      $tabIndex: { a: 1, area: 1, button: 1, input: 1, object: 1, select: 1, textarea: 1 },
1572      $tableContent: {
1573        caption: 1,
1574        col: 1,
1575        colgroup: 1,
1576        tbody: 1,
1577        td: 1,
1578        tfoot: 1,
1579        th: 1,
1580        thead: 1,
1581        tr: 1,
1582      },
1583      $transparent: {
1584        a: 1,
1585        audio: 1,
1586        canvas: 1,
1587        del: 1,
1588        ins: 1,
1589        map: 1,
1590        noscript: 1,
1591        object: 1,
1592        video: 1,
1593      },
1594      $intermediate: {
1595        caption: 1,
1596        colgroup: 1,
1597        dd: 1,
1598        dt: 1,
1599        figcaption: 1,
1600        legend: 1,
1601        li: 1,
1602        optgroup: 1,
1603        option: 1,
1604        rp: 1,
1605        rt: 1,
1606        summary: 1,
1607        tbody: 1,
1608        td: 1,
1609        tfoot: 1,
1610        th: 1,
1611        thead: 1,
1612        tr: 1,
1613      },
1614    });
1615    return d;
1616  })();
1617  CKEDITOR.dom.event = function(a) {
1618    this.$ = a;
1619  };
1620  CKEDITOR.dom.event.prototype = {
1621    getKey: function() {
1622      return this.$.keyCode || this.$.which;
1623    },
1624    getKeystroke: function() {
1625      var a = this.getKey();
1626      if (this.$.ctrlKey || this.$.metaKey) a += CKEDITOR.CTRL;
1627      this.$.shiftKey && (a += CKEDITOR.SHIFT);
1628      this.$.altKey && (a += CKEDITOR.ALT);
1629      return a;
1630    },
1631    preventDefault: function(a) {
1632      var d = this.$;
1633      d.preventDefault ? d.preventDefault() : (d.returnValue = !1);
1634      a && this.stopPropagation();
1635    },
1636    stopPropagation: function() {
1637      var a = this.$;
1638      a.stopPropagation ? a.stopPropagation() : (a.cancelBubble = !0);
1639    },
1640    getTarget: function() {
1641      var a = this.$.target || this.$.srcElement;
1642      return a ? new CKEDITOR.dom.node(a) : null;
1643    },
1644    getPhase: function() {
1645      return this.$.eventPhase || 2;
1646    },
1647    getPageOffset: function() {
1648      var a = this.getTarget().getDocument().$;
1649      return {
1650        x: this.$.pageX || this.$.clientX + (a.documentElement.scrollLeft || a.body.scrollLeft),
1651        y: this.$.pageY || this.$.clientY + (a.documentElement.scrollTop || a.body.scrollTop),
1652      };
1653    },
1654  };
1655  CKEDITOR.CTRL = 1114112;
1656  CKEDITOR.SHIFT = 2228224;
1657  CKEDITOR.ALT = 4456448;
1658  CKEDITOR.EVENT_PHASE_CAPTURING = 1;
1659  CKEDITOR.EVENT_PHASE_AT_TARGET = 2;
1660  CKEDITOR.EVENT_PHASE_BUBBLING = 3;
1661  CKEDITOR.dom.domObject = function(a) {
1662    a && (this.$ = a);
1663  };
1664  CKEDITOR.dom.domObject.prototype = (function() {
1665    var a = function(a, b) {
1666      return function(c) {
1667        "undefined" != typeof CKEDITOR && a.fire(b, new CKEDITOR.dom.event(c));
1668      };
1669    };
1670    return {
1671      getPrivate: function() {
1672        var a;
1673        (a = this.getCustomData("_")) || this.setCustomData("_", (a = {}));
1674        return a;
1675      },
1676      on: function(d) {
1677        var b = this.getCustomData("_cke_nativeListeners");
1678        b || ((b = {}), this.setCustomData("_cke_nativeListeners", b));
1679        b[d] ||
1680          ((b = b[d] = a(this, d)),
1681          this.$.addEventListener
1682            ? this.$.addEventListener(d, b, !!CKEDITOR.event.useCapture)
1683            : this.$.attachEvent && this.$.attachEvent("on" + d, b));
1684        return CKEDITOR.event.prototype.on.apply(this, arguments);
1685      },
1686      removeListener: function(a) {
1687        CKEDITOR.event.prototype.removeListener.apply(this, arguments);
1688        if (!this.hasListeners(a)) {
1689          var b = this.getCustomData("_cke_nativeListeners"),
1690            c = b && b[a];
1691          c &&
1692            (this.$.removeEventListener
1693              ? this.$.removeEventListener(a, c, !1)
1694              : this.$.detachEvent && this.$.detachEvent("on" + a, c),
1695            delete b[a]);
1696        }
1697      },
1698      removeAllListeners: function() {
1699        var a = this.getCustomData("_cke_nativeListeners"),
1700          b;
1701        for (b in a) {
1702          var c = a[b];
1703          this.$.detachEvent
1704            ? this.$.detachEvent("on" + b, c)
1705            : this.$.removeEventListener && this.$.removeEventListener(b, c, !1);
1706          delete a[b];
1707        }
1708        CKEDITOR.event.prototype.removeAllListeners.call(this);
1709      },
1710    };
1711  })();
1712  (function(a) {
1713    var d = {};
1714    CKEDITOR.on("reset", function() {
1715      d = {};
1716    });
1717    a.equals = function(a) {
1718      try {
1719        return a && a.$ === this.$;
1720      } catch (c) {
1721        return !1;
1722      }
1723    };
1724    a.setCustomData = function(a, c) {
1725      var f = this.getUniqueId();
1726      (d[f] || (d[f] = {}))[a] = c;
1727      return this;
1728    };
1729    a.getCustomData = function(a) {
1730      var c = this.$["data-cke-expando"];
1731      return (c = c && d[c]) && a in c ? c[a] : null;
1732    };
1733    a.removeCustomData = function(a) {
1734      var c = this.$["data-cke-expando"],
1735        c = c && d[c],
1736        f,
1737        h;
1738      c && ((f = c[a]), (h = a in c), delete c[a]);
1739      return h ? f : null;
1740    };
1741    a.clearCustomData = function() {
1742      this.removeAllListeners();
1743      var a = this.$["data-cke-expando"];
1744      a && delete d[a];
1745    };
1746    a.getUniqueId = function() {
1747      return (
1748        this.$["data-cke-expando"] || (this.$["data-cke-expando"] = CKEDITOR.tools.getNextNumber())
1749      );
1750    };
1751    CKEDITOR.event.implementOn(a);
1752  })(CKEDITOR.dom.domObject.prototype);
1753  CKEDITOR.dom.node = function(a) {
1754    return a
1755      ? new CKEDITOR.dom[
1756          a.nodeType == CKEDITOR.NODE_DOCUMENT
1757            ? "document"
1758            : a.nodeType == CKEDITOR.NODE_ELEMENT
1759              ? "element"
1760              : a.nodeType == CKEDITOR.NODE_TEXT
1761                ? "text"
1762                : a.nodeType == CKEDITOR.NODE_COMMENT
1763                  ? "comment"
1764                  : a.nodeType == CKEDITOR.NODE_DOCUMENT_FRAGMENT ? "documentFragment" : "domObject"
1765        ](a)
1766      : this;
1767  };
1768  CKEDITOR.dom.node.prototype = new CKEDITOR.dom.domObject();
1769  CKEDITOR.NODE_ELEMENT = 1;
1770  CKEDITOR.NODE_DOCUMENT = 9;
1771  CKEDITOR.NODE_TEXT = 3;
1772  CKEDITOR.NODE_COMMENT = 8;
1773  CKEDITOR.NODE_DOCUMENT_FRAGMENT = 11;
1774  CKEDITOR.POSITION_IDENTICAL = 0;
1775  CKEDITOR.POSITION_DISCONNECTED = 1;
1776  CKEDITOR.POSITION_FOLLOWING = 2;
1777  CKEDITOR.POSITION_PRECEDING = 4;
1778  CKEDITOR.POSITION_IS_CONTAINED = 8;
1779  CKEDITOR.POSITION_CONTAINS = 16;
1780  CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype, {
1781    appendTo: function(a, d) {
1782      a.append(this, d);
1783      return a;
1784    },
1785    clone: function(a, d) {
1786      function b(c) {
1787        c["data-cke-expando"] && (c["data-cke-expando"] = !1);
1788        if (c.nodeType == CKEDITOR.NODE_ELEMENT || c.nodeType == CKEDITOR.NODE_DOCUMENT_FRAGMENT)
1789          if ((d || c.nodeType != CKEDITOR.NODE_ELEMENT || c.removeAttribute("id", !1), a)) {
1790            c = c.childNodes;
1791            for (var f = 0; f < c.length; f++) b(c[f]);
1792          }
1793      }
1794      function c(b) {
1795        if (b.type == CKEDITOR.NODE_ELEMENT || b.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT) {
1796          if (b.type != CKEDITOR.NODE_DOCUMENT_FRAGMENT) {
1797            var d = b.getName();
1798            ":" == d[0] && b.renameNode(d.substring(1));
1799          }
1800          if (a) for (d = 0; d < b.getChildCount(); d++) c(b.getChild(d));
1801        }
1802      }
1803      var f = this.$.cloneNode(a);
1804      b(f);
1805      f = new CKEDITOR.dom.node(f);
1806      CKEDITOR.env.ie &&
1807        9 > CKEDITOR.env.version &&
1808        (this.type == CKEDITOR.NODE_ELEMENT || this.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT) &&
1809        c(f);
1810      return f;
1811    },
1812    hasPrevious: function() {
1813      return !!this.$.previousSibling;
1814    },
1815    hasNext: function() {
1816      return !!this.$.nextSibling;
1817    },
1818    insertAfter: function(a) {
1819      a.$.parentNode.insertBefore(this.$, a.$.nextSibling);
1820      return a;
1821    },
1822    insertBefore: function(a) {
1823      a.$.parentNode.insertBefore(this.$, a.$);
1824      return a;
1825    },
1826    insertBeforeMe: function(a) {
1827      this.$.parentNode.insertBefore(a.$, this.$);
1828      return a;
1829    },
1830    getAddress: function(a) {
1831      for (var d = [], b = this.getDocument().$.documentElement, c = this.$; c && c != b; ) {
1832        var f = c.parentNode;
1833        f && d.unshift(this.getIndex.call({ $: c }, a));
1834        c = f;
1835      }
1836      return d;
1837    },
1838    getDocument: function() {
1839      return new CKEDITOR.dom.document(this.$.ownerDocument || this.$.parentNode.ownerDocument);
1840    },
1841    getIndex: function(a) {
1842      function d(a, c) {
1843        var m = c ? a.nextSibling : a.previousSibling;
1844        return m && m.nodeType == CKEDITOR.NODE_TEXT ? (b(m) ? d(m, c) : m) : null;
1845      }
1846      function b(a) {
1847        return !a.nodeValue || a.nodeValue == CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE;
1848      }
1849      var c = this.$,
1850        f = -1,
1851        h;
1852      if (
1853        !this.$.parentNode ||
1854        (a && c.nodeType == CKEDITOR.NODE_TEXT && b(c) && !d(c) && !d(c, !0))
1855      )
1856        return -1;
1857      do
1858        (a && c != this.$ && c.nodeType == CKEDITOR.NODE_TEXT && (h || b(c))) ||
1859          (f++, (h = c.nodeType == CKEDITOR.NODE_TEXT));
1860      while ((c = c.previousSibling));
1861      return f;
1862    },
1863    getNextSourceNode: function(a, d, b) {
1864      if (b && !b.call) {
1865        var c = b;
1866        b = function(a) {
1867          return !a.equals(c);
1868        };
1869      }
1870      a = !a && this.getFirst && this.getFirst();
1871      var f;
1872      if (!a) {
1873        if (this.type == CKEDITOR.NODE_ELEMENT && b && !1 === b(this, !0)) return null;
1874        a = this.getNext();
1875      }
1876      for (; !a && (f = (f || this).getParent()); ) {
1877        if (b && !1 === b(f, !0)) return null;
1878        a = f.getNext();
1879      }
1880      return !a || (b && !1 === b(a)) ? null : d && d != a.type ? a.getNextSourceNode(!1, d, b) : a;
1881    },
1882    getPreviousSourceNode: function(a, d, b) {
1883      if (b && !b.call) {
1884        var c = b;
1885        b = function(a) {
1886          return !a.equals(c);
1887        };
1888      }
1889      a = !a && this.getLast && this.getLast();
1890      var f;
1891      if (!a) {
1892        if (this.type == CKEDITOR.NODE_ELEMENT && b && !1 === b(this, !0)) return null;
1893        a = this.getPrevious();
1894      }
1895      for (; !a && (f = (f || this).getParent()); ) {
1896        if (b && !1 === b(f, !0)) return null;
1897        a = f.getPrevious();
1898      }
1899      return !a || (b && !1 === b(a))
1900        ? null
1901        : d && a.type != d ? a.getPreviousSourceNode(!1, d, b) : a;
1902    },
1903    getPrevious: function(a) {
1904      var d = this.$,
1905        b;
1906      do b = (d = d.previousSibling) && 10 != d.nodeType && new CKEDITOR.dom.node(d);
1907      while (b && a && !a(b));
1908      return b;
1909    },
1910    getNext: function(a) {
1911      var d = this.$,
1912        b;
1913      do b = (d = d.nextSibling) && new CKEDITOR.dom.node(d);
1914      while (b && a && !a(b));
1915      return b;
1916    },
1917    getParent: function(a) {
1918      var d = this.$.parentNode;
1919      return d &&
1920        (d.nodeType == CKEDITOR.NODE_ELEMENT ||
1921          (a && d.nodeType == CKEDITOR.NODE_DOCUMENT_FRAGMENT))
1922        ? new CKEDITOR.dom.node(d)
1923        : null;
1924    },
1925    getParents: function(a) {
1926      var d = this,
1927        b = [];
1928      do b[a ? "push" : "unshift"](d);
1929      while ((d = d.getParent()));
1930      return b;
1931    },
1932    getCommonAncestor: function(a) {
1933      if (a.equals(this)) return this;
1934      if (a.contains && a.contains(this)) return a;
1935      var d = this.contains ? this : this.getParent();
1936      do if (d.contains(a)) return d;
1937      while ((d = d.getParent()));
1938      return null;
1939    },
1940    getPosition: function(a) {
1941      var d = this.$,
1942        b = a.$;
1943      if (d.compareDocumentPosition) return d.compareDocumentPosition(b);
1944      if (d == b) return CKEDITOR.POSITION_IDENTICAL;
1945      if (this.type == CKEDITOR.NODE_ELEMENT && a.type == CKEDITOR.NODE_ELEMENT) {
1946        if (d.contains) {
1947          if (d.contains(b)) return CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_PRECEDING;
1948          if (b.contains(d)) return CKEDITOR.POSITION_IS_CONTAINED + CKEDITOR.POSITION_FOLLOWING;
1949        }
1950        if ("sourceIndex" in d)
1951          return 0 > d.sourceIndex || 0 > b.sourceIndex
1952            ? CKEDITOR.POSITION_DISCONNECTED
1953            : d.sourceIndex < b.sourceIndex
1954              ? CKEDITOR.POSITION_PRECEDING
1955              : CKEDITOR.POSITION_FOLLOWING;
1956      }
1957      d = this.getAddress();
1958      a = a.getAddress();
1959      for (var b = Math.min(d.length, a.length), c = 0; c < b; c++)
1960        if (d[c] != a[c])
1961          return d[c] < a[c] ? CKEDITOR.POSITION_PRECEDING : CKEDITOR.POSITION_FOLLOWING;
1962      return d.length < a.length
1963        ? CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_PRECEDING
1964        : CKEDITOR.POSITION_IS_CONTAINED + CKEDITOR.POSITION_FOLLOWING;
1965    },
1966    getAscendant: function(a, d) {
1967      var b = this.$,
1968        c,
1969        f;
1970      d || (b = b.parentNode);
1971      "function" == typeof a
1972        ? ((f = !0), (c = a))
1973        : ((f = !1),
1974          (c = function(b) {
1975            b = "string" == typeof b.nodeName ? b.nodeName.toLowerCase() : "";
1976            return "string" == typeof a ? b == a : b in a;
1977          }));
1978      for (; b; ) {
1979        if (c(f ? new CKEDITOR.dom.node(b) : b)) return new CKEDITOR.dom.node(b);
1980        try {
1981          b = b.parentNode;
1982        } catch (h) {
1983          b = null;
1984        }
1985      }
1986      return null;
1987    },
1988    hasAscendant: function(a, d) {
1989      var b = this.$;
1990      d || (b = b.parentNode);
1991      for (; b; ) {
1992        if (b.nodeName && b.nodeName.toLowerCase() == a) return !0;
1993        b = b.parentNode;
1994      }
1995      return !1;
1996    },
1997    move: function(a, d) {
1998      a.append(this.remove(), d);
1999    },
2000    remove: function(a) {
2001      var d = this.$,
2002        b = d.parentNode;
2003      if (b) {
2004        if (a) for (; (a = d.firstChild); ) b.insertBefore(d.removeChild(a), d);
2005        b.removeChild(d);
2006      }
2007      return this;
2008    },
2009    replace: function(a) {
2010      this.insertBefore(a);
2011      a.remove();
2012    },
2013    trim: function() {
2014      this.ltrim();
2015      this.rtrim();
2016    },
2017    ltrim: function() {
2018      for (var a; this.getFirst && (a = this.getFirst()); ) {
2019        if (a.type == CKEDITOR.NODE_TEXT) {
2020          var d = CKEDITOR.tools.ltrim(a.getText()),
2021            b = a.getLength();
2022          if (d) d.length < b && (a.split(b - d.length), this.$.removeChild(this.$.firstChild));
2023          else {
2024            a.remove();
2025            continue;
2026          }
2027        }
2028        break;
2029      }
2030    },
2031    rtrim: function() {
2032      for (var a; this.getLast && (a = this.getLast()); ) {
2033        if (a.type == CKEDITOR.NODE_TEXT) {
2034          var d = CKEDITOR.tools.rtrim(a.getText()),
2035            b = a.getLength();
2036          if (d)
2037            d.length < b &&
2038              (a.split(d.length), this.$.lastChild.parentNode.removeChild(this.$.lastChild));
2039          else {
2040            a.remove();
2041            continue;
2042          }
2043        }
2044        break;
2045      }
2046      CKEDITOR.env.needsBrFiller &&
2047        (a = this.$.lastChild) &&
2048        1 == a.type &&
2049        "br" == a.nodeName.toLowerCase() &&
2050        a.parentNode.removeChild(a);
2051    },
2052    isReadOnly: function(a) {
2053      var d = this;
2054      this.type != CKEDITOR.NODE_ELEMENT && (d = this.getParent());
2055      CKEDITOR.env.edge && d && d.is("textarea", "input") && (a = !0);
2056      if (!a && d && "undefined" != typeof d.$.isContentEditable)
2057        return !(d.$.isContentEditable || d.data("cke-editable"));
2058      for (; d; ) {
2059        if (d.data("cke-editable")) return !1;
2060        if (d.hasAttribute("contenteditable")) return "false" == d.getAttribute("contenteditable");
2061        d = d.getParent();
2062      }
2063      return !0;
2064    },
2065  });
2066  CKEDITOR.dom.window = function(a) {
2067    CKEDITOR.dom.domObject.call(this, a);
2068  };
2069  CKEDITOR.dom.window.prototype = new CKEDITOR.dom.domObject();
2070  CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype, {
2071    focus: function() {
2072      this.$.focus();
2073    },
2074    getViewPaneSize: function() {
2075      var a = this.$.document,
2076        d = "CSS1Compat" == a.compatMode;
2077      return {
2078        width: (d ? a.documentElement.clientWidth : a.body.clientWidth) || 0,
2079        height: (d ? a.documentElement.clientHeight : a.body.clientHeight) || 0,
2080      };
2081    },
2082    getScrollPosition: function() {
2083      var a = this.$;
2084      if ("pageXOffset" in a) return { x: a.pageXOffset || 0, y: a.pageYOffset || 0 };
2085      a = a.document;
2086      return {
2087        x: a.documentElement.scrollLeft || a.body.scrollLeft || 0,
2088        y: a.documentElement.scrollTop || a.body.scrollTop || 0,
2089      };
2090    },
2091    getFrame: function() {
2092      var a = this.$.frameElement;
2093      return a ? new CKEDITOR.dom.element.get(a) : null;
2094    },
2095  });
2096  CKEDITOR.dom.document = function(a) {
2097    CKEDITOR.dom.domObject.call(this, a);
2098  };
2099  CKEDITOR.dom.document.prototype = new CKEDITOR.dom.domObject();
2100  CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype, {
2101    type: CKEDITOR.NODE_DOCUMENT,
2102    appendStyleSheet: function(a) {
2103      if (this.$.createStyleSheet) this.$.createStyleSheet(a);
2104      else {
2105        var d = new CKEDITOR.dom.element("link");
2106        d.setAttributes({ rel: "stylesheet", type: "text/css", href: a });
2107        this.getHead().append(d);
2108      }
2109    },
2110    appendStyleText: function(a) {
2111      if (this.$.createStyleSheet) {
2112        var d = this.$.createStyleSheet("");
2113        d.cssText = a;
2114      } else {
2115        var b = new CKEDITOR.dom.element("style", this);
2116        b.append(new CKEDITOR.dom.text(a, this));
2117        this.getHead().append(b);
2118      }
2119      return d || b.$.sheet;
2120    },
2121    createElement: function(a, d) {
2122      var b = new CKEDITOR.dom.element(a, this);
2123      d && (d.attributes && b.setAttributes(d.attributes), d.styles && b.setStyles(d.styles));
2124      return b;
2125    },
2126    createText: function(a) {
2127      return new CKEDITOR.dom.text(a, this);
2128    },
2129    focus: function() {
2130      this.getWindow().focus();
2131    },
2132    getActive: function() {
2133      var a;
2134      try {
2135        a = this.$.activeElement;
2136      } catch (d) {
2137        return null;
2138      }
2139      return new CKEDITOR.dom.element(a);
2140    },
2141    getById: function(a) {
2142      return (a = this.$.getElementById(a)) ? new CKEDITOR.dom.element(a) : null;
2143    },
2144    getByAddress: function(a, d) {
2145      for (var b = this.$.documentElement, c = 0; b && c < a.length; c++) {
2146        var f = a[c];
2147        if (d)
2148          for (var h = -1, k = 0; k < b.childNodes.length; k++) {
2149            var g = b.childNodes[k];
2150            if (
2151              !0 !== d ||
2152              3 != g.nodeType ||
2153              !g.previousSibling ||
2154              3 != g.previousSibling.nodeType
2155            )
2156              if ((h++, h == f)) {
2157                b = g;
2158                break;
2159              }
2160          }
2161        else b = b.childNodes[f];
2162      }
2163      return b ? new CKEDITOR.dom.node(b) : null;
2164    },
2165    getElementsByTag: function(a, d) {
2166      (CKEDITOR.env.ie && 8 >= document.documentMode) || !d || (a = d + ":" + a);
2167      return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a));
2168    },
2169    getHead: function() {
2170      var a = this.$.getElementsByTagName("head")[0];
2171      return (a = a
2172        ? new CKEDITOR.dom.element(a)
2173        : this.getDocumentElement().append(new CKEDITOR.dom.element("head"), !0));
2174    },
2175    getBody: function() {
2176      return new CKEDITOR.dom.element(this.$.body);
2177    },
2178    getDocumentElement: function() {
2179      return new CKEDITOR.dom.element(this.$.documentElement);
2180    },
2181    getWindow: function() {
2182      return new CKEDITOR.dom.window(this.$.parentWindow || this.$.defaultView);
2183    },
2184    write: function(a) {
2185      this.$.open("text/html", "replace");
2186      CKEDITOR.env.ie &&
2187        (a = a.replace(
2188          /(?:^\s*<!DOCTYPE[^>]*?>)|^/i,
2189          '$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e(' +
2190            CKEDITOR.tools.fixDomain +
2191            ")();\x3c/script\x3e",
2192        ));
2193      this.$.write(a);
2194      this.$.close();
2195    },
2196    find: function(a) {
2197      return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a));
2198    },
2199    findOne: function(a) {
2200      return (a = this.$.querySelector(a)) ? new CKEDITOR.dom.element(a) : null;
2201    },
2202    _getHtml5ShivFrag: function() {
2203      var a = this.getCustomData("html5ShivFrag");
2204      a ||
2205        ((a = this.$.createDocumentFragment()),
2206        CKEDITOR.tools.enableHtml5Elements(a, !0),
2207        this.setCustomData("html5ShivFrag", a));
2208      return a;
2209    },
2210  });
2211  CKEDITOR.dom.nodeList = function(a) {
2212    this.$ = a;
2213  };
2214  CKEDITOR.dom.nodeList.prototype = {
2215    count: function() {
2216      return this.$.length;
2217    },
2218    getItem: function(a) {
2219      return 0 > a || a >= this.$.length ? null : (a = this.$[a]) ? new CKEDITOR.dom.node(a) : null;
2220    },
2221    toArray: function() {
2222      return CKEDITOR.tools.array.map(this.$, function(a) {
2223        return new CKEDITOR.dom.node(a);
2224      });
2225    },
2226  };
2227  CKEDITOR.dom.element = function(a, d) {
2228    "string" == typeof a && (a = (d ? d.$ : document).createElement(a));
2229    CKEDITOR.dom.domObject.call(this, a);
2230  };
2231  CKEDITOR.dom.element.get = function(a) {
2232    return (
2233      (a =
2234        "string" == typeof a
2235          ? document.getElementById(a) || document.getElementsByName(a)[0]
2236          : a) && (a.$ ? a : new CKEDITOR.dom.element(a))
2237    );
2238  };
2239  CKEDITOR.dom.element.prototype = new CKEDITOR.dom.node();
2240  CKEDITOR.dom.element.createFromHtml = function(a, d) {
2241    var b = new CKEDITOR.dom.element("div", d);
2242    b.setHtml(a);
2243    return b.getFirst().remove();
2244  };
2245  CKEDITOR.dom.element.setMarker = function(a, d, b, c) {
2246    var f =
2247        d.getCustomData("list_marker_id") ||
2248        d
2249          .setCustomData("list_marker_id", CKEDITOR.tools.getNextNumber())
2250          .getCustomData("list_marker_id"),
2251      h =
2252        d.getCustomData("list_marker_names") ||
2253        d.setCustomData("list_marker_names", {}).getCustomData("list_marker_names");
2254    a[f] = d;
2255    h[b] = 1;
2256    return d.setCustomData(b, c);
2257  };
2258  CKEDITOR.dom.element.clearAllMarkers = function(a) {
2259    for (var d in a) CKEDITOR.dom.element.clearMarkers(a, a[d], 1);
2260  };
2261  CKEDITOR.dom.element.clearMarkers = function(a, d, b) {
2262    var c = d.getCustomData("list_marker_names"),
2263      f = d.getCustomData("list_marker_id"),
2264      h;
2265    for (h in c) d.removeCustomData(h);
2266    d.removeCustomData("list_marker_names");
2267    b && (d.removeCustomData("list_marker_id"), delete a[f]);
2268  };
2269  (function() {
2270    function a(a, b) {
2271      return -1 < (" " + a + " ").replace(h, " ").indexOf(" " + b + " ");
2272    }
2273    function d(a) {
2274      var b = !0;
2275      a.$.id || ((a.$.id = "cke_tmp_" + CKEDITOR.tools.getNextNumber()), (b = !1));
2276      return function() {
2277        b || a.removeAttribute("id");
2278      };
2279    }
2280    function b(a, b) {
2281      var c = CKEDITOR.tools.escapeCss(a.$.id);
2282      return "#" + c + " " + b.split(/,\s*/).join(", #" + c + " ");
2283    }
2284    function c(a) {
2285      for (var b = 0, c = 0, e = k[a].length; c < e; c++)
2286        b += parseFloat(this.getComputedStyle(k[a][c]) || 0, 10) || 0;
2287      return b;
2288    }
2289    var f = document.createElement("_").classList,
2290      f = "undefined" !== typeof f && null !== String(f.add).match(/\[Native code\]/gi),
2291      h = /[\n\t\r]/g;
2292    CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype, {
2293      type: CKEDITOR.NODE_ELEMENT,
2294      addClass: f
2295        ? function(a) {
2296            this.$.classList.add(a);
2297            return this;
2298          }
2299        : function(b) {
2300            var c = this.$.className;
2301            c && (a(c, b) || (c += " " + b));
2302            this.$.className = c || b;
2303            return this;
2304          },
2305      removeClass: f
2306        ? function(a) {
2307            var b = this.$;
2308            b.classList.remove(a);
2309            b.className || b.removeAttribute("class");
2310            return this;
2311          }
2312        : function(b) {
2313            var c = this.getAttribute("class");
2314            c &&
2315              a(c, b) &&
2316              ((c = c
2317                .replace(new RegExp("(?:^|\\s+)" + b + "(?\x3d\\s|$)"), "")
2318                .replace(/^\s+/, ""))
2319                ? this.setAttribute("class", c)
2320                : this.removeAttribute("class"));
2321            return this;
2322          },
2323      hasClass: function(b) {
2324        return a(this.$.className, b);
2325      },
2326      append: function(a, b) {
2327        "string" == typeof a && (a = this.getDocument().createElement(a));
2328        b ? this.$.insertBefore(a.$, this.$.firstChild) : this.$.appendChild(a.$);
2329        return a;
2330      },
2331      appendHtml: function(a) {
2332        if (this.$.childNodes.length) {
2333          var b = new CKEDITOR.dom.element("div", this.getDocument());
2334          b.setHtml(a);
2335          b.moveChildren(this);
2336        } else this.setHtml(a);
2337      },
2338      appendText: function(a) {
2339        null != this.$.text && CKEDITOR.env.ie && 9 > CKEDITOR.env.version
2340          ? (this.$.text += a)
2341          : this.append(new CKEDITOR.dom.text(a));
2342      },
2343      appendBogus: function(a) {
2344        if (a || CKEDITOR.env.needsBrFiller) {
2345          for (
2346            a = this.getLast();
2347            a && a.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.rtrim(a.getText());
2348
2349          )
2350            a = a.getPrevious();
2351          (a && a.is && a.is("br")) ||
2352            ((a = this.getDocument().createElement("br")),
2353            CKEDITOR.env.gecko && a.setAttribute("type", "_moz"),
2354            this.append(a));
2355        }
2356      },
2357      breakParent: function(a, b) {
2358        var c = new CKEDITOR.dom.range(this.getDocument());
2359        c.setStartAfter(this);
2360        c.setEndAfter(a);
2361        var e = c.extractContents(!1, b || !1),
2362          d;
2363        c.insertNode(this.remove());
2364        if (CKEDITOR.env.ie && !CKEDITOR.env.edge) {
2365          for (c = new CKEDITOR.dom.element("div"); (d = e.getFirst()); )
2366            d.$.style.backgroundColor && (d.$.style.backgroundColor = d.$.style.backgroundColor),
2367              c.append(d);
2368          c.insertAfter(this);
2369          c.remove(!0);
2370        } else e.insertAfterNode(this);
2371      },
2372      contains: document.compareDocumentPosition
2373        ? function(a) {
2374            return !!(this.$.compareDocumentPosition(a.$) & 16);
2375          }
2376        : function(a) {
2377            var b = this.$;
2378            return a.type != CKEDITOR.NODE_ELEMENT
2379              ? b.contains(a.getParent().$)
2380              : b != a.$ && b.contains(a.$);
2381          },
2382      focus: (function() {
2383        function a() {
2384          try {
2385            this.$.focus();
2386          } catch (b) {}
2387        }
2388        return function(b) {
2389          b ? CKEDITOR.tools.setTimeout(a, 100, this) : a.call(this);
2390        };
2391      })(),
2392      getHtml: function() {
2393        var a = this.$.innerHTML;
2394        return CKEDITOR.env.ie ? a.replace(/<\?[^>]*>/g, "") : a;
2395      },
2396      getOuterHtml: function() {
2397        if (this.$.outerHTML) return this.$.outerHTML.replace(/<\?[^>]*>/, "");
2398        var a = this.$.ownerDocument.createElement("div");
2399        a.appendChild(this.$.cloneNode(!0));
2400        return a.innerHTML;
2401      },
2402      getClientRect: function() {
2403        var a = CKEDITOR.tools.extend({}, this.$.getBoundingClientRect());
2404        !a.width && (a.width = a.right - a.left);
2405        !a.height && (a.height = a.bottom - a.top);
2406        return a;
2407      },
2408      setHtml:
2409        CKEDITOR.env.ie && 9 > CKEDITOR.env.version
2410          ? function(a) {
2411              try {
2412                var b = this.$;
2413                if (this.getParent()) return (b.innerHTML = a);
2414                var c = this.getDocument()._getHtml5ShivFrag();
2415                c.appendChild(b);
2416                b.innerHTML = a;
2417                c.removeChild(b);
2418                return a;
2419              } catch (e) {
2420                this.$.innerHTML = "";
2421                b = new CKEDITOR.dom.element("body", this.getDocument());
2422                b.$.innerHTML = a;
2423                for (b = b.getChildren(); b.count(); ) this.append(b.getItem(0));
2424                return a;
2425              }
2426            }
2427          : function(a) {
2428              return (this.$.innerHTML = a);
2429            },
2430      setText: (function() {
2431        var a = document.createElement("p");
2432        a.innerHTML = "x";
2433        a = a.textContent;
2434        return function(b) {
2435          this.$[a ? "textContent" : "innerText"] = b;
2436        };
2437      })(),
2438      getAttribute: (function() {
2439        var a = function(a) {
2440          return this.$.getAttribute(a, 2);
2441        };
2442        return CKEDITOR.env.ie && (CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks)
2443          ? function(a) {
2444              switch (a) {
2445                case "class":
2446                  a = "className";
2447                  break;
2448                case "http-equiv":
2449                  a = "httpEquiv";
2450                  break;
2451                case "name":
2452                  return this.$.name;
2453                case "tabindex":
2454                  return (
2455                    (a = this.$.getAttribute(a, 2)),
2456                    0 !== a && 0 === this.$.tabIndex && (a = null),
2457                    a
2458                  );
2459                case "checked":
2460                  return (
2461                    (a = this.$.attributes.getNamedItem(a)),
2462                    (a.specified ? a.nodeValue : this.$.checked) ? "checked" : null
2463                  );
2464                case "hspace":
2465                case "value":
2466                  return this.$[a];
2467                case "style":
2468                  return this.$.style.cssText;
2469                case "contenteditable":
2470                case "contentEditable":
2471                  return this.$.attributes.getNamedItem("contentEditable").specified
2472                    ? this.$.getAttribute("contentEditable")
2473                    : null;
2474              }
2475              return this.$.getAttribute(a, 2);
2476            }
2477          : a;
2478      })(),
2479      getAttributes: function(a) {
2480        var b = {},
2481          c = this.$.attributes,
2482          e;
2483        a = CKEDITOR.tools.isArray(a) ? a : [];
2484        for (e = 0; e < c.length; e++)
2485          -1 === CKEDITOR.tools.indexOf(a, c[e].name) && (b[c[e].name] = c[e].value);
2486        return b;
2487      },
2488      getChildren: function() {
2489        return new CKEDITOR.dom.nodeList(this.$.childNodes);
2490      },
2491      getComputedStyle:
2492        document.defaultView && document.defaultView.getComputedStyle
2493          ? function(a) {
2494              var b = this.getWindow().$.getComputedStyle(this.$, null);
2495              return b ? b.getPropertyValue(a) : "";
2496            }
2497          : function(a) {
2498              return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(a)];
2499            },
2500      getDtd: function() {
2501        var a = CKEDITOR.dtd[this.getName()];
2502        this.getDtd = function() {
2503          return a;
2504        };
2505        return a;
2506      },
2507      getElementsByTag: CKEDITOR.dom.document.prototype.getElementsByTag,
2508      getTabIndex: function() {
2509        var a = this.$.tabIndex;
2510        return 0 !== a ||
2511          CKEDITOR.dtd.$tabIndex[this.getName()] ||
2512          0 === parseInt(this.getAttribute("tabindex"), 10)
2513          ? a
2514          : -1;
2515      },
2516      getText: function() {
2517        return this.$.textContent || this.$.innerText || "";
2518      },
2519      getWindow: function() {
2520        return this.getDocument().getWindow();
2521      },
2522      getId: function() {
2523        return this.$.id || null;
2524      },
2525      getNameAtt: function() {
2526        return this.$.name || null;
2527      },
2528      getName: function() {
2529        var a = this.$.nodeName.toLowerCase();
2530        if (CKEDITOR.env.ie && 8 >= document.documentMode) {
2531          var b = this.$.scopeName;
2532          "HTML" != b && (a = b.toLowerCase() + ":" + a);
2533        }
2534        this.getName = function() {
2535          return a;
2536        };
2537        return this.getName();
2538      },
2539      getValue: function() {
2540        return this.$.value;
2541      },
2542      getFirst: function(a) {
2543        var b = this.$.firstChild;
2544        (b = b && new CKEDITOR.dom.node(b)) && a && !a(b) && (b = b.getNext(a));
2545        return b;
2546      },
2547      getLast: function(a) {
2548        var b = this.$.lastChild;
2549        (b = b && new CKEDITOR.dom.node(b)) && a && !a(b) && (b = b.getPrevious(a));
2550        return b;
2551      },
2552      getStyle: function(a) {
2553        return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)];
2554      },
2555      is: function() {
2556        var a = this.getName();
2557        if ("object" == typeof arguments[0]) return !!arguments[0][a];
2558        for (var b = 0; b < arguments.length; b++) if (arguments[b] == a) return !0;
2559        return !1;
2560      },
2561      isEditable: function(a) {
2562        var b = this.getName();
2563        return this.isReadOnly() ||
2564          "none" == this.getComputedStyle("display") ||
2565          "hidden" == this.getComputedStyle("visibility") ||
2566          CKEDITOR.dtd.$nonEditable[b] ||
2567          CKEDITOR.dtd.$empty[b] ||
2568          (this.is("a") &&
2569            (this.data("cke-saved-name") || this.hasAttribute("name")) &&
2570            !this.getChildCount())
2571          ? !1
2572          : !1 !== a ? ((a = CKEDITOR.dtd[b] || CKEDITOR.dtd.span), !(!a || !a["#"])) : !0;
2573      },
2574      isIdentical: function(a) {
2575        var b = this.clone(0, 1);
2576        a = a.clone(0, 1);
2577        b.removeAttributes([
2578          "_moz_dirty",
2579          "data-cke-expando",
2580          "data-cke-saved-href",
2581          "data-cke-saved-name",
2582        ]);
2583        a.removeAttributes([
2584          "_moz_dirty",
2585          "data-cke-expando",
2586          "data-cke-saved-href",
2587          "data-cke-saved-name",
2588        ]);
2589        if (b.$.isEqualNode)
2590          return (
2591            (b.$.style.cssText = CKEDITOR.tools.normalizeCssText(b.$.style.cssText)),
2592            (a.$.style.cssText = CKEDITOR.tools.normalizeCssText(a.$.style.cssText)),
2593            b.$.isEqualNode(a.$)
2594          );
2595        b = b.getOuterHtml();
2596        a = a.getOuterHtml();
2597        if (CKEDITOR.env.ie && 9 > CKEDITOR.env.version && this.is("a")) {
2598          var c = this.getParent();
2599          c.type == CKEDITOR.NODE_ELEMENT &&
2600            ((c = c.clone()), c.setHtml(b), (b = c.getHtml()), c.setHtml(a), (a = c.getHtml()));
2601        }
2602        return b == a;
2603      },
2604      isVisible: function() {
2605        var a =
2606            (this.$.offsetHeight || this.$.offsetWidth) &&
2607            "hidden" != this.getComputedStyle("visibility"),
2608          b,
2609          c;
2610        a &&
2611          CKEDITOR.env.webkit &&
2612          ((b = this.getWindow()),
2613          !b.equals(CKEDITOR.document.getWindow()) &&
2614            (c = b.$.frameElement) &&
2615            (a = new CKEDITOR.dom.element(c).isVisible()));
2616        return !!a;
2617      },
2618      isEmptyInlineRemoveable: function() {
2619        if (!CKEDITOR.dtd.$removeEmpty[this.getName()]) return !1;
2620        for (var a = this.getChildren(), b = 0, c = a.count(); b < c; b++) {
2621          var e = a.getItem(b);
2622          if (e.type != CKEDITOR.NODE_ELEMENT || !e.data("cke-bookmark"))
2623            if (
2624              (e.type == CKEDITOR.NODE_ELEMENT && !e.isEmptyInlineRemoveable()) ||
2625              (e.type == CKEDITOR.NODE_TEXT && CKEDITOR.tools.trim(e.getText()))
2626            )
2627              return !1;
2628        }
2629        return !0;
2630      },
2631      hasAttributes:
2632        CKEDITOR.env.ie && (CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks)
2633          ? function() {
2634              for (var a = this.$.attributes, b = 0; b < a.length; b++) {
2635                var c = a[b];
2636                switch (c.nodeName) {
2637                  case "class":
2638                    if (this.getAttribute("class")) return !0;
2639                  case "data-cke-expando":
2640                    continue;
2641                  default:
2642                    if (c.specified) return !0;
2643                }
2644              }
2645              return !1;
2646            }
2647          : function() {
2648              var a = this.$.attributes,
2649                b = a.length,
2650                c = { "data-cke-expando": 1, _moz_dirty: 1 };
2651              return 0 < b && (2 < b || !c[a[0].nodeName] || (2 == b && !c[a[1].nodeName]));
2652            },
2653      hasAttribute: (function() {
2654        function a(b) {
2655          var c = this.$.attributes.getNamedItem(b);
2656          if ("input" == this.getName())
2657            switch (b) {
2658              case "class":
2659                return 0 < this.$.className.length;
2660              case "checked":
2661                return !!this.$.checked;
2662              case "value":
2663                return (
2664                  (b = this.getAttribute("type")),
2665                  "checkbox" == b || "radio" == b ? "on" != this.$.value : !!this.$.value
2666                );
2667            }
2668          return c ? c.specified : !1;
2669        }
2670        return CKEDITOR.env.ie
2671          ? 8 > CKEDITOR.env.version
2672            ? function(b) {
2673                return "name" == b ? !!this.$.name : a.call(this, b);
2674              }
2675            : a
2676          : function(a) {
2677              return !!this.$.attributes.getNamedItem(a);
2678            };
2679      })(),
2680      hide: function() {
2681        this.setStyle("display", "none");
2682      },
2683      moveChildren: function(a, b) {
2684        var c = this.$;
2685        a = a.$;
2686        if (c != a) {
2687          var e;
2688          if (b) for (; (e = c.lastChild); ) a.insertBefore(c.removeChild(e), a.firstChild);
2689          else for (; (e = c.firstChild); ) a.appendChild(c.removeChild(e));
2690        }
2691      },
2692      mergeSiblings: (function() {
2693        function a(b, c, e) {
2694          if (c && c.type == CKEDITOR.NODE_ELEMENT) {
2695            for (var d = []; c.data("cke-bookmark") || c.isEmptyInlineRemoveable(); )
2696              if (
2697                (d.push(c),
2698                (c = e ? c.getNext() : c.getPrevious()),
2699                !c || c.type != CKEDITOR.NODE_ELEMENT)
2700              )
2701                return;
2702            if (b.isIdentical(c)) {
2703              for (var g = e ? b.getLast() : b.getFirst(); d.length; ) d.shift().move(b, !e);
2704              c.moveChildren(b, !e);
2705              c.remove();
2706              g && g.type == CKEDITOR.NODE_ELEMENT && g.mergeSiblings();
2707            }
2708          }
2709        }
2710        return function(b) {
2711          if (!1 === b || CKEDITOR.dtd.$removeEmpty[this.getName()] || this.is("a"))
2712            a(this, this.getNext(), !0), a(this, this.getPrevious());
2713        };
2714      })(),
2715      show: function() {
2716        this.setStyles({
2717          display: "",
2718          visibility: "",
2719        });
2720      },
2721      setAttribute: (function() {
2722        var a = function(a, b) {
2723          this.$.setAttribute(a, b);
2724          return this;
2725        };
2726        return CKEDITOR.env.ie && (CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks)
2727          ? function(b, c) {
2728              "class" == b
2729                ? (this.$.className = c)
2730                : "style" == b
2731                  ? (this.$.style.cssText = c)
2732                  : "tabindex" == b
2733                    ? (this.$.tabIndex = c)
2734                    : "checked" == b
2735                      ? (this.$.checked = c)
2736                      : "contenteditable" == b
2737                        ? a.call(this, "contentEditable", c)
2738                        : a.apply(this, arguments);
2739              return this;
2740            }
2741          : CKEDITOR.env.ie8Compat && CKEDITOR.env.secure
2742            ? function(b, c) {
2743                if ("src" == b && c.match(/^http:\/\//))
2744                  try {
2745                    a.apply(this, arguments);
2746                  } catch (e) {}
2747                else a.apply(this, arguments);
2748                return this;
2749              }
2750            : a;
2751      })(),
2752      setAttributes: function(a) {
2753        for (var b in a) this.setAttribute(b, a[b]);
2754        return this;
2755      },
2756      setValue: function(a) {
2757        this.$.value = a;
2758        return this;
2759      },
2760      removeAttribute: (function() {
2761        var a = function(a) {
2762          this.$.removeAttribute(a);
2763        };
2764        return CKEDITOR.env.ie && (CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks)
2765          ? function(a) {
2766              "class" == a
2767                ? (a = "className")
2768                : "tabindex" == a
2769                  ? (a = "tabIndex")
2770                  : "contenteditable" == a && (a = "contentEditable");
2771              this.$.removeAttribute(a);
2772            }
2773          : a;
2774      })(),
2775      removeAttributes: function(a) {
2776        if (CKEDITOR.tools.isArray(a))
2777          for (var b = 0; b < a.length; b++) this.removeAttribute(a[b]);
2778        else
2779          for (b in ((a = a || this.getAttributes()), a))
2780            a.hasOwnProperty(b) && this.removeAttribute(b);
2781      },
2782      removeStyle: function(a) {
2783        var b = this.$.style;
2784        if (b.removeProperty || ("border" != a && "margin" != a && "padding" != a))
2785          b.removeProperty
2786            ? b.removeProperty(a)
2787            : b.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a)),
2788            this.$.style.cssText || this.removeAttribute("style");
2789        else {
2790          var c = ["top", "left", "right", "bottom"],
2791            e;
2792          "border" == a && (e = ["color", "style", "width"]);
2793          for (var b = [], d = 0; d < c.length; d++)
2794            if (e) for (var x = 0; x < e.length; x++) b.push([a, c[d], e[x]].join("-"));
2795            else b.push([a, c[d]].join("-"));
2796          for (a = 0; a < b.length; a++) this.removeStyle(b[a]);
2797        }
2798      },
2799      setStyle: function(a, b) {
2800        this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)] = b;
2801        return this;
2802      },
2803      setStyles: function(a) {
2804        for (var b in a) this.setStyle(b, a[b]);
2805        return this;
2806      },
2807      setOpacity: function(a) {
2808        CKEDITOR.env.ie && 9 > CKEDITOR.env.version
2809          ? ((a = Math.round(100 * a)),
2810            this.setStyle(
2811              "filter",
2812              100 <= a ? "" : "progid:DXImageTransform.Microsoft.Alpha(opacity\x3d" + a + ")",
2813            ))
2814          : this.setStyle("opacity", a);
2815      },
2816      unselectable: function() {
2817        this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select", "none"));
2818        if (CKEDITOR.env.ie) {
2819          this.setAttribute("unselectable", "on");
2820          for (var a, b = this.getElementsByTag("*"), c = 0, e = b.count(); c < e; c++)
2821            (a = b.getItem(c)), a.setAttribute("unselectable", "on");
2822        }
2823      },
2824      getPositionedAncestor: function() {
2825        for (var a = this; "html" != a.getName(); ) {
2826          if ("static" != a.getComputedStyle("position")) return a;
2827          a = a.getParent();
2828        }
2829        return null;
2830      },
2831      getDocumentPosition: function(a) {
2832        var b = 0,
2833          c = 0,
2834          e = this.getDocument(),
2835          d = e.getBody(),
2836          x = "BackCompat" == e.$.compatMode;
2837        if (
2838          document.documentElement.getBoundingClientRect &&
2839          (CKEDITOR.env.ie ? 8 !== CKEDITOR.env.version : 1)
2840        ) {
2841          var f = this.$.getBoundingClientRect(),
2842            h = e.$.documentElement,
2843            w = h.clientTop || d.$.clientTop || 0,
2844            p = h.clientLeft || d.$.clientLeft || 0,
2845            k = !0;
2846          CKEDITOR.env.ie &&
2847            ((k = e.getDocumentElement().contains(this)),
2848            (e = e.getBody().contains(this)),
2849            (k = (x && e) || (!x && k)));
2850          k &&
2851            (CKEDITOR.env.webkit || (CKEDITOR.env.ie && 12 <= CKEDITOR.env.version)
2852              ? ((b = d.$.scrollLeft || h.scrollLeft), (c = d.$.scrollTop || h.scrollTop))
2853              : ((c = x ? d.$ : h), (b = c.scrollLeft), (c = c.scrollTop)),
2854            (b = f.left + b - p),
2855            (c = f.top + c - w));
2856        } else
2857          for (w = this, p = null; w && "body" != w.getName() && "html" != w.getName(); ) {
2858            b += w.$.offsetLeft - w.$.scrollLeft;
2859            c += w.$.offsetTop - w.$.scrollTop;
2860            w.equals(this) || ((b += w.$.clientLeft || 0), (c += w.$.clientTop || 0));
2861            for (; p && !p.equals(w); )
2862              (b -= p.$.scrollLeft), (c -= p.$.scrollTop), (p = p.getParent());
2863            p = w;
2864            w = (f = w.$.offsetParent) ? new CKEDITOR.dom.element(f) : null;
2865          }
2866        a &&
2867          ((f = this.getWindow()),
2868          (w = a.getWindow()),
2869          !f.equals(w) &&
2870            f.$.frameElement &&
2871            ((a = new CKEDITOR.dom.element(f.$.frameElement).getDocumentPosition(a)),
2872            (b += a.x),
2873            (c += a.y)));
2874        document.documentElement.getBoundingClientRect ||
2875          !CKEDITOR.env.gecko ||
2876          x ||
2877          ((b += this.$.clientLeft ? 1 : 0), (c += this.$.clientTop ? 1 : 0));
2878        return { x: b, y: c };
2879      },
2880      scrollIntoView: function(a) {
2881        var b = this.getParent();
2882        if (b) {
2883          do
2884            if (
2885              (((b.$.clientWidth && b.$.clientWidth < b.$.scrollWidth) ||
2886                (b.$.clientHeight && b.$.clientHeight < b.$.scrollHeight)) &&
2887                !b.is("body") &&
2888                this.scrollIntoParent(b, a, 1),
2889              b.is("html"))
2890            ) {
2891              var c = b.getWindow();
2892              try {
2893                var e = c.$.frameElement;
2894                e && (b = new CKEDITOR.dom.element(e));
2895              } catch (d) {}
2896            }
2897          while ((b = b.getParent()));
2898        }
2899      },
2900      scrollIntoParent: function(a, b, c) {
2901        var e, d, x, f;
2902        function h(b, c) {
2903          /body|html/.test(a.getName())
2904            ? a.getWindow().$.scrollBy(b, c)
2905            : ((a.$.scrollLeft += b), (a.$.scrollTop += c));
2906        }
2907        function w(a, b) {
2908          var c = { x: 0, y: 0 };
2909          if (!a
2909.is(k ? "body" : "html")) {
2910            var e = a.$.getBoundingClientRect();
2911            c.x = e.left;
2912            c.y = e.top;
2913          }
2914          e = a.getWindow();
2915          e.equals(b) ||
2916            ((e = w(CKEDITOR.dom.element.get(e.$.frameElement), b)), (c.x += e.x), (c.y += e.y));
2917          return c;
2918        }
2919        function p(a, b) {
2920          return parseInt(a.getComputedStyle("margin-" + b) || 0, 10) || 0;
2921        }
2922        !a && (a = this.getWindow());
2923        x = a.getDocument();
2924        var k = "BackCompat" == x.$.compatMode;
2925        a instanceof CKEDITOR.dom.window && (a = k ? x.getBody() : x.getDocumentElement());
2926        CKEDITOR.env.webkit && (x = this.getEditor(!1)) && (x._.previousScrollTop = null);
2927        x = a.getWindow();
2928        d = w(this, x);
2929        var u = w(a, x),
2930          K = this.$.offsetHeight;
2931        e = this.$.offsetWidth;
2932        var l = a.$.clientHeight,
2933          q = a.$.clientWidth;
2934        x = d.x - p(this, "left") - u.x || 0;
2935        f = d.y - p(this, "top") - u.y || 0;
2936        e = d.x + e + p(this, "right") - (u.x + q) || 0;
2937        d = d.y + K + p(this, "bottom") - (u.y + l) || 0;
2938        (0 > f || 0 < d) && h(0, !0 === b ? f : !1 === b ? d : 0 > f ? f : d);
2939        c && (0 > x || 0 < e) && h(0 > x ? x : e, 0);
2940      },
2941      setState: function(a, b, c) {
2942        b = b || "cke";
2943        switch (a) {
2944          case CKEDITOR.TRISTATE_ON:
2945            this.addClass(b + "_on");
2946            this.removeClass(b + "_off");
2947            this.removeClass(b + "_disabled");
2948            c && this.setAttribute("aria-pressed", !0);
2949            c && this.removeAttribute("aria-disabled");
2950            break;
2951          case CKEDITOR.TRISTATE_DISABLED:
2952            this.addClass(b + "_disabled");
2953            this.removeClass(b + "_off");
2954            this.removeClass(b + "_on");
2955            c && this.setAttribute("aria-disabled", !0);
2956            c && this.removeAttribute("aria-pressed");
2957            break;
2958          default:
2959            this.addClass(b + "_off"),
2960              this.removeClass(b + "_on"),
2961              this.removeClass(b + "_disabled"),
2962              c && this.removeAttribute("aria-pressed"),
2963              c && this.removeAttribute("aria-disabled");
2964        }
2965      },
2966      getFrameDocument: function() {
2967        var a = this.$;
2968        try {
2969          a.contentWindow.document;
2970        } catch (b) {
2971          a.src = a.src;
2972        }
2973        return a && new CKEDITOR.dom.document(a.contentWindow.document);
2974      },
2975      copyAttributes: function(a, b) {
2976        var c = this.$.attributes;
2977        b = b || {};
2978        for (var e = 0; e < c.length; e++) {
2979          var d = c[e],
2980            x = d.nodeName.toLowerCase(),
2981            f;
2982          if (!(x in b))
2983            if ("checked" == x && (f = this.getAttribute(x))) a.setAttribute(x, f);
2984            else if (!CKEDITOR.env.ie || this.hasAttribute(x))
2985              (f = this.getAttribute(x)), null === f && (f = d.nodeValue), a.setAttribute(x, f);
2986        }
2987        "" !== this.$.style.cssText && (a.$.style.cssText = this.$.style.cssText);
2988      },
2989      renameNode: function(a) {
2990        if (this.getName() != a) {
2991          var b = this.getDocument();
2992          a = new CKEDITOR.dom.element(a, b);
2993          this.copyAttributes(a);
2994          this.moveChildren(a);
2995          this.getParent(!0) && this.$.parentNode.replaceChild(a.$, this.$);
2996          a.$["data-cke-expando"] = this.$["data-cke-expando"];
2997          this.$ = a.$;
2998          delete this.getName;
2999        }
3000      },
3001      getChild: (function() {
3002        function a(b, c) {
3003          var e = b.childNodes;
3004          if (0 <= c && c < e.length) return e[c];
3005        }
3006        return function(b) {
3007          var c = this.$;
3008          if (b.slice) for (b = b.slice(); 0 < b.length && c; ) c = a(c, b.shift());
3009          else c = a(c, b);
3010          return c ? new CKEDITOR.dom.node(c) : null;
3011        };
3012      })(),
3013      getChildCount: function() {
3014        return this.$.childNodes.length;
3015      },
3016      disableContextMenu: function() {
3017        function a(b) {
3018          return b.type == CKEDITOR.NODE_ELEMENT && b.hasClass("cke_enable_context_menu");
3019        }
3020        this.on("contextmenu", function(b) {
3021          b.data.getTarget().getAscendant(a, !0) || b.data.preventDefault();
3022        });
3023      },
3024      getDirection: function(a) {
3025        return a
3026          ? this.getComputedStyle("direction") ||
3027              this.getDirection() ||
3028              (this.getParent() && this.getParent().getDirection(1)) ||
3029              this.getDocument().$.dir ||
3030              "ltr"
3031          : this.getStyle("direction") || this.getAttribute("dir");
3032      },
3033      data: function(a, b) {
3034        a = "data-" + a;
3035        if (void 0 === b) return this.getAttribute(a);
3036        !1 === b ? this.removeAttribute(a) : this.setAttribute(a, b);
3037        return null;
3038      },
3039      getEditor: function(a) {
3040        var b = CKEDITOR.instances,
3041          c,
3042          e,
3043          d;
3044        a = a || void 0 === a;
3045        for (c in b)
3046          if (
3047            ((e = b[c]),
3048            (e.element.equals(this) && e.elementMode != CKEDITOR.ELEMENT_MODE_APPENDTO) ||
3049              (!a && (d = e.editable()) && (d.equals(this) || d.contains(this))))
3050          )
3051            return e;
3052        return null;
3053      },
3054      find: function(a) {
3055        var c = d(this);
3056        a = new CKEDITOR.dom.nodeList(this.$.querySelectorAll(b(this, a)));
3057        c();
3058        return a;
3059      },
3060      findOne: function(a) {
3061        var c = d(this);
3062        a = this.$.querySelector(b(this, a));
3063        c();
3064        return a ? new CKEDITOR.dom.element(a) : null;
3065      },
3066      forEach: function(a, b, c) {
3067        if (!(c || (b && this.type != b))) var e = a(this);
3068        if (!1 !== e) {
3069          c = this.getChildren();
3070          for (var d = 0; d < c.count(); d++)
3071            (e = c.getItem(d)),
3072              e.type == CKEDITOR.NODE_ELEMENT ? e.forEach(a, b) : (b && e.type != b) || a(e);
3073        }
3074      },
3075    });
3076    var k = {
3077      width: ["border-left-width", "border-right-width", "padding-left", "padding-right"],
3078      height: ["border-top-width", "border-bottom-width", "padding-top", "padding-bottom"],
3079    };
3080    CKEDITOR.dom.element.prototype.setSize = function(a, b, d) {
3081      "number" == typeof b &&
3082        (!d || (CKEDITOR.env.ie && CKEDITOR.env.quirks) || (b -= c.call(this, a)),
3083        this.setStyle(a, b + "px"));
3084    };
3085    CKEDITOR.dom.element.prototype.getSize = function(a, b) {
3086      var d =
3087        Math.max(
3088          this.$["offset" + CKEDITOR.tools.capitalize(a)],
3089          this.$["client" + CKEDITOR.tools.capitalize(a)],
3090        ) || 0;
3091      b && (d -= c.call(this, a));
3092      return d;
3093    };
3094  })();
3095  CKEDITOR.dom.documentFragment = function(a) {
3096    a = a || CKEDITOR.document;
3097    this.$ = a.type == CKEDITOR.NODE_DOCUMENT ? a.$.createDocumentFragment() : a;
3098  };
3099  CKEDITOR.tools.extend(
3100    CKEDITOR.dom.documentFragment.prototype,
3101    CKEDITOR.dom.element.prototype,
3102    {
3103      type: CKEDITOR.NODE_DOCUMENT_FRAGMENT,
3104      insertAfterNode: function(a) {
3105        a = a.$;
3106        a.parentNode.insertBefore(this.$, a.nextSibling);
3107      },
3108      getHtml: function() {
3109        var a = new CKEDITOR.dom.element("div");
3110        this.clone(1, 1).appendTo(a);
3111        return a.getHtml().replace(/\s*data-cke-expando=".*?"/g, "");
3112      },
3113    },
3114    !0,
3115    {
3116      append: 1,
3117      appendBogus: 1,
3118      clone: 1,
3119      getFirst: 1,
3120      getHtml: 1,
3121      getLast: 1,
3122      getParent: 1,
3123      getNext: 1,
3124      getPrevious: 1,
3125      appendTo: 1,
3126      moveChildren: 1,
3127      insertBefore: 1,
3128      insertAfterNode: 1,
3129      replace: 1,
3130      trim: 1,
3131      type: 1,
3132      ltrim: 1,
3133      rtrim: 1,
3134      getDocument: 1,
3135      getChildCount: 1,
3136      getChild: 1,
3137      getChildren: 1,
3138    },
3139  );
3140  (function() {
3141    function a(a, b) {
3142      var c = this.range;
3143      if (this._.end) return null;
3144      if (!this._.start) {
3145        this._.start = 1;
3146        if (c.collapsed) return this.end(), null;
3147        c.optimize();
3148      }
3149      var e,
3150        d = c.startContainer;
3151      e = c.endContainer;
3152      var f = c.startOffset,
3153        y = c.endOffset,
3154        h,
3155        l = this.guard,
3156        q = this.type,
3157        F = a ? "getPreviousSourceNode" : "getNextSourceNode";
3158      if (!a && !this._.guardLTR) {
3159        var g = e.type == CKEDITOR.NODE_ELEMENT ? e : e.getParent(),
3160          k = e.type == CKEDITOR.NODE_ELEMENT ? e.getChild(y) : e.getNext();
3161        this._.guardLTR = function(a, b) {
3162          return (
3163            (!b || !g.equals(a)) &&
3164            (!k || !a.equals(k)) &&
3165            (a.type != CKEDITOR.NODE_ELEMENT || !b || !a.equals(c.root))
3166          );
3167        };
3168      }
3169      if (a && !this._.guardRTL) {
3170        var M = d.type == CKEDITOR.NODE_ELEMENT ? d : d.getParent(),
3171          t = d.type == CKEDITOR.NODE_ELEMENT ? (f ? d.getChild(f - 1) : null) : d.getPrevious();
3172        this._.guardRTL = function(a, b) {
3173          return (
3174            (!b || !M.equals(a)) &&
3175            (!t || !a.equals(t)) &&
3176            (a.type != CKEDITOR.NODE_ELEMENT || !b || !a.equals(c.root))
3177          );
3178        };
3179      }
3180      var C = a ? this._.guardRTL : this._.guardLTR;
3181      h = l
3182        ? function(a, b) {
3183            return !1 === C(a, b) ? !1 : l(a, b);
3184          }
3185        : C;
3186      this.current
3187        ? (e = this.current[F](!1, q, h))
3188        : (a
3189            ? e.type == CKEDITOR.NODE_ELEMENT &&
3190              (e =
3191                0 < y
3192                  ? e.getChild(y - 1)
3193                  : !1 === h(e, !0) ? null : e.getPreviousSourceNode(!0, q, h))
3194            : ((e = d),
3195              e.type == CKEDITOR.NODE_ELEMENT &&
3196                ((e = e.getChild(f)) ||
3197                  (e = !1 === h(d, !0) ? null : d.getNextSourceNode(!0, q, h)))),
3198          e && !1 === h(e) && (e = null));
3199      for (; e && !this._.end; ) {
3200        this.current = e;
3201        if (!this.evaluator || !1 !== this.evaluator(e)) {
3202          if (!b) return e;
3203        } else if (b && this.evaluator) return !1;
3204        e = e[F](!1, q, h);
3205      }
3206      this.end();
3207      return (this.current = null);
3208    }
3209    function d(b) {
3210      for (var c, e = null; (c = a.call(this, b)); ) e = c;
3211      return e;
3212    }
3213    CKEDITOR.dom.walker = CKEDITOR.tools.createClass({
3214      $: function(a) {
3215        this.range = a;
3216        this._ = {};
3217      },
3218      proto: {
3219        end: function() {
3220          this._.end = 1;
3221        },
3222        next: function() {
3223          return a.call(this);
3224        },
3225        previous: function() {
3226          return a.call(this, 1);
3227        },
3228        checkForward: function() {
3229          return !1 !== a.call(this, 0, 1);
3230        },
3231        checkBackward: function() {
3232          return !1 !== a.call(this, 1, 1);
3233        },
3234        lastForward: function() {
3235          return d.call(this);
3236        },
3237        lastBackward: function() {
3238          return d.call(this, 1);
3239        },
3240        reset: function() {
3241          delete this.current;
3242          this._ = {};
3243        },
3244      },
3245    });
3246    var b = {
3247        block: 1,
3248        "list-item": 1,
3249        table: 1,
3250        "table-row-group": 1,
3251        "table-header-group": 1,
3252        "table-footer-group": 1,
3253        "table-row": 1,
3254        "table-column-group": 1,
3255        "table-column": 1,
3256        "table-cell": 1,
3257        "table-caption": 1,
3258      },
3259      c = { absolute: 1, fixed: 1 };
3260    CKEDITOR.dom.element.prototype.isBlockBoundary = function(a) {
3261      return "none" != this.getComputedStyle("float") ||
3262        this.getComputedStyle("position") in c ||
3263        !b[this.getComputedStyle("display")]
3264        ? !!(this.is(CKEDITOR.dtd.$block) || (a && this.is(a)))
3265        : !0;
3266    };
3267    CKEDITOR.dom.walker.blockBoundary = function(a) {
3268      return function(b) {
3269        return !(b.type == CKEDITOR.NODE_ELEMENT && b.isBlockBoundary(a));
3270      };
3271    };
3272    CKEDITOR.dom.walker.listItemBoundary = function() {
3273      return this.blockBoundary({ br: 1 });
3274    };
3275    CKEDITOR.dom.walker.bookmark = function(a, b) {
3276      function c(a) {
3277        return a && a.getName && "span" == a.getName() && a.data("cke-bookmark");
3278      }
3279      return function(e) {
3280        var d, f;
3281        d = e && e.type != CKEDITOR.NODE_ELEMENT && (f = e.getParent()) && c(f);
3282        d = a ? d : d || c(e);
3283        return !!(b ^ d);
3284      };
3285    };
3286    CKEDITOR.dom.walker.whitespaces = function(a) {
3287      return function(b) {
3288        var c;
3289        b &&
3290          b.type == CKEDITOR.NODE_TEXT &&
3291          (c =
3292            !CKEDITOR.tools.trim(b.getText()) ||
3293            (CKEDITOR.env.webkit && b.getText() == CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE));
3294        return !!(a ^ c);
3295      };
3296    };
3297    CKEDITOR.dom.walker.invisible = function(a) {
3298      var b = CKEDITOR.dom.walker.whitespaces(),
3299        c = CKEDITOR.env.webkit ? 1 : 0;
3300      return function(e) {
3301        b(e)
3302          ? (e = 1)
3303          : (e.type == CKEDITOR.NODE_TEXT && (e = e.getParent()), (e = e.$.offsetWidth <= c));
3304        return !!(a ^ e);
3305      };
3306    };
3307    CKEDITOR.dom.walker.nodeType = function(a, b) {
3308      return function(c) {
3309        return !!(b ^ (c.type == a));
3310      };
3311    };
3312    CKEDITOR.dom.walker.bogus = function(a) {
3313      function b(a) {
3314        return !h(a) && !k(a);
3315      }
3316      return function(c) {
3317        var e = CKEDITOR.env.needsBrFiller ? c.is && c.is("br") : c.getText && f.test(c.getText());
3318        e &&
3319          ((e = c.getParent()),
3320          (c = c.getNext(b)),
3321          (e =
3322            e.isBlockBoundary() &&
3323            (!c || (c.type == CKEDITOR.NODE_ELEMENT && c.isBlockBoundary()))));
3324        return !!(a ^ e);
3325      };
3326    };
3327    CKEDITOR.dom.walker.temp = function(a) {
3328      return function(b) {
3329        b.type != CKEDITOR.NODE_ELEMENT && (b = b.getParent());
3330        b = b && b.hasAttribute("data-cke-temp");
3331        return !!(a ^ b);
3332      };
3333    };
3334    var f = /^[\t\r\n ]*(?:&nbsp;|\xa0)$/,
3335      h = CKEDITOR.dom.walker.whitespaces(),
3336      k = CKEDITOR.dom.walker.bookmark(),
3337      g = CKEDITOR.dom.walker.temp(),
3338      m = function(a) {
3339        return (
3340          k(a) ||
3341          h(a) ||
3342          (a.type == CKEDITOR.NODE_ELEMENT &&
3343            a.is(CKEDITOR.dtd.$inline) &&
3344            !a.is(CKEDITOR.dtd.$empty))
3345        );
3346      };
3347    CKEDITOR.dom.walker.ignored = function(a) {
3348      return function(b) {
3349        b = h(b) || k(b) || g(b);
3350        return !!(a ^ b);
3351      };
3352    };
3353    var r = CKEDITOR.dom.walker.ignored();
3354    CKEDITOR.dom.walker.empty = function(a) {
3355      return function(b) {
3356        for (var c = 0, e = b.getChildCount(); c < e; ++c) if (!r(b.getChild(c))) return !!a;
3357        return !a;
3358      };
3359    };
3360    var e = CKEDITOR.dom.walker.empty(),
3361      y = (CKEDITOR.dom.walker.validEmptyBlockContainers = CKEDITOR.tools.extend(
3362        (function(a) {
3363          var b = {},
3364            c;
3365          for (c in a) CKEDITOR.dtd[c]["#"] && (b[c] = 1);
3366          return b;
3367        })(CKEDITOR.dtd.$block),
3368        { caption: 1, td: 1, th: 1 },
3369      ));
3370    CKEDITOR.dom.walker.editable = function(a) {
3371      return function(b) {
3372        b = r(b)
3373          ? !1
3374          : b.type == CKEDITOR.NODE_TEXT ||
3375            (b.type == CKEDITOR.NODE_ELEMENT &&
3376              (b.is(CKEDITOR.dtd.$inline) ||
3377                b.is("hr") ||
3378                "false" == b.getAttribute("contenteditable") ||
3379                (!CKEDITOR.env.needsBrFiller && b.is(y) && e(b))))
3380            ? !0
3381            : !1;
3382        return !!(a ^ b);
3383      };
3384    };
3385    CKEDITOR.dom.element.prototype.getBogus = function() {
3386      var a = this;
3387      do a = a.getPreviousSourceNode();
3388      while (m(a));
3389      return a &&
3390        (CKEDITOR.env.needsBrFiller ? a.is && a.is("br") : a.getText && f.test(a.getText()))
3391        ? a
3392        : !1;
3393    };
3394  })();
3395  CKEDITOR.dom.range = function(a) {
3396    this.endOffset = this.endContainer = this.startOffset = this.startContainer = null;
3397    this.collapsed = !0;
3398    var d = a instanceof CKEDITOR.dom.document;
3399    this.document = d ? a : a.getDocument();
3400    this.root = d ? a.getBody() : a;
3401  };
3402  (function() {
3403    function a(a) {
3404      a.collapsed =
3405        a.startContainer &&
3406        a.endContainer &&
3407        a.startContainer.equals(a.endContainer) &&
3408        a.startOffset == a.endOffset;
3409    }
3410    function d(a, b, c, d, f) {
3411      function h(a, b, c, e) {
3412        var d = c ? a.getPrevious() : a.getNext();
3413        if (e && k) return d;
3414        l || e ? b.append(a.clone(!0, f), c) : (a.remove(), r && b.append(a, c));
3415        return d;
3416      }
3417      function p() {
3418        var a,
3419          b,
3420          c,
3421          e = Math.min(O.length, n.length);
3422        for (a = 0; a < e; a++) if (((b = O[a]), (c = n[a]), !b.equals(c))) return a;
3423        return a - 1;
3424      }
3425      function g() {
3426        var b = N - 1,
3427          c = C && z && !q.equals(F);
3428        b < v - 1 || b < A - 1 || c
3429          ? (c
3430              ? a.moveToPosition(F, CKEDITOR.POSITION_BEFORE_START)
3431              : A == b + 1 && t
3432                ? a.moveToPosition(n[b], CKEDITOR.POSITION_BEFORE_END)
3433                : a.moveToPosition(n[b + 1], CKEDITOR.POSITION_BEFORE_START),
3434            d &&
3435              (b = O[b + 1]) &&
3436              b.type == CKEDITOR.NODE_ELEMENT &&
3437              ((c = CKEDITOR.dom.element.createFromHtml(
3438                '\x3cspan data-cke-bookmark\x3d"1" style\x3d"display:none"\x3e\x26nbsp;\x3c/span\x3e',
3439                a.document,
3440              )),
3441              c.insertAfter(b),
3442              b.mergeSiblings(!1),
3443              a.moveToBookmark({ startNode: c })))
3444          : a.collapse(!0);
3445      }
3446      a.optimizeBookmark();
3447      var k = 0 === b,
3448        r = 1 == b,
3449        l = 2 == b;
3450      b = l || r;
3451      var q = a.startContainer,
3452        F = a.endContainer,
3453        L = a.startOffset,
3454        E = a.endOffset,
3455        M,
3456        t,
3457        C,
3458        z,
3459        H,
3460        P;
3461      if (
3462        l &&
3463        F.type == CKEDITOR.NODE_TEXT &&
3464        (q.equals(F) || (q.type === CKEDITOR.NODE_ELEMENT && q.getFirst().equals(F)))
3465      )
3466        c.append(a.document.createText(F.substring(L, E)));
3467      else {
3468        F.type == CKEDITOR.NODE_TEXT
3469          ? l ? (P = !0) : (F = F.split(E))
3470          : 0 < F.getChildCount()
3471            ? E >= F.getChildCount() ? ((F = F.getChild(E - 1)), (t = !0)) : (F = F.getChild(E))
3472            : (z = t = !0);
3473        q.type == CKEDITOR.NODE_TEXT
3474          ? l ? (H = !0) : q.split(L)
3475          : 0 < q.getChildCount()
3476            ? 0 === L ? ((q = q.getChild(L)), (M = !0)) : (q = q.getChild(L - 1))
3477            : (C = M = !0);
3478        for (
3479          var O = q.getParents(),
3480            n = F.getParents(),
3481            N = p(),
3482            v = O.length - 1,
3483            A = n.length - 1,
3484            G = c,
3485            I,
3486            X,
3487            V,
3488            da = -1,
3489            Q = N;
3490          Q <= v;
3491          Q++
3492        ) {
3493          X = O[Q];
3494          V = X.getNext();
3495          for (
3496            Q != v || (X.equals(n[Q]) && v < A)
3497              ? b && (I = G.append(X.clone(0, f)))
3498              : M ? h(X, G, !1, C) : H && G.append(a.document.createText(X.substring(L)));
3499            V;
3500
3501          ) {
3502            if (V.equals(n[Q])) {
3503              da = Q;
3504              break;
3505            }
3506            V = h(V, G);
3507          }
3508          G = I;
3509        }
3510        G = c;
3511        for (Q = N; Q <= A; Q++)
3512          if (((c = n[Q]), (V = c.getPrevious()), c.equals(O[Q]))) b && (G = G.getChild(0));
3513          else {
3514            Q != A || (c.equals(O[Q]) && A < v)
3515              ? b && (I = G.append(c.clone(0, f)))
3516              : t ? h(c, G, !1, z) : P && G.append(a.document.createText(c.substring(0, E)));
3517            if (Q > da) for (; V; ) V = h(V, G, !0);
3518            G = I;
3519          }
3520        l || g();
3521      }
3522    }
3523    function b() {
3524      var a = !1,
3525        b = CKEDITOR.dom.walker.whitespaces(),
3526        c = CKEDITOR.dom.walker.bookmark(!0),
3527        d = CKEDITOR.dom.walker.bogus();
3528      return function(f) {
3529        return c(f) || b(f)
3530          ? !0
3531          : d(f) && !a
3532            ? (a = !0)
3533            : (f.type == CKEDITOR.NODE_TEXT &&
3534                (f.hasAscendant("pre") || CKEDITOR.tools.trim(f.getText()).length)) ||
3535              (f.type == CKEDITOR.NODE_ELEMENT && !f.is(h))
3536              ? !1
3537              : !0;
3538      };
3539    }
3540    function c(a) {
3541      var b = CKEDITOR.dom.walker.whitespaces(),
3542        c = CKEDITOR.dom.walker.bookmark(1);
3543      return function(d) {
3544        return c(d) || b(d)
3545          ? !0
3546          : (!a && k(d)) || (d.type == CKEDITOR.NODE_ELEMENT && d.is(CKEDITOR.dtd.$removeEmpty));
3547      };
3548    }
3549    function f(a) {
3550      return function() {
3551        var b;
3552        return this[a ? "getPreviousNode" : "getNextNode"](function(a) {
3553          !b && r(a) && (b = a);
3554          return m(a) && !(k(a) && a.equals(b));
3555        });
3556      };
3557    }
3558    var h = {
3559        abbr: 1,
3560        acronym: 1,
3561        b: 1,
3562        bdo: 1,
3563        big: 1,
3564        cite: 1,
3565        code: 1,
3566        del: 1,
3567        dfn: 1,
3568        em: 1,
3569        font: 1,
3570        i: 1,
3571        ins: 1,
3572        label: 1,
3573        kbd: 1,
3574        q: 1,
3575        samp: 1,
3576        small: 1,
3577        span: 1,
3578        strike: 1,
3579        strong: 1,
3580        sub: 1,
3581        sup: 1,
3582        tt: 1,
3583        u: 1,
3584        var: 1,
3585      },
3586      k = CKEDITOR.dom.walker.bogus(),
3587      g = /^[\t\r\n ]*(?:&nbsp;|\xa0)$/,
3588      m = CKEDITOR.dom.walker.editable(),
3589      r = CKEDITOR.dom.walker.ignored(!0);
3590    CKEDITOR.dom.range.prototype = {
3591      clone: function() {
3592        var a = new CKEDITOR.dom.range(this.root);
3593        a._setStartContainer(this.startContainer);
3594        a.startOffset = this.startOffset;
3595        a._setEndContainer(this.endContainer);
3596        a.endOffset = this.endOffset;
3597        a.collapsed = this.collapsed;
3598        return a;
3599      },
3600      collapse: function(a) {
3601        a
3602          ? (this._setEndContainer(this.startContainer), (this.endOffset = this.startOffset))
3603          : (this._setStartContainer(this.endContainer), (this.startOffset = this.endOffset));
3604        this.collapsed = !0;
3605      },
3606      cloneContents: function(a) {
3607        var b = new CKEDITOR.dom.documentFragment(this.document);
3608        this.collapsed || d(this, 2, b, !1, "undefined" == typeof a ? !0 : a);
3609        return b;
3610      },
3611      deleteContents: function(a) {
3612        this.collapsed || d(this, 0, null, a);
3613      },
3614      extractContents: function(a, b) {
3615        var c = new CKEDITOR.dom.documentFragment(this.document);
3616        this.collapsed || d(this, 1, c, a, "undefined" == typeof b ? !0 : b);
3617        return c;
3618      },
3619      createBookmark: function(a) {
3620        var b,
3621          c,
3622          d,
3623          f,
3624          h = this.collapsed;
3625        b = this.document.createElement("span");
3626        b.data("cke-bookmark", 1);
3627        b.setStyle("display", "none");
3628        b.setHtml("\x26nbsp;");
3629        a &&
3630          ((d = "cke_bm_" + CKEDITOR.tools.getNextNumber()),
3631          b.setAttribute("id", d + (h ? "C" : "S")));
3632        h ||
3633          ((c = b.clone()),
3634          c.setHtml("\x26nbsp;"),
3635          a && c.setAttribute("id", d + "E"),
3636          (f = this.clone()),
3637          f.collapse(),
3638          f.insertNode(c));
3639        f = this.clone();
3640        f.collapse(!0);
3641        f.insertNode(b);
3642        c
3643          ? (this.setStartAfter(b), this.setEndBefore(c))
3644          : this.moveToPosition(b, CKEDITOR.POSITION_AFTER_END);
3645        return {
3646          startNode: a ? d + (h ? "C" : "S") : b,
3647          endNode: a ? d + "E" : c,
3648          serializable: a,
3649          collapsed: h,
3650        };
3651      },
3652      createBookmark2: (function() {
3653        function a(b) {
3654          var e = b.container,
3655            d = b.offset,
3656            p;
3657          p = e;
3658          var f = d;
3659          p =
3660            p.type != CKEDITOR.NODE_ELEMENT || 0 === f || f == p.getChildCount()
3661              ? 0
3662              : p.getChild(f - 1).type == CKEDITOR.NODE_TEXT &&
3663                p.getChild(f).type == CKEDITOR.NODE_TEXT;
3664          p && ((e = e.getChild(d - 1)), (d = e.getLength()));
3665          if (e.type == CKEDITOR.NODE_ELEMENT && 0 < d) {
3666            a: {
3667              for (p = e; d--; )
3668                if (((f = p.getChild(d).getIndex(!0)), 0 <= f)) {
3669                  d = f;
3670                  break a;
3671                }
3672              d = -1;
3673            }
3674            d += 1;
3675          }
3676          if (e.type == CKEDITOR.NODE_TEXT) {
3677            p = e;
3678            for (f = 0;
3678 (p = p.getPrevious()) && p.type == CKEDITOR.NODE_TEXT; )
3679              f += p.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE, "").length;
3680            p = f;
3681            e.getText()
3682              ? (d += p)
3683              : ((f = e.getPrevious(c)),
3684                p
3685                  ? ((d = p), (e = f ? f.getNext() : e.getParent().getFirst()))
3686                  : ((e = e.getParent()), (d = f ? f.getIndex(!0) + 1 : 0)));
3687          }
3688          b.container = e;
3689          b.offset = d;
3690        }
3691        function b(a, c) {
3692          var e = c.getCustomData("cke-fillingChar");
3693          if (e) {
3694            var d = a.container;
3695            e.equals(d) &&
3696              ((a.offset -= CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length),
3697              0 >= a.offset && ((a.offset = d.getIndex()), (a.container = d.getParent())));
3698          }
3699        }
3700        var c = CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT, !0);
3701        return function(c) {
3702          var d = this.collapsed,
3703            f = { container: this.startContainer, offset: this.startOffset },
3704            p = { container: this.endContainer, offset: this.endOffset };
3705          c && (a(f), b(f, this.root), d || (a(p), b(p, this.root)));
3706          return {
3707            start: f.container.getAddress(c),
3708            end: d ? null : p.container.getAddress(c),
3709            startOffset: f.offset,
3710            endOffset: p.offset,
3711            normalized: c,
3712            collapsed: d,
3713            is2: !0,
3714          };
3715        };
3716      })(),
3717      moveToBookmark: function(a) {
3718        if (a.is2) {
3719          var b = this.document.getByAddress(a.start, a.normalized),
3720            c = a.startOffset,
3721            d = a.end && this.document.getByAddress(a.end, a.normalized);
3722          a = a.endOffset;
3723          this.setStart(b, c);
3724          d ? this.setEnd(d, a) : this.collapse(!0);
3725        } else
3726          (b = (c = a.serializable) ? this.document.getById(a.startNode) : a.startNode),
3727            (a = c ? this.document.getById(a.endNode) : a.endNode),
3728            this.setStartBefore(b),
3729            b.remove(),
3730            a ? (this.setEndBefore(a), a.remove()) : this.collapse(!0);
3731      },
3732      getBoundaryNodes: function() {
3733        var a = this.startContainer,
3734          b = this.endContainer,
3735          c = this.startOffset,
3736          d = this.endOffset,
3737          f;
3738        if (a.type == CKEDITOR.NODE_ELEMENT)
3739          if (((f = a.getChildCount()), f > c)) a = a.getChild(c);
3740          else if (1 > f) a = a.getPreviousSourceNode();
3741          else {
3742            for (a = a.$; a.lastChild; ) a = a.lastChild;
3743            a = new CKEDITOR.dom.node(a);
3744            a = a.getNextSourceNode() || a;
3745          }
3746        if (b.type == CKEDITOR.NODE_ELEMENT)
3747          if (((f = b.getChildCount()), f > d)) b = b.getChild(d).getPreviousSourceNode(!0);
3748          else if (1 > f) b = b.getPreviousSourceNode();
3749          else {
3750            for (b = b.$; b.lastChild; ) b = b.lastChild;
3751            b = new CKEDITOR.dom.node(b);
3752          }
3753        a.getPosition(b) & CKEDITOR.POSITION_FOLLOWING && (a = b);
3754        return { startNode: a, endNode: b };
3755      },
3756      getCommonAncestor: function(a, b) {
3757        var c = this.startContainer,
3758          d = this.endContainer,
3759          c = c.equals(d)
3760            ? a && c.type == CKEDITOR.NODE_ELEMENT && this.startOffset == this.endOffset - 1
3761              ? c.getChild(this.startOffset)
3762              : c
3763            : c.getCommonAncestor(d);
3764        return b && !c.is ? c.getParent() : c;
3765      },
3766      optimize: function() {
3767        var a = this.startContainer,
3768          b = this.startOffset;
3769        a.type != CKEDITOR.NODE_ELEMENT &&
3770          (b ? b >= a.getLength() && this.setStartAfter(a) : this.setStartBefore(a));
3771        a = this.endContainer;
3772        b = this.endOffset;
3773        a.type != CKEDITOR.NODE_ELEMENT &&
3774          (b ? b >= a.getLength() && this.setEndAfter(a) : this.setEndBefore(a));
3775      },
3776      optimizeBookmark: function() {
3777        var a = this.startContainer,
3778          b = this.endContainer;
3779        a.is &&
3780          a.is("span") &&
3781          a.data("cke-bookmark") &&
3782          this.setStartAt(a, CKEDITOR.POSITION_BEFORE_START);
3783        b &&
3784          b.is &&
3785          b.is("span") &&
3786          b.data("cke-bookmark") &&
3787          this.setEndAt(b, CKEDITOR.POSITION_AFTER_END);
3788      },
3789      trim: function(a, b) {
3790        var c = this.startContainer,
3791          d = this.startOffset,
3792          f = this.collapsed;
3793        if ((!a || f) && c && c.type == CKEDITOR.NODE_TEXT) {
3794          if (d)
3795            if (d >= c.getLength()) (d = c.getIndex() + 1), (c = c.getParent());
3796            else {
3797              var h = c.split(d),
3798                d = c.getIndex() + 1,
3799                c = c.getParent();
3800              this.startContainer.equals(this.endContainer)
3801                ? this.setEnd(h, this.endOffset - this.startOffset)
3802                : c.equals(this.endContainer) && (this.endOffset += 1);
3803            }
3804          else (d = c.getIndex()), (c = c.getParent());
3805          this.setStart(c, d);
3806          if (f) {
3807            this.collapse(!0);
3808            return;
3809          }
3810        }
3811        c = this.endContainer;
3812        d = this.endOffset;
3813        b ||
3814          f ||
3815          !c ||
3816          c.type != CKEDITOR.NODE_TEXT ||
3817          (d ? (d >= c.getLength() || c.split(d), (d = c.getIndex() + 1)) : (d = c.getIndex()),
3818          (c = c.getParent()),
3819          this.setEnd(c, d));
3820      },
3821      enlarge: function(a, b) {
3822        function c(a) {
3823          return a && a.type == CKEDITOR.NODE_ELEMENT && a.hasAttribute("contenteditable")
3824            ? null
3825            : a;
3826        }
3827        var d = new RegExp(/[^\s\ufeff]/);
3828        switch (a) {
3829          case CKEDITOR.ENLARGE_INLINE:
3830            var f = 1;
3831          case CKEDITOR.ENLARGE_ELEMENT:
3832            var h = function(a, b) {
3833              var c = new CKEDITOR.dom.range(g);
3834              c.setStart(a, b);
3835              c.setEndAt(g, CKEDITOR.POSITION_BEFORE_END);
3836              var c = new CKEDITOR.dom.walker(c),
3837                e;
3838              for (
3839                c.guard = function(a) {
3840                  return !(a.type == CKEDITOR.NODE_ELEMENT && a.isBlockBoundary());
3841                };
3842                (e = c.next());
3843
3844              ) {
3845                if (e.type != CKEDITOR.NODE_TEXT) return !1;
3846                M = e != a ? e.getText() : e.substring(b);
3847                if (d.test(M)) return !1;
3848              }
3849              return !0;
3850            };
3851            if (this.collapsed) break;
3852            var p = this.getCommonAncestor(),
3853              g = this.root,
3854              k,
3855              r,
3856              l,
3857              q,
3858              F,
3859              L = !1,
3860              E,
3861              M;
3862            E = this.startContainer;
3863            var t = this.startOffset;
3864            E.type == CKEDITOR.NODE_TEXT
3865              ? (t && ((E = !CKEDITOR.tools.trim(E.substring(0, t)).length && E), (L = !!E)),
3866                E && ((q = E.getPrevious()) || (l = E.getParent())))
3867              : (t && (q = E.getChild(t - 1) || E.getLast()), q || (l = E));
3868            for (l = c(l); l || q; ) {
3869              if (l && !q) {
3870                !F && l.equals(p) && (F = !0);
3871                if (f ? l.isBlockBoundary() : !g.contains(l)) break;
3872                (L && "inline" == l.getComputedStyle("display")) ||
3873                  ((L = !1), F ? (k = l) : this.setStartBefore(l));
3874                q = l.getPrevious();
3875              }
3876              for (; q; )
3877                if (((E = !1), q.type == CKEDITOR.NODE_COMMENT)) q = q.getPrevious();
3878                else {
3879                  if (q.type == CKEDITOR.NODE_TEXT)
3880                    (M = q.getText()), d.test(M) && (q = null), (E = /[\s\ufeff]$/.test(M));
3881                  else if (
3882                    (q.$.offsetWidth > (CKEDITOR.env.webkit ? 1 : 0) || (b && q.is("br"))) &&
3883                    !q.data("cke-bookmark")
3884                  )
3885                    if (L && CKEDITOR.dtd.$removeEmpty[q.getName()]) {
3886                      M = q.getText();
3887                      if (d.test(M)) q = null;
3888                      else
3889                        for (var t = q.$.getElementsByTagName("*"), C = 0, z; (z = t[C++]); )
3890                          if (!CKEDITOR.dtd.$removeEmpty[z.nodeName.toLowerCase()]) {
3891                            q = null;
3892                            break;
3893                          }
3894                      q && (E = !!M.length);
3895                    } else q = null;
3896                  E && (L ? (F ? (k = l) : l && this.setStartBefore(l)) : (L = !0));
3897                  if (q) {
3898                    E = q.getPrevious();
3899                    if (!l && !E) {
3900                      l = q;
3901                      q = null;
3902                      break;
3903                    }
3904                    q = E;
3905                  } else l = null;
3906                }
3907              l && (l = c(l.getParent()));
3908            }
3909            E = this.endContainer;
3910            t = this.endOffset;
3911            l = q = null;
3912            F = L = !1;
3913            E.type == CKEDITOR.NODE_TEXT
3914              ? CKEDITOR.tools.trim(E.substring(t)).length
3915                ? (L = !0)
3916                : ((L = !E.getLength()),
3917                  t == E.getLength()
3918                    ? (q = E.getNext()) || (l = E.getParent())
3919                    : h(E, t) && (l = E.getParent()))
3920              : (q = E.getChild(t)) || (l = E);
3921            for (; l || q; ) {
3922              if (l && !q) {
3923                !F && l.equals(p) && (F = !0);
3924                if (f ? l.isBlockBoundary() : !g.contains(l)) break;
3925                (L && "inline" == l.getComputedStyle("display")) ||
3926                  ((L = !1), F ? (r = l) : l && this.setEndAfter(l));
3927                q = l.getNext();
3928              }
3929              for (; q; ) {
3930                E = !1;
3931                if (q.type == CKEDITOR.NODE_TEXT)
3932                  (M = q.getText()), h(q, 0) || (q = null), (E = /^[\s\ufeff]/.test(M));
3933                else if (q.type == CKEDITOR.NODE_ELEMENT) {
3934                  if ((0 < q.$.offsetWidth || (b && q.is("br"))) && !q.data("cke-bookmark"))
3935                    if (L && CKEDITOR.dtd.$removeEmpty[q.getName()]) {
3936                      M = q.getText();
3937                      if (d.test(M)) q = null;
3938                      else
3939                        for (t = q.$.getElementsByTagName("*"), C = 0; (z = t[C++]); )
3940                          if (!CKEDITOR.dtd.$removeEmpty[z.nodeName.toLowerCase()]) {
3941                            q = null;
3942                            break;
3943                          }
3944                      q && (E = !!M.length);
3945                    } else q = null;
3946                } else E = 1;
3947                E && L && (F ? (r = l) : this.setEndAfter(l));
3948                if (q) {
3949                  E = q.getNext();
3950                  if (!l && !E) {
3951                    l = q;
3952                    q = null;
3953                    break;
3954                  }
3955                  q = E;
3956                } else l = null;
3957              }
3958              l && (l = c(l.getParent()));
3959            }
3960            k && r && ((p = k.contains(r) ? r : k), this.setStartBefore(p), this.setEndAfter(p)
3960);
3961            break;
3962          case CKEDITOR.ENLARGE_BLOCK_CONTENTS:
3963          case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:
3964            l = new CKEDITOR.dom.range(this.root);
3965            g = this.root;
3966            l.setStartAt(g, CKEDITOR.POSITION_AFTER_START);
3967            l.setEnd(this.startContainer, this.startOffset);
3968            l = new CKEDITOR.dom.walker(l);
3969            var H,
3970              P,
3971              O = CKEDITOR.dom.walker.blockBoundary(
3972                a == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ? { br: 1 } : null,
3973              ),
3974              n = null,
3975              N = function(a) {
3976                if (a.type == CKEDITOR.NODE_ELEMENT && "false" == a.getAttribute("contenteditable"))
3977                  if (n) {
3978                    if (n.equals(a)) {
3979                      n = null;
3980                      return;
3981                    }
3982                  } else n = a;
3983                else if (n) return;
3984                var b = O(a);
3985                b || (H = a);
3986                return b;
3987              },
3988              f = function(a) {
3989                var b = N(a);
3990                !b && a.is && a.is("br") && (P = a);
3991                return b;
3992              };
3993            l.guard = N;
3994            l = l.lastBackward();
3995            H = H || g;
3996            this.setStartAt(
3997              H,
3998              !H.is("br") && ((!l && this.checkStartOfBlock()) || (l && H.contains(l)))
3999                ? CKEDITOR.POSITION_AFTER_START
4000                : CKEDITOR.POSITION_AFTER_END,
4001            );
4002            if (a == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS) {
4003              l = this.clone();
4004              l = new CKEDITOR.dom.walker(l);
4005              var v = CKEDITOR.dom.walker.whitespaces(),
4006                A = CKEDITOR.dom.walker.bookmark();
4007              l.evaluator = function(a) {
4008                return !v(a) && !A(a);
4009              };
4010              if ((l = l.previous()) && l.type == CKEDITOR.NODE_ELEMENT && l.is("br")) break;
4011            }
4012            l = this.clone();
4013            l.collapse();
4014            l.setEndAt(g, CKEDITOR.POSITION_BEFORE_END);
4015            l = new CKEDITOR.dom.walker(l);
4016            l.guard = a == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ? f : N;
4017            H = n = P = null;
4018            l = l.lastForward();
4019            H = H || g;
4020            this.setEndAt(
4021              H,
4022              (!l && this.checkEndOfBlock()) || (l && H.contains(l))
4023                ? CKEDITOR.POSITION_BEFORE_END
4024                : CKEDITOR.POSITION_BEFORE_START,
4025            );
4026            P && this.setEndAfter(P);
4027        }
4028      },
4029      shrink: function(a, b, c) {
4030        var d =
4031            "boolean" === typeof c
4032              ? c
4033              : c && "boolean" === typeof c.shrinkOnBlockBoundary ? c.shrinkOnBlockBoundary : !0,
4034          f = c && c.skipBogus;
4035        if (!this.collapsed) {
4036          a = a || CKEDITOR.SHRINK_TEXT;
4037          var h = this.clone(),
4038            p = this.startContainer,
4039            g = this.endContainer,
4040            k = this.startOffset,
4041            r = this.endOffset,
4042            l = (c = 1);
4043          p &&
4044            p.type == CKEDITOR.NODE_TEXT &&
4045            (k
4046              ? k >= p.getLength() ? h.setStartAfter(p) : (h.setStartBefore(p), (c = 0))
4047              : h.setStartBefore(p));
4048          g &&
4049            g.type == CKEDITOR.NODE_TEXT &&
4050            (r
4051              ? r >= g.getLength() ? h.setEndAfter(g) : (h.setEndAfter(g), (l = 0))
4052              : h.setEndBefore(g));
4053          var h = new CKEDITOR.dom.walker(h),
4054            q = CKEDITOR.dom.walker.bookmark(),
4055            F = CKEDITOR.dom.walker.bogus();
4056          h.evaluator = function(b) {
4057            return (
4058              b.type == (a == CKEDITOR.SHRINK_ELEMENT ? CKEDITOR.NODE_ELEMENT : CKEDITOR.NODE_TEXT)
4059            );
4060          };
4061          var L;
4062          h.guard = function(b, c) {
4063            if ((f && F(b)) || q(b)) return !0;
4064            if (
4065              (a == CKEDITOR.SHRINK_ELEMENT && b.type == CKEDITOR.NODE_TEXT) ||
4066              (c && b.equals(L)) ||
4067              (!1 === d && b.type == CKEDITOR.NODE_ELEMENT && b.isBlockBoundary()) ||
4068              (b.type == CKEDITOR.NODE_ELEMENT && b.hasAttribute("contenteditable"))
4069            )
4070              return !1;
4071            c || b.type != CKEDITOR.NODE_ELEMENT || (L = b);
4072            return !0;
4073          };
4074          c &&
4075            (p = h[a == CKEDITOR.SHRINK_ELEMENT ? "lastForward" : "next"]()) &&
4076            this.setStartAt(p, b ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_START);
4077          l &&
4078            (h.reset(),
4079            (h = h[a == CKEDITOR.SHRINK_ELEMENT ? "lastBackward" : "previous"]()) &&
4080              this.setEndAt(h, b ? CKEDITOR.POSITION_BEFORE_END : CKEDITOR.POSITION_AFTER_END));
4081          return !(!c && !l);
4082        }
4083      },
4084      insertNode: function(a) {
4085        this.optimizeBookmark();
4086        this.trim(!1, !0);
4087        var b = this.startContainer,
4088          c = b.getChild(this.startOffset);
4089        c ? a.insertBefore(c) : b.append(a);
4090        a.getParent() && a.getParent().equals(this.endContainer) && this.endOffset++;
4091        this.setStartBefore(a);
4092      },
4093      moveToPosition: function(a, b) {
4094        this.setStartAt(a, b);
4095        this.collapse(!0);
4096      },
4097      moveToRange: function(a) {
4098        this.setStart(a.startContainer, a.startOffset);
4099        this.setEnd(a.endContainer, a.endOffset);
4100      },
4101      selectNodeContents: function(a) {
4102        this.setStart(a, 0);
4103        this.setEnd(a, a.type == CKEDITOR.NODE_TEXT ? a.getLength() : a.getChildCount());
4104      },
4105      setStart: function(b, c) {
4106        b.type == CKEDITOR.NODE_ELEMENT &&
4107          CKEDITOR.dtd.$empty[b.getName()] &&
4108          ((c = b.getIndex()), (b = b.getParent()));
4109        this._setStartContainer(b);
4110        this.startOffset = c;
4111        this.endContainer || (this._setEndContainer(b), (this.endOffset = c));
4112        a(this);
4113      },
4114      setEnd: function(b, c) {
4115        b.type == CKEDITOR.NODE_ELEMENT &&
4116          CKEDITOR.dtd.$empty[b.getName()] &&
4117          ((c = b.getIndex() + 1), (b = b.getParent()));
4118        this._setEndContainer(b);
4119        this.endOffset = c;
4120        this.startContainer || (this._setStartContainer(b), (this.startOffset = c));
4121        a(this);
4122      },
4123      setStartAfter: function(a) {
4124        this.setStart(a.getParent(), a.getIndex() + 1);
4125      },
4126      setStartBefore: function(a) {
4127        this.setStart(a.getParent(), a.getIndex());
4128      },
4129      setEndAfter: function(a) {
4130        this.setEnd(a.getParent(), a.getIndex() + 1);
4131      },
4132      setEndBefore: function(a) {
4133        this.setEnd(a.getParent(), a.getIndex());
4134      },
4135      setStartAt: function(b, c) {
4136        switch (c) {
4137          case CKEDITOR.POSITION_AFTER_START:
4138            this.setStart(b, 0);
4139            break;
4140          case CKEDITOR.POSITION_BEFORE_END:
4141            b.type == CKEDITOR.NODE_TEXT
4142              ? this.setStart(b, b.getLength())
4143              : this.setStart(b, b.getChildCount());
4144            break;
4145          case CKEDITOR.POSITION_BEFORE_START:
4146            this.setStartBefore(b);
4147            break;
4148          case CKEDITOR.POSITION_AFTER_END:
4149            this.setStartAfter(b);
4150        }
4151        a(this);
4152      },
4153      setEndAt: function(b, c) {
4154        switch (c) {
4155          case CKEDITOR.POSITION_AFTER_START:
4156            this.setEnd(b, 0);
4157            break;
4158          case CKEDITOR.POSITION_BEFORE_END:
4159            b.type == CKEDITOR.NODE_TEXT
4160              ? this.setEnd(b, b.getLength())
4161              : this.setEnd(b, b.getChildCount());
4162            break;
4163          case CKEDITOR.POSITION_BEFORE_START:
4164            this.setEndBefore(b);
4165            break;
4166          case CKEDITOR.POSITION_AFTER_END:
4167            this.setEndAfter(b);
4168        }
4169        a(this);
4170      },
4171      fixBlock: function(a, b) {
4172        var c = this.createBookmark(),
4173          d = this.document.createElement(b);
4174        this.collapse(a);
4175        this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);
4176        this.extractContents().appendTo(d);
4177        d.trim();
4178        this.insertNode(d);
4179        var f = d.getBogus();
4180        f && f.remove();
4181        d.appendBogus();
4182        this.moveToBookmark(c);
4183        return d;
4184      },
4185      splitBlock: function(a, b) {
4186        var c = new CKEDITOR.dom.elementPath(this.startContainer, this.root),
4187          d = new CKEDITOR.dom.elementPath(this.endContainer, this.root),
4188          f = c.block,
4189          h = d.block,
4190          p = null;
4191        if (!c.blockLimit.equals(d.blockLimit)) return null;
4192        "br" != a &&
4193          (f ||
4194            ((f = this.fixBlock(!0, a)),
4195            (h = new CKEDITOR.dom.elementPath(this.endContainer, this.root).block)),
4196          h || (h = this.fixBlock(!1, a)));
4197        c = f && this.checkStartOfBlock();
4198        d = h && this.checkEndOfBlock();
4199        this.deleteContents();
4200        f &&
4201          f.equals(h) &&
4202          (d
4203            ? ((p = new CKEDITOR.dom.elementPath(this.startContainer, this.root)),
4204              this.moveToPosition(h, CKEDITOR.POSITION_AFTER_END),
4205              (h = null))
4206            : c
4207              ? ((p = new CKEDITOR.dom.elementPath(this.startContainer, this.root)),
4208                this.moveToPosition(f, CKEDITOR.POSITION_BEFORE_START),
4209                (f = null))
4210              : ((h = this.splitElement(f, b || !1)), f.is("ul", "ol") || f.appendBogus()));
4211        return {
4212          previousBlock: f,
4213          nextBlock: h,
4214          wasStartOfBlock: c,
4215          wasEndOfBlock: d,
4216          elementPath: p,
4217        };
4218      },
4219      splitElement: function(a, b) {
4220        if (!this.collapsed) return null;
4221        this.setEndAt(a, CKEDITOR.POSITION_BEFORE_END);
4222        var c = this.extractContents(!1, b || !1),
4223          d = a.clone(!1, b || !1);
4224        c.appendTo(d);
4225        d.insertAfter(a);
4226        this.moveToPosition(a, CKEDITOR.POSITION_AFTER_END);
4227        return d;
4228      },
4229      removeEmptyBlocksAtEnd: (function() {
4230        function a(d) {
4231          return function(a) {
4232            return b(a) ||
4233              c(a) ||
4234              (a.type == CKEDITOR.NODE_ELEMENT && a.isEmptyInlineRemoveable()) ||
4235              (d.is("table") && a.is("caption"))
4236              ? !1
4237              : !0;
4238          };
4239        }
4240        var b = CKEDITOR.dom.walker.whitespaces(),
4241          c = CKEDITOR.dom.walker.bookmark(!1);
4242        return function(b) {
4243          for (
4244            var c = this.createBookmark(),
4245              d = this[b ? "endPath" : "startPath"](),
4246              f = d.block || d.blockLimit,
4247              h;
4248            f && !f.equals(d.root) && !f.getFirst(a(f));
4249
4250          )
4251            (h = f.getParent()),
4252              this[b ? "setEndAt" : "setStartAt"](f, CKEDITOR.POSITION_AFTER_END),
4253              f.remove(1),
4254              (f = h);
4255          this.moveToBookmark(c);
4256        };
4257      })(),
4258      startPath: function() {
4259        return new CKEDITOR.dom.elementPath(this.startContainer, this.root);
4260      },
4261      endPath: function() {
4262        return new CKEDITOR.dom.elementPath(this.endContainer, this.root);
4263      },
4264      checkBoundaryOfElement: function(a, b) {
4265        var d = b == CKEDITOR.START,
4266          f = this.clone();
4267        f.collapse(d);
4268        f[d ? "setStartAt" : "setEndAt"](
4269          a,
4270          d ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_END,
4271        );
4272        f = new CKEDITOR.dom.walker(f);
4273        f.evaluator = c(d);
4274        return f[d ? "checkBackward" : "checkForward"]();
4275      },
4276      checkStartOfBlock: function() {
4277        var a = this.startContainer,
4278          c = this.startOffset;
4279        CKEDITOR.env.ie &&
4280          c &&
4281          a.type == CKEDITOR.NODE_TEXT &&
4282          ((a = CKEDITOR.tools.ltrim(a.substring(0, c))), g.test(a) && this.trim(0, 1));
4283        this.trim();
4284        a = new CKEDITOR.dom.elementPath(this.startContainer, this.root);
4285        c = this.clone();
4286        c.collapse(!0);
4287        c.setStartAt(a.block || a.blockLimit, CKEDITOR.POSITION_AFTER_START);
4288        a = new CKEDITOR.dom.walker(c);
4289        a.evaluator = b();
4290        return a.checkBackward();
4291      },
4292      checkEndOfBlock: function() {
4293        var a = this.endContainer,
4294          c = this.endOffset;
4295        CKEDITOR.env.ie &&
4296          a.type == CKEDITOR.NODE_TEXT &&
4297          ((a = CKEDITOR.tools.rtrim(a.substring(c))), g.test(a) && this.trim(1, 0));
4298        this.trim();
4299        a = new CKEDITOR.dom.elementPath(this.endContainer, this.root);
4300        c = this.clone();
4301        c.collapse(!1);
4302        c.setEndAt(a.block || a.blockLimit, CKEDITOR.POSITION_BEFORE_END);
4303        a = new CKEDITOR.dom.walker(c);
4304        a.evaluator = b();
4305        return a.checkForward();
4306      },
4307      getPreviousNode: function(a, b, c) {
4308        var d = this.clone();
4309        d.collapse(1);
4310        d.setStartAt(c || this.root, CKEDITOR.POSITION_AFTER_START);
4311        c = new CKEDITOR.dom.walker(d);
4312        c.evaluator = a;
4313        c.guard = b;
4314        return c.previous();
4315      },
4316      getNextNode: function(a, b, c) {
4317        var d = this.clone();
4318        d.collapse();
4319        d.setEndAt(c || this.root, CKEDITOR.POSITION_BEFORE_END);
4320        c = new CKEDITOR.dom.walker(d);
4321        c.evaluator = a;
4322        c.guard = b;
4323        return c.next();
4324      },
4325      checkReadOnly: (function() {
4326        function a(b, c) {
4327          for (; b; ) {
4328            if (b.type == CKEDITOR.NODE_ELEMENT) {
4329              if ("false" == b.getAttribute("contentEditable") && !b.data("cke-editable")) return 0;
4330              if (
4331                b.is("html") ||
4332                ("true" == b.getAttribute("contentEditable") && (b.contains(c) || b.equals(c)))
4333              )
4334                break;
4335            }
4336            b = b.getParent();
4337          }
4338          return 1;
4339        }
4340        return function() {
4341          var b = this.startContainer,
4342            c = this.endContainer;
4343          return !(a(b, c) && a(c, b));
4344        };
4345      })(),
4346      moveToElementEditablePosition: function(a, b) {
4347        if (a.type == CKEDITOR.NODE_ELEMENT && !a.isEditable(!1))
4348          return (
4349            this.moveToPosition(
4350              a,
4351              b ? CKEDITOR.POSITION_AFTER_END : CKEDITOR.POSITION_BEFORE_START,
4352            ),
4353            !0
4354          );
4355        for (var c = 0; a; ) {
4356          if (a.type == CKEDITOR.NODE_TEXT) {
4357            b && this.endContainer && this.checkEndOfBlock() && g.test(a.getText())
4358              ? this.moveToPosition(a, CKEDITOR.POSITION_BEFORE_START)
4359              : this.moveToPosition(
4360                  a,
4361                  b ? CKEDITOR.POSITION_AFTER_END : CKEDITOR.POSITION_BEFORE_START,
4362                );
4363            c = 1;
4364            break;
4365          }
4366          if (a.type == CKEDITOR.NODE_ELEMENT)
4367            if (a.isEditable())
4368              this.moveToPosition(
4369                a,
4370                b ? CKEDITOR.POSITION_BEFORE_END : CKEDITOR.POSITION_AFTER_START,
4371              ),
4372                (c = 1);
4373            else if (b && a.is("br") && this.endContainer && this.checkEndOfBlock())
4374              this.moveToPosition(a, CKEDITOR.POSITION_BEFORE_START);
4375            else if ("false" == a.getAttribute("contenteditable") && a.is(CKEDITOR.dtd.$block))
4376              return this.setStartBefore(a), this.setEndAfter(a), !0;
4377          var d = a,
4378            f = c,
4379            h = void 0;
4380          d.type == CKEDITOR.NODE_ELEMENT &&
4381            d.isEditable(!1) &&
4382            (h = d[b ? "getLast" : "getFirst"](r));
4383          f || h || (h = d[b ? "getPrevious" : "getNext"](r));
4384          a = h;
4385        }
4386        return !!c;
4387      },
4388      moveToClosestEditablePosition: function(a, b) {
4389        var c,
4390          d = 0,
4391          f,
4392          h,
4393          p = [CKEDITOR.POSITION_AFTER_END, CKEDITOR.POSITION_BEFORE_START];
4394        a
4395          ? ((c = new CKEDITOR.dom.range(this.root)), c.moveToPosition(a, p[b ? 0 : 1]))
4396          : (c = this.clone());
4397        if (a && !a.is(CKEDITOR.dtd.$block)) d = 1;
4398        else if ((f = c[b ? "getNextEditableNode" : "getPreviousEditableNode"]()))
4399          (d = 1),
4400            (h = f.type == CKEDITOR.NODE_ELEMENT) &&
4401            f.is(CKEDITOR.dtd.$block) &&
4402            "false" == f.getAttribute("contenteditable")
4403              ? (c.setStartAt(f, CKEDITOR.POSITION_BEFORE_START),
4404                c.setEndAt(f, CKEDITOR.POSITION_AFTER_END))
4405              : !CKEDITOR.env.needsBrFiller &&
4406                h &&
4407                f.is(CKEDITOR.dom.walker.validEmptyBlockContainers)
4408                ? (c.setEnd(f, 0), c.collapse())
4409                : c.moveToPosition(f, p[b ? 1 : 0]);
4410        d && this.moveToRange(c);
4411        return !!d;
4412      },
4413      moveToElementEditStart: function(a) {
4414        return this.moveToElementEditablePosition(a);
4415      },
4416      moveToElementEditEnd: function(a) {
4417        return this.moveToElementEditablePosition(a, !0);
4418      },
4419      getEnclosedNode: function() {
4420        var a = this.clone();
4421        a.optimize();
4422        if (
4423          a.startContainer.type != CKEDITOR.NODE_ELEMENT ||
4424          a.endContainer.type != CKEDITOR.NODE_ELEMENT
4425        )
4426          return null;
4427        var a = new CKEDITOR.dom.walker(a),
4428          b = CKEDITOR.dom.walker.bookmark(!1, !0),
4429          c = CKEDITOR.dom.walker.whitespaces(!0);
4430        a.evaluator = function(a) {
4431          return c(a) && b(a);
4432        };
4433        var d = a.next();
4434        a.reset();
4435        return d && d.equals(a.previous()) ? d : null;
4436      },
4437      getTouchedStartNode: function() {
4438        var a = this.startContainer;
4439        return this.collapsed || a.type != CKEDITOR.NODE_ELEMENT
4440          ? a
4441          : a.getChild(this.startOffset) || a;
4442      },
4443      getTouchedEndNode: function() {
4444        var a = this.endContainer;
4445        return this.collapsed || a.type != CKEDITOR.NODE_ELEMENT
4446          ? a
4447          : a.getChild(this.endOffset - 1) || a;
4448      },
4449      getNextEditableNode: f(),
4450      getPreviousEditableNode: f(1),
4451      _getTableElement: function(a) {
4452        a = a || { td: 1, th: 1, tr: 1, tbody: 1, thead: 1, tfoot: 1, table: 1 };
4453        var b = this.startContainer,
4454          c = this.endContainer,
4455          d = b.getAscendant("table", !0),
4456          f = c.getAscendant("table", !0);
4457        return CKEDITOR.env.safari && d && c.equals(this.root)
4458          ? b.getAscendant(a, !0)
4459          : this.getEnclosedNode()
4460            ? this.getEnclosedNode().getAscendant(a, !0)
4461            : d && f && (d.equals(f) || d.contains(f) || f.contains(d))
4462              ? b.getAscendant(a, !0)
4463              : null;
4464      },
4465      scrollIntoView: function() {
4466        var a = new CKEDITOR.dom.element.createFromHtml(
4467            "\x3cspan\x3e\x26nbsp;\x3c/span\x3e",
4468            this.document,
4469          ),
4470          b,
4471          c,
4472          d,
4473          f = this.clone();
4474        f.optimize();
4475        (d = f.startContainer.type == CKEDITOR.NODE_TEXT)
4476          ? ((c = f.startContainer.getText()),
4477            (b = f.startContainer.split(f.startOffset)),
4478            a.insertAfter(f.startContainer))
4479          : f.insertNode(a);
4480        a.scrollIntoView();
4481        d && (f.startContainer.setText(c), b.remove());
4482        a.remove();
4483      },
4484      _setStartContainer: function(a) {
4485        this.startContainer = a;
4486      },
4487      _setEndContainer: function(a) {
4488        this.endContainer = a;
4489      },
4490      _find: function(a, b) {
4491        var c = this.getCommonAncestor(),
4492          d = this.getBoundaryNodes(),
4493          f = [],
4494          h,
4495          p,
4496          g,
4497          k;
4498        if (c && c.find)
4499          for (p = c.find(a), h = 0; h < p.count(); h++)
4500            if (((c = p.getItem(h)), b || !c.isReadOnly()))
4501              (g =
4502                c.getPosition(d.startNode) & CKEDITOR.POSITION_FOLLOWING || d.startNode.equals(c)),
4503                (k =
4504                  c.getPosition(d.endNode) &
4505                    (CKEDITOR.POSITION_PRECEDING + CKEDITOR.POSITION_IS_CONTAINED) ||
4506                  d.endNode.equals(c)),
4507                g && k && f.push(c);
4508        return f;
4509      },
4510    };
4511    CKEDITOR.dom.range.mergeRanges = function(a) {
4512      return CKEDITOR.tools.array.reduce(
4513        a,
4514        function(a, b) {
4515          var c = a[a.length - 1],
4516            d = !1;
4517          b = b.clone();
4518          b.enlarge(CKEDITOR.ENLARGE_ELEMENT);
4519          if (c) {
4520            var e = new CKEDITOR.dom.range(b.root),
4521              d = new CKEDITOR.dom.walker(e),
4522              f = CKEDITOR.dom.walker.whitespaces();
4523            e.setStart(c.endContainer, c.endOffset);
4524            e.setEnd(b.startContainer, b.startOffset);
4525            for (e = d.next(); f(e) || b.endContainer.equals(e); ) e = d.next();
4526            d = !e;
4527          }
4528          d ? c.setEnd(b.endContainer, b.endOffset) : a.push(b);
4529          return a;
4530        },
4531        [],
4532      );
4533    };
4534  })();
4535  CKEDITOR.POSITION_AFTER_START = 1;
4536  CKEDITOR.POSITION_BEFORE_END = 2;
4537  CKEDITOR.POSITION_BEFORE_START = 3;
4538  CKEDITOR.POSITION_AFTER_END = 4;
4539  CKEDITOR.ENLARGE_ELEMENT = 1;
4540  CKEDITOR.ENLARGE_BLOCK_CONTENTS = 2;
4541  CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS = 3;
4542  CKEDITOR.ENLARGE_INLINE = 4;
4543  CKEDITOR.START = 1;
4544  CKEDITOR.END = 2;
4545  CKEDITOR.SHRINK_ELEMENT = 1;
4546  CKEDITOR.SHRINK_TEXT = 2;
4547  ("use strict");
4548  (function() {
4549    function a(a) {
4550      1 > arguments.length ||
4551        ((this.range = a),
4552        (this.forceBrBreak = 0),
4553        (this.enlargeBr = 1),
4554        (this.enforceRealBlocks = 0),
4555        this._ || (this._ = {}));
4556    }
4557    function d(a) {
4558      var b = [];
4559      a.forEach(
4560        function(a) {
4561          if ("true" == a.getAttribute("contenteditable")) return b.push(a), !1;
4562        },
4563        CKEDITOR.NODE_ELEMENT,
4564        !0,
4565      );
4566      return b;
4567    }
4568    function b(a, c, f, h) {
4569      a: {
4570        null == h && (h = d(f));
4571        for (var g; (g = h.shift()); )
4572          if (g.getDtd().p) {
4573            h = { element: g, remaining: h };
4574            break a;
4575          }
4576        h = null;
4577      }
4578      if (!h) return 0;
4579      if ((g = CKEDITOR.filter.instances[h.element.data("cke-filter")]) && !g.check(c))
4580        return b(a, c, f, h.remaining);
4581      c = new CKEDITOR.dom.range(h.element);
4582      c.selectNodeContents(h.element);
4583      c = c.createIterator();
4584      c.enlargeBr = a.enlargeBr;
4585      c.enforceRealBlocks = a.enforceRealBlocks;
4586      c.activeFilter = c.filter = g;
4587      a._.nestedEditable = {
4588        element: h.element,
4589        container: f,
4590        remaining: h.remaining,
4591        iterator: c,
4592      };
4593      return 1;
4594    }
4595    function c(a, b, c) {
4596      if (!b) return !1;
4597      a = a.clone();
4598      a.collapse(!c);
4599      return a.checkBoundaryOfElement(b, c ? CKEDITOR.START : CKEDITOR.END);
4600    }
4601    var f = /^[\r\n\t ]+$/,
4602      h = CKEDITOR.dom.walker.bookmark(!1, !0),
4603      k = CKEDITOR.dom.walker.whitespaces(!0),
4604      g = function(a) {
4605        return h(a) && k(a);
4606      },
4607      m = { dd: 1, dt: 1, li: 1 };
4608    a.prototype = {
4609      getNextParagraph: function(a) {
4610        var d, k, x, B, D;
4611        a = a || "p";
4612        if (this._.nestedEditable) {
4613          if ((d = this._.nestedEditable.iterator.getNextParagraph(a)))
4614            return (this.activeFilter = this._.nestedEditable.iterator.activeFilter), d;
4615          this.activeFilter = this.filter;
4616          if (b(this, a, this._.nestedEditable.container, this._.nestedEditable.remaining))
4617            return (
4618              (this.activeFilter = this._.nestedEditable.iterator.activeFilter),
4619              this._.nestedEditable.iterator.getNextParagraph(a)
4620            );
4621          this._.nestedEditable = null;
4622        }
4623        if (!this.range.root.getDtd()[a]) return null;
4624        if (!this._.started) {
4625          var w = this.range.clone();
4626          k = w.startPath();
4627          var p = w.endPath(),
4628            J = !w.collapsed && c(w, k.block),
4629            u = !w.collapsed && c(w, p.block, 1);
4630          w.shrink(CKEDITOR.SHRINK_ELEMENT, !0);
4631          J && w.setStartAt(k.block, CKEDITOR.POSITION_BEFORE_END);
4632          u && w.setEndAt(p.block, CKEDITOR.POSITION_AFTER_START);
4633          k = w.endContainer.hasAscendant("pre", !0) || w.startContainer.hasAscendant("pre", !0);
4634          w.enlarge(
4635            (this.forceBrBreak && !k) || !this.enlargeBr
4636              ? CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS
4637              : CKEDITOR.ENLARGE_BLOCK_CONTENTS,
4638          );
4639          w.collapsed ||
4640            ((k = new CKEDITOR.dom.walker(w.clone())),
4641            (p = CKEDITOR.dom.walker.bookmark(!0, !0)),
4642            (k.evaluator = p),
4643            (this._.nextNode = k.next()),
4644            (k = new CKEDITOR.dom.walker(w.clone())),
4645            (k.evaluator = p),
4646            (k = k.previous()),
4647            (this._.lastNode = k.getNextSourceNode(!0, null, w.root)),
4648            this._.lastNode &&
4649              this._.lastNode.type == CKEDITOR.NODE_TEXT &&
4650              !CKEDITOR.tools.trim(this._.lastNode.getText()) &&
4651              this._.lastNode.getParent().isBlockBoundary() &&
4652              ((p = this.range.clone()),
4653              p.moveToPosition(this._.lastNode, CKEDITOR.POSITION_AFTER_END),
4654              p.checkEndOfBlock() &&
4655                ((p = new CKEDITOR.dom.elementPath(p.endContainer, p.root)),
4656                (this._.lastNode = (p.block || p.blockLimit).getNextSourceNode(!0)))),
4657            (this._.lastNode && w.root.contains(this._.lastNode)) ||
4658              ((this._.lastNode = this._.docEndMarker = w.document.createText("")),
4659              this._.lastNode.insertAfter(k)),
4660            (w = null));
4661          this._.started = 1;
4662          k = w;
4663        }
4664        p = this._.nextNode;
4665        w = this._.lastNode;
4666        for (this._.nextNode = null; p; ) {
4667          var J = 0,
4668            u = p.hasAscendant("pre"),
4669            K = p.type != CKEDITOR.NODE_ELEMENT,
4670            l = 0;
4671          if (K) p.type == CKEDITOR.NODE_TEXT && f.test(p.getText()) && (K = 0);
4672          else {
4673            var q = p.getName();
4674            if (CKEDITOR.dtd.$block[q] && "false" == p.getAttribute("contenteditable")) {
4675              d = p;
4676              b(this, a, d);
4677              break;
4678            } else if (p.isBlockBoundary(this.forceBrBreak && !u && { br: 1 })) {
4679              if ("br" == q) K = 1;
4680              else if (!k && !p.getChildCount() && "hr" != q) {
4681                d = p;
4682                x = p.equals(w);
4683                break;
4684              }
4685              k &&
4686                (k.setEndAt(p, CKEDITOR.POSITION_BEFORE_START), "br" != q && (this._.nextNode = p));
4687              J = 1;
4688            } else {
4689              if (p.getFirst()) {
4690                k || ((k = this.range.clone()), k.setStartAt(p, CKEDITOR.POSITION_BEFORE_START));
4691                p = p.getFirst();
4692                continue;
4693              }
4694              K = 1;
4695            }
4696          }
4697          K && !k && ((k = this.range.clone()), k.setStartAt(p, CKEDITOR.POSITION_BEFORE_START));
4698          x = (!J || K) && p.equals(w);
4699          if (k && !J)
4700            for (; !p.getNext(g) && !x; ) {
4701              q = p.getParent();
4702              if (q.isBlockBoundary(this.forceBrBreak && !u && { br: 1 })) {
4703                J = 1;
4704                K = 0;
4705                x || q.equals(w);
4706                k.setEndAt(q, CKEDITOR.POSITION_BEFORE_END);
4707                break;
4708              }
4709              p = q;
4710              K = 1;
4711              x = p.equals(w);
4712              l = 1;
4713            }
4714          K && k.setEndAt(p, CKEDITOR.POSITION_AFTER_END);
4715          p = this._getNextSourceNode(p, l, w);
4716          if ((x = !p) || (J && k)) break;
4717        }
4718        if (!d) {
4719          if (!k)
4720            return this._.docEndMarker && this._.docEndMarker.remove(), (this._.nextNode = null);
4721          d = new CKEDITOR.dom.elementPath(k.startContainer, k.root);
4722          p = d.blockLimit;
4723          J = { div: 1, th: 1, td: 1 };
4724          d = d.block;
4725          !d &&
4726          p &&
4727          !this.enforceRealBlocks &&
4728          J[p.getName()] &&
4729          k.checkStartOfBlock() &&
4730          k.checkEndOfBlock() &&
4731          !p.equals(k.root)
4732            ? (d = p)
4733            : !d || (this.enforceRealBlocks && d.is(m))
4734              ? ((d = this.range.document.createElement(a)),
4735                k.extractContents().appendTo(d),
4736                d.trim(),
4737                k.insertNode(d),
4738                (B = D = !0))
4739              : "li" != d.getName()
4740                ? (k.checkStartOfBlock() && k.checkEndOfBlock()) ||
4741                  ((d = d.clone(!1)),
4742                  k.extractContents().appendTo(d),
4743                  d.trim(),
4744                  (D = k.splitBlock()),
4745                  (B = !D.wasStartOfBlock),
4746                  (D = !D.wasEndOfBlock),
4747                  k.insertNode(d))
4748                : x ||
4749                  (this._.nextNode = d.equals(w)
4750                    ? null
4751                    : this._getNextSourceNode(k.getBoundaryNodes().endNode, 1, w));
4752        }
4753        B &&
4754          (B = d.getPrevious()) &&
4755          B.type == CKEDITOR.NODE_ELEMENT &&
4756          ("br" == B.getName()
4757            ? B.remove()
4758            : B.getLast() && "br" == B.getLast().$.nodeName.toLowerCase() && B.getLast().remove());
4759        D &&
4760          (B = d.getLast()) &&
4761          B.type == CKEDITOR.NODE_ELEMENT &&
4762          "br" == B.getName() &&
4763          (!CKEDITOR.env.needsBrFiller || B.getPrevious(h) || B.getNext(h)) &&
4764          B.remove();
4765        this._.nextNode ||
4766          (this._.nextNode = x || d.equals(w) || !w ? null : this._getNextSourceNode(d, 1, w));
4767        return d;
4768      },
4769      _getNextSourceNode: function(a, b, c) {
4770        function d(a) {
4771          return !(a.equals(c) || a.equals(f));
4772        }
4773        var f = this.range.root;
4774        for (a = a.getNextSourceNode(b, null, d); !h(a); ) a = a.getNextSourceNode(b, null, d);
4775        return a;
4776      },
4777    };
4778    CKEDITOR.dom.range.prototype.createIterator = function() {
4779      return new a(this);
4780    };
4781  })();
4782  CKEDITOR.command = function(a, d) {
4783    this.uiItems = [];
4784    this.exec = function(b) {
4785      if (this.state == CKEDITOR.TRISTATE_DISABLED || !this.checkAllowed()) return !1;
4786      this.editorFocus && a.focus();
4787      return !1 === this.fire("exec") ? !0 : !1 !== d.exec.call(this, a, b);
4788    };
4789    this.refresh = function(a, b) {
4790      if (!this.readOnly && a.readOnly) return !0;
4791      if ((this.context && !b.isContextFor(this.context)) || !this.checkAllowed(!0))
4792        return this.disable(), !0;
4793      this.startDisabled || this.enable();
4794      this.modes && !this.modes[a.mode] && this.disable();
4795      return !1 === this.fire("refresh", { editor: a, path: b })
4796        ? !0
4797        : d.refresh && !1 !== d.refresh.apply(this, arguments);
4798    };
4799    var b;
4800    this.checkAllowed = function(c) {
4801      return c || "boolean" != typeof b ? (b = a.activeFilter.checkFeature(this)) : b;
4802    };
4803    CKEDITOR.tools.extend(this, d, {
4804      modes: { wysiwyg: 1 },
4805      editorFocus: 1,
4806      contextSensitive: !!d.context,
4807      state: CKEDITOR.TRISTATE_DISABLED,
4808    });
4809    CKEDITOR.event.call(this);
4810  };
4811  CKEDITOR.command.prototype = {
4812    enable: function() {
4813      this.state == CKEDITOR.TRISTATE_DISABLED &&
4814        this.checkAllowed() &&
4815        this.setState(
4816          this.preserveState && "undefined" != typeof this.previousState
4817            ? this.previousState
4818            : CKEDITOR.TRISTATE_OFF,
4819        );
4820    },
4821    disable: function() {
4822      this.setState(CKEDITOR.TRISTATE_DISABLED);
4823    },
4824    setState: function(a) {
4825      if (this.state == a || (a != CKEDITOR.TRISTATE_DISABLED && !this.checkAllowed())) return !1;
4826      this.previousState = this.state;
4827      this.state = a;
4828      this.fire("state");
4829      return !0;
4830    },
4831    toggleState: function() {
4832      this.state == CKEDITOR.TRISTATE_OFF
4833        ? this.setState(CKEDITOR.TRISTATE_ON)
4834        : this.state == CKEDITOR.TRISTATE_ON && this.setState(CKEDITOR.TRISTATE_OFF);
4835    },
4836  };
4837  CKEDITOR.event.implementOn(CKEDITOR.command.prototype);
4838  CKEDITOR.ENTER_P = 1;
4839  CKEDITOR.ENTER_BR = 2;
4840  CKEDITOR.ENTER_DIV = 3;
4841  CKEDITOR.config = {
4842    customConfig: "config.js",
4843    autoUpdateElement: !0,
4844    language: "",
4845    defaultLanguage: "en",
4846    contentsLangDirection: "",
4847    enterMode: CKEDITOR.ENTER_P,
4848    forceEnterMode: !1,
4849    shiftEnterMode: CKEDITOR.ENTER_BR,
4850    docType: "\x3c!DOCTYPE html\x3e",
4851    bodyId: "",
4852    bodyClass: "",
4853    fullPage: !1,
4854    height: 200,
4855    contentsCss: CKEDITOR.getUrl("contents.css"),
4856    extraPlugins: "",
4857    removePlugins: "",
4858    protectedSource: [],
4859    tabIndex: 0,
4860    width: "",
4861    baseFloatZIndex: 1e4,
4862    blockedKeystrokes: [CKEDITOR.CTRL + 66, CKEDITOR.CTRL + 73, CKEDITOR.CTRL + 85],
4863  };
4864  (function() {
4865    function a(a, b, c, d, f) {
4866      var e, v;
4867      a = [];
4868      for (e in b) {
4869        v = b[e];
4870        v = "boolean" == typeof v ? {} : "function" == typeof v ? { match: v } : C(v);
4871        "$" != e.charAt(0) && (v.elements = e);
4872        c && (v.featureName = c.toLowerCase());
4873        var l = v;
4874        l.elements = k(l.elements, /\s+/) || null;
4875        l.propertiesOnly = l.propertiesOnly || !0 === l.elements;
4876        var n = /\s*,\s*/,
4877          p = void 0;
4878        for (p in P) {
4879          l[p] = k(l[p], n) || null;
4880          var h = l,
4881            q = O[p],
4882            t = k(l[O[p]], n),
4883            A = l[p],
4884            z = [],
4885            g = !0,
4886            H = void 0;
4887          t ? (g = !1) : (t = {});
4888          for (H in A) "!" == H.charAt(0) && ((H = H.slice(1)), z.push(H), (t[H] = !0), (g = !1));
4889          for (; (H = z.pop()); ) (A[H] = A["!" + H]), delete A["!" + H];
4890          h[q] = (g ? !1 : t) || null;
4891        }
4892        l.match = l.match || null;
4893        d.push(v);
4894        a.push(v);
4895      }
4896      b = f.elements;
4897      f = f.generic;
4898      var F;
4899      c = 0;
4900      for (d = a.length; c < d; ++c) {
4901        e = C(a[c]);
4902        v = !0 === e.classes || !0 === e.styles || !0 === e.attributes;
4903        l = e;
4904        p = q = n = void 0;
4905        for (n in P) l[n] = J(l[n]);
4906        h = !0;
4907        for (p in O) {
4908          n = O[p];
4909          q = l[n];
4910          t = [];
4911          A = void 0;
4912          for (A in q)
4913            -1 < A.indexOf("*")
4914              ? t.push(new RegExp("^" + A.replace(/\*/g, ".*") + "$"))
4915              : t.push(A);
4916          q = t;
4917          q.length && ((l[n] = q), (h = !1));
4918        }
4919        l.nothingRequired = h;
4920        l.noProperties = !(l.attributes || l.classes || l.styles);
4921        if (!0 === e.elements || null === e.elements) f[v ? "unshift" : "push"](e);
4922        else
4923          for (F in ((l = e.elements), delete e.elements, l))
4924            if (b[F]) b[F][v ? "unshift" : "push"](e);
4925            else b[F] = [e];
4926      }
4927    }
4928    function d(a, c, d, f) {
4929      if (!a.match || a.match(c))
4930        if (f || g(a, c))
4931          if (
4932            (a.propertiesOnly || (d.valid = !0),
4933            d.allAttributes || (d.allAttributes = b(a.attributes, c.attributes, d.validAttributes)),
4934            d.allStyles || (d.allStyles = b(a.styles, c.styles, d.validStyles)),
4935            !d.allClasses)
4936          ) {
4937            a = a.classes;
4938            c = c.classes;
4939            f = d.validClasses;
4940            if (a)
4941              if (!0 === a) a = !0;
4942              else {
4943                for (var e = 0, v = c.length, l; e < v; ++e) (l = c[e]), f[l] || (f[l] = a(l));
4944                a = !1;
4945              }
4946            else a = !1;
4947            d.allClasses = a;
4948          }
4949    }
4950    function b(a, b, c) {
4951      if (!a) return !1;
4952      if (!0 === a) return !0;
4953      for (var d in b) c[d] || (c[d] = a(d));
4954      return !1;
4955    }
4956    function c(a, b, c) {
4957      if (!a.match || a.match(b)) {
4958        if (a.noProperties) return !1;
4959        c.hadInvalidAttribute = f(a.attributes, b.attributes) || c.hadInvalidAttribute;
4960        c.hadInvalidStyle = f(a.styles, b.styles) || c.hadInvalidStyle;
4961        a = a.classes;
4962        b = b.classes;
4963        if (a) {
4964          for (var d = !1, e = !0 === a, v = b.length; v--; )
4965            if (e || a(b[v])) b.splice(v, 1), (d = !0);
4966          a = d;
4967        } else a = !1;
4968        c.hadInvalidClass = a || c.hadInvalidClass;
4969      }
4970    }
4971    function f(a, b) {
4972      if (!a) return !1;
4973      var c = !1,
4974        d = !0 === a,
4975        f;
4976      for (f in b) if (d || a(f)) delete b[f], (c = !0);
4977      return c;
4978    }
4979    function h(a, b, c) {
4980      if (a.disabled || (a.customConfig && !c) || !b) return !1;
4981      a._.cachedChecks = {};
4982      return !0;
4983    }
4984    function k(a, b) {
4985      if (!a) return !1;
4986      if (!0 === a) return a;
4987      if ("string" == typeof a)
4988        return (a = z(a)), "*" == a ? !0 : CKEDITOR.tools.convertArrayToObject(a.split(b));
4989      if (CKEDITOR.tools.isArray(a)) return a.length ? CKEDITOR.tools.convertArrayToObject(a) : !1;
4990      var c = {},
4991        d = 0,
4992        f;
4993      for (f in a) (c[f] = a[f]), d++;
4994      return 
4994d ? c : !1;
4995    }
4996    function g(a, b) {
4997      if (a.nothingRequired) return !0;
4998      var c, d, f, e;
4999      if ((f = a.requiredClasses))
5000        for (e = b.classes, c = 0; c < f.length; ++c)
5001          if (((d = f[c]), "string" == typeof d)) {
5002            if (-1 == CKEDITOR.tools.indexOf(e, d)) return !1;
5003          } else if (!CKEDITOR.tools.checkIfAnyArrayItemMatches(e, d)) return !1;
5004      return m(b.styles, a.requiredStyles) && m(b.attributes, a.requiredAttributes);
5005    }
5006    function m(a, b) {
5007      if (!b) return !0;
5008      for (var c = 0, d; c < b.length; ++c)
5009        if (((d = b[c]), "string" == typeof d)) {
5010          if (!(d in a)) return !1;
5011        } else if (!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a, d)) return !1;
5012      return !0;
5013    }
5014    function r(a) {
5015      if (!a) return {};
5016      a = a.split(/\s*,\s*/).sort();
5017      for (var b = {}; a.length; ) b[a.shift()] = "cke-test";
5018      return b;
5019    }
5020    function e(a) {
5021      var b,
5022        c,
5023        d,
5024        f,
5025        e = {},
5026        v = 1;
5027      for (a = z(a); (b = a.match(n)); )
5028        (c = b[2])
5029          ? ((d = y(c, "styles")), (f = y(c, "attrs")), (c = y(c, "classes")))
5030          : (d = f = c = null),
5031          (e["$" + v++] = { elements: b[1], classes: c, styles: d, attributes: f }),
5032          (a = a.slice(b[0].length));
5033      return e;
5034    }
5035    function y(a, b) {
5036      var c = a.match(N[b]);
5037      return c ? z(c[1]) : null;
5038    }
5039    function x(a) {
5040      var b = (a.styleBackup = a.attributes.style),
5041        c = (a.classBackup = a.attributes["class"]);
5042      a.styles || (a.styles = CKEDITOR.tools.parseCssText(b || "", 1));
5043      a.classes || (a.classes = c ? c.split(/\s+/) : []);
5044    }
5045    function B(a, b, f, e) {
5046      var l = 0,
5047        n;
5048      e.toHtml && (b.name = b.name.replace(v, "$1"));
5049      if (e.doCallbacks && a.elementCallbacks) {
5050        a: {
5051          n = a.elementCallbacks;
5052          for (var h = 0, t = n.length, C; h < t; ++h)
5053            if ((C = n[h](b))) {
5054              n = C;
5055              break a;
5056            }
5057          n = void 0;
5058        }
5059        if (n) return n;
5060      }
5061      if (e.doTransform && (n = a._.transformations[b.name])) {
5062        x(b);
5063        for (h = 0; h < n.length; ++h) q(a, b, n[h]);
5064        w(b);
5065      }
5066      if (e.doFilter) {
5067        a: {
5068          h = b.name;
5069          t = a._;
5070          a = t.allowedRules.elements[h];
5071          n = t.allowedRules.generic;
5072          h = t.disallowedRules.elements[h];
5073          t = t.disallowedRules.generic;
5074          C = e.skipRequired;
5075          var z = {
5076              valid: !1,
5077              validAttributes: {},
5078              validClasses: {},
5079              validStyles: {},
5080              allAttributes: !1,
5081              allClasses: !1,
5082              allStyles: !1,
5083              hadInvalidAttribute: !1,
5084              hadInvalidClass: !1,
5085              hadInvalidStyle: !1,
5086            },
5087            k,
5088            g;
5089          if (a || n) {
5090            x(b);
5091            if (h)
5092              for (k = 0, g = h.length; k < g; ++k)
5093                if (!1 === c(h[k], b, z)) {
5094                  a = null;
5095                  break a;
5096                }
5097            if (t) for (k = 0, g = t.length; k < g; ++k) c(t[k], b, z);
5098            if (a) for (k = 0, g = a.length; k < g; ++k) d(a[k], b, z, C);
5099            if (n) for (k = 0, g = n.length; k < g; ++k) d(n[k], b, z, C);
5100            a = z;
5101          } else a = null;
5102        }
5103        if (!a || !a.valid) return f.push(b), 1;
5104        g = a.validAttributes;
5105        var H = a.validStyles;
5106        n = a.validClasses;
5107        var h = b.attributes,
5108          F = b.styles,
5109          t = b.classes;
5110        C = b.classBackup;
5111        var L = b.styleBackup,
5112          G,
5113          N,
5114          E = [],
5115          z = [],
5116          O = /^data-cke-/;
5117        k = !1;
5118        delete h.style;
5119        delete h["class"];
5120        delete b.classBackup;
5121        delete b.styleBackup;
5122        if (!a.allAttributes)
5123          for (G in h)
5124            g[G] ||
5125              (O.test(G)
5126                ? G == (N = G.replace(/^data-cke-saved-/, "")) || g[N] || (delete h[G], (k = !0))
5127                : (delete h[G], (k = !0)));
5128        if (!a.allStyles || a.hadInvalidStyle) {
5129          for (G in F) a.allStyles || H[G] ? E.push(G + ":" + F[G]) : (k = !0);
5130          E.length && (h.style = E.sort().join("; "));
5131        } else L && (h.style = L);
5132        if (!a.allClasses || a.hadInvalidClass) {
5133          for (G = 0; G < t.length; ++G) (a.allClasses || n[t[G]]) && z.push(t[G]);
5134          z.length && (h["class"] = z.sort().join(" "));
5135          C && z.length < C.split(/\s+/).length && (k = !0);
5136        } else C && (h["class"] = C);
5137        k && (l = 1);
5138        if (!e.skipFinalValidation && !p(b)) return f.push(b), 1;
5139      }
5140      e.toHtml && (b.name = b.name.replace(A, "cke:$1"));
5141      return l;
5142    }
5143    function D(a) {
5144      var b = [],
5145        c;
5146      for (c in a) -1 < c.indexOf("*") && b.push(c.replace(/\*/g, ".*"));
5147      return b.length ? new RegExp("^(?:" + b.join("|") + ")$") : null;
5148    }
5149    function w(a) {
5150      var b = a.attributes,
5151        c;
5152      delete b.style;
5153      delete b["class"];
5154      if ((c = CKEDITOR.tools.writeCssText(a.styles, !0))) b.style = c;
5155      a.classes.length && (b["class"] = a.classes.sort().join(" "));
5156    }
5157    function p(a) {
5158      switch (a.name) {
5159        case "a":
5160          if (!(a.children.length || a.attributes.name || a.attributes.id)) return !1;
5161          break;
5162        case "img":
5163          if (!a.attributes.src) return !1;
5164      }
5165      return !0;
5166    }
5167    function J(a) {
5168      if (!a) return !1;
5169      if (!0 === a) return !0;
5170      var b = D(a);
5171      return function(c) {
5172        return c in a || (b && c.match(b));
5173      };
5174    }
5175    function u() {
5176      return new CKEDITOR.htmlParser.element("br");
5177    }
5178    function K(a) {
5179      return a.type == CKEDITOR.NODE_ELEMENT && ("br" == a.name || t.$block[a.name]);
5180    }
5181    function l(a, b, c) {
5182      var d = a.name;
5183      if (t.$empty[d] || !a.children.length)
5184        "hr" == d && "br" == b
5185          ? a.replaceWith(u())
5186          : (a.parent && c.push({ check: "it", el: a.parent }), a.remove());
5187      else if (t.$block[d] || "tr" == d)
5188        if ("br" == b)
5189          a.previous && !K(a.previous) && ((b = u()), b.insertBefore(a)),
5190            a.next && !K(a.next) && ((b = u()), b.insertAfter(a)),
5191            a.replaceWithChildren();
5192        else {
5193          var d = a.children,
5194            f;
5195          b: {
5196            f = t[b];
5197            for (var e = 0, v = d.length, l; e < v; ++e)
5198              if (((l = d[e]), l.type == CKEDITOR.NODE_ELEMENT && !f[l.name])) {
5199                f = !1;
5200                break b;
5201              }
5202            f = !0;
5203          }
5204          if (f) (a.name = b), (a.attributes = {}), c.push({ check: "parent-down", el: a });
5205          else {
5206            f = a.parent;
5207            for (
5208              var e = f.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT || "body" == f.name,
5209                n,
5210                h,
5211                v = d.length;
5212              0 < v;
5213
5214            )
5215              (l = d[--v]),
5216                e &&
5217                (l.type == CKEDITOR.NODE_TEXT ||
5218                  (l.type == CKEDITOR.NODE_ELEMENT && t.$inline[l.name]))
5219                  ? (n ||
5220                      ((n = new CKEDITOR.htmlParser.element(b)),
5221                      n.insertAfter(a),
5222                      c.push({ check: "parent-down", el: n })),
5223                    n.add(l, 0))
5224                  : ((n = null),
5225                    (h = t[f.name] || t.span),
5226                    l.insertAfter(a),
5227                    f.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT ||
5228                      l.type != CKEDITOR.NODE_ELEMENT ||
5229                      h[l.name] ||
5230                      c.push({ check: "el-up", el: l }));
5231            a.remove();
5232          }
5233        }
5234      else
5235        d in { style: 1, script: 1 }
5236          ? a.remove()
5237          : (a.parent && c.push({ check: "it", el: a.parent }), a.replaceWithChildren());
5238    }
5239    function q(a, b, c) {
5240      var d, f;
5241      for (d = 0; d < c.length; ++d)
5242        if (((f = c[d]), !((f.check && !a.check(f.check, !1)) || (f.left && !f.left(b))))) {
5243          f.right(b, G);
5244          break;
5245        }
5246    }
5247    function F(a, b) {
5248      var c = b.getDefinition(),
5249        d = c.attributes,
5250        f = c.styles,
5251        e,
5252        v,
5253        l,
5254        n;
5255      if (a.name != c.element) return !1;
5256      for (e in d)
5257        if ("class" == e)
5258          for (c = d[e].split(/\s+/), l = a.classes.join("|"); (n = c.pop()); ) {
5259            if (-1 == l.indexOf(n)) return !1;
5260          }
5261        else if (a.attributes[e] != d[e]) return !1;
5262      for (v in f) if (a.styles[v] != f[v]) return !1;
5263      return !0;
5264    }
5265    function L(a, b) {
5266      var c, d;
5267      "string" == typeof a
5268        ? (c = a)
5269        : a instanceof CKEDITOR.style ? (d = a) : ((c = a[0]), (d = a[1]));
5270      return [
5271        {
5272          element: c,
5273          left: d,
5274          right: function(a, c) {
5275            c.transform(a, b);
5276          },
5277        },
5278      ];
5279    }
5280    function E(a) {
5281      return function(b) {
5282        return F(b, a);
5283      };
5284    }
5285    function M(a) {
5286      return function(b, c) {
5287        c[a](b);
5288      };
5289    }
5290    var t = CKEDITOR.dtd,
5291      C = CKEDITOR.tools.copy,
5292      z = CKEDITOR.tools.trim,
5293      H = ["", "p", "br", "div"];
5294    CKEDITOR.FILTER_SKIP_TREE = 2;
5295    CKEDITOR.filter = function(a) {
5296      this.allowedContent = [];
5297      this.disallowedContent = [];
5298      this.elementCallbacks = null;
5299      this.disabled = !1;
5300      this.editor = null;
5301      this.id = CKEDITOR.tools.getNextNumber();
5302      this._ = {
5303        allowedRules: { elements: {}, generic: [] },
5304        disallowedRules: { elements: {}, generic: [] },
5305        transformations: {},
5306        cachedTests: {},
5307        cachedChecks: {},
5308      };
5309      CKEDITOR.filter.instances[this.id] = this;
5310      if (a instanceof CKEDITOR.editor) {
5311        a = this.editor = a;
5312        this.customConfig = !0;
5313        var b = a.config.allowedContent;
5314        !0 === b
5315          ? (this.disabled = !0)
5316          : (b || (this.customConfig = !1),
5317            this.allow(b, "config", 1),
5318            this.allow(a.config.extraAllowedContent, "extra", 1),
5319            this.allow(H[a.enterMode] + " " + H[a.shiftEnterMode], "default", 1),
5320            this.disallow(a.config.disallowedContent));
5321      } else (this.customConfig = !1), this.allow(a, "default", 1);
5322    };
5323    CKEDITOR.filter.instances = {};
5324    CKEDITOR.filter.prototype = {
5325      allow: function(b, c, d) {
5326        if (!h(this, b, d)) return !1;
5327        var f, v;
5328        if ("string" == typeof b) b = e(b);
5329        else if (b instanceof CKEDITOR.style) {
5330          if (b.toAllowedContentRules)
5331            return this.allow(b.toAllowedContentRules(this.editor), c, d);
5332          f = b.getDefinition();
5333          b = {};
5334          d = f.attributes;
5335          b[f.element] = f = {
5336            styles: f.styles,
5337            requiredStyles: f.styles && CKEDITOR.tools.objectKeys(f.styles),
5338          };
5339          d &&
5340            ((d = C(d)),
5341            (f.classes = d["class"] ? d["class"].split(/\s+/) : null),
5342            (f.requiredClasses = f.classes),
5343            delete d["class"],
5344            (f.attributes = d),
5345            (f.requiredAttributes = d && CKEDITOR.tools.objectKeys(d)));
5346        } else if (CKEDITOR.tools.isArray(b)) {
5347          for (f = 0; f < b.length; ++f) v = this.allow(b[f], c, d);
5348          return v;
5349        }
5350        a(this, b, c, this.allowedContent, this._.allowedRules);
5351        return !0;
5352      },
5353      applyTo: function(a, b, c, d) {
5354        if (this.disabled) return !1;
5355        var f = this,
5356          e = [],
5357          v = this.editor && this.editor.config.protectedSource,
5358          n,
5359          h = !1,
5360          q = { doFilter: !c, doTransform: !0, doCallbacks: !0, toHtml: b };
5361        a.forEach(
5362          function(a) {
5363            if (a.type == CKEDITOR.NODE_ELEMENT) {
5364              if ("off" == a.attributes["data-cke-filter"]) return !1;
5365              if (
5366                !b ||
5367                "span" != a.name ||
5368                !~CKEDITOR.tools
5369                  .objectKeys(a.attributes)
5370                  .join("|")
5371                  .indexOf("data-cke-")
5372              )
5373                if (((n = B(f, a, e, q)), n & 1)) h = !0;
5374                else if (n & 2) return !1;
5375            } else if (
5376              a.type == CKEDITOR.NODE_COMMENT &&
5377              a.value.match(/^\{cke_protected\}(?!\{C\})/)
5378            ) {
5379              var c;
5380              a: {
5381                var d = decodeURIComponent(a.value.replace(/^\{cke_protected\}/, ""));
5382                c = [];
5383                var l, p, t;
5384                if (v)
5385                  for (p = 0; p < v.length; ++p)
5386                    if ((t = d.match(v[p])) && t[0].length == d.length) {
5387                      c = !0;
5388                      break a;
5389                    }
5390                d = CKEDITOR.htmlParser.fragment.fromHtml(d);
5391                1 == d.children.length &&
5392                  (l = d.children[0]).type == CKEDITOR.NODE_ELEMENT &&
5393                  B(f, l, c, q);
5394                c = !c.length;
5395              }
5396              c || e.push(a);
5397            }
5398          },
5399          null,
5400          !0,
5401        );
5402        e.length && (h = !0);
5403        var C;
5404        a = [];
5405        d = H[d || (this.editor ? this.editor.enterMode : CKEDITOR.ENTER_P)];
5406        for (var z; (c = e.pop()); ) c.type == CKEDITOR.NODE_ELEMENT ? l(c, d, a) : c.remove();
5407        for (; (C = a.pop()); )
5408          if (((c = C.el), c.parent))
5409            switch (((z = t[c.parent.name] || t.span), C.check)) {
5410              case "it":
5411                t.$removeEmpty[c.name] && !c.children.length ? l(c, d, a) : p(c) || l(c, d, a);
5412                break;
5413              case "el-up":
5414                c.parent.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT || z[c.name] || l(c, d, a);
5415                break;
5416              case "parent-down":
5417                c.parent.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT || z[c.name] || l(c.parent, d, a);
5418            }
5419        return h;
5420      },
5421      checkFeature: function(a) {
5422        if (this.disabled || !a) return !0;
5423        a.toFeature && (a = a.toFeature(this.editor));
5424        return !a.requiredContent || this.check(a.requiredContent);
5425      },
5426      disable: function() {
5427        this.disabled = !0;
5428      },
5429      disallow: function(b) {
5430        if (!h(this, b, !0)) return !1;
5431        "string" == typeof b && (b = e(b));
5432        a(this, b, null, this.disallowedContent, this._.disallowedRules);
5433        return !0;
5434      },
5435      addContentForms: function(a) {
5436        if (!this.disabled && a) {
5437          var b,
5438            c,
5439            d = [],
5440            f;
5441          for (b = 0; b < a.length && !f; ++b)
5442            (c = a[b]),
5443              ("string" == typeof c || c instanceof CKEDITOR.style) && this.check(c) && (f = c);
5444          if (f) {
5445            for (b = 0; b < a.length; ++b) d.push(L(a[b], f));
5446            this.addTransformations(d);
5447          }
5448        }
5449      },
5450      addElementCallback: function(a) {
5451        this.elementCallbacks || (this.elementCallbacks = []);
5452        this.elementCallbacks.push(a);
5453      },
5454      addFeature: function(a) {
5455        if (this.disabled || !a) return !0;
5456        a.toFeature && (a = a.toFeature(this.editor));
5457        this.allow(a.allowedContent, a.name);
5458        this.addTransformations(a.contentTransformations);
5459        this.addContentForms(a.contentForms);
5460        return a.requiredContent && (this.customConfig || this.disallowedContent.length)
5461          ? this.check(a.requiredContent)
5462          : !0;
5463      },
5464      addTransformations: function(a) {
5465        var b, c;
5466        if (!this.disabled && a) {
5467          var d = this._.transformations,
5468            f;
5469          for (f = 0; f < a.length; ++f) {
5470            b = a[f];
5471            var e = void 0,
5472              v = void 0,
5473              l = void 0,
5474              n = void 0,
5475              h = void 0,
5476              p = void 0;
5477            c = [];
5478            for (v = 0; v < b.length; ++v)
5479              (l = b[v]),
5480                "string" == typeof l
5481                  ? ((l = l.split(/\s*:\s*/)), (n = l[0]), (h = null), (p = l[1]))
5482                  : ((n = l.check), (h = l.left), (p = l.right)),
5483                e ||
5484                  ((e = l),
5485                  (e = e.element
5486                    ? e.element
5487                    : n ? n.match(/^([a-z0-9]+)/i)[0] : e.left.getDefinition().element)),
5488                h instanceof CKEDITOR.style && (h = E(h)),
5489                c.push({
5490                  check: n == e ? null : n,
5491                  left: h,
5492                  right: "string" == typeof p ? M(p) : p,
5493                });
5494            b = e;
5495            d[b] || (d[b] = []);
5496            d[b].push(c);
5497          }
5498        }
5499      },
5500      check: function(a, b, c) {
5501        if (this.disabled) return !0;
5502        if (CKEDITOR.tools.isArray(a)) {
5503          for (var d = a.length; d--; ) if (this.check(a[d], b, c)) return !0;
5504          return !1;
5505        }
5506        var f, v;
5507        if ("string" == typeof a) {
5508          v = a + "\x3c" + (!1 === b ? "0" : "1") + (c ? "1" : "0") + "\x3e";
5509          if (v in this._.cachedChecks) return this._.cachedChecks[v];
5510          d = e(a).$1;
5511          f = d.styles;
5512          var l = d.classes;
5513          d.name = d.elements;
5514          d.classes = l = l ? l.split(/\s*,\s*/) : [];
5515          d.styles = r(f);
5516          d.attributes = r(d.attributes);
5517          d.children = [];
5518          l.length && (d.attributes["class"] = l.join(" "));
5519          f && (d.attributes.style = CKEDITOR.tools.writeCssText(d.styles));
5520          f = d;
5521        } else
5522          (d = a.getDefinition()),
5523            (f = d.styles),
5524            (l = d.attributes || {}),
5525            f && !CKEDITOR.tools.isEmpty(f)
5526              ? ((f = C(f)), (l.style = CKEDITOR.tools.writeCssText(f, !0)))
5527              : (f = {}),
5528            (f = {
5529              name: d.element,
5530              attributes: l,
5531              classes: l["class"] ? l["class"].split(/\s+/) : [],
5532              styles: f,
5533              children: [],
5534            });
5535        var l = CKEDITOR.tools.clone(f),
5536          n = [],
5537          h;
5538        if (!1 !== b && (h = this._.transformations[f.name])) {
5539          for (d = 0; d < h.length; ++d) q(this, f, h[d]);
5540          w(f);
5541        }
5542        B(this, l, n, {
5543          doFilter: !0,
5544          doTransform: !1 !== b,
5545          skipRequired: !c,
5546          skipFinalValidation: !c,
5547        });
5548        b =
5549          0 < n.length
5550            ? !1
5551            : CKEDITOR.tools.objectCompare(f.attributes, l.attributes, !0) ? !0 : !1;
5552        "string" == typeof a && (this._.cachedChecks[v] = b);
5553        return b;
5554      },
5555      getAllowedEnterMode: (function() {
5556        var a = ["p", "div", "br"],
5557          b = { p: CKEDITOR.ENTER_P, div: CKEDITOR.ENTER_DIV, br: CKEDITOR.ENTER_BR };
5558        return function(c, d) {
5559          var f = a.slice(),
5560            e;
5561          if (this.check(H[c])) return c;
5562          for (d || (f = f.reverse()); (e = f.pop()); ) if (this.check(e)) return b[e];
5563          return CKEDITOR.ENTER_BR;
5564        };
5565      })(),
5566      clone: function() {
5567        var a = new CKEDITOR.filter(),
5568          b = CKEDITOR.tools.clone;
5569        a.allowedContent = b(this.allowedContent);
5570        a._.allowedRules = b(this._.allowedRules);
5571        a.disallowedContent = b(this.disallowedContent);
5572        a._.disallowedRules = b(this._.disallowedRules);
5573        a._.transformations = b(this._.transformations);
5574        a.disabled = this.disabled;
5575        a.editor = this.editor;
5576        return a;
5577      },
5578      destroy: function() {
5579        delete CKEDITOR.filter.instances[this.id];
5580        delete this._;
5581        delete this.allowedContent;
5582        delete this.disallowedContent;
5583      },
5584    };
5585    var P = { styles: 1, attributes: 1, classes: 1 },
5586      O = {
5587        styles: "requiredStyles",
5588        attributes: "requiredAttributes",
5589        classes: "requiredClasses",
5590      },
5591      n = /^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,
5592      N = { styles: /{([^}]+)}/, attrs: /\[([^\]]+)\]/, classes: /\(([^\)]+)\)/ },
5593      v = /^cke:(object|embed|param)$/,
5594      A = /^(object|embed|param)$/,
5595      G;
5596    G = CKEDITOR.filter.transformationsTools = {
5597      sizeToStyle: function(a) {
5598        this.lengthToStyle(a, "width");
5599        this.lengthToStyle(a, "height");
5600      },
5601      sizeToAttribute: function(a) {
5602        this.lengthToAttribute(a, "width");
5603        this.lengthToAttribute(a, "height");
5604      },
5605      lengthToStyle: function(a, b, c) {
5606        c = c || b;
5607        if (!(c in a.styles)) {
5608          var d = a.attributes[b];
5609          d && (/^\d+$/.test(d) && (d += "px"), (a.styles[c] = d));
5610        }
5611        delete a.attributes[b];
5612      },
5613      lengthToAttribute: function(a, b, c) {
5614        c = c || b;
5615        if (!(c in a.attributes)) {
5616          var d = a.styles[b],
5617            f = d && d.match(/^(\d+)(?:\.\d*)?px$/);
5618          f ? (a.attributes[c] = f[1]) : "cke-test" == d && (a.attributes[c] = "cke-test");
5619        }
5620        delete a.styles[b];
5621      },
5622      alignmentToStyle: function(a) {
5623        if (!("float" in a.styles)) {
5624          var b = a.attributes.align;
5625          if ("left" == b || "right" == b) a.styles["float"] = b;
5626        }
5627        delete a.attributes.align;
5628      },
5629      alignmentToAttribute: function(a) {
5630        if (!("align" in a.attributes)) {
5631          var b = a.styles["float"];
5632          if ("left" == b || "right" == b) a.attributes.align = b;
5633        }
5634        delete a.styles["float"];
5635      },
5636      splitBorderShorthand: function(a) {
5637        if (a.styles.border) {
5638          var b = CKEDITOR.tools.style.parse.border(a.styles.border);
5639          b.color && (a.styles["border-color"] = b.color);
5640          b.style && (a.styles["border-style"] = b.style);
5641          b.width && (a.styles["border-width"] = b.width);
5642          delete a.styles.border;
5643        }
5644      },
5645      listTypeToStyle: function(a) {
5646        if (a.attributes.type)
5647          switch (a.attributes.type) {
5648            case "a":
5649              a.styles["list-style-type"] = "lower-alpha";
5650              break;
5651            case "A":
5652              a.styles["list-style-type"] = "upper-alpha";
5653              break;
5654            case "i":
5655              a.styles["list-style-type"] = "lower-roman";
5656              break;
5657            case "I":
5658              a.styles["list-style-type"] = "upper-roman";
5659              break;
5660            case "1":
5661              a.styles["list-style-type"] = "decimal";
5662              break;
5663            default:
5664              a.styles["list-style-type"] = a.attributes.type;
5665          }
5666      },
5667      splitMarginShorthand: function(a) {
5668        function b(d) {
5669          a.styles["margin-top"] = c[d[0]];
5670          a.styles["margin-right"] = c[d[1]];
5671          a.styles["margin-bottom"] = c[d[2]];
5672          a.styles["margin-left"] = c[d[3]];
5673        }
5674        if (a.styles.margin) {
5675          var c = a.styles.margin.match(/(\-?[\.\d]+\w+)/g) || ["0px"];
5676          switch (c.length) {
5677            case 1:
5678              b([0, 0, 0, 0]);
5679              break;
5680            case 2:
5681              b([0, 1, 0, 1]);
5682              break;
5683            case 3:
5684              b([0, 1, 2, 1]);
5685              break;
5686            case 4:
5687              b([0, 1, 2, 3]);
5688          }
5689          delete a.styles.margin;
5690        }
5691      },
5692      matchesStyle: F,
5693      transform: function(a, b) {
5694        if ("string" == typeof b) a.name = b;
5695        else {
5696          var c = b.getDefinition(),
5697            d = c.styles,
5698            f = c.attributes,
5699            e,
5700            l,
5701            v,
5702            n;
5703          a.name = c.element;
5704          for (e in f)
5705            if ("class" == e)
5706              for (c = a.classes.join("|"), v = f[e].split(/\s+/); (n = v.pop()); )
5707                -1 == c.indexOf(n) && a.classes.push(n);
5708            else a.attributes[e] = f[e];
5709          for (l in d) a.styles[l] = d[l];
5710        }
5711      },
5712    };
5713  })();
5714  (function() {
5715    CKEDITOR.focusManager = function(a) {
5716      if (a.focusManager) return a.focusManager;
5717      this.hasFocus = !1;
5718      this.currentActive = null;
5719      this._ = { editor: a };
5720      return this;
5721    };
5722    CKEDITOR.focusManager._ = { blurDelay: 200 };
5723    CKEDITOR.focusManager.prototype = {
5724      focus: function(a) {
5725        this._.timer && clearTimeout(this._.timer);
5726        a && (this.currentActive = a);
5727        this.hasFocus ||
5728          this._.locked ||
5729          ((a = CKEDITOR.currentInstance) && a.focusManager.blur(1),
5730          (this.hasFocus = !0),
5731          (a = this._.editor.container) && a.addClass("cke_focus"),
5732          this._.editor.fire("focus"));
5733      },
5734      lock: function() {
5735        this._.locked = 1;
5736      },
5737      unlock: function() {
5738        delete this._.locked;
5739      },
5740      blur: function(a) {
5741        function d() {
5742          if (this.hasFocus) {
5743            this.hasFocus = !1;
5744            var a = this._.editor.container;
5745            a && a.removeClass("cke_focus");
5746            this._.editor.fire("blur");
5747          }
5748        }
5749        if (!this._.locked) {
5750          this._.timer && clearTimeout(this._.timer);
5751          var b = CKEDITOR.focusManager._.blurDelay;
5752          a || !b
5753            ? d.call(this)
5754            : (this._.timer = CKEDITOR.tools.setTimeout(
5755                function() {
5756                  delete this._.timer;
5757                  d.call(this);
5758                },
5759                b,
5760                this,
5761              ));
5762        }
5763      },
5764      add: function(a, d) {
5765        var b = a.getCustomData("focusmanager");
5766        if (!b || b != this) {
5767          b && b.remove(a);
5768          var b = "focus",
5769            c = "blur";
5770          d &&
5771            (CKEDITOR.env.ie
5772              ? ((b = "focusin"), (c = "focusout"))
5773              : (CKEDITOR.event.useCapture = 1));
5774          var f = {
5775            blur: function() {
5776              a.equals(this.currentActive) && this.blur();
5777            },
5778            focus: function() {
5779              this.focus(a);
5780            },
5781          };
5782          a.on(b, f.focus, this);
5783          a.on(c, f.blur, this);
5784          d && (CKEDITOR.event.useCapture = 0);
5785          a.setCustomData("focusmanager", this);
5786          a.setCustomData("focusmanager_handlers", f);
5787        }
5788      },
5789      remove: function(a) {
5790        a.removeCustomData("focusmanager");
5791        var d = a.removeCustomData("focusmanager_handlers");
5792        a.removeListener("blur", d.blur);
5793        a.removeListener("focus", d.focus);
5794      },
5795    };
5796  })();
5797  CKEDITOR.keystrokeHandler = function(a) {
5798    if (a.keystrokeHandler) return a.keystrokeHandler;
5799    this.keystrokes = {};
5800    this.blockedKeystrokes = {};
5801    this._ = { editor: a };
5802    return this;
5803  };
5804  (function() {
5805    var a,
5806      d = function(b) {
5807        b = b.data;
5808        var d = b.getKeystroke(),
5809          h = this.keystrokes[d],
5810          k = this._.editor;
5811        a = !1 === k.fire("key", { keyCode: d, domEvent: b });
5812        a ||
5813          (h && (a = !1 !== k.execCommand(h, { from: "keystrokeHandler" })),
5814          a || (a = !!this.blockedKeystrokes[d]));
5815        a && b.preventDefault(!0);
5816        return !a;
5817      },
5818      b = function(b) {
5819        a && ((a = !1), b.data.preventDefault(!0));
5820      };
5821    CKEDITOR.keystrokeHandler.prototype = {
5822      attach: function(a) {
5823        a.on("keydown", d, this);
5824        if (CKEDITOR.env.gecko && CKEDITOR.env.mac) a.on("keypress", b, this);
5825      },
5826    };
5827  })();
5828  (function() {
5829    CKEDITOR.lang = {
5830      languages: {
5831        af: 1,
5832        ar: 1,
5833        az: 1,
5834        bg: 1,
5835        bn: 1,
5836        bs: 1,
5837        ca: 1,
5838        cs: 1,
5839        cy: 1,
5840        da: 1,
5841        de: 1,
5842        "de-ch": 1,
5843        el: 1,
5844        "en-au": 1,
5845        "en-ca": 1,
5846        "en-gb": 1,
5847        en: 1,
5848        eo: 1,
5849        es: 1,
5850        "es-mx": 1,
5851        et: 1,
5852        eu: 1,
5853        fa: 1,
5854        fi: 1,
5855        fo: 1,
5856        "fr-ca": 1,
5857        fr: 1,
5858        gl: 1,
5859        gu: 1,
5860        he: 1,
5861        hi: 1,
5862        hr: 1,
5863        hu: 1,
5864        id: 1,
5865        is: 1,
5866        it: 1,
5867        ja: 1,
5868        ka: 1,
5869        km: 1,
5870        ko: 1,
5871        ku: 1,
5872        lt: 1,
5873        lv: 1,
5874        mk: 1,
5875        mn: 1,
5876        ms: 1,
5877        nb: 1,
5878        nl: 1,
5879        no: 1,
5880        oc: 1,
5881        pl: 1,
5882        "pt-br": 1,
5883        pt: 1,
5884        ro: 1,
5885        ru: 1,
5886        si: 1,
5887        sk: 1,
5888        sl: 1,
5889        sq: 1,
5890        "sr-latn": 1,
5891        sr: 1,
5892        sv: 1,
5893        th: 1,
5894        tr: 1,
5895        tt: 1,
5896        ug: 1,
5897        uk: 1,
5898        vi: 1,
5899        "zh-cn": 1,
5900        zh: 1,
5901      },
5902      rtl: { ar: 1, fa: 1, he: 1, ku: 1, ug: 1 },
5903      load: function(a, d, b) {
5904        (a && CKEDITOR.lang.languages[a]) || (a = this.detect(d, a));
5905        var c = this;
5906        d = function() {
5907          c[a].dir = c.rtl[a] ? "rtl" : "ltr";
5908          b(a, c[a]);
5909        };
5910        this[a] ? d() : CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/" + a + ".js"), d, this);
5911      },
5912      detect: function(a, d) {
5913        var b = this.languages;
5914        d = d || navigator.userLanguage || navigator.language || a;
5915        var c = d.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),
5916          f = c[1],
5917          c = c[2];
5918        b[f + "-" + c] ? (f = f + "-" + c) : b[f] || (f = null);
5919        CKEDITOR.lang.detect = f
5920          ? function() {
5921              return f;
5922            }
5923          : function(a) {
5924              return a;
5925            };
5926        return f || a;
5927      },
5928    };
5929  })();
5930  CKEDITOR.scriptLoader = (function() {
5931    var a = {},
5932      d = {};
5933    return {
5934      load: function(b, c, f, h) {
5935        var k = "string" == typeof b;
5936        k && (b = [b]);
5937        f || (f = CKEDITOR);
5938        var g = b.length,
5939          m = [],
5940          r = [],
5941          e = function(a) {
5942            c && (k ? c.call(f, a) : c.call(f, m, r));
5943          };
5944        if (0 === g) e(!0);
5945        else {
5946          var y = function(a, b) {
5947              (b ? m : r).push(a);
5948              0 >= --g && (h && CKEDITOR.document.getDocumentElement().removeStyle("cursor"), e(b));
5949            },
5950            x = function(b, c) {
5951              a[b] = 1;
5952              var f = d[b];
5953              delete d[b];
5954              for (var e = 0; e < f.length; e++) f[e](b, c);
5955            },
5956            B = function(b) {
5957              if (a[b]) y(b, !0);
5958              else {
5959                var f = d[b] || (d[b] = []);
5960                f.push(y);
5961                if (!(1 < f.length)) {
5962                  var e = new CKEDITOR.dom.element("script");
5963                  e.setAttributes({ type: "text/javascript", src: b });
5964                  c &&
5965                    (CKEDITOR.env.ie && (8 >= CKEDITOR.env.version || CKEDITOR.env.ie9Compat)
5966                      ? (e.$.onreadystatechange = function() {
5967                          if ("loaded" == e.$.readyState || "complete" == e.$.readyState)
5968                            (e.$.onreadystatechange = null), x(b, !0);
5969                        })
5970                      : ((e.$.onload = function() {
5971                          setTimeout(function() {
5972                            x(b, !0);
5973                          }, 0);
5974                        }),
5975                        (e.$.onerror = function() {
5976                          x(b, !1);
5977                        })));
5978                  e.appendTo(CKEDITOR.document.getHead());
5979                }
5980              }
5981            };
5982          h && CKEDITOR.document.getDocumentElement().setStyle("cursor", "wait");
5983          for (var D = 0; D < g; D++) B(b[D]);
5984        }
5985      },
5986      queue: (function() {
5987        function a() {
5988          var b;
5989          (b = c[0]) && this.load(b.scriptUrl, b.callback, CKEDITOR, 0);
5990        }
5991        var c = [];
5992        return function(d, h) {
5993          var k = this;
5994          c.push({
5995            scriptUrl: d,
5996            callback: function() {
5997              h && h.apply(this, arguments);
5998              c.shift();
5999              a.call(k);
6000            },
6001          });
6002          1 == c.length && a.call(this);
6003        };
6004      })(),
6005    };
6006  })();
6007  CKEDITOR.resourceManager = function(a, d) {
6008    this.basePath = a;
6009    this.fileName = d;
6010    this.registered = {};
6011    this.loaded = {};
6012    this.externals = {};
6013    this._ = { waitingList: {} };
6014  };
6015  CKEDITOR.resourceManager.prototype = {
6016    add: function(a, d) {
6017      if (this.registered[a])
6018        throw Error(
6019          '[CKEDITOR.resourceManager.add] The resource name "' + a + '" is already registered.',
6020        );
6021      var b = (this.registered[a] = d || {});
6022      b.name = a;
6023      b.path = this.getPath(a);
6024      CKEDITOR.fire(a + CKEDITOR.tools.capitalize(this.fileName) + "Ready", b);
6025      return this.get(a);
6026    },
6027    get: function(a) {
6028      return this.registered[a] || null;
6029    },
6030    getPath: function(a) {
6031      var d = this.externals[a];
6032      return CKEDITOR.getUrl((d && d.dir) || this.basePath + a + "/");
6033    },
6034    getFilePath: function(a) {
6035      var d = this.externals[a];
6036      return CKEDITOR.getUrl(this.getPath(a) + (d ? d.file : this.fileName + ".js"));
6037    },
6038    addExternal: function(a, d, b) {
6039      a = a.split(",");
6040      for (var c = 0; c < a.length; c++) {
6041        var f = a[c];
6042        b ||
6043          (d = d.replace(/[^\/]+$/, function(a) {
6044            b = a;
6045            return "";
6046          }));
6047        this.externals[f] = { dir: d, file: b || this.fileName + ".js" };
6048      }
6049    },
6050    load: function(a, d, b) {
6051      CKEDITOR.tools.isArray(a) || (a = a ? [a] : []);
6052      for (
6053        var c = this.loaded, f = this.registered, h = [], k = {}, g = {}, m = 0;
6054        m < a.length;
6055        m++
6056      ) {
6057        var r = a[m];
6058        if (r)
6059          if (c[r] || f[r]) g[r] = this.get(r);
6060          else {
6061            var e = this.getFilePath(r);
6062            h.push(e);
6063            e in k || (k[e] = []);
6064            k[e].push(r);
6065          }
6066      }
6067      CKEDITOR.scriptLoader.load(
6068        h,
6069        function(a, f) {
6070          if (f.length)
6071            throw Error(
6072              '[CKEDITOR.resourceManager.load] Resource name "' +
6073                k[f[0]].join(",") +
6074                '" was not found at "' +
6075                f[0] +
6076                '".',
6077            );
6078          for (var e = 0; e < a.length; e++)
6079            for (var h = k[a[e]], m = 0; m < h.length; m++) {
6080              var p = h[m];
6081              g[p] = this.get(p);
6082              c[p] = 1;
6083            }
6084          d.call(b, g);
6085        },
6086        this,
6087      );
6088    },
6089  };
6090  CKEDITOR.plugins = new CKEDITOR.resourceManager("plugins/", "plugin");
6091  CKEDITOR.plugins.load = CKEDITOR.tools.override(CKEDITOR.plugins.load, function(a) {
6092    var d = {};
6093    return function(b, c, f) {
6094      var h = {},
6095        k = function(b) {
6096          a.call(
6097            this,
6098            b,
6099            function(a) {
6100              CKEDITOR.tools.extend(h, a);
6101              var b = [],
6102                e;
6103              for (e in a) {
6104                var g = a[e],
6105                  x = g && g.requires;
6106                if (!d[e]) {
6107                  if (g.icons)
6108                    for (var B = g.icons.split(","), D = B.length; D--; )
6109                      CKEDITOR.skin.addIcon(
6110                        B[D],
6111                        g.path +
6112                          "icons/" +
6113                          (CKEDITOR.env.hidpi && g.hidpi ? "hidpi/" : "") +
6114                          B[D] +
6115                          ".png",
6116                      );
6117                  d[e] = 1;
6118                }
6119                if (x)
6120                  for (x.split && (x = x.split(",")), g = 0; g < x.length; g++)
6121                    h[x[g]] || b.push(x[g]);
6122              }
6123              if (b.length) k.call(this, b);
6124              else {
6125                for (e in h)
6126                  (g = h[e]),
6127                    g.onLoad &&
6128                      !g.onLoad._called &&
6129                      (!1 === g.onLoad() && delete h[e], (g.onLoad._called = 1));
6130                c && c.call(f || window, h);
6131              }
6132            },
6133            this,
6134          );
6135        };
6136      k.call(this, b);
6137    };
6138  });
6139  CKEDITOR.plugins.setLang = function(a, d, b) {
6140    var c = this.get(a);
6141    a = c.langEntries || (c.langEntries = {});
6142    c = c.lang || (c.lang = []);
6143    c.split && (c = c.split(","));
6144    -1 == CKEDITOR.tools.indexOf(c, d) && c.push(d);
6145    a[d] = b;
6146  };
6147  CKEDITOR.ui = function(a) {
6148    if (a.ui) return a.ui;
6149    this.items = {};
6150    this.instances = {};
6151    this.editor = a;
6152    this._ = { handlers: {} };
6153    return this;
6154  };
6155  CKEDITOR.ui.prototype = {
6156    add: function(a, d, b) {
6157      b.name = a.toLowerCase();
6158      var c = (this.items[a] = {
6159        type: d,
6160        command: b.command || null,
6161        args: Array.prototype.slice.call(arguments, 2),
6162      });
6163      CKEDITOR.tools.extend(c, b);
6164    },
6165    get: function(a) {
6166      return this.instances[a];
6167    },
6168    create: function(a) {
6169      var d = this.items[a],
6170        b = d && this._.handlers[d.type],
6171        c = d && d.command && this.editor.getCommand(d.command),
6172        b = b && b.create.apply(this, d.args);
6173      this.instances[a] = b;
6174      c && c.uiItems.push(b);
6175      b && !b.type && (b.type = d.type);
6176      return b;
6177    },
6178    addHandler: function(a, d) {
6179      this._.handlers[a] = d;
6180    },
6181    space: function(a) {
6182      return CKEDITOR.document.getById(this.spaceId(a));
6183    },
6184    spaceId: function(a) {
6185      return this.editor.id + "_" + a;
6186    },
6187  };
6188  CKEDITOR.event.implementOn(CKEDITOR.ui);
6189  (function() {
6190    function a(a, f, e) {
6191      CKEDITOR.event.call(this);
6192      a = a && CKEDITOR.tools.clone(a);
6193      if (void 0 !== f) {
6194        if (!(f instanceof CKEDITOR.dom.element))
6195          throw Error("Expect element of type CKEDITOR.dom.element.");
6196        if (!e) throw Error("One of the element modes must be specified.");
6197        if (CKEDITOR.env.ie && CKEDITOR.env.quirks && e == CKEDITOR.ELEMENT_MODE_INLINE)
6198          throw Error("Inline element mode is not supported on IE quirks.");
6199        if (!b(f, e))
6200          throw Error(
6201            'The specified element mode is not supported on element: "' + f.getName() + '".',
6202          );
6203        this.element = f;
6204        this.elementMode = e;
6205        this.name =
6206          this.elementMode != CKEDITOR.ELEMENT_MODE_APPENDTO && (f.getId() || f.getNameAtt());
6207      } else this.elementMode = CKEDITOR.ELEMENT_MODE_NONE;
6208      this._ = {};
6209      this.commands = {};
6210      this.templates = {};
6211      this.name = this.name || d();
6212      this.id = CKEDITOR.tools.getNextId();
6213      this.status = "unloaded";
6214      this.config = CKEDITOR.tools.prototypedCopy(CKEDITOR.config);
6215      this.ui = new CKEDITOR.ui(this);
6216      this.focusManager = new CKEDITOR.focusManager(this);
6217      this.keystrokeHandler = new CKEDITOR.keystrokeHandler(this);
6218      this.on("readOnly", c);
6219      this.on("selectionChange", function(a) {
6220        h(this, a.data.path);
6221      });
6222      this.on("activeFilterChange", function() {
6223        h(this, this.elementPath(), !0);
6224      });
6225      this.on("mode", c);
6226      this.on("instanceReady", function() {
6227        if (this.config.startupFocus) {
6228          if ("end" === this.config.startupFocus) {
6229            var a = this.createRange();
6230            a.selectNodeContents(this.editable());
6231            a.shrink(CKEDITOR.SHRINK_ELEMENT, !0);
6232            a.collapse();
6233            this.getSelection().selectRanges([a]);
6234          }
6235          this.focus();
6236        }
6237      });
6238      CKEDITOR.fire("instanceCreated", null, this);
6239      CKEDITOR.add(this);
6240      CKEDITOR.tools.setTimeout(
6241        function() {
6242          "destroyed" !== this.status ? g(this, a) : CKEDITOR.warn("editor-incorrect-destroy");
6243        },
6244        0,
6245        this,
6246      );
6247    }
6248    function d() {
6249      do var a = "editor" + ++D;
6250      while (CKEDITOR.instances[a]);
6251      return a;
6252    }
6253    function b(a, b) {
6254      return b == CKEDITOR.ELEMENT_MODE_INLINE
6255        ? a.is(CKEDITOR.dtd.$editable) || a.is("textarea")
6256        : b == CKEDITOR.ELEMENT_MODE_REPLACE ? !a.is(CKEDITOR.dtd.$nonBodyContent) : 1;
6257    }
6258    function c() {
6259      var a = this.commands,
6260        b;
6261      for (b in a) f(this, a[b]);
6262    }
6263    function f(a, b) {
6264      b[
6265        b.startDisabled
6266          ? "disable"
6267          : a.readOnly && !b.readOnly ? "disable" : b.modes[a.mode] ? "enable" : "disable"
6268      ]();
6269    }
6270    function h(a, b, c) {
6271      if (b) {
6272        var d,
6273          f,
6274          e = a.commands;
6275        for (f in e) (d = e[f]), (c || d.contextSensitive) && d.refresh(a, b);
6276      }
6277    }
6278    function k(a) {
6279      var b = a.config.customConfig;
6280      if (!b) return !1;
6281      var b = CKEDITOR.getUrl(b),
6282        c = w[b] || (w[b] = {});
6283      c.fn
6284        ? (c.fn.call(a, a.config),
6285          (CKEDITOR.getUrl(a.config.customConfig) != b && k(a)) || a.fireOnce("customConfigLoaded"))
6286        : CKEDITOR.scriptLoader.queue(b, function() {
6287            c.fn = CKEDITOR.editorConfig ? CKEDITOR.editorConfig : function() {};
6288            k(a);
6289          });
6290      return !0;
6291    }
6292    function g(a, b) {
6293      a.on("customConfigLoaded", function() {
6294        if (b) {
6295          if (b.on) for (var c in b.on) a.on(c, b.on[c]);
6296          CKEDITOR.tools.extend(a.config, b, !0);
6297          delete a.config.on;
6298        }
6299        c = a.config;
6300        a.readOnly = c.readOnly
6301          ? !0
6302          : a.elementMode == CKEDITOR.ELEMENT_MODE_INLINE
6303            ? a.element.is("textarea")
6304              ? a.element.hasAttribute("disabled") || a.element.hasAttribute("readonly")
6305              : a.element.isReadOnly()
6306            : a.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE
6307              ? a.element.hasAttribute("disabled") || a.element.hasAttribute("readonly")
6308              : !1;
6309        a.blockless =
6310          a.elementMode == CKEDITOR.ELEMENT_MODE_INLINE
6311            ? !(a.element.is("textarea") || CKEDITOR.dtd[a.element.getName()].p)
6312            : !1;
6313        a.tabIndex = c.tabIndex || (a.element && a.element.getAttribute("tabindex")) || 0;
6314        a.activeEnterMode = a.enterMode = a.blockless ? CKEDITOR.ENTER_BR : c.enterMode;
6315        a.activeShiftEnterMode = a.shiftEnterMode = a.blockless
6316          ? CKEDITOR.ENTER_BR
6317          : c.shiftEnterMode;
6318        c.skin && (CKEDITOR.skinName = c.skin);
6319        a.fireOnce("configLoaded");
6320        a.dataProcessor = new CKEDITOR.htmlDataProcessor(a);
6321        a.filter = a.activeFilter = new CKEDITOR.filter(a);
6322        m(a);
6323      });
6324      b && null != b.customConfig && (a.config.customConfig = b.customConfig);
6325      k(a) || a.fireOnce("customConfigLoaded");
6326    }
6327    function m(a) {
6328      CKEDITOR.skin.loadPart("editor", function() {
6329        r(a);
6330      });
6331    }
6332    function r(a) {
6333      CKEDITOR.lang.load(a.config.language, a.config.defaultLanguage, function(b, c) {
6334        var d = a.config.title;
6335        a.langCode = b;
6336        a.lang = CKEDITOR.tools.prototypedCopy(c);
6337        a.title = "string" == typeof d || !1 === d ? d : [a.lang.editor, a.name].join(", ");
6338        a.config.contentsLangDirection ||
6339          (a.config.contentsLangDirection =
6340            a.elementMode == CKEDITOR.ELEMENT_MODE_INLINE ? a.element.getDirection(1) : a.lang.dir);
6341        a.fire("langLoaded");
6342        e(a);
6343      });
6344    }
6345    function e(a) {
6346      a.getStylesSet(function(b) {
6347        a.once(
6348          "loaded",
6349          function() {
6350            a.fire("stylesSet", { styles: b });
6351          },
6352          null,
6353          null,
6354          1,
6355        );
6356        y(a);
6357      });
6358    }
6359    function y(a) {
6360      var b = a.config,
6361        c = b.plugins,
6362        d = b.extraPlugins,
6363        f = b.removePlugins;
6364      if (d)
6365        var e = new RegExp("(?:^|,)(?:" + d.replace(/\s*,\s*/g, "|") + ")(?\x3d,|$)", "g"),
6366          c = c.replace(e, ""),
6367          c = c + ("," + d);
6368      if (f)
6369        var h = new RegExp("(?:^|,)(?:" + f.replace(/\s*,\s*/g, "|") + ")(?\x3d,|$)", "g"),
6370          c = c.replace(h, "");
6371      CKEDITOR.env.air && (c += ",adobeair");
6372      CKEDITOR.plugins.load(c.split(","), function(c) {
6373        var d = [],
6374          f = [],
6375          e = [];
6376        a.plugins = c;
6377        for (var l in c) {
6378          var q = c[l],
6379            k = q.lang,
6380            g = null,
6381            O = q.requires,
6382            n;
6383          CKEDITOR.tools.isArray(O) && (O = O.join(","));
6384          if (O && (n = O.match(h)))
6385            for (; (O = n.pop()); )
6386              CKEDITOR.error("editor-plugin-required", {
6387                plugin: O.replace(",", ""),
6388                requiredBy: l,
6389              });
6390          k &&
6391            !a.lang[l] &&
6392            (k.split && (k = k.split(",")),
6393            0 <= CKEDITOR.tools.indexOf(k, a.langCode)
6394              ? (g = a.langCode)
6395              : ((g = a.langCode.replace(/-.*/, "")),
6396                (g =
6397                  g != a.langCode && 0 <= CKEDITOR.tools.indexOf(k, g)
6398                    ? g
6399                    : 0 <= CKEDITOR.tools.indexOf(k, "en") ? "en" : k[0])),
6400            q.langEntries && q.langEntries[g]
6401              ? ((a.lang[l] = q.langEntries[g]), (g = null))
6402              : e.push(CKEDITOR.getUrl(q.path + "lang/" + g + ".js")));
6403          f.push(g);
6404          d.push(q);
6405        }
6406        CKEDITOR.scriptLoader.load(e, function() {
6407          for (var c = ["beforeInit", "init", "afterInit"], e = 0; e < c.length; e++)
6408            for (var l = 0; l < d.length; l++) {
6409              var n = d[l];
6410              0 === e && f[l] && n.lang && n.langEntries && (a.lang[n.name] = n.langEntries[f[l]]);
6411              if (n[c[e]]) n[c[e]](a);
6412            }
6413          a.fireOnce("pluginsLoaded");
6414          b.keystrokes && a.setKeystroke(a.config.keystrokes);
6415          for (l = 0; l < a.config.blockedKeystrokes.length; l++)
6416            a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[l]] = 1;
6417          a.status = "loaded";
6418          a.fireOnce("loaded");
6419          CKEDITOR.fire("instanceLoaded", null, a);
6420        });
6421      });
6422    }
6423    function x() {
6424      var a = this.element;
6425      if (a && this.elementMode != CKEDITOR.ELEMENT_MODE_APPENDTO) {
6426        var b = this.getData();
6427        this.config.htmlEncodeOutput && (b = CKEDITOR.tools.htmlEncode(b));
6428        a.is("textarea") ? a.setValue(b) : a.setHtml(b);
6429        return !0;
6430      }
6431      return !1;
6432    }
6433    function B(a, b) {
6434      function c(a) {
6435        var b = a.startContainer,
6436          d = a.endContainer;
6437        return b.is &&
6438          (b.is("tr") || (b.is("td") && b.equals(d) && a.endOffset === b.getChildCount()))
6439          ? !0
6440          : !1;
6441      }
6442      function d(a) {
6443        var b = a.startContainer;
6444        return b.is("tr") ? a.cloneContents() : b.clone(!0);
6445      }
6446      for (var f = new CKEDITOR.dom.documentFragment(), e, h, g, k = 0; k < a.length; k++) {
6447        var M = a[k],
6448          t = M.startContainer.getAscendant("tr", !0);
6449        c(M)
6450          ? (e ||
6451              ((e = t.getAscendant("table").clone()),
6452              e.append(t.getAscendant({ thead: 1, tbody: 1, tfoot: 1 }).clone()),
6453              f.append(e),
6454              (e = e.findOne("thead, tbody, tfoot"))),
6455            (h && h.equals(t)) || ((h = t), (g = t.clone()), e.append(g)),
6456            g.append(d(M)))
6457          : f.append(M.cloneContents());
6458      }
6459      return e ? f : b.getHtmlFromRange(a[0]);
6460    }
6461    a.prototype = CKEDITOR.editor.prototype;
6462    CKEDITOR.editor = a;
6463    var D = 0,
6464      w = {};
6465    CKEDITOR.tools.extend(CKEDITOR.editor.prototype, {
6466      addCommand: function(a, b) {
6467        b.name = a.toLowerCase();
6468        var c = new CKEDITOR.command(this, b);
6469        this.mode && f(this, c);
6470        return (this.commands[a] = c);
6471      },
6472      _attachToForm: function() {
6473        function a(b) {
6474          c.updateElement();
6475          c._.required && !d.getValue() && !1 === c.fire("required") && b.data.preventDefault();
6476        }
6477        function b(a) {
6478          return !!(a && a.call && a.apply);
6479        }
6480        var c = this,
6481          d = c.element,
6482          f = new CKEDITOR.dom.element(d.$.form);
6483        d.is("textarea") &&
6484          f &&
6485          (f.on("submit", a),
6486          b(f.$.submit) &&
6487            (f.$.submit = CKEDITOR.tools.override(f.$.submit, function(b) {
6488              return function() {
6489                a();
6490                b.apply ? b.apply(this) : b();
6491              };
6492            })),
6493          c.on("destroy", function() {
6494            f.removeListener("submit", a);
6495          }));
6496      },
6497      destroy: function(a) {
6498        this.fire("beforeDestroy");
6499        !a && x.call(this);
6500        this.editable(null);
6501        this.filter && (this.filter.destroy(), delete this.filter);
6502        delete this.activeFilter;
6503        this.status = "destroyed";
6504        this.fire("destroy");
6505        this.removeAllListeners();
6506        CKEDITOR.remove(this);
6507        CKEDITOR.fire("instanceDestroyed", null, this);
6508      },
6509      elementPath: function(a) {
6510        if (!a) {
6511          a = this.getSelection();
6512          if (!a) return null;
6513          a = a.getStartElement();
6514        }
6515        return a ? new CKEDITOR.dom.elementPath(a, this.editable()) : null;
6516      },
6517      createRange: function() {
6518        var a = this.editable();
6519        return a ? new CKEDITOR.dom.range(a) : null;
6520      },
6521      execCommand: function(a, b) {
6522        var c = this.getCommand(a),
6523          d = { name: a, commandData: b || {}, command: c };
6524        return c &&
6525          c.state != CKEDITOR.TRISTATE_DISABLED &&
6526          !1 !== this.fire("beforeCommandExec", d) &&
6527          ((d.returnValue = c.exec(d.commandData)),
6528          !c.async && !1 !== this.fire("afterCommandExec", d))
6529          ? d.returnValue
6530          : !1;
6531      },
6532      getCommand: function(a) {
6533        return this.commands[a];
6534      },
6535      getData: function(a) {
6536        !a && this.fire("beforeGetData");
6537        var b = this._.data;
6538        "string" != typeof b &&
6539          (b =
6540            (b = this.element) && this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE
6541              ? b.is("textarea") ? b.getValue() : b.getHtml()
6542              : "");
6543        b = { dataValue: b };
6544        !a && this.fire("getData", b);
6545        return b.dataValue;
6546      },
6547      getSnapshot: function() {
6548        var a = this.fire("getSnapshot");
6549        "string" != typeof a &&
6550          (a =
6551            (a = this.element) && this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE
6552              ? a.is("textarea") ? a.getValue() : a.getHtml()
6553              : "");
6554        return a;
6555      },
6556      loadSnapshot: function(a) {
6557        this.fire("loadSnapshot", a);
6558      },
6559      setData: function(a, b, c) {
6560        var d = !0,
6561          f = b;
6562        b && "object" == typeof b && ((c = b.internal), (f = b.callback), (d = !b.noSnapshot));
6563        !c && d && this.fire("saveSnapshot");
6564        if (f || !c)
6565          this.once("dataReady", function(a) {
6566            !c && d && this.fire("saveSnapshot");
6567            f && f.call(a.editor);
6568          });
6569        a = { dataValue: a };
6570        !c && this.fire("setData", a);
6571        this._.data = a.dataValue;
6572        !c && this.fire("afterSetData", a);
6573      },
6574      setReadOnly: function(a) {
6575        a = null == a || a;
6576        this.readOnly != a &&
6577          ((this.readOnly = a),
6578          (this.keystrokeHandler.blockedKeystrokes[8] = +a),
6579          this.editable().setReadOnly(a),
6580          this.fire("readOnly"));
6581      },
6582      insertHtml: function(a, b, c) {
6583        this.fire("insertHtml", { dataValue: a, mode: b, range: c });
6584      },
6585      insertText: function(a) {
6586        this.fire("insertText", a);
6587      },
6588      insertElement: function(a) {
6589        this.fire("insertElement", a);
6590      },
6591      getSelectedHtml: function(a) {
6592        var b = this.editable(),
6593          c = this.getSelection(),
6594          c = c && c.getRanges();
6595        if (!b || !c || 0 === c.length) return null;
6596        b = B(c, b);
6597        return a ? b.getHtml() : b;
6598      },
6599      extractSelectedHtml: function(a, b) {
6600        var c = this.editable(),
6601          d = this.getSelection().getRanges(),
6602          f = new CKEDITOR.dom.documentFragment(),
6603          e;
6604        if (!c || 0 === d.length) return null;
6605        for (e = 0; e < d.length; e++) f.append(c.extractHtmlFromRange(d[e], b));
6606        b || this.getSelection().selectRanges([d[0]]);
6607        return a ? f.getHtml() : f;
6608      },
6609      focus: function() {
6610        this.fire("beforeFocus");
6611      },
6612      checkDirty: function() {
6613        return "ready" == this.status && this._.previousValue !== this.getSnapshot();
6614      },
6615      resetDirty: function() {
6616        this._.previousValue = this.getSnapshot();
6617      },
6618      updateElement: function() {
6619        return x.call(this);
6620      },
6621      setKeystroke: function() {
6622        for (
6623          var a = this.keystrokeHandler.keystrokes,
6624            b = CKEDITOR.tools.isArray(arguments[0]) ? arguments[0] : [[].slice.call(arguments, 0)],
6625            c,
6626            d,
6627            f = b.length;
6628          f--;
6629
6630        )
6631          (c = b[f]),
6632            (d = 0),
6633            CKEDITOR.tools.isArray(c) && ((d = c[1]), (c = c[0])),
6634            d ? (a[c] = d) : delete a[c];
6635      },
6636      getCommandKeystroke: function(a) {
6637        if ((a = "string" === typeof a ? this.getCommand(a) : a)) {
6638          var b = CKEDITOR.tools.object.findKey(this.commands, a),
6639            c = this.keystrokeHandler.keystrokes,
6640            d;
6641          if (a.fakeKeystroke) return a.fakeKeystroke;
6642          for (d in c) if (c.hasOwnProperty(d) && c[d] == b) return d;
6643        }
6644        return null;
6645      },
6646      addFeature: function(a) {
6647        return this.filter.addFeature(a);
6648      },
6649      setActiveFilter: function(a) {
6650        a || (a = this.filter);
6651        this.activeFilter !== a &&
6652          ((this.activeFilter = a),
6653          this.fire("activeFilterChange"),
6654          a === this.filter
6655            ? this.setActiveEnterMode(null, null)
6656            : this.setActiveEnterMode(
6657                a.getAllowedEnterMode(this.enterMode),
6658                a.getAllowedEnterMode(this.shiftEnterMode, !0),
6659              ));
6660      },
6661      setActiveEnterMode: function(a, b) {
6662        a = a ? (this.blockless ? CKEDITOR.ENTER_BR : a) : this.enterMode;
6663        b = b ? (this.blockless ? CKEDITOR.ENTER_BR : b) : this.shiftEnterMode;
6664        if (this.activeEnterMode != a || this.activeShiftEnterMode != b)
6665          (this.activeEnterMode = a),
6666            (this.activeShiftEnterMode = b),
6667            this.fire("activeEnterModeChange");
6668      },
6669      showNotification: function(a) {
6670        alert(a);
6671      },
6672    });
6673  })();
6674  CKEDITOR.ELEMENT_MODE_NONE = 0;
6675  CKEDITOR.ELEMENT_MODE_REPLACE = 1;
6676  CKEDITOR.ELEMENT_MODE_APPENDTO = 2;
6677  CKEDITOR.ELEMENT_MODE_INLINE = 3;
6678  CKEDITOR.htmlParser = function() {
6679    this._ = {
6680      htmlPartsRegex: /<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g,
6681    };
6682  };
6683  (function() {
6684    var a = /([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,
6685      d = {
6686        checked: 1,
6687        compact: 1,
6688        declare: 1,
6689        defer: 1,
6690        disabled: 1,
6691        ismap: 1,
6692        multiple: 1,
6693        nohref: 1,
6694        noresize: 1,
6695        noshade: 1,
6696        nowrap: 1,
6697        readonly: 1,
6698        selected: 1,
6699      };
6700    CKEDITOR.htmlParser.prototype = {
6701      onTagOpen: function() {},
6702      onTagClose: function() {},
6703      onText: function() {},
6704      onCDATA: function() {},
6705      onComment: function() {},
6706      parse: function(b) {
6707        for (var c, f, h = 0, k; (c = this._.htmlPartsRegex.exec(b)); ) {
6708          f = c.index;
6709          if (f > h)
6710            if (((h = b.substring(h, f)), k)) k.push(h);
6711            else this.onText(h);
6712          h = this._.htmlPartsRegex.lastIndex;
6713          if ((f = c[1]))
6714            if (
6715              ((f = f.toLowerCase()),
6716              k && CKEDITOR.dtd.$cdata[f] && (this.onCDATA(k.join("")), (k = null)),
6717              !k)
6718            ) {
6719              this.onTagClose(f);
6720              continue;
6721            }
6722          if (k) k.push(c[0]);
6723          else if ((f = c[3])) {
6724            if (((f = f.toLowerCase()), !/="/.test(f))) {
6725              var g = {},
6726                m,
6727                r = c[4];
6728              c = !!c[5];
6729              if (r)
6730                for (; (m = a.exec(r)); ) {
6731                  var e = m[1].toLowerCase();
6732                  m = m[2] || m[3] || m[4] || "";
6733                  g[e] = !m && d[e] ? e : CKEDITOR.tools.htmlDecodeAttr(m);
6734                }
6735              this.onTagOpen(f, g, c);
6736              !k && CKEDITOR.dtd.$cdata[f] && (k = []);
6737            }
6738          } else if ((f = c[2])) this.onComment(f);
6739        }
6740        if (b.length > h) this.onText(b.substring(h, b.length));
6741      },
6742    };
6743  })();
6744  CKEDITOR.htmlParser.basicWriter = CKEDITOR.tools.createClass({
6745    $: function() {
6746      this._ = { output: [] };
6747    },
6748    proto: {
6749      openTag: function(a) {
6750        this._.output.push("\x3c", a);
6751      },
6752      openTagClose: function(a, d) {
6753        d ? this._.output.push(" /\x3e") : this._.output.push("\x3e");
6754      },
6755      attribute: function(a, d) {
6756        "string" == typeof d && (d = CKEDITOR.tools.htmlEncodeAttr(d));
6757        this._.output.push(" ", a, '\x3d"', d, '"');
6758      },
6759      closeTag: function(a) {
6760        this._.output.push("\x3c/", a, "\x3e");
6761      },
6762      text: function(a) {
6763        this._.output.push(a);
6764      },
6765      comment: function(a) {
6766        this._.output.push("\x3c!--", a, "--\x3e");
6767      },
6768      write: function(a) {
6769        this._.output.push(a);
6770      },
6771      reset: function() {
6772        this._.output = [];
6773        this._.indent = !1;
6774      },
6775      getHtml: function(a) {
6776        var d = this._.output.join("");
6777        a && this.reset();
6778        return d;
6779      },
6780    },
6781  });
6782  ("use strict");
6783  (function() {
6784    CKEDITOR.htmlParser.node = function() {};
6785    CKEDITOR.htmlParser.node.prototype = {
6786      remove: function() {
6787        var a = this.parent.children,
6788          d = CKEDITOR.tools.indexOf(a, this),
6789          b = this.previous,
6790          c = this.next;
6791        b && (b.next = c);
6792        c && (c.previous = b);
6793        a.splice(d, 1);
6794        this.parent = null;
6795      },
6796      replaceWith: function(a) {
6797        var d = this.parent.children,
6798          b = CKEDITOR.tools.indexOf(d, this),
6799          c = (a.previous = this.previous),
6800          f = (a.next = this.next);
6801        c && (c.next = a);
6802        f && (f.previous = a);
6803        d[b] = a;
6804        a.parent = this.parent;
6805        this.parent = null;
6806      },
6807      insertAfter: function(a) {
6808        var d = a.parent.children,
6809          b = CKEDITOR.tools.indexOf(d, a),
6810          c = a.next;
6811        d.splice(b + 1, 0, this);
6812        this.next = a.next;
6813        this.previous = a;
6814        a.next = this;
6815        c && (c.previous = this);
6816        this.parent = a.parent;
6817      },
6818      insertBefore: function(a) {
6819        var d = a.parent.children,
6820          b = CKEDITOR.tools.indexOf(d, a);
6821        d.splice(b, 0, this);
6822        this.next = a;
6823        (this.previous = a.previous) && (a.previous.next = this);
6824        a.previous = this;
6825        this.parent = a.parent;
6826      },
6827      getAscendant: function(a) {
6828        var d =
6829            "function" == typeof a
6830              ? a
6831              : "string" == typeof a
6832                ? function(b) {
6833                    return b.name == a;
6834                  }
6835                : function(b) {
6836                    return b.name in a;
6837                  },
6838          b = this.parent;
6839        for (; b && b.type == CKEDITOR.NODE_ELEMENT; ) {
6840          if (d(b)) return b;
6841          b = b.parent;
6842        }
6843        return null;
6844      },
6845      wrapWith: function(a) {
6846        this.replaceWith(a);
6847        a.add(this);
6848        return a;
6849      },
6850      getIndex: function() {
6851        return CKEDITOR.tools.indexOf(this.parent.children, this);
6852      },
6853      getFilterContext: function(a) {
6854        return a || {};
6855      },
6856    };
6857  })();
6858  ("use strict");
6859  CKEDITOR.htmlParser.comment = function(a) {
6860    this.value = a;
6861    this._ = { isBlockLike: !1 };
6862  };
6863  CKEDITOR.htmlParser.comment.prototype = CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node(), {
6864    type: CKEDITOR.NODE_COMMENT,
6865    filter: function(a, d) {
6866      var b = this.value;
6867      if (!(b = a.onComment(d, b, this))) return this.remove(), !1;
6868      if ("string" != typeof b) return this.replaceWith(b), !1;
6869      this.value = b;
6870      return !0;
6871    },
6872    writeHtml: function(a, d) {
6873      d && this.filter(d);
6874      a.comment(this.value);
6875    },
6876  });
6877  ("use strict");
6878  (function() {
6879    CKEDITOR.htmlParser.text = function(a) {
6880      this.value = a;
6881      this._ = { isBlockLike: !1 };
6882    };
6883    CKEDITOR.htmlParser.text.prototype = CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node(), {
6884      type: CKEDITOR.NODE_TEXT,
6885      filter: function(a, d) {
6886        if (!(this.value = a.onText(d, this.value, this))) return this.remove(), !1;
6887      },
6888      writeHtml: function(a, d) {
6889        d && this.filter(d);
6890        a.text(this.value);
6891      },
6892    });
6893  })();
6894  ("use strict");
6895  (function() {
6896    CKEDITOR.htmlParser.cdata = function(a) {
6897      this.value = a;
6898    };
6899    CKEDITOR.htmlParser.cdata.prototype = CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node(), {
6900      type: CKEDITOR.NODE_TEXT,
6901      filter: function() {},
6902      writeHtml: function(a) {
6903        a.write(this.value);
6904      },
6905    });
6906  })();
6907  ("use strict");
6908  CKEDITOR.htmlParser.fragment = function() {
6909    this.children = [];
6910    this.parent = null;
6911    this._ = { isBlockLike: !0, hasInlineStarted: !1 };
6912  };
6913  (function() {
6914    function a(a) {
6915      return a.attributes["data-cke-survive"]
6916        ? !1
6917        : ("a" == a.name && a.attributes.href) || CKEDITOR.dtd.$removeEmpty[a.name];
6918    }
6919    var d = CKEDITOR.tools.extend(
6920        { table: 1, ul: 1, ol: 1, dl: 1 },
6921        CKEDITOR.dtd.table,
6922        CKEDITOR.dtd.ul,
6923        CKEDITOR.dtd.ol,
6924        CKEDITOR.dtd.dl,
6925      ),
6926      b = { ol: 1, ul: 1 },
6927      c = CKEDITOR.tools.extend(
6928        {},
6929        { html: 1 },
6930        CKEDITOR.dtd.html,
6931        CKEDITOR.dtd.body,
6932        CKEDITOR.dtd.head,
6933        { style: 1, script: 1 },
6934      ),
6935      f = {
6936        ul: "li",
6937        ol: "li",
6938        dl: "dd",
6939        table: "tbody",
6940        tbody: "tr",
6941        thead: "tr",
6942        tfoot: "tr",
6943        tr: "td",
6944      };
6945    CKEDITOR.htmlParser.fragment.fromHtml = function(h, k, g) {
6946      function m(a) {
6947        var b;
6948        if (0 < p.length)
6949          for (var c = 0; c < p.length; c++) {
6950            var d = p[c],
6951              f = d.name,
6952              e = CKEDITOR.dtd[f],
6953              l = u.name && CKEDITOR.dtd[u.name];
6954            (l && !l[f]) || (a && e && !e[a] && CKEDITOR.dtd[a])
6955              ? f == u.name && (y(u, u.parent, 1), c--)
6956              : (b || (r(), (b = 1)),
6957                (d = d.clone()),
6958                (d.parent = u),
6959                (u = d),
6960                p.splice(c, 1),
6961                c--);
6962          }
6963      }
6964      function r() {
6965        for (; J.length; ) y(J.shift(), u);
6966      }
6967      function e(a) {
6968        if (a._.isBlockLike && "pre" != a.name && "textarea" != a.name) {
6969          var b = a.children.length,
6970            c = a.children[b - 1],
6971            d;
6972          c &&
6973            c.type == CKEDITOR.NODE_TEXT &&
6974            ((d = CKEDITOR.tools.rtrim(c.value)) ? (c.value = d) : (a.children.length = b - 1));
6975        }
6976      }
6977      function y(b, c, d) {
6978        c = c || u || w;
6979        var f = u;
6980        void 0 === b.previous &&
6981          (x(c, b) && ((u = c), D.onTagOpen(g, {}), (b.returnPoint = c = u)),
6982          e(b),
6983          (a(b) && !b.children.length) || c.add(b),
6984          "pre" == b.name && (l = !1),
6985          "textarea" == b.name && (K = !1));
6986        b.returnPoint ? ((u = b.returnPoint), delete b.returnPoint) : (u = d ? c : f);
6987      }
6988      function x(a, b) {
6989        if ((a == w || "body" == a.name) && g && (!a.name || CKEDITOR.dtd[a.name][g])) {
6990          var c, d;
6991          return (
6992            ((c = b.attributes && (d = b.attributes["data-cke-real-element-type"]) ? d : b.name) &&
6993              c in CKEDITOR.dtd.$inline &&
6994              !(c in CKEDITOR.dtd.head) &&
6995              !b.isOrphan) ||
6996            b.type == CKEDITOR.NODE_TEXT
6997          );
6998        }
6999      }
7000      function B(a, b) {
7001        return a in CKEDITOR.dtd.$listItem || a in CKEDITOR.dtd.$tableContent
7002          ? a == b || ("dt" == a && "dd" == b) || ("dd" == a && "dt" == b)
7003          : !1;
7004      }
7005      var D = new CKEDITOR.htmlParser(),
7006        w =
7007          k instanceof CKEDITOR.htmlParser.element
7008            ? k
7009            : "string" == typeof k
7010              ? new CKEDITOR.htmlParser.element(k)
7011              : new CKEDITOR.htmlParser.fragment(),
7012        p = [],
7013        J = [],
7014        u = w,
7015        K = "textarea" == w.name,
7016        l = "pre" == w.name;
7017      D.onTagOpen = function(f, e, h, g) {
7018        e = new CKEDITOR.htmlParser.element(f, e);
7019        e.isUnknown && h && (e.isEmpty = !0);
7020        e.isOptionalClose = g;
7021        if (a(e)) p.push(e);
7022        else {
7023          if ("pre" == f) l = !0;
7024          else {
7025            if ("br" == f && l) {
7026              u.add(new CKEDITOR.htmlParser.text("\n"));
7027              return;
7028            }
7029            "textarea" == f && (K = !0);
7030          }
7031          if ("br" == f) J.push(e);
7032          else {
7033            for (
7034              ;
7035              !((g = (h = u.name)
7036                ? CKEDITOR.dtd[h] || (u._.isBlockLike ? CKEDITOR.dtd.div : CKEDITOR.dtd.span)
7037                : c),
7038              e.isUnknown || u.isUnknown || g[f]);
7039
7040            )
7041              if (u.isOptionalClose) D.onTagClose(h);
7042              else if (f in b && h in b)
7043                (h = u.children),
7044                  ((h = h[h.length - 1]) && "li" == h.name) ||
7045                    y((h = new CKEDITOR.htmlParser.element("li")), u),
7046                  !e.returnPoint && (e.returnPoint = u),
7047                  (u = h);
7048              else if (f in CKEDITOR.dtd.$listItem && !B(f, h))
7049                D.onTagOpen("li" == f ? "ul" : "dl", {}, 0, 1);
7050              else if (h in d && !B(f, h)) !e.returnPoint && (e.returnPoint = u), (u = u.parent);
7051              else if ((h in CKEDITOR.dtd.$inline && p.unshift(u), u.parent)) y(u, u.parent, 1);
7052              else {
7053                e.isOrphan = 1;
7054                break;
7055              }
7056            m(f);
7057            r();
7058            e.parent = u;
7059            e.isEmpty ? y(e) : (u = e);
7060          }
7061        }
7062      };
7063      D.onTagClose = function(a) {
7064        for (var b = p.length - 1; 0 <= b; b--)
7065          if (a == p[b].name) {
7066            p.splice(b, 1);
7067            return;
7068          }
7069        for (var c = [], d = [], f = u; f != w && f.name != a; )
7070          f._.isBlockLike || d.unshift(f), c.push(f), (f = f.returnPoint || f.parent);
7071        if (f != w) {
7072          for (b = 0; b < c.length; b++) {
7073            var e = c[b];
7074            y(e, e.parent);
7075          }
7076          u = f;
7077          f._.isBlockLike && r();
7078          y(f, f.parent);
7079          f == u && (u = u.parent);
7080          p = p.concat(d);
7081        }
7082        "body" == a && (g = !1);
7083      };
7084      D.onText = function(a) {
7085        if (
7086          !((u._.hasInlineStarted && !J.length) || l || K) &&
7087          ((a = CKEDITOR.tools.ltrim(a)), 0 === a.length)
7088        )
7089          return;
7090        var b = u.name,
7091          e = b ? CKEDITOR.dtd[b] || (u._.isBlockLike ? CKEDITOR.dtd.div : CKEDITOR.dtd.span) : c;
7092        if (!K && !e["#"] && b in d) D.onTagOpen(f[b] || ""), D.onText(a);
7093        else {
7094          r();
7095          m();
7096          l || K || (a = a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g, " "));
7097          a = new CKEDITOR.htmlParser.text(a);
7098          if (x(u, a)) this.onTagOpen(g, {}, 0, 1);
7099          u.add(a);
7100        }
7101      };
7102      D.onCDATA = function(a) {
7103        u.add(new CKEDITOR.htmlParser.cdata(a));
7104      };
7105      D.onComment = function(a) {
7106        r();
7107        m();
7108        u.add(new CKEDITOR.htmlParser.comment(a));
7109      };
7110      D.parse(h);
7111      for (r(); u != w; ) y(u, u.parent, 1);
7112      e(w);
7113      return w;
7114    };
7115    CKEDITOR.htmlParser.fragment.prototype = {
7116      type: CKEDITOR.NODE_DOCUMENT_FRAGMENT,
7117      add: function(a, b) {
7118        isNaN(b) && (b = this.children.length);
7119        var c = 0 < b ? this.children[b - 1] : null;
7120        if (c) {
7121          if (
7122            a._.isBlockLike &&
7123            c.type == CKEDITOR.NODE_TEXT &&
7124            ((c.value = CKEDITOR.tools.rtrim(c.value)), 0 === c.value.length)
7125          ) {
7126            this.children.pop();
7127            this.add(a);
7128            return;
7129          }
7130          c.next = a;
7131        }
7132        a.previous = c;
7133        a.parent = this;
7134        this.children.splice(b, 0, a);
7135        this._.hasInlineStarted ||
7136          (this._.hasInlineStarted =
7137            a.type == CKEDITOR.NODE_TEXT || (a.type == CKEDITOR.NODE_ELEMENT && !a._.isBlockLike));
7138      },
7139      filter: function(a, b) {
7140        b = this.getFilterContext(b);
7141        a.onRoot(b, this);
7142        this.filterChildren(a, !1, b);
7143      },
7144      filterChildren: function(a, b, c) {
7145        if (this.childrenFilteredBy != a.id) {
7146          c = this.getFilterContext(c);
7147          if (b && !this.parent) a.onRoot(c, this);
7148          this.childrenFilteredBy = a.id;
7149          for (b = 0; b < this.children.length; b++) !1 === this.children[b].filter(a, c) && b--;
7150        }
7151      },
7152      writeHtml: function(a, b) {
7153        b && this.filter(b);
7154        this.writeChildrenHtml(a);
7155      },
7156      writeChildrenHtml: function(a, b, c) {
7157        var d = this.getFilterContext();
7158        if (c && !this.parent && b) b.onRoot(d, this);
7159        b && this.filterChildren(b, !1, d);
7160        b = 0;
7161        c = this.children;
7162        for (d = c.length; b < d; b++) c[b].writeHtml(a);
7163      },
7164      forEach: function(a, b, c) {
7165        if (!(c || (b && this.type != b))) var d = a(this);
7166        if (!1 !== d) {
7167          c = this.children;
7168          for (var f = 0; f < c.length; f++)
7169            (d = c[f]),
7170              d.type == CKEDITOR.NODE_ELEMENT ? d.forEach(a, b) : (b && d.type != b) || a(d);
7171        }
7172      },
7173      getFilterContext: function(a) {
7174        return a || {};
7175      },
7176    };
7177  })();
7178  ("use strict");
7179  (function() {
7180    function a() {
7181      this.rules = [];
7182    }
7183    function d(b, c, d, h) {
7184      var k, g;
7185      for (k in c) (g = b[k]) || (g = b[k] = new a()), g.add(c[k], d, h);
7186    }
7187    CKEDITOR.htmlParser.filter = CKEDITOR.tools.createClass({
7188      $: function(b) {
7189        this.id = CKEDITOR.tools.getNextNumber();
7190        this.elementNameRules = new a();
7191        this.attributeNameRules = new a();
7192        this.elementsRules = {};
7193        this.attributesRules = {};
7194        this.textRules = new a();
7195        this.commentRules = new a();
7196        this.rootRules = new a();
7197        b && this.addRules(b, 10);
7198      },
7199      proto: {
7200        addRules: function(a, c) {
7201          var f;
7202          "number" == typeof c ? (f = c) : c && "priority" in c && (f = c.priority);
7203          "number" != typeof f && (f = 10);
7204          "object" != typeof c && (c = {});
7205          a.elementNames && this.elementNameRules.addMany(a.elementNames, f, c);
7206          a.attributeNames && this.attributeNameRules.addMany(a.attributeNames, f, c);
7207          a.elements && d(this.elementsRules, a.elements, f, c);
7208          a.attributes && d(this.attributesRules, a.attributes, f, c);
7209          a.text && this.textRules.add(a.text, f, c);
7210          a.comment && this.commentRules.add(a.comment, f, c);
7211          a.root && this.rootRules.add(a.root, f, c);
7212        },
7213        applyTo: function(a) {
7214          a.filter(this);
7215        },
7216        onElementName: function(a, c) {
7217          return this.elementNameRules.execOnName(a, c);
7218        },
7219        onAttributeName: function(a, c) {
7220          return this.attributeNameRules.execOnName(a, c);
7221        },
7222        onText: function(a, c, d) {
7223          return this.textRules.exec(a, c, d);
7224        },
7225        onComment: function(a, c, d) {
7226          return this.commentRules.exec(a, c, d);
7227        },
7228        onRoot: function(a, c) {
7229          return this.rootRules.exec(a, c);
7230        },
7231        onElement: function(a, c) {
7232          for (
7233            var d = [this.elementsRules["^"], this.elementsRules[c.name], this.elementsRules.$],
7234              h,
7235              k = 0;
7236            3 > k;
7237            k++
7238          )
7239            if ((h = d[k])) {
7240              h = h.exec(a, c, this);
7241              if (!1 === h) return null;
7242              if (h && h != c) return this.onNode(a, h);
7243              if (c.parent && !c.name) break;
7244            }
7245          return c;
7246        },
7247        onNode: function(a, c) {
7248          var d = c.type;
7249          return d == CKEDITOR.NODE_ELEMENT
7250            ? this.onElement(a, c)
7251            : d == CKEDITOR.NODE_TEXT
7252              ? new CKEDITOR.htmlParser.text(this.onText(a, c.value))
7253              : d == CKEDITOR.NODE_COMMENT
7254                ? new CKEDITOR.htmlParser.comment(this.onComment(a, c.value))
7255                : null;
7256        },
7257        onAttribute: function(a, c, d, h) {
7258          return (d = this.attributesRules[d]) ? d.exec(a, h, c, this) : h;
7259        },
7260      },
7261    });
7262    CKEDITOR.htmlParser.filterRulesGroup = a;
7263    a.prototype = {
7264      add: function(a, c, d) {
7265        this.rules.splice(this.findIndex(c), 0, { value: a, priority: c, options: d });
7266      },
7267      addMany: function(a, c, d) {
7268        for (var h = [this.findIndex(c), 0], k = 0, g = a.length; k < g; k++)
7269          h.push({ value: a[k], priority: c, options: d });
7270        this.rules.splice.apply(this.rules, h);
7271      },
7272      findIndex: function(a) {
7273        for (var c = this.rules, d = c.length - 1; 0 <= d && a < c[d].priority; ) d--;
7274        return d + 1;
7275      },
7276      exec: function(a, c) {
7277        var d = c instanceof CKEDITOR.htmlParser.node || c instanceof CKEDITOR.htmlParser.fragment,
7278          h = Array.prototype.slice.call(arguments, 1),
7279          k = this.rules,
7280          g = k.length,
7281          m,
7282          r,
7283          e,
7284          y;
7285        for (y = 0; y < g; y++)
7286          if (
7287            (d && ((m = c.type), (r = c.name)),
7288            (e = k[y]),
7289            !(
7290              (a.nonEditable && !e.options.applyToAll) ||
7291              (a.nestedEditable && e.options.excludeNestedEditable)
7292            ))
7293          ) {
7294            e = e.value.apply(null, h);
7295            if (!1 === e || (d && e && (e.name != r || e.type != m))) return e;
7296            null != e && (h[0] = c = e);
7297          }
7298        return c;
7299      },
7300      execOnName: function(a, c) {
7301        for (var d = 0, h = this.rules, k = h.length, g; c && d < k; d++)
7302          (g = h[d]),
7303            (a.nonEditable && !g.options.applyToAll) ||
7304              (a.nestedEditable && g.options.excludeNestedEditable) ||
7305              (c = c.replace(g.value[0], g.value[1]));
7306        return c;
7307      },
7308    };
7309  })();
7310  (function() {
7311    function a(a, d) {
7312      function e(a) {
7313        return a || CKEDITOR.env.needsNbspFiller
7314          ? new CKEDITOR.htmlParser.text(" ")
7315          : new CKEDITOR.htmlParser.element("br", { "data-cke-bogus": 1 });
7316      }
7317      function n(a, d) {
7318        return function(f) {
7319          if (f.type != CKEDITOR.NODE_DOCUMENT_FRAGMENT) {
7320            var l = [],
7321              v = b(f),
7322              n,
7323              C;
7324            if (v)
7325              for (t(v, 1) && l.push(v); v; )
7326                h(v) &&
7327                  (n = c(v)) &&
7328                  t(n) &&
7329                  ((C = c(n)) && !h(C) ? l.push(n) : (e(z).insertAfter(n), n.remove())),
7330                  (v = v.previous);
7331            for (v = 0; v < l.length; v++) l[v].remove();
7332            if ((l = !a || !1 !== ("function" == typeof d ? d(f) : d)))
7333              z || CKEDITOR.env.needsBrFiller || f.type != CKEDITOR.NODE_DOCUMENT_FRAGMENT
7334                ? z ||
7335                  CKEDITOR.env.needsBrFiller ||
7336                  !(
7337                    7 < document.documentMode ||
7338                    f.name in CKEDITOR.dtd.tr ||
7339                    f.name in CKEDITOR.dtd.$listItem
7340                  )
7341                  ? ((l = b(f)), (l = !l || ("form" == f.name && "input" == l.name)))
7342                  : (l = !1)
7343                : (l = !1);
7344            l && f.add(e(a));
7345          }
7346        };
7347      }
7348      function t(a, b) {
7349        if (
7350          (!z || CKEDITOR.env.needsBrFiller) &&
7351          a.type == CKEDITOR.NODE_ELEMENT &&
7352          "br" == a.name &&
7353          !a.attributes["data-cke-eol"]
7354        )
7355          return !0;
7356        var c;
7357        return a.type == CKEDITOR.NODE_TEXT &&
7358          (c = a.value.match(p)) &&
7359          (c.index &&
7360            (new CKEDITOR.htmlParser.text(a.value.substring(0, c.index)).insertBefore(a),
7361            (a.value = c[0])),
7362          (!CKEDITOR.env.needsBrFiller && z && (!b || a.parent.name in g)) ||
7363            (!z && (((c = a.previous) && "br" == c.name) || !c || h(c))))
7364          ? !0
7365          : !1;
7366      }
7367      var C = { elements: {} },
7368        z = "html" == d,
7369        g = CKEDITOR.tools.extend({}, l),
7370        q;
7371      for (q in g) "#" in u[q] || delete g[q];
7372      for (q in g) C.elements[q] = n(z, a.config.fillEmptyBlocks);
7373      C.root = n(z, !1);
7374      C.elements.br = (function(a) {
7375        return function(b) {
7376          if (b.parent.type != CKEDITOR.NODE_DOCUMENT_FRAGMENT) {
7377            var d = b.attributes;
7378            if ("data-cke-bogus" in d || "data-cke-eol" in d) delete d["data-cke-bogus"];
7379            else {
7380              for (d = b.next; d && f(d); ) d = d.next;
7381              var l = c(b);
7382              !d && h(b.parent) ? k(b.parent, e(a)) : h(d) && l && !h(l) && e(a).insertBefore(d);
7383            }
7384          }
7385        };
7386      })(z);
7387      return C;
7388    }
7389    function d(a, b) {
7390      return a != CKEDITOR.ENTER_BR && !1 !== b ? (a == CKEDITOR.ENTER_DIV ? "div" : "p") : !1;
7391    }
7392    function b(a) {
7393      for (a = a.children[a.children.length - 1]; a && f(a); ) a = a.previous;
7394      return a;
7395    }
7396    function c(a) {
7397      for (a = a.previous; a && f(a); ) a = a.previous;
7398      return a;
7399    }
7400    function f(a) {
7401      return (
7402        (a.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.trim(a.value)) ||
7403        (a.type == CKEDITOR.NODE_ELEMENT && a.attributes["data-cke-bookmark"])
7404      );
7405    }
7406    function h(a) {
7407      return (
7408        a &&
7409        ((a.type == CKEDITOR.NODE_ELEMENT && a.name in l) ||
7410          a.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT)
7411      );
7412    }
7413    function k(a, b) {
7414      var c = a.children[a.children.length - 1];
7415      a.children.push(b);
7416      b.parent = a;
7417      c && ((c.next = b), (b.previous = c));
7418    }
7419    function g(a) {
7420      a = a.attributes;
7421      "false" != a.contenteditable && (a["data-cke-editable"] = a.contenteditable ? "true" : 1);
7422      a.contenteditable = "false";
7423    }
7424    function m(a) {
7425      a = a.attributes;
7426      switch (a["data-cke-editable"]) {
7427        case "true":
7428          a.contenteditable = "true";
7429          break;
7430        case "1":
7431          delete a.contenteditable;
7432      }
7433    }
7434    function r(a) {
7435      return a.replace(M, function(a, b, c) {
7436        return (
7437          "\x3c" +
7438          b +
7439          c.replace(t, function(a, b) {
7440            return C.test(b) && -1 == c.indexOf("data-cke-saved-" + b)
7441              ? " data-cke-saved-" + a + " data-cke-" + CKEDITOR.rnd + "-" + a
7442              : a;
7443          }) +
7444          "\x3e"
7445        );
7446      });
7447    }
7448    function e(a, b) {
7449      return a.replace(b, function(a, b, c) {
7450        0 === a.indexOf("\x3ctextarea") &&
7451          (a =
7452            b +
7453            B(c)
7454              .replace(/</g, "\x26lt;")
7455              .replace(/>/g, "\x26gt;") +
7456            "\x3c/textarea\x3e");
7457        return "\x3ccke:encoded\x3e" + encodeURIComponent(a) + "\x3c/cke:encoded\x3e";
7458      });
7459    }
7460    function y(a) {
7461      return a.replace(P, function(a, b) {
7462        return decodeURIComponent(b);
7463      });
7464    }
7465    function x(a) {
7466      return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g, function(a) {
7467        return "\x3c!--" + J + "{C}" + encodeURIComponent(a).replace(/--/g, "%2D%2D") + "--\x3e";
7468      });
7469    }
7470    function B(a) {
7471      return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g, function(a, b) {
7472        return decodeURIComponent(b);
7473      });
7474    }
7475    function D(a, b) {
7476      var c = b._.dataStore;
7477      return a
7478        .replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g, function(a, b) {
7479          return decodeURIComponent(b);
7480        })
7481        .replace(/\{cke_protected_(\d+)\}/g, function(a, b) {
7482          return (c && c[b]) || "";
7483        });
7484    }
7485    function w(a, b) {
7486      var c = [],
7487        d = b.config.protectedSource,
7488        f = b._.dataStore || (b._.dataStore = { id: 1 }),
7489        e = /<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,
7490        d = [
7491          /<script[\s\S]*?(<\/script>|$)/gi,
7492          /<noscript[\s\S]*?<\/noscript>/gi,
7493          /<meta[\s\S]*?\/?>/gi,
7494        ].concat(d);
7495      a = a.replace(/\x3c!--[\s\S]*?--\x3e/g, function(a) {
7496        return "\x3c!--{cke_tempcomment}" + (c.push(a) - 1) + "--\x3e";
7497      });
7498      for (var l = 0; l < d.length; l++)
7499        a = a.replace(d[l], function(a) {
7500          a = a.replace(e, function(a, b, d) {
7501            return c[d];
7502          });
7503          return /cke_temp(comment)?/.test(a)
7504            ? a
7505            : "\x3c!--{cke_temp}" + (c.push(a) - 1) + "--\x3e";
7506        });
7507      a = a.replace(e, function(a, b, d) {
7508        return (
7509          "\x3c!--" +
7510          J +
7511          (b ? "{C}" : "") +
7512          encodeURIComponent(c[d]).replace(/--/g, "%2D%2D") +
7513          "--\x3e"
7514        );
7515      });
7516      a = a.replace(
7517        /<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,
7518        function(a) {
7519          return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g, function(a, b) {
7520            f[f.id] = decodeURIComponent(b);
7521            return "{cke_protected_" + f.id++ + "}";
7522          });
7523        },
7524      );
7525      return (a = a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g, function(
7526        a,
7527        c,
7528        d,
7529        f,
7530      ) {
7531        return "\x3c" + c + d + "\x3e" + D(B(f), b) + "\x3c/" + c + "\x3e";
7532      }));
7533    }
7534    CKEDITOR.htmlDataProcessor = function(b) {
7535      var c,
7536        f,
7537        l = this;
7538      this.editor = b;
7539      this.dataFilter = c = new CKEDITOR.htmlParser.filter();
7540      this.htmlFilter = f = new CKEDITOR.htmlParser.filter();
7541      this.writer = new CKEDITOR.htmlParser.basicWriter();
7542      c.addRules(q);
7543      c.addRules(F, { applyToAll: !0 });
7544      c.addRules(a(b, "data"), { applyToAll: !0 });
7545      f.addRules(L);
7546      f.addRules(E, { applyToAll: !0 });
7547      f.addRules(a(b, "html"), { applyToAll: !0 });
7548      b.on(
7549        "toHtml",
7550        function(a) {
7551          a = a.data;
7552          var c = a.dataValue,
7553            f,
7554            c = w(c, b),
7555            c = e(c, H),
7556            c = r(c),
7557            c = e(c, z),
7558            c = c.replace(O, "$1cke:$2"),
7559            c = c.replace(N, "\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),
7560            c = c.replace(/(<pre\b[^>]*>)(\r\n|\n)/g, "$1$2$2"),
7561            c = c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>
7561)/gi, "$1data-cke-" + CKEDITOR.rnd + "-$2");
7562          f = a.context || b.editable().getName();
7563          var l;
7564          CKEDITOR.env.ie &&
7565            9 > CKEDITOR.env.version &&
7566            "pre" == f &&
7567            ((f = "div"), (c = "\x3cpre\x3e" + c + "\x3c/pre\x3e"), (l = 1));
7568          f = b.document.createElement(f);
7569          f.setHtml("a" + c);
7570          c = f.getHtml().substr(1);
7571          c = c.replace(new RegExp("data-cke-" + CKEDITOR.rnd + "-", "ig"), "");
7572          l && (c = c.replace(/^<pre>|<\/pre>$/gi, ""));
7573          c = c.replace(n, "$1$2");
7574          c = y(c);
7575          c = B(c);
7576          f = !1 === a.fixForBody ? !1 : d(a.enterMode, b.config.autoParagraph);
7577          c = CKEDITOR.htmlParser.fragment.fromHtml(c, a.context, f);
7578          f &&
7579            ((l = c),
7580            !l.children.length &&
7581              CKEDITOR.dtd[l.name][f] &&
7582              ((f = new CKEDITOR.htmlParser.element(f)), l.add(f)));
7583          a.dataValue = c;
7584        },
7585        null,
7586        null,
7587        5,
7588      );
7589      b.on(
7590        "toHtml",
7591        function(a) {
7592          a.data.filter.applyTo(a.data.dataValue, !0, a.data.dontFilter, a.data.enterMode) &&
7593            b.fire("dataFiltered");
7594        },
7595        null,
7596        null,
7597        6,
7598      );
7599      b.on(
7600        "toHtml",
7601        function(a) {
7602          a.data.dataValue.filterChildren(l.dataFilter, !0);
7603        },
7604        null,
7605        null,
7606        10,
7607      );
7608      b.on(
7609        "toHtml",
7610        function(a) {
7611          a = a.data;
7612          var b = a.dataValue,
7613            c = new CKEDITOR.htmlParser.basicWriter();
7614          b.writeChildrenHtml(c);
7615          b = c.getHtml(!0);
7616          a.dataValue = x(b);
7617        },
7618        null,
7619        null,
7620        15,
7621      );
7622      b.on(
7623        "toDataFormat",
7624        function(a) {
7625          var c = a.data.dataValue;
7626          a.data.enterMode != CKEDITOR.ENTER_BR && (c = c.replace(/^<br *\/?>/i, ""));
7627          a.data.dataValue = CKEDITOR.htmlParser.fragment.fromHtml(
7628            c,
7629            a.data.context,
7630            d(a.data.enterMode, b.config.autoParagraph),
7631          );
7632        },
7633        null,
7634        null,
7635        5,
7636      );
7637      b.on(
7638        "toDataFormat",
7639        function(a) {
7640          a.data.dataValue.filterChildren(l.htmlFilter, !0);
7641        },
7642        null,
7643        null,
7644        10,
7645      );
7646      b.on(
7647        "toDataFormat",
7648        function(a) {
7649          a.data.filter.applyTo(a.data.dataValue, !1, !0);
7650        },
7651        null,
7652        null,
7653        11,
7654      );
7655      b.on(
7656        "toDataFormat",
7657        function(a) {
7658          var c = a.data.dataValue,
7659            d = l.writer;
7660          d.reset();
7661          c.writeChildrenHtml(d);
7662          c = d.getHtml(!0);
7663          c = B(c);
7664          c = D(c, b);
7665          a.data.dataValue = c;
7666        },
7667        null,
7668        null,
7669        15,
7670      );
7671    };
7672    CKEDITOR.htmlDataProcessor.prototype = {
7673      toHtml: function(a, b, c, d) {
7674        var f = this.editor,
7675          e,
7676          l,
7677          n,
7678          h;
7679        b && "object" == typeof b
7680          ? ((e = b.context),
7681            (c = b.fixForBody),
7682            (d = b.dontFilter),
7683            (l = b.filter),
7684            (n = b.enterMode),
7685            (h = b.protectedWhitespaces))
7686          : (e = b);
7687        e || null === e || (e = f.editable().getName());
7688        return f.fire("toHtml", {
7689          dataValue: a,
7690          context: e,
7691          fixForBody: c,
7692          dontFilter: d,
7693          filter: l || f.filter,
7694          enterMode: n || f.enterMode,
7695          protectedWhitespaces: h,
7696        }).dataValue;
7697      },
7698      toDataFormat: function(a, b) {
7699        var c, d, f;
7700        b && ((c = b.context), (d = b.filter), (f = b.enterMode));
7701        c || null === c || (c = this.editor.editable().getName());
7702        return this.editor.fire("toDataFormat", {
7703          dataValue: a,
7704          filter: d || this.editor.filter,
7705          context: c,
7706          enterMode: f || this.editor.enterMode,
7707        }).dataValue;
7708      },
7709    };
7710    var p = /(?:&nbsp;|\xa0)$/,
7711      J = "{cke_protected}",
7712      u = CKEDITOR.dtd,
7713      K = "caption colgroup col thead tfoot tbody".split(" "),
7714      l = CKEDITOR.tools.extend({}, u.$blockLimit, u.$block),
7715      q = { elements: { input: g, textarea: g } },
7716      F = {
7717        attributeNames: [
7718          [/^on/, "data-cke-pa-on"],
7719          [/^srcdoc/, "data-cke-pa-srcdoc"],
7720          [/^data-cke-expando$/, ""],
7721        ],
7722        elements: {
7723          iframe: function(a) {
7724            if (a.attributes && a.attributes.src) {
7725              var b = a.attributes.src.toLowerCase().replace(/[^a-z]/gi, "");
7726              if (0 === b.indexOf("javascript") || 0 === b.indexOf("data"))
7727                (a.attributes["data-cke-pa-src"] = a.attributes.src), delete a.attributes.src;
7728            }
7729          },
7730        },
7731      },
7732      L = {
7733        elements: {
7734          embed: function(a) {
7735            var b = a.parent;
7736            if (b && "object" == b.name) {
7737              var c = b.attributes.width,
7738                b = b.attributes.height;
7739              c && (a.attributes.width = c);
7740              b && (a.attributes.height = b);
7741            }
7742          },
7743          a: function(a) {
7744            var b = a.attributes;
7745            if (!(a.children.length || b.name || b.id || a.attributes["data-cke-saved-name"]))
7746              return !1;
7747          },
7748        },
7749      },
7750      E = {
7751        elementNames: [[/^cke:/, ""], [/^\?xml:namespace$/, ""]],
7752        attributeNames: [[/^data-cke-(saved|pa)-/, ""], [/^data-cke-.*/, ""], ["hidefocus", ""]],
7753        elements: {
7754          $: function(a) {
7755            var b = a.attributes;
7756            if (b) {
7757              if (b["data-cke-temp"]) return !1;
7758              for (var c = ["name", "href", "src"], d, f = 0; f < c.length; f++)
7759                (d = "data-cke-saved-" + c[f]), d in b && delete b[c[f]];
7760            }
7761            return a;
7762          },
7763          table: function(a) {
7764            a.children.slice(0).sort(function(a, b) {
7765              var c, d;
7766              a.type == CKEDITOR.NODE_ELEMENT &&
7767                b.type == a.type &&
7768                ((c = CKEDITOR.tools.indexOf(K, a.name)), (d = CKEDITOR.tools.indexOf(K, b.name)));
7769              (-1 < c && -1 < d && c != d) ||
7770                ((c = a.parent ? a.getIndex() : -1), (d = b.parent ? b.getIndex() : -1));
7771              return c > d ? 1 : -1;
7772            });
7773          },
7774          param: function(a) {
7775            a.children = [];
7776            a.isEmpty = !0;
7777            return a;
7778          },
7779          span: function(a) {
7780            "Apple-style-span" == a.attributes["class"] && delete a.name;
7781          },
7782          html: function(a) {
7783            delete a.attributes.contenteditable;
7784            delete a.attributes["class"];
7785          },
7786          body: function(a) {
7787            delete a.attributes.spellcheck;
7788            delete a.attributes.contenteditable;
7789          },
7790          style: function(a) {
7791            var b = a.children[0];
7792            b && b.value && (b.value = CKEDITOR.tools.trim(b.value));
7793            a.attributes.type || (a.attributes.type = "text/css");
7794          },
7795          title: function(a) {
7796            var b = a.children[0];
7797            !b && k(a, (b = new CKEDITOR.htmlParser.text()));
7798            b.value = a.attributes["data-cke-title"] || "";
7799          },
7800          input: m,
7801          textarea: m,
7802        },
7803        attributes: {
7804          class: function(a) {
7805            return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g, "")) || !1;
7806          },
7807        },
7808      };
7809    CKEDITOR.env.ie &&
7810      (E.attributes.style = function(a) {
7811        return a.replace(/(^|;)([^\:]+)/g, function(a) {
7812          return a.toLowerCase();
7813        });
7814      });
7815    var M = /<(a|area|img|input|source)\b([^>]*)>/gi,
7816      t = /([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,
7817      C = /^(href|src|name)$/i,
7818      z = /(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,
7819      H = /(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,
7820      P = /<cke:encoded>([^<]*)<\/cke:encoded>/gi,
7821      O = /(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,
7822      n = /(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,
7823      N = /<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi;
7824  })();
7825  ("use strict");
7826  CKEDITOR.htmlParser.element = function(a, d) {
7827    this.name = a;
7828    this.attributes = d || {};
7829    this.children = [];
7830    var b = a || "",
7831      c = b.match(/^cke:(.*)/);
7832    c && (b = c[1]);
7833    b = !!(
7834      CKEDITOR.dtd.$nonBodyContent[b] ||
7835      CKEDITOR.dtd.$block[b] ||
7836      CKEDITOR.dtd.$listItem[b] ||
7837      CKEDITOR.dtd.$tableContent[b] ||
7838      CKEDITOR.dtd.$nonEditable[b] ||
7839      "br" == b
7840    );
7841    this.isEmpty = !!CKEDITOR.dtd.$empty[a];
7842    this.isUnknown = !CKEDITOR.dtd[a];
7843    this._ = { isBlockLike: b, hasInlineStarted: this.isEmpty || !b };
7844  };
7845  CKEDITOR.htmlParser.cssStyle = function(a) {
7846    var d = {};
7847    ((a instanceof CKEDITOR.htmlParser.element ? a.attributes.style : a) || "")
7848      .replace(/&quot;/g, '"')
7849      .replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g, function(a, c, f) {
7850        "font-family" == c && (f = f.replace(/["']/g, ""));
7851        d[c.toLowerCase()] = f;
7852      });
7853    return {
7854      rules: d,
7855      populate: function(a) {
7856        var c = this.toString();
7857        c &&
7858          (a instanceof CKEDITOR.dom.element
7859            ? a.setAttribute("style", c)
7860            : a instanceof CKEDITOR.htmlParser.element ? (a.attributes.style = c) : (a.style = c));
7861      },
7862      toString: function() {
7863        var a = [],
7864          c;
7865        for (c in d) d[c] && a.push(c, ":", d[c], ";");
7866        return a.join("");
7867      },
7868    };
7869  };
7870  (function() {
7871    function a(a) {
7872      return function(b) {
7873        return (
7874          b.type == CKEDITOR.NODE_ELEMENT && ("string" == typeof a ? b.n
7874ame == a : b.name in a)
7875        );
7876      };
7877    }
7878    var d = function(a, b) {
7879        a = a[0];
7880        b = b[0];
7881        return a < b ? -1 : a > b ? 1 : 0;
7882      },
7883      b = CKEDITOR.htmlParser.fragment.prototype;
7884    CKEDITOR.htmlParser.element.prototype = CKEDITOR.tools.extend(
7885      new CKEDITOR.htmlParser.node(),
7886      {
7887        type: CKEDITOR.NODE_ELEMENT,
7888        add: b.add,
7889        clone: function() {
7890          return new CKEDITOR.htmlParser.element(this.name, this.attributes);
7891        },
7892        filter: function(a, b) {
7893          var d = this,
7894            k,
7895            g;
7896          b = d.getFilterContext(b);
7897          if (b.off) return !0;
7898          if (!d.parent) a.onRoot(b, d);
7899          for (;;) {
7900            k = d.name;
7901            if (!(g = a.onElementName(b, k))) return this.remove(), !1;
7902            d.name = g;
7903            if (!(d = a.onElement(b, d))) return this.remove(), !1;
7904            if (d !== this) return this.replaceWith(d), !1;
7905            if (d.name == k) break;
7906            if (d.type != CKEDITOR.NODE_ELEMENT) return this.replaceWith(d), !1;
7907            if (!d.name) return this.replaceWithChildren(), !1;
7908          }
7909          k = d.attributes;
7910          var m, r;
7911          for (m in k) {
7912            for (g = k[m]; ; )
7913              if ((r = a.onAttributeName(b, m)))
7914                if (r != m) delete k[m], (m = r);
7915                else break;
7916              else {
7917                delete k[m];
7918                break;
7919              }
7920            r && (!1 === (g = a.onAttribute(b, d, r, g)) ? delete k[r] : (k[r] = g));
7921          }
7922          d.isEmpty || this.filterChildren(a, !1, b);
7923          return !0;
7924        },
7925        filterChildren: b.filterChildren,
7926        writeHtml: function(a, b) {
7927          b && this.filter(b);
7928          var h = this.name,
7929            k = [],
7930            g = this.attributes,
7931            m,
7932            r;
7933          a.openTag(h, g);
7934          for (m in g) k.push([m, g[m]]);
7935          a.sortAttributes && k.sort(d);
7936          m = 0;
7937          for (r = k.length; m < r; m++) (g = k[m]), a.attribute(g[0], g[1]);
7938          a.openTagClose(h, this.isEmpty);
7939          this.writeChildrenHtml(a);
7940          this.isEmpty || a.closeTag(h);
7941        },
7942        writeChildrenHtml: b.writeChildrenHtml,
7943        replaceWithChildren: function() {
7944          for (var a = this.children, b = a.length; b; ) a[--b].insertAfter(this);
7945          this.remove();
7946        },
7947        forEach: b.forEach,
7948        getFirst: function(b) {
7949          if (!b) return this.children.length ? this.children[0] : null;
7950          "function" != typeof b && (b = a(b));
7951          for (var d = 0, h = this.children.length; d < h; ++d)
7952            if (b(this.children[d])) return this.children[d];
7953          return null;
7954        },
7955        getHtml: function() {
7956          var a = new CKEDITOR.htmlParser.basicWriter();
7957          this.writeChildrenHtml(a);
7958          return a.getHtml();
7959        },
7960        setHtml: function(a) {
7961          a = this.children = CKEDITOR.htmlParser.fragment.fromHtml(a).children;
7962          for (var b = 0, d = a.length; b < d; ++b) a[b].parent = this;
7963        },
7964        getOuterHtml: function() {
7965          var a = new CKEDITOR.htmlParser.basicWriter();
7966          this.writeHtml(a);
7967          return a.getHtml();
7968        },
7969        split: function(a) {
7970          for (
7971            var b = this.children.splice(a, this.children.length - a), d = this.clone(), k = 0;
7972            k < b.length;
7973            ++k
7974          )
7975            b[k].parent = d;
7976          d.children = b;
7977          b[0] && (b[0].previous = null);
7978          0 < a && (this.children[a - 1].next = null);
7979          this.parent.add(d, this.getIndex() + 1);
7980          return d;
7981        },
7982        find: function(a, b) {
7983          void 0 === b && (b = !1);
7984          var d = [],
7985            k;
7986          for (k = 0; k < this.children.length; k++) {
7987            var g = this.children[k];
7988            "function" == typeof a && a(g)
7989              ? d.push(g)
7990              : "string" == typeof a && g.name === a && d.push(g);
7991            b && g.find && (d = d.concat(g.find(a, b)));
7992          }
7993          return d;
7994        },
7995        addClass: function(a) {
7996          if (!this.hasClass(a)) {
7997            var b = this.attributes["class"] || "";
7998            this.attributes["class"] = b + (b ? " " : "") + a;
7999          }
8000        },
8001        removeClass: function(a) {
8002          var b = this.attributes["class"];
8003          b &&
8004            ((b = CKEDITOR.tools.trim(b.replace(new RegExp("(?:\\s+|^)" + a + "(?:\\s+|$)"), " ")))
8005              ? (this.attributes["class"] = b)
8006              : delete this.attributes["class"]);
8007        },
8008        hasClass: function(a) {
8009          var b = this.attributes["class"];
8010          return b ? new RegExp("(?:^|\\s)" + a + "(?\x3d\\s|$)").test(b) : !1;
8011        },
8012        getFilterContext: function(a) {
8013          var b = [];
8014          a || (a = { off: !1, nonEditable: !1, nestedEditable: !1 });
8015          a.off || "off" != this.attributes["data-cke-processor"] || b.push("off", !0);
8016          a.nonEditable || "false" != this.attributes.contenteditable
8017            ? a.nonEditable &&
8018              !a.nestedEditable &&
8019              "true" == this.attributes.contenteditable &&
8020              b.push("nestedEditable", !0)
8021            : b.push("nonEditable", !0);
8022          if (b.length) {
8023            a = CKEDITOR.tools.copy(a);
8024            for (var d = 0; d < b.length; d += 2) a[b[d]] = b[d + 1];
8025          }
8026          return a;
8027        },
8028      },
8029      !0,
8030    );
8031  })();
8032  (function() {
8033    var a = /{([^}]+)}/g;
8034    CKEDITOR.template = function(a) {
8035      this.source = String(a);
8036    };
8037    CKEDITOR.template.prototype.output = function(d, b) {
8038      var c = this.source.replace(a, function(a, b) {
8039        return void 0 !== d[b] ? d[b] : a;
8040      });
8041      return b ? b.push(c) : c;
8042    };
8043  })();
8044  delete CKEDITOR.loadFullCore;
8045  CKEDITOR.instances = {};
8046  CKEDITOR.document = new CKEDITOR.dom.document(document);
8047  CKEDITOR.add = function(a) {
8048    CKEDITOR.instances[a.name] = a;
8049    a.on("focus", function() {
8050      CKEDITOR.currentInstance != a &&
8051        ((CKEDITOR.currentInstance = a), CKEDITOR.fire("currentInstance"));
8052    });
8053    a.on("blur", function() {
8054      CKEDITOR.currentInstance == a &&
8055        ((CKEDITOR.currentInstance = null), CKEDITOR.fire("currentInstance"));
8056    });
8057    CKEDITOR.fire("instance", null, a);
8058  };
8059  CKEDITOR.remove = function(a) {
8060    delete CKEDITOR.instances[a.name];
8061  };
8062  (function() {
8063    var a = {};
8064    CKEDITOR.addTemplate = function(d, b) {
8065      var c = a[d];
8066      if (c) return c;
8067      c = { name: d, source: b };
8068      CKEDITOR.fire("template", c);
8069      return (a[d] = new CKEDITOR.template(c.source));
8070    };
8071    CKEDITOR.getTemplate = function(d) {
8072      return a[d];
8073    };
8074  })();
8075  (function() {
8076    var a = [];
8077    CKEDITOR.addCss = function(d) {
8078      a.push(d);
8079    };
8080    CKEDITOR.getCss = function() {
8081      return a.join("\n");
8082    };
8083  })();
8084  CKEDITOR.on("instanceDestroyed", function() {
8085    CKEDITOR.tools.isEmpty(this.instances) && CKEDITOR.fire("reset");
8086  });
8087  CKEDITOR.TRISTATE_ON = 1;
8088  CKEDITOR.TRISTATE_OFF = 2;
8089  CKEDITOR.TRISTATE_DISABLED = 0;
8090  (function() {
8091    CKEDITOR.inline = function(a, d) {
8092      if (!CKEDITOR.env.isCompatible) return null;
8093      a = CKEDITOR.dom.element.get(a);
8094      if (a.getEditor())
8095        throw 'The editor instance "' +
8096          a.getEditor().name +
8097          '" is already attached to the provided element.';
8098      var b = new CKEDITOR.editor(d, a, CKEDITOR.ELEMENT_MODE_INLINE),
8099        c = a.is("textarea") ? a : null;
8100      c
8101        ? (b.setData(c.getValue(), null, !0),
8102          (a = CKEDITOR.dom.element.createFromHtml(
8103            '\x3cdiv contenteditable\x3d"' +
8104              !!b.readOnly +
8105              '" class\x3d"cke_textarea_inline"\x3e' +
8106              c.getValue() +
8107              "\x3c/div\x3e",
8108            CKEDITOR.document,
8109          )),
8110          a.insertAfter(c),
8111          c.hide(),
8112          c.$.form && b._attachToForm())
8113        : b.setData(a.getHtml(), null, !0);
8114      b.on(
8115        "loaded",
8116        function() {
8117          b.fire("uiReady");
8118          b.editable(a);
8119          b.container = a;
8120          b.ui.contentsElement = a;
8121          b.setData(b.getData(1));
8122          b.resetDirty();
8123          b.fire("contentDom");
8124          b.mode = "wysiwyg";
8125          b.fire("mode");
8126          b.status = "ready";
8127          b.fireOnce("instanceReady");
8128          CKEDITOR.fire("instanceReady", null, b);
8129        },
8130        null,
8131        null,
8132        1e4,
8133      );
8134      b.on("destroy", function() {
8135        c && (b.container.clearCustomData(), b.container.remove(), c.show());
8136        b.element.clearCustomData();
8137        delete b.element;
8138      });
8139      return b;
8140    };
8141    CKEDITOR.inlineAll = function() {
8142      var a, d, b;
8143      for (b in CKEDITOR.dtd.$editable)
8144        for (var c = CKEDITOR.document.getElementsByTag(b), f = 0, h = c.count(); f < h; f++)
8145          (a = c.getItem(f)),
8146            "true" == a.getAttribute("contenteditable") &&
8147              ((d = { element: a, config: {} }),
8148              !1 !== CKEDITOR.fire("inline", d) && CKEDITOR.inline(a, d.config));
8149    };
8150    CKEDITOR.domReady(function() {
8151      !CKEDITOR.disableAutoInline && CKEDITOR.inlineAll();
8152    });
8153  })();
8154  CKEDITOR.replaceClass = "ckeditor";
8155  (function() {
8156    function a(a, f, h, k) {
8157      if (!CKEDITOR.env.isCompatible) return null;
8158      a = CKEDITOR.dom.element.get(a);
8159      if (a.getEditor())
8160        throw 'The editor instance "' +
8161          a.getEditor().name +
8162          '" is already attached to the provided element.';
8163      var g = new CKEDITOR.editor(f, a, k);
8164      k == CKEDITOR.ELEMENT_MODE_REPLACE &&
8165        (a.setStyle("visibility", "hidden"),
8166        (g._.required = a.hasAttribute("required")),
8167        a.removeAttribute("required"));
8168      h && g.setData(h, null, !0);
8169      g.on("loaded", function() {
8170        b(g);
8171        k == CKEDITOR.ELEMENT_MODE_REPLACE &&
8172          g.config.autoUpdateElement &&
8173          a.$.form &&
8174          g._attachToForm();
8175        g.setMode(g.config.startupMode, function() {
8176          g.resetDirty();
8177          g.status = "ready";
8178          g.fireOnce("instanceReady");
8179          CKEDITOR.fire("instanceReady", null, g);
8180        });
8181      });
8182      g.on("destroy", d);
8183      return g;
8184    }
8185    function d() {
8186      var a = this.container,
8187        b = this.element;
8188      a && (a.clearCustomData(), a.remove());
8189      b &&
8190        (b.clearCustomData(),
8191        this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE &&
8192          (b.show(), this._.required && b.setAttribute("required", "required")),
8193        delete this.element);
8194    }
8195    function b(a) {
8196      var b = a.name,
8197        d = a.element,
8198        k = a.elementMode,
8199        g = a.fire("uiSpace", { space: "top", html: "" }).html,
8200        m = a.fire("uiSpace", { space: "bottom", html: "" }).html,
8201        r = new CKEDITOR.template(
8202          '\x3c{outerEl} id\x3d"cke_{name}" class\x3d"{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} ' +
8203            CKEDITOR.env.cssClass +
8204            '"  dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"application"' +
8205            (a.title ? ' aria-labelledby\x3d"cke_{name}_arialbl"' : "") +
8206            "\x3e" +
8207            (a.title
8208              ? '\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e'
8209              : "") +
8210            '\x3c{outerEl} class\x3d"cke_inner cke_reset" role\x3d"presentation"\x3e{topHtml}\x3c{outerEl} id\x3d"{contentId}" class\x3d"cke_contents cke_reset" role\x3d"presentation"\x3e\x3c/{outerEl}\x3e{bottomHtml}\x3c/{outerEl}\x3e\x3c/{outerEl}\x3e',
8211        ),
8212        b = CKEDITOR.dom.element.createFromHtml(
8213          r.output({
8214            id: a.id,
8215            name: b,
8216            langDir: a.lang.dir,
8217            langCode: a.langCode,
8218            voiceLabel: a.title,
8219            topHtml: g
8220              ? '\x3cspan id\x3d"' +
8221                a.ui.spaceId("top") +
8222                '" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e' +
8223                g +
8224                "\x3c/span\x3e"
8225              : "",
8226            contentId: a.ui.spaceId("contents"),
8227            bottomHtml: m
8228              ? '\x3cspan id\x3d"' +
8229                a.ui.spaceId("bottom") +
8230                '" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e' +
8231                m +
8232                "\x3c/span\x3e"
8233              : "",
8234            outerEl: CKEDITOR.env.ie ? "span" : "div",
8235          }),
8236        );
8237      k == CKEDITOR.ELEMENT_MODE_REPLACE ? (d.hide(), b.insertAfter(d)) : d.append(b);
8238      a.container = b;
8239      a.ui.contentsElement = a.ui.space("contents");
8240      g && a.ui.space("top").unselectable();
8241      m && a.ui.space("bottom").unselectable();
8242      d = a.config.width;
8243      k = a.config.height;
8244      d && b.setStyle("width", CKEDITOR.tools.cssLength(d));
8245      k && a.ui.space("contents").setStyle("height", CKEDITOR.tools.cssLength(k));
8246      b.disableContextMenu();
8247      CKEDITOR.env.webkit &&
8248        b.on("focus", function() {
8249          a.focus();
8250        });
8251      a.fireOnce("uiReady");
8252    }
8253    CKEDITOR.replace = function(b, d) {
8254      return a(b, d, null, CKEDITOR.ELEMENT_MODE_REPLACE);
8255    };
8256    CKEDITOR.appendTo = function(b, d, h) {
8257      return a(b, d, h, CKEDITOR.ELEMENT_MODE_APPENDTO);
8258    };
8259    CKEDITOR.replaceAll = function() {
8260      for (var a = document.getElementsByTagName("textarea"), b = 0; b < a.length; b++) {
8261        var d = null,
8262          k = a[b];
8263        if (k.name || k.id) {
8264          if ("string" == typeof arguments[0]) {
8265            if (!new RegExp("(?:^|\\s)" + arguments[0] + "(?:$|\\s)").test(k.className)) continue;
8266          } else if ("function" == typeof arguments[0] && ((d = {}), !1 === arguments[0](k, d)))
8267            continue;
8268          this.replace(k, d);
8269        }
8270      }
8271    };
8272    CKEDITOR.editor.prototype.addMode = function(a, b) {
8273      (this._.modes || (this._.modes = {}))[a] = b;
8274    };
8275    CKEDITOR.editor.prototype.setMode = function(a, b) {
8276      var d = this,
8277        k = this._.modes;
8278      if (a != d.mode && k && k[a]) {
8279        d.fire("beforeSetMode", a);
8280        if (d.mode) {
8281          var g = d.checkDirty(),
8282            k = d._.previousModeData,
8283            m,
8284            r = 0;
8285          d.fire("beforeModeUnload");
8286          d.editable(0);
8287          d._.previousMode = d.mode;
8288          d._.previousModeData = m = d.getData(1);
8289          "source" == d.mode && k == m && (d.fire("lockSnapshot", { forceUpdate: !0 }), (r = 1));
8290          d.ui.space("contents").setHtml("");
8291          d.mode = "";
8292        } else d._.previousModeData = d.getData(1);
8293        this._.modes[a](function() {
8294          d.mode = a;
8295          void 0 !== g && !g && d.resetDirty();
8296          r ? d.fire("unlockSnapshot") : "wysiwyg" == a && d.fire("saveSnapshot");
8297          setTimeout(function() {
8298            d.fire("mode");
8299            b && b.call(d);
8300          }, 0);
8301        });
8302      }
8303    };
8304    CKEDITOR.editor.prototype.resize = function(a, b, d, k) {
8305      var g = this.container,
8306        m = this.ui.space("contents"),
8307        r = CKEDITOR.env.webkit && this.document && this.document.getWindow().$.frameElement;
8308      k = k
8309        ? this.container.getFirst(function(a) {
8310            return a.type == CKEDITOR.NODE_ELEMENT && a.hasClass("cke_inner");
8311          })
8312        : g;
8313      k.setSize("width", a, !0);
8314      r && (r.style.width = "1%");
8315      var e = (k.$.offsetHeight || 0) - (m.$.clientHeight || 0),
8316        g = Math.max(b - (d ? 0 : e), 0);
8317      b = d ? b + e : b;
8318      m.setStyle("height", g + "px");
8319      r && (r.style.width = "100%");
8320      this.fire("resize", {
8321        outerHeight: b,
8322        contentsHeight: g,
8323        outerWidth: a || k.getSize("width"),
8324      });
8325    };
8326    CKEDITOR.editor.prototype.getResizable = function(a) {
8327      return a ? this.ui.space("contents") : this.container;
8328    };
8329    CKEDITOR.domReady(function() {
8330      CKEDITOR.replaceClass && CKEDITOR.replaceAll(CKEDITOR.replaceClass);
8331    });
8332  })();
8333  CKEDITOR.config.startupMode = "wysiwyg";
8334  (function() {
8335    function a(a) {
8336      var b = a.editor,
8337        e = a.data.path,
8338        f = e.blockLimit,
8339        h = a.data.selection,
8340        g = h.getRanges()[0],
8341        t;
8342      if (CKEDITOR.env.gecko || (CKEDITOR.env.ie && CKEDITOR.env.needsBrFiller))
8343        if ((h = d(h, e))) h.appendBogus(), (t = CKEDITOR.env.ie);
8344      k(b, e.block, f) &&
8345        g.collapsed &&
8346        !g.getCommonAncestor().isReadOnly() &&
8347        ((e = g.clone()),
8348        e.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),
8349        (f = new CKEDITOR.dom.walker(e)),
8350        (f.guard = function(a) {
8351          return !c(a) || a.type == CKEDITOR.NODE_COMMENT || a.isReadOnly();
8352        }),
8353        !f.checkForward() || (e.checkStartOfBlock() && e.checkEndOfBlock())) &&
8354        ((b = g.fixBlock(!0, b.activeEnterMode == CKEDITOR.ENTER_DIV ? "div" : "p")),
8355        CKEDITOR.env.needsBrFiller ||
8356          ((b = b.getFirst(c)) &&
8357            b.type == CKEDITOR.NODE_TEXT &&
8358            CKEDITOR.tools.trim(b.getText()).match(/^(?:&nbsp;|\xa0)$/) &&
8359            b.remove()),
8360        (t = 1),
8361        a.cancel());
8362      t && g.select();
8363    }
8364    function d(a, b) {
8365      if (a.isFake) return 0;
8366      var d = b.block || b.blockLimit,
8367        e = d && d.getLast(c);
8368      if (
8369        !(
8370          !d ||
8371          !d.isBlockBoundary() ||
8372          (e && e.type == CKEDITOR.NODE_ELEMENT && e.isBlockBoundary()) ||
8373          d.is("pre") ||
8374          d.getBogus()
8375        )
8376      )
8377        return d;
8378    }
8379    function b(a) {
8380      var b = a.data.getTarget();
8381      b.is("input") &&
8382        ((b = b.getAttribute("type")), ("submit" != b && "reset" != b) || a.data.preventDefault());
8383    }
8384    function c(a) {
8385      return e(a) && y(a);
8386    }
8387    function f(a, b) {
8388      return function(c) {
8389        var d = c.data.$.toElement || c.data.$.fromElement || c.data.$.relatedTarget;
8390        ((d = d && d.nodeType == CKEDITOR.NODE_ELEMENT ? new CKEDITOR.dom.element(d) : null) &&
8391          (b.equals(d) || b.contains(d))) ||
8392          a.call(this, c);
8393      };
8394    }
8395    function h(a) {
8396      function b(a) {
8397        return function(b, e) {
8398          e && b.type == CKEDITOR.NODE_ELEMENT && b.is(f) && (d = b);
8399          if (!(e || !c(b) || (a && B(b)))) return !1;
8400        };
8401      }
8402      var d,
8403        e = a.getRanges()[0];
8404      a = a.root;
8405      var f = { table: 1, ul: 1, ol: 1, dl: 1 };
8406      if (e.startPath().contains(f)) {
8407        var h = e.clone();
8408        h.collapse(1);
8409        h.setStartAt(a, CKEDITOR.POSITION_AFTER_START);
8410        a = new CKEDITOR.dom.walker(h);
8411        a.guard = b();
8412        a.checkBackward();
8413        if (d)
8414          return (
8415            (h = e.clone()),
8416            h.collapse(),
8417            h.setEndAt(d, CKEDITOR.POSITION_AFTER_END),
8418            (a = new CKEDITOR.dom.walker(h)),
8419            (a.guard = b(!0)),
8420            (d = !1),
8421            a.checkForward(),
8422            d
8423          );
8424      }
8425      return null;
8426    }
8427    function k(a, b, c) {
8428      return (
8429        !1 !== a.config.autoParagraph &&
8430        a.activeEnterMode != CKEDITOR.ENTER_BR &&
8431        ((a.editable().equals(c) && !b) || (b && "true" == b.getAttribute("contenteditable")))
8432      );
8433    }
8434    function g(a) {
8435      return a.activeEnterMode != CKEDITOR.ENTER_BR && !1 !== a.config.autoParagraph
8436        ? a.activeEnterMode == CKEDITOR.ENTER_DIV ? "div" : "p"
8437        : !1;
8438    }
8439    function m(a) {
8440      var b = a.editor;
8441      b.getSelection().scrollIntoView();
8442      setTimeout(function() {
8443        b.fire("saveSnapshot");
8444      }, 0);
8445    }
8446    function r(a, b, c) {
8447      var d = a.getCommonAncestor(b);
8448      for (b = a = c ? b : a; (a = a.getParent()) && !d.equals(a) && 1 == a.getChildCount(); )
8449        b = a;
8450      b.remove();
8451    }
8452    var e, y, x, B, D, w, p, J, u, K;
8453    CKEDITOR.editable = CKEDITOR.tools.createClass({
8454      base: CKEDITOR.dom.element,
8455      $: function(a, b) {
8456        this.base(b.$ || b);
8457        this.editor = a;
8458        this.status = "unloaded";
8459        this.hasFocus = !1;
8460        this.setup();
8461      },
8462      proto: {
8463        focus: function() {
8464          var a;
8465          if (
8466            CKEDITOR.env.webkit &&
8467            !this.hasFocus &&
8468            ((a = this.editor._.previousActive || this.getDocument().getActive()), this.contains(a))
8469          ) {
8470            a.focus();
8471            return;
8472          }
8473          CKEDITOR.env.edge &&
8474            14 < CKEDITOR.env.version &&
8475            !this.hasFocus &&
8476            this.getDocument().equals(CKEDITOR.document) &&
8477            (this.editor._.previousScrollTop = this.$.scrollTop);
8478          try {
8479            if (
8480              !CKEDITOR.env.ie ||
8481              (CKEDITOR.env.edge && 14 < CKEDITOR.env.version) ||
8482              !this.getDocument().equals(CKEDITOR.document)
8483            )
8484              if (CKEDITOR.env.chrome) {
8485                var b = this.$.scrollTop;
8486                this.$.focus();
8487                this.$.scrollTop = b;
8488              } else this.$.focus();
8489            else this.$.setActive();
8490          } catch (c) {
8491            if (!CKEDITOR.env.ie) throw c;
8492          }
8493          CKEDITOR.env.safari &&
8494            !this.isInline() &&
8495            ((a = CKEDITOR.document.getActive()),
8496            a.equals(this.getWindow().getFrame()) || this.getWindow().focus());
8497        },
8498        on: function(a, b) {
8499          var c = Array.prototype.slice.call(arguments, 0);
8500          CKEDITOR.env.ie &&
8501            /^focus|blur$/.exec(a) &&
8502            ((a = "focus" == a ? "focusin" : "focusout"), (b = f(b, this)), (c[0] = a), (c[1] = b));
8503          return CKEDITOR.dom.element.prototype.on.apply(this, c);
8504        },
8505        attachListener: function(a) {
8506          !this._.listeners && (this._.listeners = []);
8507          var b = Array.prototype.slice.call(arguments, 1),
8508            b = a.on.apply(a, b);
8509          this._.listeners.push(b);
8510          return b;
8511        },
8512        clearListeners: function() {
8513          var a = this._.listeners;
8514          try {
8515            for (; a.length; ) a.pop().removeListener();
8516          } catch (b) {}
8517        },
8518        restoreAttrs: function() {
8519          var a = this._.attrChanges,
8520            b,
8521            c;
8522          for (c in a)
8523            a.hasOwnProperty(c) &&
8524              ((b = a[c]), null !== b ? this.setAttribute(c, b) : this.removeAttribute(c));
8525        },
8526        attachClass: function(a) {
8527          var b = this.getCustomData("classes");
8528          this.hasClass(a) ||
8529            (!b && (b = []), b.push(a), this.setCustomData("classes", b), this.addClass(a));
8530        },
8531        changeAttr: function(a, b) {
8532          var c = this.getAttribute(a);
8533          b !== c &&
8534            (!this._.attrChanges && (this._.attrChanges = {}),
8535            a in this._.attrChanges || (this._.attrChanges[a] = c),
8536            this.setAttribute(a, b));
8537        },
8538        insertText: function(a) {
8539          this.editor.focus();
8540          this.insertHtml(this.transformPlainTextToHtml(a), "text");
8541        },
8542        transformPlainTextToHtml: function(a) {
8543          var b = this.editor
8544            .getSelection()
8545            .getStartElement()
8546            .hasAscendant("pre", !0)
8547            ? CKEDITOR.ENTER_BR
8548            : this.editor.activeEnterMode;
8549          return CKEDITOR.tools.transformPlainTextToHtml(a, b);
8550        },
8551        insertHtml: function(a, b, c) {
8552          var d = this.editor;
8553          d.focus();
8554          d.fire("saveSnapshot");
8555          c || (c = d.getSelection().getRanges()[0]);
8556          w(this, b || "html", a, c);
8557          c.select();
8558          m(this);
8559          this.editor.fire("afterInsertHtml", {});
8560        },
8561        insertHtmlIntoRange: function(a, b, c) {
8562          w(this, c || "html", a, b);
8563          this.editor.fire("afterInsertHtml", { intoRange: b });
8564        },
8565        insertElement: function(a, b) {
8566          var d = this.editor;
8567          d.focus();
8568          d.fire("saveSnapshot");
8569          var e = d.activeEnterMode,
8570            d = d.getSelection(),
8571            f = a.getName(),
8572            f = CKEDITOR.dtd.$block[f];
8573          b || (b = d.getRanges()[0]);
8574          this.insertElementIntoRange(a, b) &&
8575            (b.moveToPosition(a, CKEDITOR.POSITION_AFTER_END),
8576            f &&
8577              ((f = a.getNext(function(a) {
8578                return c(a) && !B(a);
8579              })) &&
8580              f.type == CKEDITOR.NODE_ELEMENT &&
8581              f.is(CKEDITOR.dtd.$block)
8582                ? f.getDtd()["#"] ? b.moveToElementEditStart(f) : b.moveToElementEditEnd(a)
8583                : f ||
8584                  e == CKEDITOR.ENTER_BR ||
8585                  ((f = b.fixBlock(!0, e == CKEDITOR.ENTER_DIV ? "div" : "p")),
8586                  b.moveToElementEditStart(f))));
8587          d.selectRanges([b]);
8588          m(this);
8589        },
8590        insertElementIntoSelection: function(a) {
8591          this.insertElement(a);
8592        },
8593        insertElementIntoRange: function(a, b) {
8594          var c = this.editor,
8595            d = c.config.enterMode,
8596            e = a.getName(),
8597            f = CKEDITOR.dtd.$block[e];
8598          if (b.checkReadOnly()) return !1;
8599          b.deleteContents(1);
8600          b.startContainer.type == CKEDITOR.NODE_ELEMENT &&
8601            (b.startContainer.is({ tr: 1, table: 1, tbody: 1, thead: 1, tfoot: 1 })
8602              ? p(b)
8603              : b.startContainer.is(CKEDITOR.dtd.$list) && J(b));
8604          var t, C;
8605          if (f)
8606            for (
8607              ;
8608              (t = b.getCommonAncestor(0, 1)) && (C = CKEDITOR.dtd[t.getName()]) && (!C || !C[e]);
8609
8610            )
8611              t.getName() in CKEDITOR.dtd.span
8612                ? b.splitElement(t)
8613                : b.checkStartOfBlock() && b.checkEndOfBlock()
8614                  ? (b.setStartBefore(t), b.collapse(!0), t.remove())
8615                  : b.splitBlock(d == CKEDITOR.ENTER_DIV ? "div" : "p", c.editable());
8616          b.insertNode(a);
8617          return !0;
8618        },
8619        setData: function(a, b) {
8620          b || (a = this.editor.dataProcessor.toHtml(a));
8621          this.setHtml(a);
8622          this.fixInitialSelection();
8623          "unloaded" == this.status && (this.status = "ready");
8624          this.editor.fire("dataReady");
8625        },
8626        getData: function(a) {
8627          var b = this.getHtml();
8628          a || (b = this.editor.dataProcessor.toDataFormat(b));
8629          return b;
8630        },
8631        setReadOnly: function(a) {
8632          this.setAttribute("contenteditable", !a);
8633        },
8634        detach: function() {
8635          this.removeClass("cke_editable");
8636          this.status = "detached";
8637          var a = this.editor;
8638          this._.detach();
8639          delete a.document;
8640          delete a.window;
8641        },
8642        isInline: function() {
8643          return this.getDocument().equals(CKEDITOR.document);
8644        },
8645        fixInitialSelection: function() {
8646          function a() {
8647            var b = c.getDocument().$,
8648              d = b.getSelection(),
8649              e;
8650            a: if (d.anchorNode && d.anchorNode == c.$) e = !0;
8651            else {
8652              if (
8653                CKEDITOR.env.webkit &&
8654                (e = c.getDocument().getActive()) &&
8655                e.equals(c) &&
8656                !d.anchorNode
8657              ) {
8658                e = !0;
8659                break a;
8660              }
8661              e = void 0;
8662            }
8663            e &&
8664              ((e = new CKEDITOR.dom.range(c)),
8665              e.moveToElementEditStart(c),
8666              (b = b.createRange()),
8667              b.setStart(e.startContainer.$, e.startOffset),
8668              b.collapse(!0),
8669              d.removeAllRanges(),
8670              d.addRange(b));
8671          }
8672          function b() {
8673            var a = c.getDocument().$,
8674              d = a.selection,
8675              e = c.getDocument().getActive();
8676            "None" == d.type &&
8677              e.equals(c) &&
8678              ((d = new CKEDITOR.dom.range(c)),
8679              (a = a.body.createTextRange()),
8680              d.moveToElementEditStart(c),
8681              (d = d.startContainer),
8682              d.type != CKEDITOR.NODE_ELEMENT && (d = d.getParent()),
8683              a.moveToElementText(d.$),
8684              a.collapse(!0),
8685              a.select());
8686          }
8687          var c = this;
8688          if (CKEDITOR.env.ie && (9 > CKEDITOR.env.version || CKEDITOR.env.quirks))
8689            this.hasFocus && (this.focus(), b());
8690          else if (this.hasFocus) this.focus(), a();
8691          else
8692            this.once(
8693              "focus",
8694              function() {
8695                a();
8696              },
8697              null,
8698              null,
8699              -999,
8700            );
8701        },
8702        getHtmlFromRange: function(a) {
8703          if (a.collapsed) return new CKEDITOR.dom.documentFragment(a.document);
8704          a = { doc: this.getDocument(), range: a.clone() };
8705          u.eol.detect(a, this);
8706          u.bogus.exclude(a);
8707          u.cell.shrink(a);
8708          a.fragment = a.range.cloneContents();
8709          u.tree.rebuild(a, this);
8710          u.eol.fix(a, this);
8711          return new CKEDITOR.dom.documentFragment(a.fragment.$);
8712        },
8713        extractHtmlFromRange: function(a, b) {
8714          var c = K,
8715            d = { range: a, doc: a.document },
8716            e = this.getHtmlFromRange(a);
8717          if (a.collapsed) return a.optimize(), e;
8718          a.enlarge(CKEDITOR.ENLARGE_INLINE, 1);
8719          c.table.detectPurge(d);
8720          d.bookmark = a.createBookmark();
8721          delete d.range;
8722          var f = this.editor.createRange();
8723          f.moveToPosition(d.bookmark.startNode, CKEDITOR.POSITION_BEFORE_START);
8724          d.targetBookmark = f.createBookmark();
8725          c.list.detectMerge(d, this);
8726          c.table.detectRanges(d, this);
8727          c.block.detectMerge(d, this);
8728          d.tableContentsRanges
8729            ? (c.table.deleteRanges(d), a.moveToBookmark(d.bookmark), (d.range = a))
8730            : (a.moveToBookmark(d.bookmark),
8731              (d.range = a),
8732              a.extractContents(c.detectExtractMerge(d)));
8733          a.moveToBookmark(d.targetBookmark);
8734          a.optimize();
8735          c.fixUneditableRangePosition(a);
8736          c.list.merge(d, this);
8737          c.table.purge(d, this);
8738          c.block.merge(d, this);
8739          if (b) {
8740            c = a.startPath();
8741            if (
8742              (d =
8743                a.checkStartOfBlock() && a.checkEndOfBlock() && c.block && !a.root.equals(c.block))
8744            ) {
8745              a: {
8746                var d = c.block.getElementsByTag("span"),
8747                  f = 0,
8748                  t;
8749                if (d)
8750                  for (; (t = d.getItem(f++)); )
8751                    if (!y(t)) {
8752                      d = !0;
8753                      break a;
8754                    }
8755                d = !1;
8756              }
8757              d = !d;
8758            }
8759            d && (a.moveToPosition(c.block, CKEDITOR.POSITION_BEFORE_START), c.block.remove());
8760          } else
8761            c.autoParagraph(this.editor, a), x(a.startContainer) && a.startContainer.appendBogus();
8762          a.startContainer.mergeSiblings();
8763          return e;
8764        },
8765        setup: function() {
8766          var a = this.editor;
8767          this.attachListener(
8768            a,
8769            "beforeGetData",
8770            function() {
8771              var b = this.getData();
8772              this.is("textarea") ||
8773                (!1 !== a.config.ignoreEmptyParagraph &&
8774                  (b = b.replace(D, function(a, b) {
8775                    return b;
8776                  })));
8777              a.setData(b, null, 1);
8778            },
8779            this,
8780          );
8781          this.attachListener(
8782            a,
8783            "getSnapshot",
8784            function(a) {
8785              a.data = this.getData(1);
8786            },
8787            this,
8788          );
8789          this.attachListener(
8790            a,
8791            "afterSetData",
8792            function() {
8793              this.setData(a.getData(1));
8794            },
8795            this,
8796          );
8797          this.attachListener(
8798            a,
8799            "loadSnapshot",
8800            function(a) {
8801              this.setData(a.data, 1);
8802            },
8803            this,
8804          );
8805          this.attachListener(
8806            a,
8807            "beforeFocus",
8808            function() {
8809              var b = a.getSelection();
8810              ((b = b && b.getNative()) && "Control" == b.type) || this.focus();
8811            },
8812            this,
8813          );
8814          this.attachListener(
8815            a,
8816            "insertHtml",
8817            function(a) {
8818              this.insertHtml(a.data.dataValue, a.data.mode, a.data.range);
8819            },
8820            this,
8821          );
8822          this.attachListener(
8823            a,
8824            "insertElement",
8825            function(a) {
8826              this.insertElement(a.data);
8827            },
8828            this,
8829          );
8830          this.attachListener(
8831            a,
8832            "insertText",
8833            function(a) {
8834              this.insertText(a.data);
8835            },
8836            this,
8837          );
8838          this.setReadOnly(a.readOnly);
8839          this.attachClass("cke_editable");
8840          a.elementMode == CKEDITOR.ELEMENT_MODE_INLINE
8841            ? this.attachClass("cke_editable_inline")
8842            : (a.elementMode != CKEDITOR.ELEMENT_MODE_REPLACE &&
8843                a.elementMode != CKEDITOR.ELEMENT_MODE_APPENDTO) ||
8844              this.attachClass("cke_editable_themed");
8845          this.attachClass("cke_contents_" + a.config.contentsLangDirection);
8846          a.keystrokeHandler.blockedKeystrokes[8] = +a.readOnly;
8847          a.keystrokeHandler.attach(this);
8848          this.on(
8849            "blur",
8850            function() {
8851              this.hasFocus = !1;
8852            },
8853            null,
8854            null,
8855            -1,
8856          );
8857          this.on(
8858            "focus",
8859            function() {
8860              this.hasFocus = !0;
8861            },
8862            null,
8863            null,
8864            -1,
8865          );
8866          if (CKEDITOR.env.webkit)
8867            this.on(
8868              "scroll",
8869              function() {
8870                a._.previousScrollTop = a.editable().$.scrollTop;
8871              },
8872              null,
8873              null,
8874              -1,
8875            );
8876          if (CKEDITOR.env.edge && 14 < CKEDITOR.env.version) {
8877            var d = function() {
8878              var b = a.editable();
8879              null != a._.previousScrollTop &&
8880                b.getDocument().equals(CKEDITOR.document) &&
8881                ((b.$.scrollTop = a._.previousScrollTop),
8882                (a._.previousScrollTop = null),
8883                this.removeListener("scroll", d));
8884            };
8885            this.on("scroll", d);
8886          }
8887          a.focusManager.add(this);
8888          this.equals(CKEDITOR.document.getActive()) &&
8889            ((this.hasFocus = !0),
8890            a.once(
8891              "contentDom",
8892              function() {
8893                a.focusManager.focus(this);
8894              },
8895              this,
8896            ));
8897          this.isInline() && this.changeAttr("tabindex", a.tabIndex);
8898          if (!this.is("textarea")) {
8899            a.document = this.getDocument();
8900            a.window = this.getWindow();
8901            var f = a.document;
8902            this.changeAttr("spellcheck", !a.config.disableNativeSpellChecker);
8903            var g = a.config.contentsLangDirection;
8904            this.getDirection(1) != g && this.changeAttr("dir", g);
8905            var k = CKEDITOR.getCss();
8906            if (k) {
8907              var g = f.getHead(),
8908                p = g.getCustomData("stylesheet");
8909              p
8910                ? k != p.getText() &&
8911                  (CKEDITOR.env.ie && 9 > CKEDITOR.env.version
8912                    ? (p.$.styleSheet.cssText = k)
8913                    : p.setText(k))
8914                : ((k = f.appendStyleText(k)),
8915                  (k = new CKEDITOR.dom.element(k.ownerNode || k.owningElement)),
8916                  g.setCustomData("stylesheet", k),
8917                  k.data("cke-temp", 1));
8918            }
8919            g = f.getCustomData("stylesheet_ref") || 0;
8920            f.setCustomData("stylesheet_ref", g + 1);
8921            this.setCustomData("cke_includeReadonly", !a.config.disableReadonlyStyling);
8922            this.attachListener(this, "click", function(a) {
8923              a = a.data;
8924              var b = new CKEDITOR.dom.elementPath(a.getTarget(), this).contains("a");
8925              b && 2 != a.$.button && b.isReadOnly() && a.preventDefault();
8926            });
8927            var t = { 8: 1, 46: 1 };
8928            this.attachListener(a, "key", function(b) {
8929              if (a.readOnly) return !0;
8930              var c = b.data.domEvent.getKey(),
8931                d;
8932              b = a.getSelection();
8933              if (0 !== b.getRanges().length) {
8934                if (c in t) {
8935                  var f,
8936                    g = b.getRanges()[0],
8937                    n = g.startPath(),
8938                    k,
8939                    v,
8940                    A,
8941                    c = 8 == c;
8942                  (CKEDITOR.env.ie && 11 > CKEDITOR.env.version && (f = b.getSelectedElement())) ||
8943                  (f = h(b))
8944                    ? (a.fire("saveSnapshot"),
8945                      g.moveToPosition(f, CKEDITOR.POSITION_BEFORE_START),
8946                      f.remove(),
8947                      g.select(),
8948                      a.fire("saveSnapshot"),
8949                      (d = 1))
8950                    : g.collapsed &&
8951                      ((k = n.block) &&
8952                      (A = k[c ? "getPrevious" : "getNext"](e)) &&
8953                      A.type == CKEDITOR.NODE_ELEMENT &&
8954                      A.is("table") &&
8955                      g[c ? "checkStartOfBlock" : "checkEndOfBlock"]()
8956                        ? (a.fire("saveSnapshot"),
8957                          g[c ? "checkEndOfBlock" : "checkStartOfBlock"]() && k.remove(),
8958                          g["moveToElementEdit" + (c ? "End" : "Start")](A),
8959                          g.select(),
8960                          a.fire("saveSnapshot"),
8961                          (d = 1))
8962                        : n.blockLimit &&
8963                          n.blockLimit.is("td") &&
8964                          (v = n.blockLimit.getAscendant("table")) &&
8965                          g.checkBoundaryOfElement(v, c ? CKEDITOR.START : CKEDITOR.END) &&
8966                          (A = v[c ? "getPrevious" : "getNext"](e))
8967                          ? (a.fire("saveSnapshot"),
8968                            g["moveToElementEdit" + (c ? "End" : "Start")](A),
8969                            g.checkStartOfBlock() && g.checkEndOfBlock() ? A.remove() : g.select(),
8970                            a.fire("saveSnapshot"),
8971                            (d = 1))
8972                          : (v = n.contains(["td", "th", "caption"])) &&
8973                            g.checkBoundaryOfElement(v, c ? CKEDITOR.START : CKEDITOR.END) &&
8974                            (d = 1));
8975                }
8976                return !d;
8977              }
8978            });
8979            a.blockless &&
8980              CKEDITOR.env.ie &&
8981              CKEDITOR.env.needsBrFiller &&
8982              this.attachListener(this, "keyup", function(b) {
8983                b.data.getKeystroke() in t &&
8984                  !this.getFirst(c) &&
8985                  (this.appendBogus(),
8986                  (b = a.createRange()),
8987                  b.moveToPosition(this, CKEDITOR.POSITION_AFTER_START),
8988                  b.select());
8989              });
8990            this.attachListener(this, "dblclick", function(b) {
8991              if (a.readOnly) return !1;
8992              b = { element: b.data.getTarget() };
8993              a.fire("doubleclick", b);
8994            });
8995            CKEDITOR.env.ie && this.attachListener(this, "click", b);
8996            (CKEDITOR.env.ie && !CKEDITOR.env.edge) ||
8997              this.attachListener(this, "mousedown", function(b) {
8998                var c = b.data.getTarget();
8999                c.is("img", "hr", "input", "textarea", "select") &&
9000                  !c.isReadOnly() &&
9001                  (a.getSelection().selectElement(c),
9002                  c.is("input", "textarea", "select") && b.data.preventDefault());
9003              });
9004            CKEDITOR.env.edge &&
9005              this.attachListener(this, "mouseup", function(b) {
9006                (b = b.data.getTarget()) && b.is("img") && a.getSelection().selectElement(b);
9007              });
9008            CKEDITOR.env.gecko &&
9009              this.attachListener(this, "mouseup", function(b) {
9010                if (
9011                  2 == b.data.$.button &&
9012                  ((b = b.data.getTarget()), !b.getOuterHtml().replace(D, ""))
9013                ) {
9014                  var c = a.createRange();
9015                  c.moveToElementEditStart(b);
9016                  c.select(!0);
9017                }
9018              });
9019            CKEDITOR.env.webkit &&
9020              (this.attachListener(this, "click", function(a) {
9021                a.data.getTarget().is("input", "select") && a.data.preventDefault();
9022              }),
9023              this.attachListener(this, "mouseup", function(a) {
9024                a.data.getTarget().is("input", "textarea") && a.data.preventDefault();
9025              }));
9026            CKEDITOR.env.webkit &&
9027              this.attachListener(
9028                a,
9029                "key",
9030                function(b) {
9031                  if (a.readOnly) return !0;
9032                  var c = b.data.domEvent.getKey();
9033                  if (c in t && ((b = a.getSelection()), 0 !== b.getRanges().length)) {
9034                    var c = 8 == c,
9035                      d = b.getRanges()[0];
9036                    b = d.startPath();
9037                    if (d.collapsed)
9038                      a: {
9039                        var e = b.block;
9040                        if (
9041                          e &&
9042                          d[c ? "checkStartOfBlock" : "checkEndOfBlock"]() &&
9043                          d.moveToClosestEditablePosition(e, !c) &&
9044                          d.collapsed
9045                        ) {
9046                          if (d.startContainer.type == CKEDITOR.NODE_ELEMENT) {
9047                            var f = d.startContainer.getChild(d.startOffset - (c ? 1 : 0));
9048                            if (f && f.type == CKEDITOR.NODE_ELEMENT && f.is("hr")) {
9049                              a.fire("saveSnapshot");
9050                              f.remove();
9051                              b = !0;
9052                              break a;
9053                            }
9054                          }
9055                          d = d.startPath().block;
9056                          if (!d || (d && d.contains(e))) b = void 0;
9057                          else {
9058                            a.fire("saveSnapshot");
9059                            var n;
9060                            (n = (c ? d : e).getBogus()) && n.remove();
9061                            n = a.getSelection();
9062                            f = n.createBookmarks();
9063                            (c ? e : d).moveChildren(c ? d : e, !1);
9064                            b.lastElement.mergeSiblings();
9065                            r(e, d, !c);
9066                            n.selectBookmarks(f);
9067                            b = !0;
9068                          }
9069                        } else b = !1;
9070                      }
9071                    else
9072                      (c = d),
9073                        (n = b.block),
9074                        (d = c.endPath().block),
9075                        n && d && !n.equals(d)
9076                          ? (a.fire("saveSnapshot"),
9077                            (e = n.getBogus()) && e.remove(),
9078                            c.enlarge(CKEDITOR.ENLARGE_INLINE),
9079                            c.deleteContents(),
9080                            d.getParent() &&
9081                              (d.moveChildren(n, !1), b.lastElement.mergeSiblings(), r(n, d, !0)),
9082                            (c = a.getSelection().getRanges()[0]),
9083                            c.collapse(1),
9084                            c.optimize(),
9085                            "" === c.startContainer.getHtml() && c.startContainer.appendBogus(),
9086                            c.select(),
9087                            (b = !0))
9088                          : (b = !1);
9089                    if (!b) return;
9090                    a.getSelection().scrollIntoView();
9091                    a.fire("saveSnapshot");
9092                    return !1;
9093                  }
9094                },
9095                this,
9096                null,
9097                100,
9098              );
9099          }
9100        },
9101      },
9102      _: {
9103        detach: function() {
9104          this.editor.setData(this.editor.getData(), 0, 1);
9105          this.clearListeners();
9106          this.restoreAttrs();
9107          var a;
9108          if ((a = this.removeCustomData("classes"))) for (; a.length; ) this.removeClass(a.pop());
9109          if (!this.is("textarea")) {
9110            a = this.getDocument();
9111            var b = a.getHead();
9112            if (b.getCustomData("stylesheet")) {
9113              var c = a.getCustomData("stylesheet_ref");
9114              --c
9115                ? a.setCustomData("stylesheet_ref", c)
9116                : (a.removeCustomData("stylesheet_ref"), b.removeCustomData("stylesheet").remove());
9117            }
9118          }
9119          this.editor.fire("contentDomUnload");
9120          delete this.editor;
9121        },
9122      },
9123    });
9124    CKEDITOR.editor.prototype.editable = function(a) {
9125      var b = this._.editable;
9126      if (b && a) return 0;
9127      arguments.length &&
9128        (b = this._.editable = a
9129          ? a instanceof CKEDITOR.editable ? a : new CKEDITOR.editable(this, a)
9130          : (b && b.detach(), null));
9131      return b;
9132    };
9133    CKEDITOR.on("instanceLoaded", function(b) {
9134      var c = b.editor;
9135      c.on("insertElement", function(a) {
9136        a = a.data;
9137        a.type == CKEDITOR.NODE_ELEMENT &&
9138          (a.is("input") || a.is("textarea")) &&
9139          ("false" != a.getAttribute("contentEditable") &&
9140            a.data("cke-editable", a.hasAttribute("contenteditable") ? "true" : "1"),
9141          a.setAttribute("contentEditable", !1));
9142      });
9143      c.on("selectionChange", function(b) {
9144        if (!c.readOnly) {
9145          var d = c.getSelection();
9146          d &&
9147            !d.isLocked &&
9148            ((d = c.checkDirty()),
9149            c.fire("lockSnapshot"),
9150            a(b),
9151            c.fire("unlockSnapshot"),
9152            !d && c.resetDirty());
9153        }
9154      });
9155    });
9156    CKEDITOR.on("instanceCreated", function(a) {
9157      var b = a.editor;
9158      b.on("mode", function() {
9159        var a = b.editable();
9160        if (a && a.isInline()) {
9161          var c = b.title;
9162          a.changeAttr("role", "textbox");
9163          a.changeAttr("aria-label", c);
9164          c && a.changeAttr("title", c);
9165          var d = b.fire("ariaEditorHelpLabel", {}).label;
9166          if (
9167            d &&
9168            (c = this.ui.space(
9169              this.elementMode == CKEDITOR.ELEMENT_MODE_INLINE ? "top" : "contents",
9170            ))
9171          ) {
9172            var e = CKEDITOR.tools.getNextId(),
9173              d = CKEDITOR.dom.element.createFromHtml(
9174                '\x3cspan id\x3d"' + e + '" class\x3d"cke_voice_label"\x3e' + d + "\x3c/span\x3e",
9175              );
9176            c.append(d);
9177            a.changeAttr("aria-describedby", e);
9178          }
9179        }
9180      });
9181    });
9182    CKEDITOR.addCss(
9183      ".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}",
9184    );
9185    e = CKEDITOR.dom.walker.whitespaces(!0);
9186    y = CKEDITOR.dom.walker.bookmark(!1, !0);
9187    x = CKEDITOR.dom.walker.empty();
9188    B = CKEDITOR.dom.walker.bogus();
9189    D = /(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;
9190    w = (function() {
9191      function a(b) {
9192        return b.type == CKEDITOR.NODE_ELEMENT;
9193      }
9194      function b(c, d) {
9195        var e,
9196          f,
9197          t,
9198          g,
9199          h = [],
9200          k = d.range.startContainer;
9201        e = d.range.startPath();
9202        for (
9203          var k = C[k.getName()],
9204            z = 0,
9205            H = c.getChildren(),
9206            p = H.count(),
9207            m = -1,
9208            r = -1,
9209            P = 0,
9210            E = e.contains(C.$list);
9211          z < p;
9212          ++z
9213        )
9214          (e = H.getItem(z)),
9215            a(e)
9216              ? ((t = e.getName()),
9217                E && t in CKEDITOR.dtd.$list
9218                  ? (h = h.concat(b(e, d)))
9219                  : ((g = !!k[t]),
9220                    "br" != t ||
9221                      !e.data("cke-eol") ||
9222                      (z && z != p - 1) ||
9223                      ((P = (f = z ? h[z - 1].node : H.getItem(z + 1)) && (!a(f) || !f.is("br"))),
9224                      (f = f && a(f) && C.$block[f.getName()])),
9225                    -1 != m || g || (m = z),
9226                    g || (r = z),
9227                    h.push({
9228                      isElement: 1,
9229                      isLineBreak: P,
9230                      isBlock: e.isBlockBoundary(),
9231                      hasBlockSibling: f,
9232                      node: e,
9233                      name: t,
9234                      allowed: g,
9235                    }),
9236                    (f = P = 0)))
9237              : h.push({ isElement: 0, node: e, allowed: 1 });
9238        -1 < m && (h[m].firstNotAllowed = 1);
9239        -1 < r && (h[r].lastNotAllowed = 1);
9240        return h;
9241      }
9242      function d(b, c) {
9243        var e = [],
9244          f = b.getChildren(),
9245          t = f.count(),
9246          h,
9247          g = 0,
9248          z = C[c],
9249          k = !b.is(C.$inline) || b.is("br");
9250        for (k && e.push(" "); g < t; g++)
9251          (h = f.getItem(g)), a(h) && !h.is(z) ? (e = e.concat(d(h, c))) : e.push(h);
9252        k && e.push(" ");
9253        return e;
9254      }
9255      function e(b) {
9256        return a(b.startContainer) && b.startContainer.getChild(b.startOffset - 1);
9257      }
9258      function f(b) {
9259        return b && a(b) && (b.is(C.$removeEmpty) || (b.is("a") && !b.isBlockBoundary()));
9260      }
9261      function h(b, c, d, e) {
9262        var f = b.clone(),
9263          t,
9264          g;
9265        f.setEndAt(c, CKEDITOR.POSITION_BEFORE_END);
9266        (t = new CKEDITOR.dom.walker(f).next()) &&
9267          a(t) &&
9268          z[t.getName()] &&
9269          (g = t.getPrevious()) &&
9270          a(g) &&
9271          !g.getParent().equals(b.startContainer) &&
9272          d.contains(g) &&
9273          e.contains(t) &&
9274          t.isIdentical(g) &&
9275          (t.moveChildren(g), t.remove(), h(b, c, d, e));
9276      }
9277      function t(b, c) {
9278        function d(b, c) {
9279          if (c.isBlock && c.isElement && !c.node.is("br") && a(b) && b.is("br"))
9280            return b.remove(), 1;
9281        }
9282        var e = c.endContainer.getChild(c.endOffset),
9283          f = c.endContainer.getChild(c.endOffset - 1);
9284        e && d(e, b[b.length - 1]);
9285        f && d(f, b[0]) && (c.setEnd(c.endContainer, c.endOffset - 1), c.collapse());
9286      }
9287      var C = CKEDITOR.dtd,
9288        z = {
9289          p: 1,
9290          div: 1,
9291          h1: 1,
9292          h2: 1,
9293          h3: 1,
9294          h4: 1,
9295          h5: 1,
9296          h6: 1,
9297          ul: 1,
9298          ol: 1,
9299          li: 1,
9300          pre: 1,
9301          dl: 1,
9302          blockquote: 1,
9303        },
9304        H = { p: 1, div: 1, h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1 },
9305        p = CKEDITOR.tools.extend({}, C.$inline);
9306      delete p.br;
9307      return function(z, n, N, v) {
9308        var A = z.editor,
9309          G = !1;
9310        "unfiltered_html" == n && ((n = "html"), (G = !0));
9311        if (!v.checkReadOnly()) {
9312          var I = new CKEDITOR.dom.elementPath(v.startContainer, v.root).blockLimit || v.root;
9313          z = {
9314            type: n,
9315            dontFilter: G,
9316            editable: z,
9317            editor: A,
9318            range: v,
9319            blockLimit: I,
9320            mergeCandidates: [],
9321            zombies: [],
9322          };
9323          n = z.range;
9324          v = z.mergeCandidates;
9325          var m, r;
9326          "text" == z.type &&
9327            n.shrink(CKEDITOR.SHRINK_ELEMENT, !0, !1) &&
9328            ((m = CKEDITOR.dom.element.createFromHtml(
9329              "\x3cspan\x3e\x26nbsp;\x3c/span\x3e",
9330              n.document,
9331            )),
9332            n.insertNode(m),
9333            n.setStartAfter(m));
9334          G = new CKEDITOR.dom.elementPath(n.startContainer);
9335          z.endPath = I = new CKEDITOR.dom.elementPath(n.endContainer);
9336          if (!n.collapsed) {
9337            var A = I.block || I.blockLimit,
9338              x = n.getCommonAncestor();
9339            A && !A.equals(x) && !A.contains(x) && n.checkEndOfBlock() && z.zombies.push(A);
9340            n.deleteContents();
9341          }
9342          for (; (r = e(n)) && a(r) && r.isBlockBoundary() && G.contains(r); )
9343            n.moveToPosition(r, CKEDITOR.POSITION_BEFORE_END);
9344          h(n, z.blockLimit, G, I);
9345          m && (n.setEndBefore(m), n.collapse(), m.remove());
9346          m = n.startPath();
9347          if ((A = m.contains(f, !1, 1)))
9348            n.splitElement(A), (z.inlineStylesRoot = A), (z.inlineStylesPeak = m.lastElement);
9349          m = n.createBookmark();
9350          (A = m.startNode.getPrevious(c)) && a(A) && f(A) && v.push(A);
9351          (A = m.startNode.getNext(c)) && a(A) && f(A) && v.push(A);
9352          for (A = m.startNode; (A = A.getParent()) && f(A); ) v.push(A);
9353          n.moveToBookmark(m);
9354          if ((m = N)) {
9355            m = z.range;
9356            if ("text" == z.type && z.inlineStylesRoot) {
9357              r = z.inlineStylesPeak;
9358              n = r.getDocument().createText("{cke-peak}");
9359              for (v = z.inlineStylesRoot.getParent(); !r.equals(v); )
9360                (n = n.appendTo(r.clone())), (r = r.getParent());
9361              N = n
9362                .getOuterHtml()
9363                .split("{cke-peak}")
9364                .join(N);
9365            }
9366            r = z.blockLimit.getName();
9367            if (/^\s+|\s+$/.test(N) && "span" in CKEDITOR.dtd[r]) {
9368              var w = '\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e';
9369              N = w + N + w;
9370            }
9371            N = z.editor.dataProcessor.toHtml(N, {
9372              context: null,
9373              fixForBody: !1,
9374              protectedWhitespaces: !!w,
9375              dontFilter: z.dontFilter,
9376              filter: z.editor.activeFilter,
9377              enterMode: z.editor.activeEnterMode,
9378            });
9379            r = m.document.createElement("body");
9380            r.setHtml(N);
9381            w && (r.getFirst().remove(), r.getLast().remove());
9382            if ((w = m.startPath().block) && (1 != w.getChildCount() || !w.getBogus()))
9383              a: {
9384                var y;
9385                if (
9386                  1 == r.getChildCount() &&
9387                  a((y = r.getFirst())) &&
9388                  y.is(H) &&
9389                  !y.hasAttribute("contenteditable")
9390                ) {
9391                  w = y.getElementsByTag("*");
9392                  m = 0;
9393                  for (v = w.count(); m < v; m++) if (((n = w.getItem(m)), !n.is(p))) break a;
9394                  y.moveChildren(y.getParent(1));
9395                  y.remove();
9396                }
9397              }
9398            z.dataWrapper = r;
9399            m = N;
9400          }
9401          if (m) {
9402            y = z.range;
9403            m = y.document;
9404            var u;
9405            r = z.blockLimit;
9406            v = 0;
9407            var B,
9408              w = [],
9409              D,
9410              T;
9411            N = A = 0;
9412            var J, K;
9413            n = y.startContainer;
9414            var G = z.endPath.elements[0],
9415              W,
9416              I = G.getPosition(n),
9417              x =
9418                !!G.getCommonAncestor(n) &&
9419                I != CKEDITOR.POSITION_IDENTICAL &&
9420                !(I & (CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_IS_CONTAINED));
9421            n = b(z.dataWrapper, z);
9422            for (t(n, y); v < n.length; v++) {
9423              I = n[v];
9424              if ((u = I.isLineBreak)) {
9425                u = y;
9426                J = r;
9427                var S = void 0,
9428                  Y = void 0;
9429                I.hasBlockSibling
9430                  ? (u = 1)
9431                  : (S = u.startContainer.getAscendant(C.$block, 1)) && S.is({ div: 1, p: 1 })
9432                    ? ((Y = S.getPosition(J)),
9433                      Y == CKEDITOR.POSITION_IDENTICAL || Y == CKEDITOR.POSITION_CONTAINS
9434                        ? (u = 0)
9435                        : ((J = u.splitElement(S)),
9436                          u.moveToPosition(J, CKEDITOR.POSITION_AFTER_START),
9437                          (u = 1)))
9438                    : (u = 0);
9439              }
9440              if (u) N = 0 < v;
9441              else {
9442                u = y.startPath();
9443                !I.isBlock &&
9444                  k(z.editor, u.block, u.blockLimit) &&
9445                  (T = g(z.editor)) &&
9446                  ((T = m.createElement(T)),
9447                  T.appendBogus(),
9448                  y.insertNode(T),
9449                  CKEDITOR.env.needsBrFiller && (B = T.getBogus()) && B.remove(),
9450                  y.moveToPosition(T, CKEDITOR.POSITION_BEFORE_END));
9451                if ((u = y.startPath().block) && !u.equals(D)) {
9452                  if ((B = u.getBogus())) B.remove(), w.push(u);
9453                  D = u;
9454                }
9455                I.firstNotAllowed && (A = 1);
9456                if (A && I.isElement) {
9457                  u = y.startContainer;
9458                  for (J = null; u && !C[u.getName()][I.name]; ) {
9459                    if (u.equals(r)) {
9460                      u = null;
9461                      break;
9462                    }
9463                    J = u;
9464                    u = u.getParent();
9465                  }
9466                  if (u) J && ((K = y.splitElement(J)), z.zombies.push(K), z.zombies.push(J));
9467                  else {
9468                    J = r.getName();
9469                    W = !v;
9470                    u = v == n.length - 1;
9471                    J = d(I.node, J);
9472                    for (var S = [], Y = J.length, Z = 0, ba = void 0, ca = 0, U = -1; Z < Y; Z++)
9473                      (ba = J[Z]),
9474                        " " == ba
9475                          ? (ca ||
9476                              (W && !Z) ||
9477                              (S.push(new CKEDITOR.dom.text(" ")), (U = S.length)),
9478                            (ca = 1))
9479                          : (S.push(ba), (ca = 0));
9480                    u && U == S.length && S.pop();
9481                    W = S;
9482                  }
9483                }
9484                if (W) {
9485                  for (; (u = W.pop()); ) y.insertNode(u);
9486                  W = 0;
9487                } else y.insertNode(I.node);
9488                I.lastNotAllowed &&
9489                  v < n.length - 1 &&
9490                  ((K = x ? G : K) && y.setEndAt(K, CKEDITOR.POSITION_AFTER_START), (A = 0));
9491                y.collapse();
9492              }
9493            }
9494            1 != n.length
9495              ? (B = !1)
9496              : ((B = n[0]),
9497                (B = B.isElement && "false" == B.node.getAttribute("contenteditable")));
9498            B &&
9499              ((N = !0),
9500              (u = n[0].node),
9501              y.setStartAt(u, CKEDITOR.POSITION_BEFORE_START),
9502              y.setEndAt(u, CKEDITOR.POSITION_AFTER_END));
9503            z.dontMoveCaret = N;
9504            z.bogusNeededBlocks = w;
9505          }
9506          B = z.range;
9507          var R;
9508          K = z.bogusNeededBlocks;
9509          for (W = B.createBookmark(); (D = z.zombies.pop()); )
9510            D.getParent() &&
9511              ((T = B.clone()), T.moveToElementEditStart(D), T.removeEmptyBlocksAtEnd());
9512          if (K)
9513            for (; (D = K.pop()); )
9514              CKEDITOR.env.needsBrFiller ? D.appendBogus() : D.append(B.document.createText(" "));
9515          for (; (D = z.mergeCandidates.pop()); ) D.mergeSiblings();
9516          B.moveToBookmark(W);
9517          if (!z.dontMoveCaret) {
9518            for (D = e(B); D && a(D) && !D.is(C.$empty); ) {
9519              if (D.isBlockBoundary()) B.moveToPosition(D, CKEDITOR.POSITION_BEFORE_END);
9520              else {
9521                if (f(D) && D.getHtml().match(/(\s|&nbsp;)$/g)) {
9522                  R = null;
9523                  break;
9524                }
9525                R = B.clone();
9526                R.moveToPosition(D, CKEDITOR.POSITION_BEFORE_END);
9527              }
9528              D = D.getLast(c);
9529            }
9530            R && B.moveToRange(R);
9531          }
9532        }
9533      };
9534    })();
9535    p = (function() {
9536      function a(b) {
9537        b = new CKEDITOR.dom.walker(b);
9538        b.guard = function(a, b) {
9539          if (b) return !1;
9540          if (a.type == CKEDITOR.NODE_ELEMENT) return a.is(CKEDITOR.dtd.$tableContent);
9541        };
9542        b.evaluator = function(a) {
9543          return a.type == CKEDITOR.NODE_ELEMENT;
9544        };
9545        return b;
9546      }
9547      function b(a, c, d) {
9548        c = a.getDocument().createElement(c);
9549        a.append(c, d);
9550        return c;
9551      }
9552      function c(a) {
9553        var b = a.count(),
9554          d;
9555        for (b; 0 < b--; )
9556          (d = a.getItem(b)),
9557            CKEDITOR.tools.trim(d.getHtml()) ||
9558              (d.appendBogus(),
9559              CKEDITOR.env.ie &&
9560                9 > CKEDITOR.env.version &&
9561                d.getChildCount() &&
9562                d.getFirst().remove());
9563      }
9564      return function(d) {
9565        var e = d.startContainer,
9566          f = e.getAscendant("table", 1),
9567          t = !1;
9568        c(f.getElementsByTag("td"));
9569        c(f.getElementsByTag("th"));
9570        f = d.clone();
9571        f.setStart(e, 0);
9572        f = a(f).lastBackward();
9573        f ||
9574          ((f = d.clone()),
9575          f.setEndAt(e, CKEDITOR.POSITION_BEFORE_END),
9576          (f = a(f).lastForward()),
9577          (t = !0));
9578        f || (f = e);
9579        f.is("table")
9580          ? (d.setStartAt(f, CKEDITOR.POSITION_BEFORE_START), d.collapse(!0), f.remove())
9581          : (f.is({ tbody: 1, thead: 1, tfoot: 1 }) && (f = b(f, "tr", t)),
9582            f.is("tr") && (f = b(f, f.getParent().is("thead") ? "th" : "td", t)),
9583            (e = f.getBogus()) && e.remove(),
9584            d.moveToPosition(f, t ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_END));
9585      };
9586    })();
9587    J = (function() {
9588      function a(b) {
9589        b = new CKEDITOR.dom.walker(b);
9590        b.guard = function(a, b) {
9591          if (b) return !1;
9592          if (a.type == CKEDITOR.NODE_ELEMENT)
9593            return a.is(CKEDITOR.dtd.$list) || a.is(CKEDITOR.dtd.$listItem);
9594        };
9595        b.evaluator = function(a) {
9596          return a.type == CKEDITOR.NODE_ELEMENT && a.is(CKEDITOR.dtd.$listItem);
9597        };
9598        return b;
9599      }
9600      return function(b) {
9601        var c = b.startContainer,
9602          d = !1,
9603          e;
9604        e = b.clone();
9605        e.setStart(c, 0);
9606        e = a(e).lastBackward();
9607        e ||
9608          ((e = b.clone()),
9609          e.setEndAt(c, CKEDITOR.POSITION_BEFORE_END),
9610          (e = a(e).lastForward()),
9611          (d = !0));
9612        e || (e = c);
9613        e.is(CKEDITOR.dtd.$list)
9614          ? (b.setStartAt(e, CKEDITOR.POSITION_BEFORE_START), b.collapse(!0), e.remove())
9615          : ((c = e.getBogus()) && c.remove(),
9616            b.moveToPosition(e, d ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_END),
9617            b.select());
9618      };
9619    })();
9620    u = {
9621      eol: {
9622        detect: function(a, b) {
9623          var c = a.range,
9624            d = c.clone(),
9625            e = c.clone(),
9626            f = new CKEDITOR.dom.elementPath(c.startContainer, b),
9627            t = new CKEDITOR.dom.elementPath(c.endContainer, b);
9628          d.collapse(1);
9629          e.collapse();
9630          f.block &&
9631            d.checkBoundaryOfElement(f.block, CKEDITOR.END) &&
9632            (c.setStartAfter(f.block), (a.prependEolBr = 1));
9633          t.block &&
9634            e.checkBoundaryOfElement(t.block, CKEDITOR.START) &&
9635            (c.setEndBefore(t.block), (a.appendEolBr = 1));
9636        },
9637        fix: function(a, b) {
9638          var c = b.getDocument(),
9639            d;
9640          a.appendEolBr && ((d = this.createEolBr(c)), a.fragment.append(d));
9641          !a.prependEolBr || (d && !d.getPrevious()) || a.fragment.append(this.createEolBr(c), 1);
9642        },
9643        createEolBr: function(a) {
9644          return a.createElement("br", { attributes: { "data-cke-eol": 1 } });
9645        },
9646      },
9647      bogus: {
9648        exclude: function(a) {
9649          var b = a.range.getBoundaryNodes(),
9650            c = b.startNode,
9651            b = b.endNode;
9652          !b || !B(b) || (c && c.equals(b)) || a.range.setEndBefore(b);
9653        },
9654      },
9655      tree: {
9656        rebuild: function(a, b) {
9657          var c = a.range,
9658            d = c.getCommonAncestor(),
9659            e = new CKEDITOR.dom.elementPath(d, b),
9660            f = new CKEDITOR.dom.elementPath(c.startContainer, b),
9661            c = new CKEDITOR.dom.elementPath(c.endContainer, b),
9662            t;
9663          d.type == CKEDITOR.NODE_TEXT && (d = d.getParent());
9664          if (
9665            e.blockLimit.is({
9666              tr: 1,
9667              table: 1,
9668            })
9669          ) {
9670            var g = e.contains("table").getParent();
9671            t = function(a) {
9672              return !a.equals(g);
9673            };
9674          } else if (
9675            e.block &&
9676            e.block.is(CKEDITOR.dtd.$listItem) &&
9677            ((f = f.contains(CKEDITOR.dtd.$list)),
9678            (c = c.contains(CKEDITOR.dtd.$list)),
9679            !f.equals(c))
9680          ) {
9681            var h = e.contains(CKEDITOR.dtd.$list).getParent();
9682            t = function(a) {
9683              return !a.equals(h);
9684            };
9685          }
9686          t ||
9687            (t = function(a) {
9688              return !a.equals(e.block) && !a.equals(e.blockLimit);
9689            });
9690          this.rebuildFragment(a, b, d, t);
9691        },
9692        rebuildFragment: function(a, b, c, d) {
9693          for (var e; c && !c.equals(b) && d(c); )
9694            (e = c.clone(0, 1)), a.fragment.appendTo(e), (a.fragment = e), (c = c.getParent());
9695        },
9696      },
9697      cell: {
9698        shrink: function(a) {
9699          a = a.range;
9700          var b = a.startContainer,
9701            c = a.endContainer,
9702            d = a.startOffset,
9703            e = a.endOffset;
9704          b.type == CKEDITOR.NODE_ELEMENT &&
9705            b.equals(c) &&
9706            b.is("tr") &&
9707            ++d == e &&
9708            a.shrink(CKEDITOR.SHRINK_TEXT);
9709        },
9710      },
9711    };
9712    K = (function() {
9713      function a(b, c) {
9714        var d = b.getParent();
9715        if (d.is(CKEDITOR.dtd.$inline)) b[c ? "insertBefore" : "insertAfter"](d);
9716      }
9717      function b(c, d, e) {
9718        a(d);
9719        a(e, 1);
9720        for (var f; (f = e.getNext()); ) f.insertAfter(d), (d = f);
9721        x(c) && c.remove();
9722      }
9723      function c(a, b) {
9724        var d = new CKEDITOR.dom.range(a);
9725        d.setStartAfter(b.startNode);
9726        d.setEndBefore(b.endNode);
9727        return d;
9728      }
9729      return {
9730        list: {
9731          detectMerge: function(a, b) {
9732            var d = c(b, a.bookmark),
9733              e = d.startPath(),
9734              f = d.endPath(),
9735              g = e.contains(CKEDITOR.dtd.$list),
9736              h = f.contains(CKEDITOR.dtd.$list);
9737            a.mergeList = g && h && g.getParent().equals(h.getParent()) && !g.equals(h);
9738            a.mergeListItems =
9739              e.block &&
9740              f.block &&
9741              e.block.is(CKEDITOR.dtd.$listItem) &&
9742              f.block.is(CKEDITOR.dtd.$listItem);
9743            if (a.mergeList || a.mergeListItems)
9744              (d = d.clone()),
9745                d.setStartBefore(a.bookmark.startNode),
9746                d.setEndAfter(a.bookmark.endNode),
9747                (a.mergeListBookmark = d.createBookmark());
9748          },
9749          merge: function(a, c) {
9750            if (a.mergeListBookmark) {
9751              var d = a.mergeListBookmark.startNode,
9752                e = a.mergeListBookmark.endNode,
9753                f = new CKEDITOR.dom.elementPath(d, c),
9754                g = new CKEDITOR.dom.elementPath(e, c);
9755              if (a.mergeList) {
9756                var h = f.contains(CKEDITOR.dtd.$list),
9757                  k = g.contains(CKEDITOR.dtd.$list);
9758                h.equals(k) || (k.moveChildren(h), k.remove());
9759              }
9760              a.mergeListItems &&
9761                ((f = f.contains(CKEDITOR.dtd.$listItem)),
9762                (g = g.contains(CKEDITOR.dtd.$listItem)),
9763                f.equals(g) || b(g, d, e));
9764              d.remove();
9765              e.remove();
9766            }
9767          },
9768        },
9769        block: {
9770          detectMerge: function(a, b) {
9771            if (!a.tableContentsRanges && !a.mergeListBookmark) {
9772              var c = new CKEDITOR.dom.range(b);
9773              c.setStartBefore(a.bookmark.startNode);
9774              c.setEndAfter(a.bookmark.endNode);
9775              a.mergeBlockBookmark = c.createBookmark();
9776            }
9777          },
9778          merge: function(a, c) {
9779            if (a.mergeBlockBookmark && !a.purgeTableBookmark) {
9780              var d = a.mergeBlockBookmark.startNode,
9781                e = a.mergeBlockBookmark.endNode,
9782                f = new CKEDITOR.dom.elementPath(d, c),
9783                g = new CKEDITOR.dom.elementPath(e, c),
9784                f = f.block,
9785                g = g.block;
9786              f && g && !f.equals(g) && b(g, d, e);
9787              d.remove();
9788              e.remove();
9789            }
9790          },
9791        },
9792        table: (function() {
9793          function a(c) {
9794            var e = [],
9795              f,
9796              g = new CKEDITOR.dom.walker(c),
9797              h = c.startPath().contains(d),
9798              k = c.endPath().contains(d),
9799              n = {};
9800            g.guard = function(a, g) {
9801              if (a.type == CKEDITOR.NODE_ELEMENT) {
9802                var A = "visited_" + (g ? "out" : "in");
9803                if (a.getCustomData(A)) return;
9804                CKEDITOR.dom.element.setMarker(n, a, A, 1);
9805              }
9806              if (g && h && a.equals(h))
9807                (f = c.clone()), f.setEndAt(h, CKEDITOR.POSITION_BEFORE_END), e.push(f);
9808              else if (!g && k && a.equals(k))
9809                (f = c.clone()), f.setStartAt(k, CKEDITOR.POSITION_AFTER_START), e.push(f);
9810              else {
9811                if ((A = !g))
9812                  A =
9813                    a.type == CKEDITOR.NODE_ELEMENT &&
9814                    a.is(d) &&
9815                    (!h || b(a, h)) &&
9816                    (!k || b(a, k));
9817                if (!A && (A = g))
9818                  if (a.is(d))
9819                    var A = h && h.getAscendant("table", !0),
9820                      l = k && k.getAscendant("table", !0),
9821                      H = a.getAscendant("table", !0),
9822                      A = (A && A.contains(H)) || (l && l.contains(H));
9823                  else A = void 0;
9824                A && ((f = c.clone()), f.selectNodeContents(a), e.push(f));
9825              }
9826            };
9827            g.lastForward();
9828            CKEDITOR.dom.element.clearAllMarkers(n);
9829            return e;
9830          }
9831          function b(a, c) {
9832            var d = CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_IS_CONTAINED,
9833              e = a.getPosition(c);
9834            return e === CKEDITOR.POSITION_IDENTICAL ? !1 : 0 === (e & d);
9835          }
9836          var d = { td: 1, th: 1, caption: 1 };
9837          return {
9838            detectPurge: function(a) {
9839              var b = a.range,
9840                c = b.clone();
9841              c.enlarge(CKEDITOR.ENLARGE_ELEMENT);
9842              var c = new CKEDITOR.dom.walker(c),
9843                e = 0;
9844              c.evaluator = function(a) {
9845                a.type == CKEDITOR.NODE_ELEMENT && a.is(d) && ++e;
9846              };
9847              c.checkForward();
9848              if (1 < e) {
9849                var c = b.startPath().contains("table"),
9850                  f = b.endPath().contains("table");
9851                c &&
9852                  f &&
9853                  b.checkBoundaryOfElement(c, CKEDITOR.START) &&
9854                  b.checkBoundaryOfElement(f, CKEDITOR.END) &&
9855                  ((b = a.range.clone()),
9856                  b.setStartBefore(c),
9857                  b.setEndAfter(f),
9858                  (a.purgeTableBookmark = b.createBookmark()));
9859              }
9860            },
9861            detectRanges: function(e, f) {
9862              var g = c(f, e.bookmark),
9863                h = g.clone(),
9864                k,
9865                l,
9866                n = g.getCommonAncestor();
9867              n.is(CKEDITOR.dtd.$tableContent) && !n.is(d) && (n = n.getAscendant("table", !0));
9868              l = n;
9869              n = new CKEDITOR.dom.elementPath(g.startContainer, l);
9870              l = new CKEDITOR.dom.elementPath(g.endContainer, l);
9871              n = n.contains("table");
9872              l = l.contains("table");
9873              if (n || l)
9874                n && l && b(n, l)
9875                  ? ((e.tableSurroundingRange = h),
9876                    h.setStartAt(n, CKEDITOR.POSITION_AFTER_END),
9877                    h.setEndAt(l, CKEDITOR.POSITION_BEFORE_START),
9878                    (h = g.clone()),
9879                    h.setEndAt(n, CKEDITOR.POSITION_AFTER_END),
9880                    (k = g.clone()),
9881                    k.setStartAt(l, CKEDITOR.POSITION_BEFORE_START),
9882                    (k = a(h).concat(a(k))))
9883                  : n
9884                    ? l ||
9885                      ((e.tableSurroundingRange = h),
9886                      h.setStartAt(n, CKEDITOR.POSITION_AFTER_END),
9887                      g.setEndAt(n, CKEDITOR.POSITION_AFTER_END))
9888                    : ((e.tableSurroundingRange = h),
9889                      h.setEndAt(l, CKEDITOR.POSITION_BEFORE_START),
9890                      g.setStartAt(l, CKEDITOR.POSITION_AFTER_START)),
9891                  (e.tableContentsRanges = k ? k : a(g));
9892            },
9893            deleteRanges: function(a) {
9894              for (var b; (b = a.tableContentsRanges.pop()); )
9895                b.extractContents(), x(b.startContainer) && b.startContainer.appendBogus();
9896              a.tableSurroundingRange && a.tableSurroundingRange.extractContents();
9897            },
9898            purge: function(a) {
9899              if (a.purgeTableBookmark) {
9900                var b = a.doc,
9901                  c = a.range.clone(),
9902                  b = b.createElement("p");
9903                b.insertBefore(a.purgeTableBookmark.startNode);
9904                c.moveToBookmark(a.purgeTableBookmark);
9905                c.deleteContents();
9906                a.range.moveToPosition(b, CKEDITOR.POSITION_AFTER_START);
9907              }
9908            },
9909          };
9910        })(),
9911        detectExtractMerge: function(a) {
9912          return !(
9913            a.range.startPath().contains(CKEDITOR.dtd.$listItem) &&
9914            a.range.endPath().contains(CKEDITOR.dtd.$listItem)
9915          );
9916        },
9917        fixUneditableRangePosition: function(a) {
9918          a.startContainer.getDtd()["#"] || a.moveToClosestEditablePosition(null, !0);
9919        },
9920        autoParagraph: function(a, b) {
9921          var c = b.startPath(),
9922            d;
9923          k(a, c.block, c.blockLimit) &&
9924            (d = g(a)) &&
9925            ((d = b.document.createElement(d)),
9926            d.appendBogus(),
9927            b.insertNode(d),
9928            b.moveToPosition(d, CKEDITOR.POSITION_AFTER_START));
9929        },
9930      };
9931    })();
9932  })();
9933  (function() {
9934    function a(a) {
9935      return CKEDITOR.plugins.widget && CKEDITOR.plugins.widget.isDomWidget(a);
9936    }
9937    function d(b, c) {
9938      if (0 === b.length || a(b[0].getEnclosedNode())) return !1;
9939      var d, e;
9940      if ((d = !c && 1 === b.length) && !(d = b[0].collapsed)) {
9941        var f = b[0];
9942        d = f.startContainer.getAscendant({ td: 1, th: 1 }, !0);
9943        var g = f.endContainer.getAscendant({ td: 1, th: 1 }, !0);
9944        e = CKEDITOR.tools.trim;
9945        d && d.equals(g) && !d.findOne("td, th, tr, tbody, table")
9946          ? ((f = f.cloneContents()),
9947            (d = f.getFirst() ? e(f.getFirst().getText()) !== e(d.getText()) : !0))
9948          : (d = !1);
9949      }
9950      if (d) return !1;
9951      for (e = 0; e < b.length; e++) if (((d = b[e]._getTableElement()), !d)) return !1;
9952      return !0;
9953    }
9954    function b(a) {
9955      function b(a) {
9956        a = a.find("td, th");
9957        var c = [],
9958          d;
9959        for (d = 0; d < a.count(); d++) c.push(a.getItem(d));
9960        return c;
9961      }
9962      var c = [],
9963        d,
9964        e;
9965      for (e = 0; e < a.length; e++)
9966        (d = a[e]._getTableElement()),
9967          d.is && d.is({ td: 1, th: 1 }) ? c.push(d) : (c = c.concat(b(d)));
9968      return c;
9969    }
9970    function c(a) {
9971      a = b(a);
9972      var c = "",
9973        d = [],
9974        e,
9975        f;
9976      for (f = 0; f < a.length; f++)
9977        e && !e.equals(a[f].getAscendant("tr"))
9978          ? ((c += d.join("\t") + "\n"), (e = a[f].getAscendant("tr")), (d = []))
9979          : 0 === f && (e = a[f].getAscendant("tr")),
9980          d.push(a[f].getText());
9981      return (c += d.join("\t"));
9982    }
9983    function f(a) {
9984      var b = this.root.editor,
9985        d = b.getSelection(1);
9986      this.reset();
9987      l = !0;
9988      d.root.once(
9989        "selectionchange",
9990        function(a) {
9991          a.cancel();
9992        },
9993        null,
9994        null,
9995        0,
9996      );
9997      d.selectRanges([a[0]]);
9998      d = this._.cache;
9999      d.ranges = new CKEDITOR.dom.rangeList(a);
10000      d.type = CKEDITOR.SELECTION_TEXT;
10001      d.selectedElement = a[0]._getTableElement();
10002      d.selectedText = c(a);
10003      d.nativeSel = null;
10004      this.isFake = 1;
10005      this.rev = J++;
10006      b._.fakeSelection = this;
10007      l = !1;
10008      this.root.fire("selectionchange");
10009    }
10010    function h() {
10011      var b = this._.fakeSelection,
10012        c;
10013      if (b) {
10014        c = this.getSelection(1);
10015        var e;
10016        if (!(e = !c) && (e = !c.isHidden())) {
10017          e = b;
10018          var f = c.getRanges(),
10019            g = e.getRanges(),
10020            h =
10021              f.length &&
10022              f[0]._getTableElement() &&
10023              f[0]._getTableElement().getAscendant("table", !0),
10024            n =
10025              g.length &&
10026              g[0]._getTableElement() &&
10027              g[0]._getTableElement().getAscendant("table", !0),
10028            k = 1 === f.length && f[0]._getTableElement() && f[0]._getTableElement().is("table"),
10029            v = 1 === g.length && g[0]._getTableElement() && g[0]._getTableElement().is("table");
10030          if (a(e.getSelectedElement())) e = !1;
10031          else {
10032            var A = 1 === f.length && f[0].collapsed,
10033              g = d(f, !!CKEDITOR.env.webkit) && d(g);
10034            h = h && n ? h.equals(n) || n.contains(h) : !1;
10035            h && (A || g) ? (k && !v && e.selectRanges(f), (e = !0)) : (e = !1);
10036          }
10037          e = !e;
10038        }
10039        e && (b.reset(), (b = 0));
10040      }
10041      if (!b && ((b = c || this.getSelection(1)), !b || b.getType() == CKEDITOR.SELECTION_NONE))
10042        return;
10043      this.fire("selectionCheck", b);
10044      c = this.elementPath();
10045      c.compare(this._.selectionPreviousPath) ||
10046        ((e =
10047          this._.selectionPreviousPath &&
10048          this._.selectionPreviousPath.blockLimit.equals(c.blockLimit)),
10049        CKEDITOR.env.webkit && !e && (this._.previousActive = this.document.getActive()),
10050        (this._.selectionPreviousPath = c),
10051        this.fire("selectionChange", { selection: b, path: c }));
10052    }
10053    function k() {
10054      F = !0;
10055      q || (g.call(this), (q = CKEDITOR.tools.setTimeout(g, 200, this)));
10056    }
10057    function g() {
10058      q = null;
10059      F && (CKEDITOR.tools.setTimeout(h, 0, this), (F = !1));
10060    }
10061    function m(a) {
10062      return L(a) || (a.type == CKEDITOR.NODE_ELEMENT && !a.is(CKEDITOR.dtd.$empty)) ? !0 : !1;
10063    }
10064    function r(a) {
10065      function b(c, d) {
10066        return c && c.type != CKEDITOR.NODE_TEXT
10067          ? a.clone()["moveToElementEdit" + (d ? "End" : "Start")](c)
10068          : !1;
10069      }
10070      if (!(a.root instanceof CKEDITOR.editable)) return !1;
10071      var c = a.startContainer,
10072        d = a.getPreviousNode(m, null, c),
10073        e = a.getNextNode(m, null, c);
10074      return b(d) ||
10075        b(e, 1) ||
10076        !(d || e || (c.type == CKEDITOR.NODE_ELEMENT && c.isBlockBoundary() && c.getBogus()))
10077        ? !0
10078        : !1;
10079    }
10080    function e(a) {
10081      y(a, !1);
10082      var b = a.getDocument().createText(u);
10083      a.setCustomData("cke-fillingChar", b);
10084      return b;
10085    }
10086    function y(a, b) {
10087      var c = a && a.removeCustomData("cke-fillingChar");
10088      if (c) {
10089        if (!1 !== b) {
10090          var d = a
10091              .getDocument()
10092              .getSelection()
10093              .getNative(),
10094            e = d && "None" != d.type && d.getRangeAt(0),
10095            f = u.length;
10096          if (c.getLength() > f && e && e.intersectsNode(c.$)) {
10097            var n = [
10098              { node: d.anchorNode, offset: d.anchorOffset },
10099              { node: d.focusNode, offset: d.focusOffset },
10100            ];
10101            d.anchorNode == c.$ && d.anchorOffset > f && (n[0].offset -= f);
10102            d.focusNode == c.$ && d.focusOffset > f && (n[1].offset -= f);
10103          }
10104        }
10105        c.setText(x(c.getText(), 1));
10106        n &&
10107          ((c = a.getDocument().$),
10108          (d = c.getSelection()),
10109          (c = c.createRange()),
10110          c.setStart(n[0].node, n[0].offset),
10111          c.collapse(!0),
10112          d.removeAllRanges(),
10113          d.addRange(c),
10114          d.extend(n[1].node, n[1].offset));
10115      }
10116    }
10117    function x(a, b) {
10118      return b
10119        ? a.replace(K, function(a, b) {
10120            return b ? " " : "";
10121          })
10122        : a.replace(u, "");
10123    }
10124    function B(a, b) {
10125      var c = CKEDITOR.dom.element.createFromHtml(
10126        '\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"' +
10127          (CKEDITOR.env.ie && 14 > CKEDITOR.env.version
10128            ? "display:none"
10129            : "position:fixed;top:0;left:-1000px") +
10130          '"\x3e' +
10131          (b || "\x26nbsp;") +
10132          "\x3c/div\x3e",
10133        a.document,
10134      );
10135      a.fire("lockSnapshot");
10136      a.editable().append(c);
10137      var d = a.getSelection(1),
10138        e = a.createRange(),
10139        f = d.root.on(
10140          "selectionchange",
10141          function(a) {
10142            a.cancel();
10143          },
10144          null,
10145          null,
10146          0,
10147        );
10148      e.setStartAt(c, CKEDITOR.POSITION_AFTER_START);
10149      e.setEndAt(c, CKEDITOR.POSITION_BEFORE_END);
10150      d.selectRanges([e]);
10151      f.removeListener();
10152      a.fire("unlockSnapshot");
10153      a._.hiddenSelectionContainer = c;
10154    }
10155    function D(a) {
10156      var b = { 37: 1, 39: 1, 8: 1, 46: 1 };
10157      return function(c) {
10158        var d = c.data.getKeystroke();
10159        if (b[d]) {
10160          var e = a.getSelection().getRanges(),
10161            f = e[0];
10162          1 == e.length &&
10163            f.collapsed &&
10164            (d = f[38 > d ? "getPreviousEditableNode" : "getNextEditableNode"]()) &&
10165            d.type == CKEDITOR.NODE_ELEMENT &&
10166            "false" == d.getAttribute("contenteditable") &&
10167            (a.getSelection().fake(d), c.data.preventDefault(), c.cancel());
10168        }
10169      };
10170    }
10171    function w(a) {
10172      for (var b = 0; b < a.length; b++) {
10173        var c = a[b];
10174        c.getCommonAncestor().isReadOnly() && a.splice(b, 1);
10175        if (!c.collapsed) {
10176          if (c.startContainer.isReadOnly())
10177            for (
10178              var d = c.startContainer, e;
10179              d && !(((e = d.type == CKEDITOR.NODE_ELEMENT) && d.is("body")) || !d.isReadOnly());
10180
10181            )
10182              e && "false" == d.getAttribute("contentEditable") && c.setStartAfter(d),
10183                (d = d.getParent());
10184          d = c.startContainer;
10185          e = c.endContainer;
10186          var f = c.startOffset,
10187            n = c.endOffset,
10188            g = c.clone();
10189          d &&
10190            d.type == CKEDITOR.NODE_TEXT &&
10191            (f >= d.getLength() ? g.setStartAfter(d) : g.setStartBefore(d));
10192          e && e.type == CKEDITOR.NODE_TEXT && (n ? g.setEndAfter(e) : g.setEndBefore(e));
10193          d = new CKEDITOR.dom.walker(g);
10194          d.evaluator = function(d) {
10195            if (d.type == CKEDITOR.NODE_ELEMENT && d.isReadOnly()) {
10196              var e = c.clone();
10197              c.setEndBefore(d);
10198              c.collapsed && a.splice(b--, 1);
10199              d.getPosition(g.endContainer) & CKEDITOR.POSITION_CONTAINS ||
10200                (e.setStartAfter(d), e.collapsed || a.splice(b + 1, 0, e));
10201              return !0;
10202            }
10203            return !1;
10204          };
10205          d.next();
10206        }
10207      }
10208      return a;
10209    }
10210    var p = "function" != typeof window.getSelection,
10211      J = 1,
10212      u = CKEDITOR.tools.repeat("​", 7),
10213      K = new RegExp(u + "( )?", "g"),
10214      l,
10215      q,
10216      F,
10217      L = CKEDITOR.dom.walker.invisible(1),
10218      E = (function() {
10219        function a(b) {
10220          return function(a) {
10221            var c = a.editor.createRange();
10222            c.moveToClosestEditablePosition(a.selected, b) &&
10223              a.editor.getSelection().selectRanges([c]);
10224            return !1;
10225          };
10226        }
10227        function b(a) {
10228          return function(b) {
10229            var c = b.editor,
10230              d = c.createRange(),
10231              e;
10232            if (!c.readOnly)
10233              return (
10234                (e = d.moveToClosestEditablePosition(b.selected, a)) ||
10235                  (e = d.moveToClosestEditablePosition(b.selected, !a)),
10236                e && c.getSelection().selectRanges([d]),
10237                c.fire("saveSnapshot"),
10238                b.selected.remove(),
10239                e ||
10240                  (d.moveToElementEditablePosition(c.editable()),
10241                  c.getSelection().selectRanges([d])),
10242                c.fire("saveSnapshot"),
10243                !1
10244              );
10245          };
10246        }
10247        var c = a(),
10248          d = a(1);
10249        return { 37: c, 38: c, 39: d, 40: d, 8: b(), 46: b(1) };
10250      })();
10251    CKEDITOR.on("instanceCreated", function(a) {
10252      function b() {
10253        var a = c.getSelection();
10254        a && a.removeAllRanges();
10255      }
10256      var c = a.editor;
10257      c.on("contentDom", function() {
10258        function a() {
10259          r = new CKEDITOR.dom.selection(c.getSelection());
10260          r.lock();
10261        }
10262        function b() {
10263          f.removeListener("mouseup", b);
10264          t.removeListener("mouseup", b);
10265          var a = CKEDITOR.document.$.selection,
10266            c = a.createRange();
10267          "None" != a.type &&
10268            c.parentElement() &&
10269            c.parentElement().ownerDocument == e.$ &&
10270            c.select();
10271        }
10272        function d(a) {
10273          if (CKEDITOR.env.ie) {
10274            var b = (a = a.getRanges()[0])
10275              ? a.startContainer.getAscendant(function(a) {
10276                  return (
10277                    a.type == CKEDITOR.NODE_ELEMENT &&
10278                    ("false" == a.getAttribute("contenteditable") ||
10279                      "true" == a.getAttribute("contenteditable"))
10280                  );
10281                }, !0)
10282              : null;
10283            return a && "false" == b.getAttribute("contenteditable") && b;
10284          }
10285        }
10286        var e = c.document,
10287          f = CKEDITOR.document,
10288          g = c.editable(),
10289          l = e.getBody(),
10290          t = e.getDocumentElement(),
10291          C = g.isInline(),
10292          m,
10293          r;
10294        CKEDITOR.env.gecko &&
10295          g.attachListener(
10296            g,
10297            "focus",
10298            function(a) {
10299              a.removeListener();
10300              0 !== m &&
10301                (a = c.getSelection().getNative()) &&
10302                a.isCollapsed &&
10303                a.anchorNode == g.$ &&
10304                ((a = c.createRange()), a.moveToElementEditStart(g), a.select());
10305            },
10306            null,
10307            null,
10308            -2,
10309          );
10310        g.attachListener(
10311          g,
10312          CKEDITOR.env.webkit ? "DOMFocusIn" : "focus",
10313          function() {
10314            m &&
10315              CKEDITOR.env.webkit &&
10316              (m = c._.previousActive && c._.previousActive.equals(e.getActive())) &&
10317              null != c._.previousScrollTop &&
10318              c._.previousScrollTop != g.$.scrollTop &&
10319              (g.$.scrollTop = c._.previousScrollTop);
10320            c.unlockSelection(m);
10321            m = 0;
10322          },
10323          null,
10324          null,
10325          -1,
10326        );
10327        g.attachListener(g, "mousedown", function() {
10328          m = 0;
10329        });
10330        if (CKEDITOR.env.ie || C)
10331          p
10332            ? g.attachListener(g, "beforedeactivate", a, null, null, -1)
10333            : g.attachListener(c, "selectionCheck", a, null, null, -1),
10334            g.attachListener(
10335              g,
10336              CKEDITOR.env.webkit ? "DOMFocusOut" : "blur",
10337              function() {
10338                c.lockSelection(r);
10339                m = 1;
10340              },
10341              null,
10342              null,
10343              -1,
10344            ),
10345            g.attachListener(g, "mousedown", function() {
10346              m = 0;
10347            });
10348        if (CKEDITOR.env.ie && !C) {
10349          var x;
10350          g.attachListener(g, "mousedown", function(a) {
10351            2 == a.data.$.button &&
10352              (((a = c.document.getSelection()) && a.getType() != CKEDITOR.SELECTION_NONE) ||
10353                (x = c.window.getScrollPosition()));
10354          });
10355          g.attachListener(g, "mouseup", function(a) {
10356            2 == a.data.$.button &&
10357              x &&
10358              ((c.document.$.documentElement.scrollLeft = x.x),
10359              (c.document.$.documentElement.scrollTop = x.y));
10360            x = null;
10361          });
10362          if ("BackCompat" != e.$.compatMode) {
10363            if (CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat) {
10364              var q, u;
10365              t.on("mousedown", function(a) {
10366                function b(a) {
10367                  a = a.data.$;
10368                  if (q) {
10369                    var c = l.$.createTextRange();
10370                    try {
10371                      c.moveToPoint(a.clientX, a.clientY);
10372                    } catch (d) {}
10373                    q.setEndPoint(
10374                      0 > u.compareEndPoints("StartToStart", c) ? "EndToEnd" : "StartToStart",
10375                      c,
10376                    );
10377                    q.select();
10378                  }
10379                }
10380                function c() {
10381                  t.removeListener("mousemove", b);
10382                  f.removeListener("mouseup", c);
10383                  t.removeListener("mouseup", c);
10384                  q.select();
10385                }
10386                a = a.data;
10387                if (
10388                  a.getTarget().is("html") &&
10389                  a.$.y < t.$.clientHeight &&
10390                  a.$.x < t.$.clientWidth
10391                ) {
10392                  q = l.$.createTextRange();
10393                  try {
10394                    q.moveToPoint(a.$.clientX, a.$.clientY);
10395                  } catch (d) {}
10396                  u = q.duplicate();
10397                  t.on("mousemove", b);
10398                  f.on("mouseup", c);
10399                  t.on("mouseup", c);
10400                }
10401              });
10402            }
10403            if (7 < CKEDITOR.env.version && 11 > CKEDITOR.env.version)
10404              t.on("mousedown", function(a) {
10405                a.data.getTarget().is("html") && (f.on("mouseup", b), t.on("mouseup", b));
10406              });
10407          }
10408        }
10409        g.attachListener(g, "selectionchange", h, c);
10410        g.attachListener(g, "keyup", k, c);
10411        g.attachListener(
10412          g,
10413          "keydown",
10414          function(a) {
10415            var b = this.getSelection(1);
10416            d(b) && (b.selectElement(d(b)), a.data.preventDefault());
10417          },
10418          c,
10419        );
10420        g.attachListener(g, CKEDITOR.env.webkit ? "DOMFocusIn" : "focus", function() {
10421          c.forceNextSelectionCheck();
10422          c.selectionChange(1);
10423        });
10424        if (C && (CKEDITOR.env.webkit || CKEDITOR.env.gecko)) {
10425          var w;
10426          g.attachListener(g, "mousedown", function() {
10427            w = 1;
10428          });
10429          g.attachListener(e.getDocumentElement(), "mouseup", function() {
10430            w && k.call(c);
10431            w = 0;
10432          });
10433        } else g.attachListener(CKEDITOR.env.ie ? g : e.getDocumentElement(), "mouseup", k, c);
10434        CKEDITOR.env.webkit &&
10435          g.attachListener(
10436            e,
10437            "keydown",
10438            function(a) {
10439              switch (a.data.getKey()) {
10440                case 13:
10441                case 33:
10442                case 34:
10443                case 35:
10444                case 36:
10445                case 37:
10446                case 39:
10447                case 8:
10448                case 45:
10449                case 46:
10450                  g.hasFocus && y(g);
10451              }
10452            },
10453            null,
10454            null,
10455            -1,
10456          );
10457        g.attachListener(g, "keydown", D(c), null, null, -1);
10458      });
10459      c.on("setData", function() {
10460        c.unlockSelection();
10461        CKEDITOR.env.webkit && b();
10462      });
10463      c.on("contentDomUnload", function() {
10464        c.unlockSelection();
10465      });
10466      if (CKEDITOR.env.ie9Compat) c.on("beforeDestroy", b, null, null, 9);
10467      c.on("dataReady", function() {
10468        delete c._.fakeSelection;
10469        delete c._.hiddenSelectionContainer;
10470        c.selectionChange(1);
10471      });
10472      c.on(
10473        "loadSnapshot",
10474        function() {
10475          var a = CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),
10476            b = c.editable().getLast(a);
10477          b &&
10478            b.hasAttribute("data-cke-hidden-sel") &&
10479            (b.remove(),
10480            CKEDITOR.env.gecko &&
10481              (a = c.editable().getFirst(a)) &&
10482              a.is("br") &&
10483              a.getAttribute("_moz_editor_bogus_node") &&
10484              a.remove());
10485        },
10486        null,
10487        null,
10488        100,
10489      );
10490      c.on("key", function(a) {
10491        if ("wysiwyg" == c.mode) {
10492          var b = c.getSelection();
10493          if (b.isFake) {
10494            var d = E[a.data.keyCode];
10495            if (d)
10496              return d({ editor: c, selected: b.getSelectedElement(), selection: b, keyEvent: a });
10497          }
10498        }
10499      });
10500    });
10501    if (CKEDITOR.env.webkit)
10502      CKEDITOR.on("instanceReady", function(a) {
10503        var b = a.editor;
10504        b.on(
10505          "selectionChange",
10506          function() {
10507            var a = b.editable(),
10508              c = a.getCustomData("cke-fillingChar");
10509            c &&
10510              (c.getCustomData("ready")
10511                ? (y(a), a.editor.fire("selectionCheck"))
10512                : c.setCustomData("ready", 1));
10513          },
10514          null,
10515          null,
10516          -1,
10517        );
10518        b.on(
10519          "beforeSetMode",
10520          function() {
10521            y(b.editable());
10522          },
10523          null,
10524          null,
10525          -1,
10526        );
10527        b.on(
10528          "getSnapshot",
10529          function(a) {
10530            a.data && (a.data = x(a.data));
10531          },
10532          b,
10533          null,
10534          20,
10535        );
10536        b.on(
10537          "toDataFormat",
10538          function(a) {
10539            a.data.dataValue = x(a.data.dataValue);
10540          },
10541          null,
10542          null,
10543          0,
10544        );
10545      });
10546    CKEDITOR.editor.prototype.selectionChange = function(a) {
10547      (a ? h : k).call(this);
10548    };
10549    CKEDITOR.editor.prototype.getSelection = function(a) {
10550      return (!this._.savedSelection && !this._.fakeSelection) || a
10551        ? (a = this.editable()) && "wysiwyg" == this.mode ? new CKEDITOR.dom.selection(a) : null
10552        : this._.savedSelection || this._.fakeSelection;
10553    };
10554    CKEDITOR.editor.prototype.lockSelection = function(a) {
10555      a = a || this.getSelection(1);
10556      return a.getType() != CKEDITOR.SELECTION_NONE
10557        ? (!a.isLocked && a.lock(), (this._.savedSelection = a), !0)
10558        : !1;
10559    };
10560    CKEDITOR.editor.prototype.unlockSelection = function(a) {
10561      var b = this._.savedSelection;
10562      return b ? (b.unlock(a), delete this._.savedSelection, !0) : !1;
10563    };
10564    CKEDITOR.editor.prototype.forceNextSelectionCheck = function() {
10565      delete this._.selectionPreviousPath;
10566    };
10567    CKEDITOR.dom.document.prototype.getSelection = function() {
10568      return new CKEDITOR.dom.selection(this);
10569    };
10570    CKEDITOR.dom.range.prototype.select = function() {
10571      var a =
10572        this.root instanceof CKEDITOR.editable
10573          ? this.root.editor.getSelection()
10574          : new CKEDITOR.dom.selection(this.root);
10575      a.selectRanges([this]);
10576      return a;
10577    };
10578    CKEDITOR.SELECTION_NONE = 1;
10579    CKEDITOR.SELECTION_TEXT = 2;
10580    CKEDITOR.SELECTION_ELEMENT = 3;
10581    CKEDITOR.dom.selection = function(a) {
10582      if (a instanceof CKEDITOR.dom.selection) {
10583        var b = a;
10584        a = a.root;
10585      }
10586      var c = a instanceof CKEDITOR.dom.element;
10587      this.rev = b ? b.rev : J++;
10588      this.document = a instanceof CKEDITOR.dom.document ? a : a.getDocument();
10589      this.root = c ? a : this.document.getBody();
10590      this.isLocked = 0;
10591      this._ = { cache: {} };
10592      if (b)
10593        return (
10594          CKEDITOR.tools.extend(this._.cache, b._.cache),
10595          (this.isFake = b.isFake),
10596          (this.isLocked = b.isLocked),
10597          this
10598        );
10599      a = this.getNative();
10600      var d, e;
10601      if (a)
10602        if (a.getRangeAt)
10603          d =
10604            (e = a.rangeCount && a.getRangeAt(0)) &&
10605            new CKEDITOR.dom.node(e.commonAncestorContainer);
10606        else {
10607          try {
10608            e = a.createRange();
10609          } catch (f) {}
10610          d = e && CKEDITOR.dom.element.get((e.item && e.item(0)) || e.parentElement());
10611        }
10612      if (
10613        !d ||
10614        (d.type != CKEDITOR.NODE_ELEMENT && d.type != CKEDITOR.NODE_TEXT) ||
10615        (!this.root.equals(d) && !this.root.contains(d))
10616      )
10617        (this._.cache.type = CKEDITOR.SELECTION_NONE),
10618          (this._.cache.startElement = null),
10619          (this._.cache.selectedElement = null),
10620          (this._.cache.selectedText = ""),
10621          (this._.cache.ranges = new CKEDITOR.dom.rangeList());
10622      return this;
10623    };
10624    var M = {
10625      img: 1,
10626      hr: 1,
10627      li: 1,
10628      table: 1,
10629      tr: 1,
10630      td: 1,
10631      th: 1,
10632      embed: 1,
10633      object: 1,
10634      ol: 1,
10635      ul: 1,
10636      a: 1,
10637      input: 1,
10638      form: 1,
10639      select: 1,
10640      textarea: 1,
10641      button: 1,
10642      fieldset: 1,
10643      thead: 1,
10644      tfoot: 1,
10645    };
10646    CKEDITOR.tools.extend(CKEDITOR.dom.selection, {
10647      _removeFillingCharSequenceString: x,
10648      _createFillingCharSequenceNode: e,
10649      FILLING_CHAR_SEQUENCE: u,
10650    });
10651    CKEDITOR.dom.selection.prototype = {
10652      getNative: function() {
10653        return void 0 !== this._.cache.nativeSel
10654          ? this._.cache.nativeSel
10655          : (this._.cache.nativeSel = p
10656              ? this.document.$.selection
10657              : this.document.getWindow().$.getSelection());
10658      },
10659      getType: p
10660        ? function() {
10661            var a = this._.cache;
10662            if (a.type) return a.type;
10663            var b = CKEDITOR.SELECTION_NONE;
10664            try {
10665              var c = this.getNative(),
10666                d = c.type;
10667              "Text" == d && (b = CKEDITOR.SELECTION_TEXT);
10668              "Control" == d && (b = CKEDITOR.SELECTION_ELEMENT);
10669              c.createRange().parentElement() && (b = CKEDITOR.SELECTION_TEXT);
10670            } catch (e) {}
10671            return (a.type = b);
10672          }
10673        : function() {
10674            var a = this._.cache;
10675            if (a.type) return a.type;
10676            var b = CKEDITOR.SELECTION_TEXT,
10677              c = this.getNative();
10678            if (!c || !c.rangeCount) b = CKEDITOR.SELECTION_NONE;
10679            else if (1 == c.rangeCount) {
10680              var c = c.getRangeAt(0),
10681                d = c.startContainer;
10682              d == c.endContainer &&
10683                1 == d.nodeType &&
10684                1 == c.endOffset - c.startOffset &&
10685                M[d.childNodes[c.startOffset].nodeName.toLowerCase()] &&
10686                (b = CKEDITOR.SELECTION_ELEMENT);
10687            }
10688            return (a.type = b);
10689          },
10690      getRanges: (function() {
10691        var a = p
10692          ? (function() {
10693              function a(b) {
10694                return new CKEDITOR.dom.node(b).getIndex();
10695              }
10696              var b = function(b, c) {
10697                b = b.duplicate();
10698                b.collapse(c);
10699                var d = b.parentElement();
10700                if (!d.hasChildNodes()) return { container: d, offset: 0 };
10701                for (
10702                  var e = d.children,
10703                    f,
10704                    g,
10705                    h = b.duplicate(),
10706                    k = 0,
10707                    l = e.length - 1,
10708                    t = -1,
10709                    m,
10710                    p;
10711                  k <= l;
10712
10713                )
10714                  if (
10715                    ((t = Math.floor((k + l) / 2)),
10716                    (f = e[t]),
10717                    h.moveToElementText(f),
10718                    (m = h.compareEndPoints("StartToStart", b)),
10719                    0 < m)
10720                  )
10721                    l = t - 1;
10722                  else if (0 > m) k = t + 1;
10723                  else return { container: d, offset: a(f) };
10724                if (-1 == t || (t == e.length - 1 && 0 > m)) {
10725                  h.moveToElementText(d);
10726                  h.setEndPoint("StartToStart", b);
10727                  h = h.text.replace(/(\r\n|\r)/g, "\n").length;
10728                  e = d.childNodes;
10729                  if (!h)
10730                    return (
10731                      (f = e[e.length - 1]),
10732                      f.nodeType != CKEDITOR.NODE_TEXT
10733                        ? { container: d, offset: e.length }
10734                        : { container: f, offset: f.nodeValue.length }
10735                    );
10736                  for (d = e.length; 0 < h && 0 < d; )
10737                    (g = e[--d]),
10738                      g.nodeType == CKEDITOR.NODE_TEXT && ((p = g), (h -= g.nodeValue.length));
10739                  return { container: p, offset: -h };
10740                }
10741                h.collapse(0 < m ? !0 : !1);
10742                h.setEndPoint(0 < m ? "StartToStart" : "EndToStart", b);
10743                h = h.text.replace(/(\r\n|\r)/g, "\n").length;
10744                if (!h) return { container: d, offset: a(f) + (0 < m ? 0 : 1) };
10745                for (; 0 < h; )
10746                  try {
10747                    (g = f[0 < m ? "previousSibling" : "nextSibling"]),
10748                      g.nodeType == CKEDITOR.NODE_TEXT && ((h -= g.nodeValue.length), (p = g)),
10749                      (f = g);
10750                  } catch (r) {
10751                    return { container: d, offset: a(f) };
10752                  }
10753                return { container: p, offset: 0 < m ? -h : p.nodeValue.length + h };
10754              };
10755              return function() {
10756                var a = this.getNative(),
10757                  c = a && a.createRange(),
10758                  d = this.getType();
10759                if (!a) return [];
10760                if (d == CKEDITOR.SELECTION_TEXT)
10761                  return (
10762                    (a = new CKEDITOR.dom.range(this.root)),
10763                    (d = b(c, !0)),
10764                    a.setStart(new CKEDITOR.dom.node(d.container), d.offset),
10765                    (d = b(c)),
10766                    a.setEnd(new CKEDITOR.dom.node(d.container), d.offset),
10767                    a.endContainer.getPosition(a.startContainer) & CKEDITOR.POSITION_PRECEDING &&
10768                      a.endOffset <= a.startContainer.getIndex() &&
10769                      a.collapse(),
10770                    [a]
10771                  );
10772                if (d == CKEDITOR.SELECTION_ELEMENT) {
10773                  for (var d = [], e = 0; e < c.length; e++) {
10774                    for (
10775                      var f = c.item(e),
10776                        g = f.parentNode,
10777                        h = 0,
10778                        a = new CKEDITOR.dom.range(this.root);
10779                      h < g.childNodes.length && g.childNodes[h] != f;
10780                      h++
10781                    );
10782                    a.setStart(new CKEDITOR.dom.node(g), h);
10783                    a.setEnd(new CKEDITOR.dom.node(g), h + 1);
10784                    d.push(a);
10785                  }
10786                  return d;
10787                }
10788                return [];
10789              };
10790            })()
10791          : function() {
10792              var a = [],
10793                b,
10794                c = this.getNative();
10795              if (!c) return a;
10796              for (var d = 0; d < c.rangeCount; d++) {
10797                var e = c.getRangeAt(d);
10798                b = new CKEDITOR.dom.range(this.root);
10799                b.setStart(new CKEDITOR.dom.node(e.startContainer), e.startOffset);
10800                b.setEnd(new CKEDITOR.dom.node(e.endContainer), e.endOffset);
10801                a.push(b);
10802              }
10803              return a;
10804            };
10805        return function(b) {
10806          var c = this._.cache,
10807            d = c.ranges;
10808          d || (c.ranges = d = new CKEDITOR.dom.rangeList(a.call(this)));
10809          return b ? w(new CKEDITOR.dom.rangeList(d.slice())) : d;
10810        };
10811      })(),
10812      getStartElement: function() {
10813        var a = this._.cache;
10814        if (void 0 !== a.startElement) return a.startElement;
10815        var b;
10816        switch (this.getType()) {
10817          case CKEDITOR.SELECTION_ELEMENT:
10818            return this.getSelectedElement();
10819          case CKEDITOR.SELECTION_TEXT:
10820            var c = this.getRanges()[0];
10821            if (c) {
10822              if (c.collapsed)
10823                (b = c.startContainer), b.type != CKEDITOR.NODE_ELEMENT && (b = b.getParent());
10824              else {
10825                for (
10826                  c.optimize();
10827                  (b = c.startContainer),
10828                    c.startOffset == (b.getChildCount ? b.getChildCount() : b.getLength()) &&
10829                      !b.isBlockBoundary();
10830
10831                )
10832                  c.setStartAfter(b);
10833                b = c.startContainer;
10834                if (b.type != CKEDITOR.NODE_ELEMENT) return b.getParent();
10835                if ((b = b.getChild(c.startOffset)) && b.type == CKEDITOR.NODE_ELEMENT)
10836                  for (c = b.getFirst(); c && c.type == CKEDITOR.NODE_ELEMENT; )
10837                    (b = c), (c = c.getFirst());
10838                else b = c.startContainer;
10839              }
10840              b = b.$;
10841            }
10842        }
10843        return (a.startElement = b ? new CKEDITOR.dom.element(b) : null);
10844      },
10845      getSelectedElement: function() {
10846        var a = this._.cache;
10847        if (void 0 !== a.selectedElement) return a.selectedElement;
10848        var b = this,
10849          c = CKEDITOR.tools.tryThese(
10850            function() {
10851              return b
10852                .getNative()
10853                .createRange()
10854                .item(0);
10855            },
10856            function() {
10857              for (
10858                var a = b.getRanges()[0].clone(), c, d, e = 2;
10859                e &&
10860                !(
10861                  (c = a.getEnclosedNode()) &&
10862                  c.type == CKEDITOR.NODE_ELEMENT &&
10863                  M[c.getName()] &&
10864                  (d = c)
10865                );
10866                e--
10867              )
10868                a.shrink(CKEDITOR.SHRINK_ELEMENT);
10869              return d && d.$;
10870            },
10871          );
10872        return (a.selectedElement = c ? new CKEDITOR.dom.element(c) : null);
10873      },
10874      getSelectedText: function() {
10875        var a = this._.cache;
10876        if (void 0 !== a.selectedText) return a.selectedText;
10877        var b = this.getNative(),
10878          b = p ? ("Control" == b.type ? "" : b.createRange().text) : b.toString();
10879        return (a.selectedText = b);
10880      },
10881      lock: function() {
10882        this.getRanges();
10883        this.getStartElement();
10884        this.getSelectedElement();
10885        this.getSelectedText();
10886        this._.cache.nativeSel = null;
10887        this.isLocked = 1;
10888      },
10889      unlock: function(a) {
10890        if (this.isLocked) {
10891          if (a)
10892            var b = this.getSelectedElement(),
10893              c = this.getRanges(),
10894              e = this.isFake;
10895          this.isLocked = 0;
10896          this.reset();
10897          a &&
10898            (a = b || (c[0] && c[0].getCommonAncestor())) &&
10899            a.getAscendant("body", 1) &&
10900            (d(c)
10901              ? f.call(this, c)
10902              : e ? this.fake(b) : b ? this.selectElement(b) : this.selectRanges(c));
10903        }
10904      },
10905      reset: function() {
10906        this._.cache = {};
10907        this.isFake = 0;
10908        var a = this.root.editor;
10909        if (a && a._.fakeSelection)
10910          if (this.rev == a._.fakeSelection.rev) {
10911            delete a._.fakeSelection;
10912            var b = a._.hiddenSelectionContainer;
10913            if (b) {
10914              var c = a.checkDirty();
10915              a.fire("lockSnapshot");
10916              b.remove();
10917              a.fire("unlockSnapshot");
10918              !c && a.resetDirty();
10919            }
10920            delete a._.hiddenSelectionContainer;
10921          } else CKEDITOR.warn("selection-fake-reset");
10922        this.rev = J++;
10923      },
10924      selectElement: function(a) {
10925        var b = new CKEDITOR.dom.range(this.root);
10926        b.setStartBefore(a);
10927        b.setEndAfter(a);
10928        this.selectRanges([b]);
10929      },
10930      selectRanges: function(a) {
10931        var b = this.root.editor,
10932          c = b && b._.hiddenSelectionContainer;
10933        this.reset();
10934        if (c)
10935          for (var c = this.root, g, h = 0; h < a.length; ++h)
10936            (g = a[h]),
10937              g.endContainer.equals(c) && (g.endOffset = Math.min(g.endOffset, c.getChildCount()));
10938        if (a.length)
10939          if (this.isLocked) {
10940            var k = CKEDITOR.document.getActive();
10941            this.unlock();
10942            this.selectRanges(a);
10943            this.lock();
10944            k && !k.equals(this.root) && k.focus();
10945          } else {
10946            var n;
10947            a: {
10948              var m, v;
10949              if (
10950                1 == a.length &&
10951                !(v = a[0]).collapsed &&
10952                (n = v.getEnclosedNode()) &&
10953                n.type == CKEDITOR.NODE_ELEMENT &&
10954                ((v = v.clone()),
10955                v.shrink(CKEDITOR.SHRINK_ELEMENT, !0),
10956                (m = v.getEnclosedNode()) && m.type == CKEDITOR.NODE_ELEMENT && (n = m),
10957                "false" == n.getAttribute("contenteditable"))
10958              )
10959                break a;
10960              n = void 0;
10961            }
10962            if (n) this.fake(n);
10963            else if (
10964              b &&
10965              b.plugins.tableselection &&
10966              CKEDITOR.plugins.tableselection.isSupportedEnvironment &&
10967              d(a) &&
10968              !l
10969            )
10970              f.call(this, a);
10971            else {
10972              if (p) {
10973                m = CKEDITOR.dom.walker.whitespaces(!0);
10974                n = /\ufeff|\u00a0/;
10975                v = { table: 1, tbody: 1, tr: 1 };
10976                1 < a.length && ((b = a[a.length - 1]), a[0].setEnd(b.endContainer, b.endOffset));
10977                b = a[0];
10978                a = b.collapsed;
10979                var A, G, I;
10980                if (
10981                  (c = b.getEnclosedNode()) &&
10982                  c.type == CKEDITOR.NODE_ELEMENT &&
10983                  c.getName() in M &&
10984                  (!c.is("a") || !c.getText())
10985                )
10986                  try {
10987                    I = c.$.createControlRange();
10988                    I.addElement(c.$);
10989                    I.select();
10990                    return;
10991                  } catch (q) {}
10992                if (
10993                  (b.startContainer.type == CKEDITOR.NODE_ELEMENT &&
10994                    b.startContainer.getName() in v) ||
10995                  (b.endContainer.type == CKEDITOR.NODE_ELEMENT && b.endContainer.getName() in v)
10996                )
10997                  b.shrink(CKEDITOR.NODE_ELEMENT, !0), (a = b.collapsed);
10998                I = b.createBookmark();
10999                v = I.startNode;
11000                a || (k = I.endNode);
11001                I = b.document.$.body.createTextRange();
11002                I.moveToElementText(v.$);
11003                I.moveStart("character", 1);
11004                k
11005                  ? ((n = b.document.$.body.createTextRange()),
11006                    n.moveToElementText(k.$),
11007                    I.setEndPoint("EndToEnd", n),
11008                    I.moveEnd("character", -1))
11009                  : ((A = v.getNext(m)),
11010                    (G = v.hasAscendant("pre")),
11011                    (A =
11012                      !(A && A.getText && A.getText().match(n)) &&
11013                      (G || !v.hasPrevious() || (v.getPrevious().is && v.getPrevious().is("br")))),
11014                    (G = b.document.createElement("span")),
11015                    G.setHtml("\x26#65279;"),
11016                    G.insertBefore(v),
11017                    A && b.document.createText("").insertBefore(v));
11018                b.setStartBefore(v);
11019                v.remove();
11020                a
11021                  ? (A
11022                      ? (I.moveStart("character", -1), I.select(), b.document.$.selection.clear())
11023                      : I.select(),
11024                    b.moveToPosition(G, CKEDITOR.POSITION_BEFORE_START),
11025                    G.remove())
11026                  : (b.setEndBefore(k), k.remove(), I.select());
11027              } else {
11028                k = this.getNative();
11029                if (!k) return;
11030                this.removeAllRanges();
11031                for (I = 0; I < a.length; I++) {
11032                  if (
11033                    I < a.length - 1 &&
11034                    ((A = a[I]),
11035                    (G = a[I + 1]),
11036                    (n = A.clone()),
11037                    n.setStart(A.endContainer, A.endOffset),
11038                    n.setEnd(G.startContainer, G.startOffset),
11039                    !n.collapsed &&
11040                      (n.shrink(CKEDITOR.NODE_ELEMENT, !0),
11041                      (b = n.getCommonAncestor()),
11042                      (n = n.getEnclosedNode()),
11043                      b.isReadOnly() || (n && n.isReadOnly())))
11044                  ) {
11045                    G.setStart(A.startContainer, A.startOffset);
11046                    a.splice(I--, 1);
11047                    continue;
11048                  }
11049                  b = a[I];
11050                  G = this.document.$.createRange();
11051                  b.collapsed &&
11052                    CKEDITOR.env.webkit &&
11053                    r(b) &&
11054                    ((n = e(this.root)),
11055                    b.insertNode(n),
11056                    (A = n.getNext()) &&
11057                    !n.getPrevious() &&
11058                    A.type == CKEDITOR.NODE_ELEMENT &&
11059                    "br" == A.getName()
11060                      ? (y(this.root), b.moveToPosition(A, CKEDITOR.POSITION_BEFORE_START))
11061                      : b.moveToPosition(n, CKEDITOR.POSITION_AFTER_END));
11062                  G.setStart(b.startContainer.$, b.startOffset);
11063                  try {
11064                    G.setEnd(b.endContainer.$, b.endOffset);
11065                  } catch (x) {
11066                    if (0 <= x.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))
11067                      b.collapse(1), G.setEnd(b.endContainer.$, b.endOffset);
11068                    else throw x;
11069                  }
11070                  k.addRange(G);
11071                }
11072              }
11073              this.reset();
11074              this.root.fire("selectionchange");
11075            }
11076          }
11077      },
11078      fake: function(a, b) {
11079        var c = this.root.editor;
11080        void 0 === b && a.hasAttribute("aria-label") && (b = a.getAttribute("aria-label"));
11081        this.reset();
11082        B(c, b);
11083        var d = this._.cache,
11084          e = new CKEDITOR.dom.range(this.root);
11085        e.setStartBefore(a);
11086        e.setEndAfter(a);
11087        d.ranges = new CKEDITOR.dom.rangeList(e);
11088        d.selectedElement = d.startElement = a;
11089        d.type = CKEDITOR.SELECTION_ELEMENT;
11090        d.selectedText = d.nativeSel = null;
11091        this.isFake = 1;
11092        this.rev = J++;
11093        c._.fakeSelection = this;
11094        this.root.fire("selectionchange");
11095      },
11096      isHidden: function() {
11097        var a = this.getCommonAncestor();
11098        a && a.type == CKEDITOR.NODE_TEXT && (a = a.getParent());
11099        return !(!a || !a.data("cke-hidden-sel"));
11100      },
11101      isInTable: function(a) {
11102        return d(this.getRanges(), a);
11103      },
11104      isCollapsed: function() {
11105        var a = this.getRanges();
11106        return 1 === a.length && a[0].collapsed;
11107      },
11108      createBookmarks: function(a) {
11109        a = this.getRanges().createBookmarks(a);
11110        this.isFake && (a.isFake = 1);
11111        return a;
11112      },
11113      createBookmarks2: function(a) {
11114        a = this.getRanges().createBookmarks2(a);
11115        this.isFake && (a.isFake = 1);
11116        return a;
11117      },
11118      selectBookmarks: function(a) {
11119        for (var b = [], c, e = 0; e < a.length; e++) {
11120          var f = new CKEDITOR.dom.range(this.root);
11121          f.moveToBookmark(a[e]);
11122          b.push(f);
11123        }
11124        a.isFake &&
11125          ((c = d(b) ? b[0]._getTableElement() : b[0].getEnclosedNode()),
11126          (c && c.type == CKEDITOR.NODE_ELEMENT) ||
11127            (CKEDITOR.warn("selection-not-fake"), (a.isFake = 0)));
11128        a.isFake && !d(b) ? this.fake(c) : this.selectRanges(b);
11129        return this;
11130      },
11131      getCommonAncestor: function() {
11132        var a = this.getRanges();
11133        return a.length
11134          ? a[0].startContainer.getCommonAncestor(a[a.length - 1].endContainer)
11135          : null;
11136      },
11137      scrollIntoView: function() {
11138        this.type != CKEDITOR.SELECTION_NONE && this.getRanges()[0].scrollIntoView();
11139      },
11140      removeAllRanges: function() {
11141        if (this.getType() != CKEDITOR.SELECTION_NONE) {
11142          var a = this.getNative();
11143          try {
11144            a && a[p ? "empty" : "removeAllRanges"]();
11145          } catch (b) {}
11146          this.reset();
11147        }
11148      },
11149    };
11150  })();
11151  ("use strict");
11152  CKEDITOR.STYLE_BLOCK = 1;
11153  CKEDITOR.STYLE_INLINE = 2;
11154  CKEDITOR.STYLE_OBJECT = 3;
11155  (function() {
11156    function a(a, b) {
11157      for (var c, d; (a = a.getParent()) && !a.equals(b); )
11158        if (a.getAttribute("data-nostyle")) c = a;
11159        else if (!d) {
11160          var e = a.getAttribute("contentEditable");
11161          "false" == e ? (c = a) : "true" == e && (d = 1);
11162        }
11163      return c;
11164    }
11165    function d(a, b, c, d) {
11166      return (a.getPosition(b) | d) == d && (!c.childRule || c.childRule(a));
11167    }
11168    function b(c) {
11169      var e = c.document;
11170      if (c.collapsed)
11171        (e = J(this, e)), c.insertNode(e), c.moveToPosition(e, CKEDITOR.POSITION_BEFORE_END);
11172      else {
11173        var g = this.element,
11174          h = this._.definition,
11175          k,
11176          l = h.ignoreReadonly,
11177          m = l || h.includeReadonly;
11178        null == m && (m = c.root.getCustomData("cke_includeReadonly"));
11179        var p = CKEDITOR.dtd[g];
11180        p || ((k = !0), (p = CKEDITOR.dtd.span));
11181        c.enlarge(CKEDITOR.ENLARGE_INLINE, 1);
11182        c.trim();
11183        var r = c.createBookmark(),
11184          t = r.startNode,
11185          x = r.endNode,
11186          q = t,
11187          u;
11188        if (!l) {
11189          var w = c.getCommonAncestor(),
11190            l = a(t, w),
11191            w = a(x, w);
11192          l && (q = l.getNextSourceNode(!0));
11193          w && (x = w);
11194        }
11195        for (q.getPosition(x) == CKEDITOR.POSITION_FOLLOWING && (q = 0); q; ) {
11196          l = !1;
11197          if (q.equals(x)) (q = null), (l = !0);
11198          else {
11199            var y = q.type == CKEDITOR.NODE_ELEMENT ? q.getName() : null,
11200              w = y && "false" == q.getAttribute("contentEditable"),
11201              B = y && q.getAttribute("data-nostyle");
11202            if (y && q.data("cke-bookmark")) {
11203              q = q.getNextSourceNode(!0);
11204              continue;
11205            }
11206            if (w && m && CKEDITOR.dtd.$block[y])
11207              for (
11208                var E = q,
11209                  C = f(E),
11210                  F = void 0,
11211                  H = C.length,
11212                  K = 0,
11213                  E = H && new CKEDITOR.dom.range(E.getDocument());
11214                K < H;
11215                ++K
11216              ) {
11217                var F = C[K],
11218                  L = CKEDITOR.filter.instances[F.data("cke-filter")];
11219                if (L ? L.check(this) : 1) E.selectNodeContents(F), b.call(this, E);
11220              }
11221            C = y ? (!p[y] || B ? 0 : w && !m ? 0 : d(q, x, h, P)) : 1;
11222            if (C)
11223              if (
11224                ((F = q.getParent()),
11225                (C = h),
11226                (H = g),
11227                (K = k),
11228                !F ||
11229                  (!(F.getDtd() || CKEDITOR.dtd.span)[H] && !K) ||
11230                  (C.parentRule && !C.parentRule(F)))
11231              )
11232                l = !0;
11233              else {
11234                if (
11235                  (u ||
11236                    (y && CKEDITOR.dtd.$removeEmpty[y] && (q.getPosition(x) | P) != P) ||
11237                    ((u = c.clone()), u.setStartBefore(q)),
11238                  (y = q.type),
11239                  y == CKEDITOR.NODE_TEXT ||
11240                    w ||
11241                    (y == CKEDITOR.NODE_ELEMENT && !q.getChildCount()))
11242                ) {
11243                  for (
11244                    var y = q, M;
11245                    (l = !y.getNext(z)) && ((M = y.getParent()), p[M.getName()]) && d(M, t, h, O);
11246
11247                  )
11248                    y = M;
11249                  u.setEndAfter(y);
11250                }
11251              }
11252            else l = !0;
11253            q = q.getNextSourceNode(B || w);
11254          }
11255          if (l && u && !u.collapsed) {
11256            for (
11257              var l = J(this, e),
11258                w = l.hasAttributes(),
11259                B = u.getCommonAncestor(),
11260                y = {},
11261                C = {},
11262                F = {},
11263                H = {},
11264                U,
11265                R,
11266                aa;
11267              l && B;
11268
11269            ) {
11270              if (B.getName() == g) {
11271                for (U in h.attributes)
11272                  !H[U] &&
11273                    (aa = B.getAttribute(R)) &&
11274                    (l.getAttribute(U) == aa ? (C[U] = 1) : (H[U] = 1));
11275                for (R in h.styles)
11276                  !F[R] && (aa = B.getStyle(R)) && (l.getStyle(R) == aa ? (y[R] = 1) : (F[R] = 1));
11277              }
11278              B = B.getParent();
11279            }
11280            for (U in C) l.removeAttribute(U);
11281            for (R in y) l.removeStyle(R);
11282            w && !l.hasAttributes() && (l = null);
11283            l
11284              ? (u.extractContents().appendTo(l),
11285                u.insertNode(l),
11286                D.call(this, l),
11287                l.mergeSiblings(),
11288                CKEDITOR.env.ie || l.$.normalize())
11289              : ((l = new CKEDITOR.dom.element("span")),
11290                u.extractContents().appendTo(l),
11291                u.insertNode(l),
11292                D.call(this, l),
11293                l.remove(!0));
11294            u = null;
11295          }
11296        }
11297        c.moveToBookmark(r);
11298        c.shrink(CKEDITOR.SHRINK_TEXT);
11299        c.shrink(CKEDITOR.NODE_ELEMENT, !0);
11300      }
11301    }
11302    function c(a) {
11303      function b() {
11304        for (
11305          var a = new CKEDITOR.dom.elementPath(d.getParent()),
11306            c = new CKEDITOR.dom.elementPath(p.getParent()),
11307            e = null,
11308            f = null,
11309            g = 0;
11310          g < a.elements.length;
11311          g++
11312        ) {
11313          var h = a.elements[g];
11314          if (h == a.block || h == a.blockLimit) break;
11315          r.checkElementRemovable(h, !0) && (e = h);
11316        }
11317        for (g = 0; g < c.elements.length; g++) {
11318          h = c.elements[g];
11319          if (h == c.block || h == c.blockLimit) break;
11320          r.checkElementRemovable(h, !0) && (f = h);
11321        }
11322        f && p.breakParent(f);
11323        e && d.breakParent(e);
11324      }
11325      a.enlarge(CKEDITOR.ENLARGE_INLINE, 1);
11326      var c = a.createBookmark(),
11327        d = c.startNode,
11328        e = this._.definition.alwaysRemoveElement;
11329      if (a.collapsed) {
11330        for (
11331          var f = new CKEDITOR.dom.elementPath(d.getParent(), a.root), g, h = 0, k;
11332          h < f.elements.length && (k = f.elements[h]) && k != f.block && k != f.blockLimit;
11333          h++
11334        )
11335          if (this.checkElementRemovable(k)) {
11336            var m;
11337            !e &&
11338            a.collapsed &&
11339            (a.checkBoundaryOfElement(k, CKEDITOR.END) ||
11340              (m = a.checkBoundaryOfElement(k, CKEDITOR.START)))
11341              ? ((g = k), (g.match = m ? "start" : "end"))
11342              : (k.mergeSiblings(),
11343                k.is(this.element) ? B.call(this, k) : w(k, l(this)[k.getName()]));
11344          }
11345        if (g) {
11346          e = d;
11347          for (h = 0; ; h++) {
11348            k = f.elements[h];
11349            if (k.equals(g)) break;
11350            else if (k.match) continue;
11351            else k = k.clone();
11352            k.append(e);
11353            e = k;
11354          }
11355          e["start" == g.match ? "insertBefore" : "insertAfter"](g);
11356        }
11357      } else {
11358        var p = c.endNode,
11359          r = this;
11360        b();
11361        for (f = d; !f.equals(p); )
11362          (g = f.getNextSourceNode()),
11363            f.type == CKEDITOR.NODE_ELEMENT &&
11364              this.checkElementRemovable(f) &&
11365              (f.getName() == this.element ? B.call(this, f) : w(f, l(this)[f.getName()]),
11366              g.type == CKEDITOR.NODE_ELEMENT && g.contains(d) && (b(), (g = d.getNext()))),
11367            (f = g);
11368      }
11369      a.moveToBookmark(c);
11370      a.shrink(CKEDITOR.NODE_ELEMENT, !0);
11371    }
11372    function f(a) {
11373      var b = [];
11374      a.forEach(
11375        function(a) {
11376          if ("true" == a.getAttribute("contenteditable")) return b.push(a), !1;
11377        },
11378        CKEDITOR.NODE_ELEMENT,
11379        !0,
11380      );
11381      return b;
11382    }
11383    function h(a) {
11384      var b = a.getEnclosedNode() || a.getCommonAncestor(!1, !0);
11385      (a = new CKEDITOR.dom.elementPath(b, a.root).contains(this.element, 1)) &&
11386        !a.isReadOnly() &&
11387        u(a, this);
11388    }
11389    function k(a) {
11390      var b = a.getCommonAncestor(!0, !0);
11391      if ((a = new CKEDITOR.dom.elementPath(b, a.root).contains(this.element, 1))) {
11392        var b = this._.definition,
11393          c = b.attributes;
11394        if (c) for (var d in c) a.removeAttribute(d, c[d]);
11395        if (b.styles) for (var e in b.styles) b.styles.hasOwnProperty(e) && a.removeStyle(e);
11396      }
11397    }
11398    function g(a) {
11399      var b = a.createBookmark(!0),
11400        c = a.createIterator();
11401      c.enforceRealBlocks = !0;
11402      this._.enterMode && (c.enlargeBr = this._.enterMode != CKEDITOR.ENTER_BR);
11403      for (var d, e = a.document, f; (d = c.getNextParagraph()); )
11404        !d.isReadOnly() &&
11405          (c.activeFilter ? c.activeFilter.check(this) : 1) &&
11406          ((f = J(this, e, d)), r(d, f));
11407      a.moveToBookmark(b);
11408    }
11409    function m(a) {
11410      var b = a.createBookmark(1),
11411        c = a.createIterator();
11412      c.enforceRealBlocks = !0;
11413      c.enlargeBr = this._.enterMode != CKEDITOR.ENTER_BR;
11414      for (var d, e; (d = c.getNextParagraph()); )
11415        this.checkElementRemovable(d) &&
11416          (d.is("pre")
11417            ? ((e =
11418                this._.enterMode == CKEDITOR.ENTER_BR
11419                  ? null
11420                  : a.document.createElement(this._.enterMode == CKEDITOR.ENTER_P ? "p" : "div")) &&
11421                d.copyAttributes(e),
11422              r(d, e))
11423            : B.call(this, d));
11424      a.moveToBookmark(b);
11425    }
11426    function r(a, b) {
11427      var c = !b;
11428      c && ((b = a.getDocument().createElement("div")), a.copyAttributes(b));
11429      var d = b && b.is("pre"),
11430        f = a.is("pre"),
11431        g = !d && f;
11432      if (d && !f) {
11433        f = b;
11434        (g = a.getBogus()) && g.remove();
11435        g = a.getHtml();
11436        g = y(g, /(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g, "");
11437        g = g.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi, "$1");
11438        g = g.replace(/([ \t\n\r]+|&nbsp;)/g, " ");
11439        g = g.replace(/<br\b[^>]*>/gi, "\n");
11440        if (CKEDITOR.env.ie) {
11441          var h = a.getDocument().createElement("div");
11442          h.append(f);
11443          f.$.outerHTML = "\x3cpre\x3e" + g + "\x3c/pre\x3e";
11444          f.copyAttributes(h.getFirst());
11445          f = h.getFirst().remove();
11446        } else f.setHtml(g);
11447        b = f;
11448      } else g ? (b = x(c ? [a.getHtml()] : e(a), b)) : a.moveChildren(b);
11449      b.replace(a);
11450      if (d) {
11451        var c = b,
11452          k;
11453        (k = c.getPrevious(H)) &&
11454          k.type == CKEDITOR.NODE_ELEMENT &&
11455          k.is("pre") &&
11456          ((d = y(k.getHtml(), /\n$/, "") + "\n\n" + y(c.getHtml(), /^\n/, "")),
11457          CKEDITOR.env.ie ? (c.$.outerHTML = "\x3cpre\x3e" + d + "\x3c/pre\x3e") : c.setHtml(d),
11458          k.remove());
11459      } else c && p(b);
11460    }
11461    function e(a) {
11462      var b = [];
11463      y(
11464        a.getOuterHtml(),
11465        /(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,
11466        function(a, b, c) {
11467          return b + "\x3c/pre\x3e" + c + "\x3cpre\x3e";
11468        },
11469      ).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi, function(a, c) {
11470        b.push(c);
11471      });
11472      return b;
11473    }
11474    function y(a, b, c) {
11475      var d = "",
11476        e = "";
11477      a = a.replace(
11478        /(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,
11479        function(a, b, c) {
11480          b && (d = b);
11481          c && (e = c);
11482          return "";
11483        },
11484      );
11485      return d + a.replace(b, c) + e;
11486    }
11487    function x(a, b) {
11488      var c;
11489      1 < a.length && (c = new CKEDITOR.dom.documentFragment(b.getDocument()));
11490      for (var d = 0; d < a.length; d++) {
11491        var e = a[d],
11492          e = e.replace(/(\r\n|\r)/g, "\n"),
11493          e = y(e, /^[ \t]*\n/, ""),
11494          e = y(e, /\n$/, ""),
11495          e = y(e, /^[ \t]+|[ \t]+$/g, function(a, b) {
11496            return 1 == a.length
11497              ? "\x26nbsp;"
11498              : b
11499                ? " " + CKEDITOR.tools.repeat("\x26nbsp;", a.length - 1)
11500                : CKEDITOR.tools.repeat("\x26nbsp;", a.length - 1) + " ";
11501          }),
11502          e = e.replace(/\n/g, "\x3cbr\x3e"),
11503          e = e.replace(/[ \t]{2,}/g, function(a) {
11504            return CKEDITOR.tools.repeat("\x26nbsp;", a.length - 1) + " ";
11505          });
11506        if (c) {
11507          var f = b.clone();
11508          f.setHtml(e);
11509          c.append(f);
11510        } else b.setHtml(e);
11511      }
11512      return c || b;
11513    }
11514    function B(a, b) {
11515      var c = this._.definition,
11516        d = c.attributes,
11517        c = c.styles,
11518        e = l(this)[a.getName()],
11519        f = CKEDITOR.tools.isEmpty(d) && CKEDITOR.tools.isEmpty(c),
11520        g;
11521      for (g in d)
11522        if (("class" != g && !this._.definition.fullMatch) || a.getAttribute(g) == q(g, d[g]))
11523          (b && "data-" == g.slice(0, 5)) || ((f = a.hasAttribute(g)), a.removeAttribute(g));
11524      for (var h in c)
11525        (this._.definition.fullMatch && a.getStyle(h) != q(h, c[h], !0)) ||
11526          ((f = f || !!a.getStyle(h)), a.removeStyle(h));
11527      w(a, e, E[a.getName()]);
11528      f &&
11529        (this._.definition.alwaysRemoveElement
11530          ? p(a, 1)
11531          : !CKEDITOR.dtd.$block[a.getName()] ||
11532            (this._.enterMode == CKEDITOR.ENTER_BR && !a.hasAttributes())
11533            ? p(a)
11534            : a.renameNode(this._.enterMode == CKEDITOR.ENTER_P ? "p" : "div"));
11535    }
11536    function D(a) {
11537      for (var b = l(this), c = a.getElementsByTag(this.element), d, e = c.count(); 0 <= --e; )
11538        (d = c.getItem(e)), d.isReadOnly() || B.call(this, d, !0);
11539      for (var f in b)
11540        if (f != this.element)
11541          for (c = a.getElementsByTag(f), e = c.count() - 1; 0 <= e; e--)
11542            (d = c.getItem(e)), d.isReadOnly() || w(d, b[f]);
11543    }
11544    function w(a, b, c) {
11545      if ((b = b && b.attributes))
11546        for (var d = 0; d < b.length; d++) {
11547          var e = b[d][0],
11548            f;
11549          if ((f = a.getAttribute(e))) {
11550            var g = b[d][1];
11551            (null === g || (g.test && g.test(f)) || ("string" == typeof g && f == g)) &&
11552              a.removeAttribute(e);
11553          }
11554        }
11555      c || p(a);
11556    }
11557    function p(a, b) {
11558      if (!a.hasAttributes() || b)
11559        if (CKEDITOR.dtd.$block[a.getName()]) {
11560          var c = a.getPrevious(H),
11561            d = a.getNext(H);
11562          !c || (c.type != CKEDITOR.NODE_TEXT && c.isBlockBoundary({ br: 1 })) || a.append("br", 1);
11563          !d || (d.type != CKEDITOR.NODE_TEXT && d.isBlockBoundary({ br: 1 })) || a.append("br");
11564          a.remove(!0);
11565        } else
11566          (c = a.getFirst()),
11567            (d = a.getLast()),
11568            a.remove(!0),
11569            c &&
11570              (c.type == CKEDITOR.NODE_ELEMENT && c.mergeSiblings(),
11571              d && !c.equals(d) && d.type == CKEDITOR.NODE_ELEMENT && d.mergeSiblings());
11572    }
11573    function J(a, b, c) {
11574      var d;
11575      d = a.element;
11576      "*" == d && (d = "span");
11577      d = new CKEDITOR.dom.element(d, b);
11578      c && c.copyAttributes(d);
11579      d = u(d, a);
11580      b.getCustomData("doc_processing_style") && d.hasAttribute("id")
11581        ? d.removeAttribute("id")
11582        : b.setCustomData("doc_processing_style", 1);
11583      return d;
11584    }
11585    function u(a, b) {
11586      var c = b._.definition,
11587        d = c.attributes,
11588        c = CKEDITOR.style.getStyleText(c);
11589      if (d) for (var e in d) a.setAttribute(e, d[e]);
11590      c && a.setAttribute("style", c);
11591      return a;
11592    }
11593    function K(a, b) {
11594      for (var c in a)
11595        a[c] = a[c].replace(C, function(a, c) {
11596          return b[c];
11597        });
11598    }
11599    function l(a) {
11600      if (a._.overrides) return a._.overrides;
11601      var b = (a._.overrides = {}),
11602        c = a._.definition.overrides;
11603      if (c) {
11604        CKEDITOR.tools.isArray(c) || (c = [c]);
11605        for (var d = 0; d < c.length; d++) {
11606          var e = c[d],
11607            f,
11608            g;
11609          "string" == typeof e
11610            ? (f = e.toLowerCase())
11611            : ((f = e.element ? e.element.toLowerCase() : a.element), (g = e.attributes));
11612          e = b[f] || (b[f] = {});
11613          if (g) {
11614            var e = (e.attributes = e.attributes || []),
11615              h;
11616            for (h in g) e.push([h.toLowerCase(), g[h]]);
11617          }
11618        }
11619      }
11620      return b;
11621    }
11622    function q(a, b, c) {
11623      var d = new CKEDITOR.dom.element("span");
11624      d[c ? "setStyle" : "setAttribute"](a, b);
11625      return d[c ? "getStyle" : "getAttribute"](a);
11626    }
11627    function F(a, b) {
11628      function c(a, b) {
11629        return "font-family" == b.toLowerCase() ? a.replace(/["']/g, "") : a;
11630      }
11631      "string" == typeof a && (a = CKEDITOR.tools.parseCssText(a));
11632      "string" == typeof b && (b = CKEDITOR.tools.parseCssText(b, !0));
11633      for (var d in a)
11634        if (!(d in b) || (c(b[d], d) != c(a[d], d) && "inherit" != a[d] && "inherit" != b[d]))
11635          return !1;
11636      return !0;
11637    }
11638    function L(a, b, c) {
11639      var d = a.document,
11640        e = a.getRanges();
11641      b = b ? this.removeFromRange : this.applyToRange;
11642      var f, g;
11643      if (a.isFake && a.isInTable()) for (f = [], g = 0; g < e.length; g++) f.push(e[g].clone());
11644      for (var h = e.createIterator(); (g = h.getNextRange()); ) b.call(this, g, c);
11645      a.selectRanges(f || e);
11646      d.removeCustomData("doc_processing_style");
11647    }
11648    var E = {
11649        address: 1,
11650        div: 1,
11651        h1: 1,
11652        h2: 1,
11653        h3: 1,
11654        h4: 1,
11655        h5: 1,
11656        h6: 1,
11657        p: 1,
11658        pre: 1,
11659        section: 1,
11660        header: 1,
11661        footer: 1,
11662        nav: 1,
11663        article: 1,
11664        aside: 1,
11665        figure: 1,
11666        dialog: 1,
11667        hgroup: 1,
11668        time: 1,
11669        meter: 1,
11670        menu: 1,
11671        command: 1,
11672        keygen: 1,
11673        output: 1,
11674        progress: 1,
11675        details: 1,
11676        datagrid: 1,
11677        datalist: 1,
11678      },
11679      M = {
11680        a: 1,
11681        blockquote: 1,
11682        embed: 1,
11683        hr: 1,
11684        img: 1,
11685        li: 1,
11686        object: 1,
11687        ol: 1,
11688        table: 1,
11689        td: 1,
11690        tr: 1,
11691        th: 1,
11692        ul: 1,
11693        dl: 1,
11694        dt: 1,
11695        dd: 1,
11696        form: 1,
11697        audio: 1,
11698        video: 1,
11699      },
11700      t = /\s*(?:;\s*|$)/,
11701      C = /#\((.+?)\)/g,
11702      z = CKEDITOR.dom.walker.bookmark(0, 1),
11703      H = CKEDITOR.dom.walker.whitespaces(1);
11704    CKEDITOR.style = function(a, b) {
11705      if ("string" == typeof a.type) return new CKEDITOR.style.customHandlers[a.type](a);
11706      var c = a.attributes;
11707      c &&
11708        c.style &&
11709        ((a.styles = CKEDITOR.tools.extend({}, a.styles, CKEDITOR.tools.parseCssText(c.style))),
11710        delete c.style);
11711      b && ((a = CKEDITOR.tools.clone(a)), K(a.attributes, b), K(a.styles, b));
11712      c = this.element = a.element
11713        ? "string" == typeof a.element ? a.element.toLowerCase() : a.element
11714        : "*";
11715      this.type =
11716        a.type ||
11717        (E[c] ? CKEDITOR.STYLE_BLOCK : M[c] ? CKEDITOR.STYLE_OBJECT : CKEDITOR.STYLE_INLINE);
11718      "object" == typeof this.element && (this.type = CKEDITOR.STYLE_OBJECT);
11719      this._ = { definition: a };
11720    };
11721    CKEDITOR.style.prototype = {
11722      apply: function(a) {
11723        if (a instanceof CKEDITOR.dom.document) return L.call(this, a.getSelection());
11724        if (this.checkApplicable(a.elementPath(), a)) {
11725          var b = this._.enterMode;
11726          b || (this._.enterMode = a.activeEnterMode);
11727          L.call(this, a.getSelection(), 0, a);
11728          this._.enterMode = b;
11729        }
11730      },
11731      remove: function(a) {
11732        if (a instanceof CKEDITOR.dom.document) return L.call(this, a.getSelection(), 1);
11733        if (this.checkApplicable(a.elementPath(), a)) {
11734          var b = this._.enterMode;
11735          b || (this._.enterMode = a.activeEnterMode);
11736          L.call(this, a.getSelection(), 1, a);
11737          this._.enterMode = b;
11738        }
11739      },
11740      applyToRange: function(a) {
11741        this.applyToRange =
11742          this.type == CKEDITOR.STYLE_INLINE
11743            ? b
11744            : this.type == CKEDITOR.STYLE_BLOCK ? g : this.type == CKEDITOR.STYLE_OBJECT ? h : null;
11745        return this.applyToRange(a);
11746      },
11747      removeFromRange: function(a) {
11748        this.removeFromRange =
11749          this.type == CKEDITOR.STYLE_INLINE
11750            ? c
11751            : this.type == CKEDITOR.STYLE_BLOCK ? m : this.type == CKEDITOR.STYLE_OBJECT ? k : null;
11752        return this.removeFromRange(a);
11753      },
11754      applyToObject: function(a) {
11755        u(a, this);
11756      },
11757      checkActive: function(a, b) {
11758        switch (this.type) {
11759          case CKEDITOR.STYLE_BLOCK:
11760            return this.checkElementRemovable(a.block || a.blockLimit, !0, b);
11761          case CKEDITOR.STYLE_OBJECT:
11762          case CKEDITOR.STYLE_INLINE:
11763            for (var c = a.elements, d = 0, e; d < c.length; d++)
11764              if (
11765                ((e = c[d]),
11766                this.type != CKEDITOR.STYLE_INLINE || (e != a.block && e != a.blockLimit))
11767              ) {
11768                if (this.type == CKEDITOR.STYLE_OBJECT) {
11769                  var f = e.getName();
11770                  if (!("string" == typeof this.element ? f == this.element : f in this.element))
11771                    continue;
11772                }
11773                if (this.checkElementRemovable(e, !0, b)) return !0;
11774              }
11775        }
11776        return !1;
11777      },
11778      checkApplicable: function(a, b, c) {
11779        b && b instanceof CKEDITOR.filter && (c = b);
11780        if (c && !c.check(this)) return !1;
11781        switch (this.type) {
11782          case CKEDITOR.STYLE_OBJECT:
11783            return !!a.contains(this.element);
11784          case CKEDITOR.STYLE_BLOCK:
11785            return !!a.blockLimit.getDtd()[this.element];
11786        }
11787        return !0;
11788      },
11789      checkElementMatch: function(a, b) {
11790        var c = this._.definition;
11791        if (!a || (!c.ignoreReadonly && a.isReadOnly())) return !1;
11792        var d = a.getName();
11793        if ("string" == typeof this.element ? d == this.element : d in this.element) {
11794          if (!b && !a.hasAttributes()) return !0;
11795          if ((d = c._AC)) c = d;
11796          else {
11797            var d = {},
11798              e = 0,
11799              f = c.attributes;
11800            if (f) for (var g in f) e++, (d[g] = f[g]);
11801            if ((g = CKEDITOR.style.getStyleText(c))) d.style || e++, (d.style = g);
11802            d._length = e;
11803            c = c._AC = d;
11804          }
11805          if (c._length) {
11806            for (var h in c)
11807              if ("_length" != h)
11808                if (((d = a.getAttribute(h) || ""), "style" == h ? F(c[h], d) : c[h] == d)) {
11809                  if (!b) return !0;
11810                } else if (b) return !1;
11811            if (b) return !0;
11812          } else return !0;
11813        }
11814        return !1;
11815      },
11816      checkElementRemovable: function(a, b, c) {
11817        if (this.checkElementMatch(a, b, c)) return !0;
11818        if ((b = l(this)[a.getName()])) {
11819          var d;
11820          if (!(b = b.attributes)) return !0;
11821          for (c = 0; c < b.length; c++)
11822            if (((d = b[c][0]), (d = a.getAttribute(d)))) {
11823              var e = b[c][1];
11824              if (null === e) return !0;
11825              if ("string" == typeof e) {
11826                if (d == e) return !0;
11827              } else if (e.test(d)) return !0;
11828            }
11829        }
11830        return !1;
11831      },
11832      buildPreview: function(a) {
11833        var b = this._.definition,
11834          c = [],
11835          d = b.element;
11836        "bdo" == d && (d = "span");
11837        var c = ["\x3c", d],
11838          e = b.attributes;
11839        if (e) for (var f in e) c.push(" ", f, '\x3d"', e[f], '"');
11840        (e = CKEDITOR.style.getStyleText(b)) && c.push(' style\x3d"', e, '"');
11841        c.push("\x3e", a || b.name, "\x3c/", d, "\x3e");
11842        return c.join("");
11843      },
11844      getDefinition: function() {
11845        return this._.definition;
11846      },
11847    };
11848    CKEDITOR.style.getStyleText = function(a) {
11849      var b = a._ST;
11850      if (b) return b;
11851      var b = a.styles,
11852        c = (a.attributes && a.attributes.style) || "",
11853        d = "";
11854      c.length && (c = c.replace(t, ";"));
11855      for (var e in b) {
11856        var f = b[e],
11857          g = (e + ":" + f).replace(t, ";");
11858        "inherit" == f ? (d += g) : (c += g);
11859      }
11860      c.length && (c = CKEDITOR.tools.normalizeCssText(c, !0));
11861      return (a._ST = c + d);
11862    };
11863    CKEDITOR.style.customHandlers = {};
11864    CKEDITOR.style.addCustomHandler = function(a) {
11865      var b = function(a) {
11866        this._ = { definition: a };
11867        this.setup && this.setup(a);
11868      };
11869      b.prototype = CKEDITOR.tools.extend(
11870        CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),
11871        { assignedTo: CKEDITOR.STYLE_OBJECT },
11872        a,
11873        !0,
11874      );
11875      return (this.customHandlers[a.type] = b);
11876    };
11877    var P =
11878        CKEDITOR.POSITION_PRECEDING | CKEDITOR.POSITION_IDENTICAL | CKEDITOR.POSITION_IS_CONTAINED,
11879      O =
11880        CKEDITOR.POSITION_FOLLOWING | CKEDITOR.POSITION_IDENTICAL | CKEDITOR.POSITION_IS_CONTAINED;
11881  })();
11882  CKEDITOR.styleCommand = function(a, d) {
11883    this.requiredContent = this.allowedContent = this.style = a;
11884    CKEDITOR.tools.extend(this, d, !0);
11885  };
11886  CKEDITOR.styleCommand.prototype.exec = function(a) {
11887    a.focus();
11888    this.state == CKEDITOR.TRISTATE_OFF
11889      ? a.applyStyle(this.style)
11890      : this.state == CKEDITOR.TRISTATE_ON && a.removeStyle(this.style);
11891  };
11892  CKEDITOR.stylesSet = new CKEDITOR.resourceManager("", "stylesSet");
11893  CKEDITOR.addStylesSet = CKEDITOR.tools.bind(CKEDITOR.stylesSet.add, CKEDITOR.stylesSet);
11894  CKEDITOR.loadStylesSet = function(a, d, b) {
11895    CKEDITOR.stylesSet.addExternal(a, d, "");
11896    CKEDITOR.stylesSet.load(a, b);
11897  };
11898  CKEDITOR.tools.extend(CKEDITOR.editor.prototype, {
11899    attachStyleStateChange: function(a, d) {
11900      var b = this._.styleStateChangeCallbacks;
11901      b ||
11902        ((b = this._.styleStateChangeCallbacks = []),
11903        this.on("selectionChange", function(a) {
11904          for (var d = 0; d < b.length; d++) {
11905            var h = b[d],
11906              k = h.style.checkActive(a.data.path, this)
11907                ? CKEDITOR.TRISTATE_ON
11908                : CKEDITOR.TRISTATE_OFF;
11909            h.fn.call(this, k);
11910          }
11911        }));
11912      b.push({ style: a, fn: d });
11913    },
11914    applyStyle: function(a) {
11915      a.apply(this);
11916    },
11917    removeStyle: function(a) {
11918      a.remove(this);
11919    },
11920    getStylesSet: function(a) {
11921      if (this._.stylesDefinitions) a(this._.stylesDefinitions);
11922      else {
11923        var d = this,
11924          b = d.config.stylesCombo_stylesSet || d.config.stylesSet;
11925        if (!1 === b) a(null);
11926        else if (b instanceof Array) (d._.stylesDefinitions = b), a(b);
11927        else {
11928          b || (b = "default");
11929          var b = b.split(":"),
11930            c = b[0];
11931          CKEDITOR.stylesSet.addExternal(
11932            c,
11933            b[1] ? b.slice(1).join(":") : CKEDITOR.getUrl("styles.js"),
11934            "",
11935          );
11936          CKEDITOR.stylesSet.load(c, function(b) {
11937            d._.stylesDefinitions = b[c];
11938            a(d._.stylesDefinitions);
11939          });
11940        }
11941      }
11942    },
11943  });
11944  CKEDITOR.dom.comment = function(a, d) {
11945    "string" == typeof a && (a = (d ? d.$ : document).createComment(a));
11946    CKEDITOR.dom.domObject.call(this, a);
11947  };
11948  CKEDITOR.dom.comment.prototype = new CKEDITOR.dom.node();
11949  CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype, {
11950    type: CKEDITOR.NODE_COMMENT,
11951    getOuterHtml: function() {
11952      return "\x3c!--" + this.$.nodeValue + "--\x3e";
11953    },
11954  });
11955  ("use strict");
11956  (function() {
11957    var a = {},
11958      d = {},
11959      b;
11960    for (b in CKEDITOR.dtd.$blockLimit) b in CKEDITOR.dtd.$list || (a[b] = 1);
11961    for (b in CKEDITOR.dtd.$block)
11962      b in CKEDITOR.dtd.$blockLimit || b in CKEDITOR.dtd.$empty || (d[b] = 1);
11963    CKEDITOR.dom.elementPath = function(b, f) {
11964      var h = null,
11965        k = null,
11966        g = [],
11967        m = b,
11968        r;
11969      f = f || b.getDocument().getBody();
11970      m || (m = f);
11971      do
11972        if (m.type == CKEDITOR.NODE_ELEMENT) {
11973          g.push(m);
11974          if (
11975            !this.lastElement &&
11976            ((this.lastElement = m),
11977            m.is(CKEDITOR.dtd.$object) || "false" == m.getAttribute("contenteditable"))
11978          )
11979            continue;
11980          if (m.equals(f)) break;
11981          if (
11982            !k &&
11983            ((r = m.getName()),
11984            "true" == m.getAttribute("contenteditable") ? (k = m) : !h && d[r] && (h = m),
11985            a[r])
11986          ) {
11987            if ((r = !h && "div" == r)) {
11988              a: {
11989                r = m.getChildren();
11990                for (var e = 0, y = r.count(); e < y; e++) {
11991                  var x = r.getItem(e);
11992                  if (x.type == CKEDITOR.NODE_ELEMENT && CKEDITOR.dtd.$block[x.getName()]) {
11993                    r = !0;
11994                    break a;
11995                  }
11996                }
11997                r = !1;
11998              }
11999              r = !r;
12000            }
12001            r ? (h = m) : (k = m);
12002          }
12003        }
12004      while ((m = m.getParent()));
12005      k || (k = f);
12006      this.block = h;
12007      this.blockLimit = k;
12008      this.root = f;
12009      this.elements = g;
12010    };
12011  })();
12012  CKEDITOR.dom.elementPath.prototype = {
12013    compare: function(a) {
12014      var d = this.elements;
12015      a = a && a.elements;
12016      if (!a || d.length != a.length) return !1;
12017      for (var b = 0; b < d.length; b++) if (!d[b].equals(a[b])) return !1;
12018      return !0;
12019    },
12020    contains: function(a, d, b) {
12021      var c = 0,
12022        f;
12023      "string" == typeof a &&
12024        (f = function(b) {
12025          return b.getName() == a;
12026        });
12027      a instanceof CKEDITOR.dom.element
12028        ? (f = function(b) {
12029            return b.equals(a);
12030          })
12031        : CKEDITOR.tools.isArray(a)
12032          ? (f = function(b) {
12033              return -1 < CKEDITOR.tools.indexOf(a, b.getName());
12034            })
12035          : "function" == typeof a
12036            ? (f = a)
12037            : "object" == typeof a &&
12038              (f = function(b) {
12039                return b.getName() in a;
12040              });
12041      var h = this.elements,
12042        k = h.length;
12043      d && (b ? (c += 1) : --k);
12044      b && ((h = Array.prototype.slice.call(h, 0)), h.reverse());
12045      for (; c < k; c++) if (f(h[c])) return h[c];
12046      return null;
12047    },
12048    isContextFor: function(a) {
12049      var d;
12050      return a in CKEDITOR.dtd.$block
12051        ? ((d =
12052            this.contains(CKEDITOR.dtd.$intermediate) ||
12053            (this.root.equals(this.block) && this.block) ||
12054            this.blockLimit),
12055          !!d.getDtd()[a])
12056        : !0;
12057    },
12058    direction: function() {
12059      return (this.block || this.blockLimit || this.root).getDirection(1);
12060    },
12061  };
12062  CKEDITOR.dom.text = function(a, d) {
12063    "string" == typeof a && (a = (d ? d.$ : document).createTextNode(a));
12064    this.$ = a;
12065  };
12066  CKEDITOR.dom.text.prototype = new CKEDITOR.dom.node();
12067  CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype, {
12068    type: CKEDITOR.NODE_TEXT,
12069    getLength: function() {
12070      return this.$.nodeValue.length;
12071    },
12072    getText: function() {
12073      return this.$.nodeValue;
12074    },
12075    setText: function(a) {
12076      this.$.nodeValue = a;
12077    },
12078    split: function(a) {
12079      var d = this.$.parentNode,
12080        b = d.childNodes.length,
12081        c = this.getLength(),
12082        f = this.getDocument(),
12083        h = new CKEDITOR.dom.text(this.$.splitText(a), f);
12084      d.childNodes.length == b &&
12085        (a >= c
12086          ? ((h = f.createText("")), h.insertAfter(this))
12087          : ((a = f.createText("")), a.insertAfter(h), a.remove()));
12088      return h;
12089    },
12090    substring: function(a, d) {
12091      return "number" != typeof d ? this.$.nodeValue.substr(a) : this.$.nodeValue.substring(a, d);
12092    },
12093  });
12094  (function() {
12095    function a(a, c, d) {
12096      var h = a.serializable,
12097        k = c[d ? "endContainer" : "startContainer"],
12098        g = d ? "endOffset" : "startOffset",
12099        m = h ? c.document.getById(a.startNode) : a.startNode;
12100      a = h ? c.document.getById(a.endNode) : a.endNode;
12101      k.equals(m.getPrevious())
12102        ? ((c.startOffset = c.startOffset - k.getLength() - a.getPrevious().getLength()),
12103          (k = a.getNext()))
12104        : k.equals(a.getPrevious()) && ((c.startOffset -= k.getLength()), (k = a.getNext()));
12105      k.equals(m.getParent()) && c[g]++;
12106      k.equals(a.getParent()) && c[g]++;
12107      c[d ? "endContainer" : "startContainer"] = k;
12108      return c;
12109    }
12110    CKEDITOR.dom.rangeList = function(a) {
12111      if (a instanceof CKEDITOR.dom.rangeList) return a;
12112      a ? a instanceof CKEDITOR.dom.range && (a = [a]) : (a = []);
12113      return CKEDITOR.tools.extend(a, d);
12114    };
12115    var d = {
12116      createIterator: function() {
12117        var a = this,
12118          c = CKEDITOR.dom.walker.bookmark(),
12119          d = [],
12120          h;
12121        return {
12122          getNextRange: function(k) {
12123            h = void 0 === h ? 0 : h + 1;
12124            var g = a[h];
12125            if (g && 1 < a.length) {
12126              if (!h) for (var m = a.length - 1; 0 <= m; m--) d.unshift(a[m].createBookmark(!0));
12127              if (k)
12128                for (var r = 0; a[h + r + 1]; ) {
12129                  var e = g.document;
12130                  k = 0;
12131                  m = e.getById(d[r].endNode);
12132                  for (e = e.getById(d[r + 1].startNode); ; ) {
12133                    m = m.getNextSourceNode(!1);
12134                    if (e.equals(m)) k = 1;
12135                    else if (c(m) || (m.type == CKEDITOR.NODE_ELEMENT && m.isBlockBoundary()))
12136                      continue;
12137                    break;
12138                  }
12139                  if (!k) break;
12140                  r++;
12141                }
12142              for (g.moveToBookmark(d.shift()); r--; )
12143                (m = a[++h]), m.moveToBookmark(d.shift()), g.setEnd(m.endContainer, m.endOffset);
12144            }
12145            return g;
12146          },
12147        };
12148      },
12149      createBookmarks: function(b) {
12150        for (var c = [], d, h = 0; h < this.length; h++) {
12151          c.push((d = this[h].createBookmark(b, !0)));
12152          for (var k = h + 1; k < this.length; k++)
12153            (this[k] = a(d, this[k])), (this[k] = a(d, this[k], !0));
12154        }
12155        return c;
12156      },
12157      createBookmarks2: function(a) {
12158        for (var c = [], d = 0; d < this.length; d++) c.push(this[d].createBookmark2(a));
12159        return c;
12160      },
12161      moveToBookmarks: function(a) {
12162        for (var c = 0; c < this.length; c++) this[c].moveToBookmark(a[c]);
12163      },
12164    };
12165  })();
12166  (function() {
12167    function a() {
12168      return CKEDITOR.getUrl(
12169        CKEDITOR.skinName.split(",")[1] || "skins/" + CKEDITOR.skinName.split(",")[0] + "/",
12170      );
12171    }
12172    function d(b) {
12173      var c = CKEDITOR.skin["ua_" + b],
12174        d = CKEDITOR.env;
12175      if (c)
12176        for (
12177          var c = c.split(",").sort(function(a, b) {
12178              return a > b ? -1 : 1;
12179            }),
12180            f = 0,
12181            g;
12182          f < c.length;
12183          f++
12184        )
12185          if (
12186            ((g = c[f]),
12187            d.ie &&
12188              (g.replace(/^ie/, "") == d.version || (d.quirks && "iequirks" == g)) &&
12189              (g = "ie"),
12190            d[g])
12191          ) {
12192            b += "_" + c[f];
12193            break;
12194          }
12195      return CKEDITOR.getUrl(a() + b + ".css");
12196    }
12197    function b(a, b) {
12198      h[a] || (CKEDITOR.document.appendStyleSheet(d(a)), (h[a] = 1));
12199      b && b();
12200    }
12201    function c(a) {
12202      var b = a.getById(k);
12203      b ||
12204        ((b = a.getHead().append("style")),
12205        b.setAttribute("id", k),
12206        b.setAttribute("type", "text/css"));
12207      return b;
12208    }
12209    function f(a, b, c) {
12210      var d, f, g;
12211      if (CKEDITOR.env.webkit)
12212        for (b = b.split("}").slice(0, -1), f = 0; f < b.length; f++) b[f] = b[f].split("{");
12213      for (var h = 0; h < a.length; h++)
12214        if (CKEDITOR.env.webkit)
12215          for (f = 0; f < b.length; f++) {
12216            g = b[f][1];
12217            for (d = 0; d < c.length; d++) g = g.replace(c[d][0], c[d][1]);
12218            a[h].$.sheet.addRule(b[f][0], g);
12219          }
12220        else {
12221          g = b;
12222          for (d = 0; d < c.length; d++) g = g.replace(c[d][0], c[d][1]);
12223          CKEDITOR.env.ie && 11 > CKEDITOR.env.version
12224            ? (a[h].$.styleSheet.cssText += g)
12225            : (a[h].$.innerHTML += g);
12226        }
12227    }
12228    var h = {};
12229    CKEDITOR.skin = {
12230      path: a,
12231      loadPart: function(c, d) {
12232        CKEDITOR.skin.name != CKEDITOR.skinName.split(",")[0]
12233          ? CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a() + "skin.js"), function() {
12234              b(c, d);
12235            })
12236          : b(c, d);
12237      },
12238      getPath: function(a) {
12239        return CKEDITOR.getUrl(d(a));
12240      },
12241      icons: {},
12242      addIcon: function(a, b, c, d) {
12243        a = a.toLowerCase();
12244        this.icons[a] || (this.icons[a] = { path: b, offset: c || 0, bgsize: d || "16px" });
12245      },
12246      getIconStyle: function(a, b, c, d, f) {
12247        var g;
12248        a && ((a = a.toLowerCase()), b && (g = this.icons[a + "-rtl"]), g || (g = this.icons[a]));
12249        a = c || (g && g.path) || "";
12250        d = d || (g && g.offset);
12251        f = f || (g && g.bgsize) || "16px";
12252        a && (a = a.replace(/'/g, "\\'"));
12253        return (
12254          a &&
12255          "background-image:url('" +
12256            CKEDITOR.getUrl(a) +
12257            "');background-position:0 " +
12258            d +
12259            "px;background-size:" +
12260            f +
12261            ";"
12262        );
12263      },
12264    };
12265    CKEDITOR.tools.extend(CKEDITOR.editor.prototype, {
12266      getUiColor: function() {
12267        return this.uiColor;
12268      },
12269      setUiColor: function(a) {
12270        var b = c(CKEDITOR.document);
12271        return (this.setUiColor = function(a) {
12272          this.uiColor = a;
12273          var c = CKEDITOR.skin.chameleon,
12274            d = "",
12275            h = "";
12276          "function" == typeof c && ((d = c(this, "editor")), (h = c(this, "panel")));
12277          a = [[m, a]];
12278          f([b], d, a);
12279          f(g, h, a);
12280        }).call(this, a);
12281      },
12282    });
12283    var k = "cke_ui_color",
12284      g = [],
12285      m = /\$color/g;
12286    CKEDITOR.on("instanceLoaded", function(a) {
12287      if (!CKEDITOR.env.ie || !CKEDITOR.env.quirks) {
12288        var b = a.editor;
12289        a = function(a) {
12290          a = (a.data[0] || a.data).element
12291            .getElementsByTag("iframe")
12292            .getItem(0)
12293            .getFrameDocument();
12294          if (!a.getById("cke_ui_color")) {
12295            a = c(a);
12296            g.push(a);
12297            var d = b.getUiColor();
12298            d && f([a], CKEDITOR.skin.chameleon(b, "panel"), [[m, d]]);
12299          }
12300        };
12301        b.on("panelShow", a);
12302        b.on("menuShow", a);
12303        b.config.uiColor && b.setUiColor(b.config.uiColor);
12304      }
12305    });
12306  })();
12307  (function() {
12308    if (CKEDITOR.env.webkit) CKEDITOR.env.hc = !1;
12309    else {
12310      var a = CKEDITOR.dom.element.createFromHtml(
12311        '\x3cdiv style\x3d"width:0;height:0;position:absolute;
12311left:-10000px;border:1px solid;border-color:red blue"\x3e\x3c/div\x3e',
12312        CKEDITOR.document,
12313      );
12314      a.appendTo(CKEDITOR.document.getHead());
12315      try {
12316        var d = a.getComputedStyle("border-top-color"),
12317          b = a.getComputedStyle("border-right-color");
12318        CKEDITOR.env.hc = !(!d || d != b);
12319      } catch (c) {
12320        CKEDITOR.env.hc = !1;
12321      }
12322      a.remove();
12323    }
12324    CKEDITOR.env.hc && (CKEDITOR.env.cssClass += " cke_hc");
12325    CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");
12326    CKEDITOR.status = "loaded";
12327    CKEDITOR.fireOnce("loaded");
12328    if ((a = CKEDITOR._.pending))
12329      for (delete CKEDITOR._.pending, d = 0; d < a.length; d++)
12330        CKEDITOR.editor.prototype.constructor.apply(a[d][0], a[d][1]), CKEDITOR.add(a[d][0]);
12331  })(); /*
12332 Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
12333 For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
12334*/
12335  CKEDITOR.skin.name = "moono-lisa";
12336  CKEDITOR.skin.ua_editor = "ie,iequirks,ie8,gecko";
12337  CKEDITOR.skin.ua_dialog = "ie,iequirks,ie8";
12338  CKEDITOR.skin.chameleon = (function() {
12339    var b = (function() {
12340        return function(b, d) {
12341          for (var a = b.match(/[^#]./g), e = 0; 3 > e; e++) {
12342            var f = e,
12343              c;
12344            c = parseInt(a[e], 16);
12345            c = ("0" + (0 > d ? 0 | (c * (1 + d)) : 0 | (c + (255 - c) * d)).toString(16)).slice(
12346              -2,
12347            );
12348            a[f] = c;
12349          }
12350          return "#" + a.join("");
12351        };
12352      })(),
12353      f = {
12354        editor: new CKEDITOR.template(
12355          "{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_bottom [background-color:{defaultBackground};border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [background-color:{defaultBackground};outline-color:{defaultBorder};] {id} .cke_dialog_tab [background-color:{dialogTab};border-color:{defaultBorder};] {id}
12355 .cke_dialog_tab:hover [background-color:{lightBackground};] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} a.cke_button_off:hover,{id} a.cke_button_off:focus,{id} a.cke_button_off:active [background-color:{darkBackground};border-color:{toolbarElementsBorder};] {id} .cke_button_on [background-color:{ckeButtonOn};border-color:{toolbarElementsBorder};] {id} .cke_toolbar_separator,{id} .cke_toolgroup a.cke_button:last-child:after,{id} .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after [background-color: {toolbarElementsBorder};border-color: {toolbarElementsBorder};] {id} a.cke_combo_button:hover,{id} a.cke_combo_button:focus,{id} .cke_combo_on a.cke_combo_button [border-color:{toolbarElementsBorder};background-color:{darkBackground};] {id} .cke_combo:after [border-color:{toolbarElementsBorder};] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover,{id} a.cke_path_item:focus,{id} a.cke_path_item:active [background-color:{darkBackground};] {id}.cke_panel [border-color:{defaultBorder};] ",
12356        ),
12357        panel: new CKEDITOR.template(
12358          ".cke_panel_grouptitle [background-color:{lightBackgroun
12358d};border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active [background-color:{menubuttonHover};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ",
12359        ),
12360      };
12361    return function(g, d) {
12362      var a = b(g.uiColor, 0.4),
12363        a = {
12364          id: "." + g.id,
12365          defaultBorder: b(a, -0.2),
12366          toolbarElementsBorder: b(a, -0.25),
12367          defaultBackground: a,
12368          lightBackground: b(a, 0.8),
12369          darkBackground: b(a, -0.15),
12370          ckeButtonOn: b(a, 0.4),
12371          ckeResizer: b(a, -0.4),
12372          ckeColorauto: b(a, 0.8),
12373          dialogBody: b(a, 0.7),
12374          dialogTab: b(a, 0.65),
12375          dialogTabSelected: "#FFF",
12376          dialogTabSelectedBorder: "#FFF",
12377          elementsPathColor: b(a, -0.6),
12378          menubuttonHover: b(a, 0.1),
12379          menubuttonIcon: b(a, 0.5),
12380          menubuttonIconHover: b(a, 0.3),
12381        };
12382      return f[d]
12383        .output(a)
12384        .replace(/\[/g, "{")
12385        .replace(/\]/g, "}");
12386    };
12387  })();
12388  CKEDITOR.plugins.add("dialogui", {
12389    onLoad: function() {
12390      var h = function(b) {
12391          this._ || (this._ = {});
12392          this._["default"] = this._.initValue = b["default"] || "";
12393          this._.required = b.required || !1;
12394          for (var a = [this._], d = 1; d < arguments.length; d++) a.push(arguments[d]);
12395          a.push(!0);
12396          CKEDITOR.tools.extend.apply(CKEDITOR.tools, a);
12397          return this._;
12398        },
12399        v = {
12400          build: function(b, a, d) {
12401            return new CKEDITOR.ui.dialog.textInput(b, a, d);
12402          },
12403        },
12404        n = {
12405          build: function(b, a, d) {
12406            return new CKEDITOR.ui.dialog[a.type](b, a, d);
12407          },
12408        },
12409        q = {
12410          isChanged: function() {
12411            return this.getValue() != this.getInitValue();
12412          },
12413          reset: function(b) {
12414            this.setValue(this.getInitValue(), b);
12415          },
12416          setInitValue: function() {
12417            this._.initValue = this.getValue();
12418          },
12419          resetInitValue: function() {
12420            this._.initValue = this._["default"];
12421          },
12422          getInitValue: function() {
12423            return this._.initValue;
12424          },
12425        },
12426        r = CKEDITOR.tools.extend(
12427          {},
12428          CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,
12429          {
12430            onChange: function(b, a) {
12431              this._.domOnChangeRegistered ||
12432                (b.on(
12433                  "load",
12434                  function() {
12435                    this.getInputElement().on(
12436                      "change",
12437                      function() {
12438                        b.parts.dialog.isVisible() &&
12439                          this.fire("change", { value: this.getValue() });
12440                      },
12441                      this,
12442                    );
12443                  },
12444                  this,
12445                ),
12446                (this._.domOnChangeRegistered = !0));
12447              this.on("change", a);
12448            },
12449          },
12450          !0,
12451        ),
12452        x = /^on([A-Z]\w+)/,
12453        t = function(b) {
12454          for (var a in b) (x.test(a) || "title" == a || "type" == a) && delete b[a];
12455          return b;
12456        },
12457        w = function(b) {
12458          b = b.data.getKeystroke();
12459          b == CKEDITOR.SHIFT + CKEDITOR.ALT + 36
12460            ? this.setDirectionMarker("ltr")
12461            : b == CKEDITOR.SHIFT + CKEDITOR.ALT + 35 && this.setDirectionMarker("rtl");
12462        };
12463      CKEDITOR.tools.extend(
12464        CKEDITOR.ui.dialog,
12465        {
12466          labeledElement: function(b, a, d, f) {
12467            if (!(4 > arguments.length)) {
12468              var c = h.call(this, a);
12469              c.labelId = CKEDITOR.tools.getNextId() + "_label";
12470              this._.children = [];
12471              var e = { role: a.role || "presentation" };
12472              a.includeLabel && (e["aria-labelledby"] = c.labelId);
12473              CKEDITOR.ui.dialog.uiElement.call(this, b, a, d, "div", null, e, function() {
12474                var e = [],
12475                  g = a.required ? " cke_required" : "";
12476                "horizontal" != a.labelLayout
12477                  ? e.push(
12478                      '\x3clabel class\x3d"cke_dialog_ui_labeled_label' + g + '" ',
12479                      ' id\x3d"' + c.labelId + '"',
12480                      c.inputId ? ' for\x3d"' + c.inputId + '"' : "",
12481                      (a.labelStyle ? ' style\x3d"' + a.labelStyle + '"' : "") + "\x3e",
12482                      a.label,
12483                      "\x3c/label\x3e",
12484                      '\x3cdiv class\x3d"cke_dialog_ui_labeled_content"',
12485                      a.controlStyle ? ' style\x3d"' + a.controlStyle + '"' : "",
12486                      ' role\x3d"presentation"\x3e',
12487                      f.call(this, b, a),
12488                      "\x3c/div\x3e",
12489                    )
12490                  : ((g = {
12491                      type: "hbox",
12492                      widths: a.widths,
12493                      padding: 0,
12494                      children: [
12495                        {
12496                          type: "html",
12497                          html:
12498                            '\x3clabel class\x3d"cke_dialog_ui_labeled_label' +
12499                            g +
12500                            '" id\x3d"' +
12501                            c.labelId +
12502                            '" for\x3d"' +
12503                            c.inputId +
12504                            '"' +
12505                            (a.labelStyle ? ' style\x3d"' + a.labelStyle + '"' : "") +
12506                            "\x3e" +
12507                            CKEDITOR.tools.htmlEncode(a.label) +
12508                            "\x3c/label\x3e",
12509                        },
12510                        {
12511                          type: "html",
12512                          html:
12513                            '\x3cspan class\x3d"cke_dialog_ui_labeled_content"' +
12514                            (a.controlStyle ? ' style\x3d"' + a.controlStyle + '"' : "") +
12515                            "\x3e" +
12516                            f.call(this, b, a) +
12517                            "\x3c/span\x3e",
12518                        },
12519                      ],
12520                    }),
12521                    CKEDITOR.dialog._.uiElementBuilders.hbox.build(b, g, e));
12522                return e.join("");
12523              });
12524            }
12525          },
12526          textInput: function(b, a, d) {
12527            if (!(3 > arguments.length)) {
12528              h.call(this, a);
12529              var f = (this._.inputId = CKEDITOR.tools.getNextId() + "_textInput"),
12530                c = { class: "cke_dialog_ui_input_" + a.type, id: f, type: a.type };
12531              a.validate && (this.validate = a.validate);
12532              a.maxLength && (c.maxlength = a.maxLength);
12533              a.size && (c.size = a.size);
12534              a.inputStyle && (c.style = a.inputStyle);
12535              var e = this,
12536                m = !1;
12537              b.on("load", function() {
12538                e.getInputElement().on("keydown", function(a) {
12539                  13 == a.data.getKeystroke() && (m = !0);
12540                });
12541                e.getInputElement().on(
12542                  "keyup",
12543                  function(a) {
12544                    13 == a.data.getKeystroke() &&
12545                      m &&
12546                      (b.getButton("ok") &&
12547                        setTimeout(function() {
12548                          b.getButton("ok").click();
12549                        }, 0),
12550                      (m = !1));
12551                    e.bidi && w.call(e, a);
12552                  },
12553                  null,
12554                  null,
12555                  1e3,
12556                );
12557              });
12558              CKEDITOR.ui.dialog.labeledElement.call(this, b, a, d, function() {
12559                var b = [
12560                  '\x3cdiv class\x3d"cke_dialog_ui_input_',
12561                  a.type,
12562                  '" role\x3d"presentation"',
12563                ];
12564                a.width && b.push('style\x3d"width:' + a.width + '" ');
12565                b.push("\x3e\x3cinput ");
12566                c["aria-labelledby"] = this._.labelId;
12567                this._.required && (c["aria-required"] = this._.required);
12568                for (var e in c) b.push(e + '\x3d"' + c[e] + '" ');
12569                b.push(" /\x3e\x3c/div\x3e");
12570                return b.join("");
12571              });
12572            }
12573          },
12574          textarea: function(b, a, d) {
12575            if (!(3 > arguments.length)) {
12576              h.call(this, a);
12577              var f = this,
12578                c = (this._.inputId = CKEDITOR.tools.getNextId() + "_textarea"),
12579                e = {};
12580              a.validate && (this.validate = a.validate);
12581              e.rows = a.rows || 5;
12582              e.cols = a.cols || 20;
12583              e["class"] = "cke_dialog_ui_input_textarea " + (a["class"] || "");
12584              "undefined" != typeof a.inputStyle && (e.style = a.inputStyle);
12585              a.dir && (e.dir = a.dir);
12586              if (f.bidi)
12587                b.on(
12588                  "load",
12589                  function() {
12590                    f.getInputElement().on("keyup", w);
12591                  },
12592                  f,
12593                );
12594              CKEDITOR.ui.dialog.labeledElement.call(this, b, a, d, function() {
12595                e["aria-labelledby"] = this._.labelId;
12596                this._.required && (e["aria-required"] = this._.required);
12597                var a = [
12598                    '\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',
12599                    c,
12600                    '" ',
12601                  ],
12602                  b;
12603                for (b in e) a.push(b + '\x3d"' + CKEDITOR.tools.htmlEncode(e[b]) + '" ');
12604                a.push(
12605                  "\x3e",
12606                  CKEDITOR.tools.htmlEncode(f._["default"]),
12607                  "\x3c/textarea\x3e\x3c/div\x3e",
12608                );
12609                return a.join("");
12610              });
12611            }
12612          },
12613          checkbox: function(b, a, d) {
12614            if (!(3 > arguments.length)) {
12615              var f = h.call(this, a, { default: !!a["default"] });
12616              a.validate && (this.validate = a.validate);
12617              CKEDITOR.ui.dialog.uiElement.call(this, b, a, d, "span", null, null, function() {
12618                var c = CKEDITOR.tools.extend(
12619                    {},
12620                    a,
12621                    { id: a.id ? a.id + "_checkbox" : CKEDITOR.tools.getNextId() + "_checkbox" },
12622                    !0,
12623                  ),
12624                  e = [],
12625                  d = CKEDITOR.tools.getNextId() + "_label",
12626                  g = {
12627                    class: "cke_dialog_ui_checkbox_input",
12628                    type: "checkbox",
12629                    "aria-labelledby": d,
12630                  };
12631                t(c);
12632                a["default"] && (g.checked = "checked");
12633                "undefined" != typeof c.inputStyle && (c.style = c.inputStyle);
12634                f.checkbox = new CKEDITOR.ui.dialog.uiElement(b, c, e, "input", null, g);
12635                e.push(
12636                  ' \x3clabel id\x3d"',
12637                  d,
12638                  '" for\x3d"',
12639                  g.id,
12640                  '"' + (a.labelStyle ? ' style\x3d"' + a.labelStyle + '"' : "") + "\x3e",
12641                  CKEDITOR.tools.htmlEncode(a.label),
12642                  "\x3c/label\x3e",
12643                );
12644                return e.join("");
12645              });
12646            }
12647          },
12648          radio: function(b, a, d) {
12649            if (!(3 > arguments.length)) {
12650              h.call(this, a);
12651              this._["default"] || (this._["default"] = this._.initValue = a.items[0][1]);
12652              a.validate && (this.validate = a.validate);
12653              var f = [],
12654                c = this;
12655              a.role = "radiogroup";
12656              a.includeLabel = !0;
12657              CKEDITOR.ui.dialog.labeledElement.call(this, b, a, d, function() {
12658                for (
12659                  var e = [],
12660                    d = [],
12661                    g = (a.id ? a.id : CKEDITOR.tools.getNextId()) + "_radio",
12662                    k = 0;
12663                  k < a.items.length;
12664                  k++
12665                ) {
12666                  var l = a.items[k],
12667                    h = void 0 !== l[2] ? l[2] : l[0],
12668                    n = void 0 !== l[1] ? l[1] : l[0],
12669                    p = CKEDITOR.tools.getNextId() + "_radio_input",
12670                    q = p + "_label",
12671                    p = CKEDITOR.tools.extend({}, a, { id: p, title: null, type: null }, !0),
12672                    h = CKEDITOR.tools.extend({}, p, { title: h }, !0),
12673                    r = {
12674                      type: "radio",
12675                      class: "cke_dialog_ui_radio_input",
12676                      name: g,
12677                      value: n,
12678                      "aria-labelledby": q,
12679                    },
12680                    u = [];
12681                  c._["default"] == n && (r.checked = "checked");
12682                  t(p);
12683                  t(h);
12684                  "undefined" != typeof p.inputStyle && (p.style = p.inputStyle);
12685                  p.keyboardFocusable = !0;
12686                  f.push(new CKEDITOR.ui.dialog.uiElement(b, p, u, "input", null, r));
12687                  u.push(" ");
12688                  new CKEDITOR.ui.dialog.uiElement(
12689                    b,
12690                    h,
12691                    u,
12692                    "label",
12693                    null,
12694                    { id: q, for: r.id },
12695                    l[0],
12696                  );
12697                  e.push(u.join(""));
12698                }
12699                new CKEDITOR.ui.dialog.hbox(b, f, e, d);
12700                return d.join("");
12701              });
12702              this._.children = f;
12703            }
12704          },
12705          button: function(b, a, d) {
12706            if (arguments.length) {
12707              "function" == typeof a && (a = a(b.getParentEditor()));
12708              h.call(this, a, { disabled: a.disabled || !1 });
12709              CKEDITOR.event.implementOn(this);
12710              var f = this;
12711              b.on(
12712                "load",
12713                function() {
12714                  var a = this.getElement();
12715                  (function() {
12716                    a.on("click", function(a) {
12717                      f.click();
12718                      a.data.preventDefault();
12719                    });
12720                    a.on("keydown", function(a) {
12721                      a.data.getKeystroke() in { 32: 1 } && (f.click(), a.data.preventDefault());
12722                    });
12723                  })();
12724                  a.unselectable();
12725                },
12726                this,
12727              );
12728              var c = CKEDITOR.tools.extend({}, a);
12729              delete c.style;
12730              var e = CKEDITOR.tools.getNextId() + "_label";
12731              CKEDITOR.ui.dialog.uiElement.call(
12732                this,
12733                b,
12734                c,
12735                d,
12736                "a",
12737                null,
12738                {
12739                  style: a.style,
12740                  href: "javascript:void(0)",
12741                  title: a.label,
12742                  hidefocus: "true",
12743                  class: a["class"],
12744                  role: "button",
12745                  "aria-labelledby": e,
12746                },
12747                '\x3cspan id\x3d"' +
12748                  e +
12749                  '" class\x3d"cke_dialog_ui_button"\x3e' +
12750                  CKEDITOR.tools.htmlEncode(a.label) +
12751                  "\x3c/span\x3e",
12752              );
12753            }
12754          },
12755          select: function(b, a, d) {
12756            if (!(3 > arguments.length)) {
12757              var f = h.call(this, a);
12758              a.validate && (this.validate = a.validate);
12759              f.inputId = CKEDITOR.tools.getNextId() + "_select";
12760              CKEDITOR.ui.dialog.labeledElement.call(this, b, a, d, function() {
12761                var c = CKEDITOR.tools.extend(
12762                    {},
12763                    a,
12764                    { id: a.id ? a.id + "_select" : CKEDITOR.tools.getNextId() + "_select" },
12765                    !0,
12766                  ),
12767                  e = [],
12768                  d = [],
12769                  g = {
12770                    id: f.inputId,
12771                    class: "cke_dialog_ui_input_select",
12772                    "aria-labelledby": this._.labelId,
12773                  };
12774                e.push(
12775                  '\x3cdiv class\x3d"cke_dialog_ui_input_',
12776                  a.type,
12777                  '" role\x3d"presentation"',
12778                );
12779                a.width && e.push('style\x3d"width:' + a.width + '" ');
12780                e.push("\x3e");
12781                void 0 !== a.size && (g.size = a.size);
12782                void 0 !== a.multiple && (g.multiple = a.multiple);
12783                t(c);
12784                for (var k = 0, l; k < a.items.length && (l = a.items[k]); k++)
12785                  d.push(
12786                    '\x3coption value\x3d"',
12787                    CKEDITOR.tools
12788                      .htmlEncode(void 0 !== l[1] ? l[1] : l[0])
12789                      .replace(/"/g, "\x26quot;"),
12790                    '" /\x3e ',
12791                    CKEDITOR.tools.htmlEncode(l[0]),
12792                  );
12793                "undefined" != typeof c.inputStyle && (c.style = c.inputStyle);
12794                f.select = new CKEDITOR.ui.dialog.uiElement(b, c, e, "select", null, g, d.join(""));
12795                e.push("\x3c/div\x3e");
12796                return e.join("");
12797              });
12798            }
12799          },
12800          file: function(b, a, d) {
12801            if (!(3 > arguments.length)) {
12802              void 0 === a["default"] && (a["default"] = "");
12803              var f = CKEDITOR.tools.extend(h.call(this, a), { definition: a, buttons: [] });
12804              a.validate && (this.validate = a.validate);
12805              b.on("load", function() {
12806                CKEDITOR.document
12807                  .getById(f.frameId)
12808                  .getParent()
12809                  .addClass("cke_dialog_ui_input_file");
12810              });
12811              CKEDITOR.ui.dialog.labeledElement.call(this, b, a, d, function() {
12812                f.frameId = CKEDITOR.tools.getNextId() + "_fileInput";
12813                var b = [
12814                  '\x3ciframe frameborder\x3d"0" allowtransparency\x3d"0" class\x3d"cke_dialog_ui_input_file" role\x3d"presentation" id\x3d"',
12815                  f.frameId,
12816                  '" title\x3d"',
12817                  a.label,
12818                  '" src\x3d"javascript:void(',
12819                ];
12820                b.push(
12821                  CKEDITOR.env.ie
12822                    ? "(function(){" +
12823                      encodeURIComponent(
12824                        "document.open();(" + CKEDITOR.tools.fixDomain + ")();document.close();",
12825                      ) +
12826                      "})()"
12827                    : "0",
12828                );
12829                b.push(')"\x3e\x3c/iframe\x3e');
12830                return b.join("");
12831              });
12832            }
12833          },
12834          fileButton: function(b, a, d) {
12835            var f = this;
12836            if (!(3 > arguments.length)) {
12837              h.call(this, a);
12838              a.validate && (this.validate = a.validate);
12839              var c = CKEDITOR.tools.extend({}, a),
12840                e = c.onClick;
12841              c.className = (c.className ? c.className + " " : "") + "cke_dialog_ui_button";
12842              c.onClick = function(c) {
12843                var d = a["for"];
12844                c = e ? e.call(this, c) : !1;
12845                !1 !== c &&
12846                  ("xhr" !== c && b.getContentElement(d[0], d[1]).submit(), this.disable());
12847              };
12848              b.on("load", function() {
12849                b.getContentElement(a["for"][0], a["for"][1])._.buttons.push(f);
12850              });
12851              CKEDITOR.ui.dialog.button.call(this, b, c, d);
12852            }
12853          },
12854          html: (function() {
12855            var b = /^\s*<[\w:]+\s+([^>]*)?>/,
12856              a = /^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,
12857              d = /\/$/;
12858            return function(f, c, e) {
12859              if (!(3 > arguments.length)) {
12860                var m = [],
12861                  g = c.html;
12862                "\x3c" != g.charAt(0) && (g = "\x3cspan\x3e" + g + "\x3c/span\x3e");
12863                var k = c.focus;
12864                if (k) {
12865                  var l = this.focus;
12866                  this.focus = function() {
12867                    ("function" == typeof k ? k : l).call(this);
12868                    this.fire("focus");
12869                  };
12870                  c.isFocusable && (this.isFocusable = this.isFocusable);
12871                  this.keyboardFocusable = !0;
12872                }
12873                CKEDITOR.ui.dialog.uiElement.call(this, f, c, m, "span", null, null, "");
12874                m = m.join("").match(b);
12875                g = g.match(a) || ["", "", ""];
12876                d.test(g[1]) && ((g[1] = g[1].slice(0, -1)), (g[2] = "/" + g[2]));
12877                e.push([g[1], " ", m[1] || "", g[2]].join(""));
12878              }
12879            };
12880          })(),
12881          fieldset: function(b, a, d, f, c) {
12882            var e = c.label;
12883            this._ = { children: a };
12884            CKEDITOR.ui.dialog.uiElement.call(this, b, c, f, "fieldset", null, null, function() {
12885              var a = [];
12886              e &&
12887                a.push(
12888                  "\x3clegend" +
12889                    (c.labelStyle ? ' style\x3d"' + c.labelStyle + '"' : "") +
12890                    "\x3e" +
12891                    e +
12892                    "\x3c/legend\x3e",
12893                );
12894              for (var b = 0; b < d.length; b++) a.push(d[b]);
12895              return a.join("");
12896            });
12897          },
12898        },
12899        !0,
12900      );
12901      CKEDITOR.ui.dialog.html.prototype = new CKEDITOR.ui.dialog.uiElement();
12902      CKEDITOR.ui.dialog.labeledElement.prototype = CKEDITOR.tools.extend(
12903        new CKEDITOR.ui.dialog.uiElement(),
12904        {
12905          setLabel: function(b) {
12906            var a = CKEDITOR.document.getById(this._.labelId);
12907            1 > a.getChildCount()
12908              ? new CKEDITOR.dom.text(b, CKEDITOR.document).appendTo(a)
12909              : (a.getChild(0).$.nodeValue = b);
12910            return this;
12911          },
12912          getLabel: function() {
12913            var b = CKEDITOR.document.getById(this._.labelId);
12914            return !b || 1 > b.getChildCount() ? "" : b.getChild(0).getText();
12915          },
12916          eventProcessors: r,
12917        },
12918        !0,
12919      );
12920      CKEDITOR.ui.dialog.button.prototype = CKEDITOR.tools.extend(
12921        new CKEDITOR.ui.dialog.uiElement(),
12922        {
12923          click: function() {
12924            return this._.disabled ? !1 : this.fire("click", { dialog: this._.dialog });
12925          },
12926          enable: function() {
12927            this._.disabled = !1;
12928            var b = this.getElement();
12929            b && b.removeClass("cke_disabled");
12930          },
12931          disable: function() {
12932            this._.disabled = !0;
12933            this.getElement().addClass("cke_disabled");
12934          },
12935          isVisible: function() {
12936            return this.getElement()
12937              .getFirst()
12938              .isVisible();
12939          },
12940          isEnabled: function() {
12941            return !this._.disabled;
12942          },
12943          eventProcessors: CKEDITOR.tools.extend(
12944            {},
12945            CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,
12946            {
12947              onClick: function(b, a) {
12948                this.on("click", function() {
12949                  a.apply(this, arguments);
12950                });
12951              },
12952            },
12953            !0,
12954          ),
12955          accessKeyUp: function() {
12956            this.click();
12957          },
12958          accessKeyDown: function() {
12959            this.focus();
12960          },
12961          keyboardFocusable: !0,
12962        },
12963        !0,
12964      );
12965      CKEDITOR.ui.dialog.textInput.prototype = CKEDITOR.tools.extend(
12966        new CKEDITOR.ui.dialog.labeledElement(),
12967        {
12968          getInputElement: function() {
12969            return CKEDITOR.document.getById(this._.inputId);
12970          },
12971          focus: function() {
12972            var b = this.selectParentTab();
12973            setTimeout(function() {
12974              var a = b.getInputElement();
12975              a && a.$.focus();
12976            }, 0);
12977          },
12978          select: function() {
12979            var b = this.selectParentTab();
12980            setTimeout(function() {
12981              var a = b.getInputElement();
12982              a && (a.$.focus(), a.$.select());
12983            }, 0);
12984          },
12985          accessKeyUp: function() {
12986            this.select();
12987          },
12988          setValue: function(b) {
12989            if (this.bidi) {
12990              var a = b && b.charAt(0);
12991              (a = "‪" == a ? "ltr" : "‫" == a ? "rtl" : null) && (b = b.slice(1));
12992              this.setDirectionMarker(a);
12993            }
12994            b || (b = "");
12995            return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this, arguments);
12996          },
12997          getValue: function() {
12998            var b = CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);
12999            if (this.bidi && b) {
13000              var a = this.getDirectionMarker();
13001              a && (b = ("ltr" == a ? "‪" : "‫") + b);
13002            }
13003            return b;
13004          },
13005          setDirectionMarker: function(b) {
13006            var a = this.getInputElement();
13007            b
13008              ? a.setAttributes({ dir: b, "data-cke-dir-marker": b })
13009              : this.getDirectionMarker() && a.removeAttributes(["dir", "data-cke-dir-marker"]);
13010          },
13011          getDirectionMarker: function() {
13012            return this.getInputElement().data("cke-dir-marker");
13013          },
13014          keyboardFocusable: !0,
13015        },
13016        q,
13017        !0,
13018      );
13019      CKEDITOR.ui.dialog.textarea.prototype = new CKEDITOR.ui.dialog.textInput();
13020      CKEDITOR.ui.dialog.select.prototype = CKEDITOR.tools.extend(
13021        new CKEDITOR.ui.dialog.labeledElement(),
13022        {
13023          getInputElement: function() {
13024            return this._.select.getElement();
13025          },
13026          add: function(b, a, d) {
13027            var f = new CKEDITOR.dom.element("option", this.getDialog().getParentEditor().document),
13028              c = this.getInputElement().$;
13029            f.$.text = b;
13030            f.$.value = void 0 === a || null === a ? b : a;
13031            void 0 === d || null === d
13032              ? CKEDITOR.env.ie ? c.add(f.$) : c.add(f.$, null)
13033              : c.add(f.$, d);
13034            return this;
13035          },
13036          remove: function(b) {
13037            this.getInputElement().$.remove(b);
13038            return this;
13039          },
13040          clear: function() {
13041            for (var b = this.getInputElement().$; 0 < b.length; ) b.remove(0);
13042            return this;
13043          },
13044          keyboardFocusable: !0,
13045        },
13046        q,
13047        !0,
13048      );
13049      CKEDITOR.ui.dialog.checkbox.prototype = CKEDITOR.tools.extend(
13050        new CKEDITOR.ui.dialog.uiElement(),
13051        {
13052          getInputElement: function() {
13053            return this._.checkbox.getElement();
13054          },
13055          setValue: function(b, a) {
13056            this.getInputElement().$.checked = b;
13057            !a && this.fire("change", { value: b });
13058          },
13059          getValue: function() {
13060            return this.getInputElement().$.checked;
13061          },
13062          accessKeyUp: function() {
13063            this.setValue(!this.getValue());
13064          },
13065          eventProcessors: {
13066            onChange: function(b, a) {
13067              if (!CKEDITOR.env.ie || 8 < CKEDITOR.env.version)
13068                return r.onChange.apply(this, arguments);
13069              b.on(
13070                "load",
13071                function() {
13072                  var a = this._.checkbox.getElement();
13073                  a.on(
13074                    "propertychange",
13075                    function(b) {
13076                      b = b.data.$;
13077                      "checked" == b.propertyName && this.fire("change", { value: a.$.checked });
13078                    },
13079                    this,
13080                  );
13081                },
13082                this,
13083              );
13084              this.on("change", a);
13085              return null;
13086            },
13087          },
13088          keyboardFocusable: !0,
13089        },
13090        q,
13091        !0,
13092      );
13093      CKEDITOR.ui.dialog.radio.prototype = CKEDITOR.tools.extend(
13094        new CKEDITOR.ui.dialog.uiElement(),
13095        {
13096          setValue: function(b, a) {
13097            for (var d = this._.children, f, c = 0; c < d.length && (f = d[c]); c++)
13098              f.getElement().$.checked = f.getValue() == b;
13099            !a && this.fire("change", { value: b });
13100          },
13101          getValue: function() {
13102            for (var b = this._.children, a = 0; a < b.length; a++)
13103              if (b[a].getElement().$.checked) return b[a].getValue();
13104            return null;
13105          },
13106          accessKeyUp: function() {
13107            var b = this._.children,
13108              a;
13109            for (a = 0; a < b.length; a++)
13110              if (b[a].getElement().$.checked) {
13111                b[a].getElement().focus();
13112                return;
13113              }
13114            b[0].getElement().focus();
13115          },
13116          eventProcessors: {
13117            onChange: function(b, a) {
13118              if (!CKEDITOR.env.ie || 8 < CKEDITOR.env.version)
13119                return r.onChange.apply(this, arguments);
13120              b.on(
13121                "load",
13122                function() {
13123                  for (var a = this._.children, b = this, c = 0; c < a.length; c++)
13124                    a[c].getElement().on("propertychange", function(a) {
13125                      a = a.data.$;
13126                      "checked" == a.propertyName &&
13127                        this.$.checked &&
13128                        b.fire("change", { value: this.getAttribute("value") });
13129                    });
13130                },
13131                this,
13132              );
13133              this.on("change", a);
13134              return null;
13135            },
13136          },
13137        },
13138        q,
13139        !0,
13140      );
13141      CKEDITOR.ui.dialog.file.prototype = CKEDITOR.tools.extend(
13142        new CKEDITOR.ui.dialog.labeledElement(),
13143        q,
13144        {
13145          getInputElement: function() {
13146            var b = CKEDITOR.document.getById(this._.frameId).getFrameDocument();
13147            return 0 < b.$.forms.length
13148              ? new CKEDITOR.dom.element(b.$.forms[0].elements[0])
13149              : this.getElement();
13150          },
13151          submit: function() {
13152            this.getInputElement()
13153              .getParent()
13154              .$.submit();
13155            return this;
13156          },
13157          getAction: function() {
13158            return this.getInputElement().getParent().$.action;
13159          },
13160          registerEvents: function(b) {
13161            var a = /^on([A-Z]\w+)/,
13162              d,
13163              f = function(a, b, c, d) {
13164                a.on("formLoaded", function() {
13165                  a.getInputElement().on(c, d, a);
13166                });
13167              },
13168              c;
13169            for (c in b)
13170              if ((d = c.match(a)))
13171                this.eventProcessors[c]
13172                  ? this.eventProcessors[c].call(this, this._.dialog, b[c])
13173                  : f(this, this._.dialog, d[1].toLowerCase(), b[c]);
13174            return this;
13175          },
13176          reset: function() {
13177            function b() {
13178              d.$.open();
13179              var b = "";
13180              f.size && (b = f.size - (CKEDITOR.env.ie ? 7 : 0));
13181              var h = a.frameId + "_input";
13182              d.$.write(
13183                [
13184                  '\x3chtml dir\x3d"' +
13185                    g +
13186                    '" lang\x3d"' +
13187                    k +
13188                    '"\x3e\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e\x3cbody style\x3d"margin: 0; overflow: hidden; background: transparent;"\x3e',
13189                  '\x3cform enctype\x3d"multipart/form-data" method\x3d"POST" dir\x3d"' +
13190                    g +
13191                    '" lang\x3d"' +
13192                    k +
13193                    '" action\x3d"',
13194                  CKEDITOR.tools.htmlEncode(f.action),
13195                  '"\x3e\x3clabel id\x3d"',
13196                  a.labelId,
13197                  '" for\x3d"',
13198                  h,
13199                  '" style\x3d"display:none"\x3e',
13200                  CKEDITOR.tools.htmlEncode(f.label),
13201                  '\x3c/label\x3e\x3cinput style\x3d"width:100%" id\x3d"',
13202                  h,
13203                  '" aria-labelledby\x3d"',
13204                  a.labelId,
13205                  '" type\x3d"file" name\x3d"',
13206                  CKEDITOR.tools.htmlEncode(f.id || "cke_upload"),
13207                  '" size\x3d"',
13208                  CKEDITOR.tools.htmlEncode(0 < b ? b : ""),
13209                  '" /\x3e\x3c/form\x3e\x3c/body\x3e\x3c/html\x3e\x3cscript\x3e',
13210                  CKEDITOR.env.ie ? "(" + CKEDITOR.tools.fixDomain + ")();" : "",
13211                  "window.parent.CKEDITOR.tools.callFunction(" + e + ");",
13212                  "window.onbeforeunload \x3d function() {window.parent.CKEDITOR.tools.callFunction(" +
13213                    m +
13214                    ")}",
13215                  "\x3c/script\x3e",
13216                ].join(""),
13217              );
13218              d.$.close();
13219              for (b = 0; b < c.length; b++) c[b].enable();
13220            }
13221            var a = this._,
13222              d = CKEDITOR.document.getById(a.frameId).getFrameDocument(),
13223              f = a.definition,
13224              c = a.buttons,
13225              e = this.formLoadedNumber,
13226              m = this.formUnloadNumber,
13227              g = a.dialog._.editor.lang.dir,
13228              k = a.dialog._.editor.langCode;
13229            e ||
13230              ((e = this.formLoadedNumber = CKEDITOR.tools.addFunction(function() {
13231                this.fire("formLoaded");
13232              }, this)),
13233              (m = this.formUnloadNumber = CKEDITOR.tools.addFunction(function() {
13234                this.getInputElement().clearCustomData();
13235              }, this)),
13236              this.getDialog()._.editor.on("destroy", function() {
13237                CKEDITOR.tools.removeFunction(e);
13238                CKEDITOR.tools.removeFunction(m);
13239              }));
13240            CKEDITOR.env.gecko ? setTimeout(b, 500) : b();
13241          },
13242          getValue: function() {
13243            return this.getInputElement().$.value || "";
13244          },
13245          setInitValue: function() {
13246            this._.initValue = "";
13247          },
13248          eventProcessors: {
13249            onChange: function(b, a) {
13250              this._.domOnChangeRegistered ||
13251                (this.on(
13252                  "formLoaded",
13253                  function() {
13254                    this.getInputElement().on(
13255                      "change",
13256                      function() {
13257                        this.fire("change", { value: this.getValue() });
13258                      },
13259                      this,
13260                    );
13261                  },
13262                  this,
13263                ),
13264                (this._.domOnChangeRegistered = !0));
13265              this.on("change", a);
13266            },
13267          },
13268          keyboardFocusable: !0,
13269        },
13270        !0,
13271      );
13272      CKEDITOR.ui.dialog.fileButton.prototype = new CKEDITOR.ui.dialog.button();
13273      CKEDITOR.ui.dialog.fieldset.prototype = CKEDITOR.tools.clone(
13274        CKEDITOR.ui.dialog.hbox.prototype,
13275      );
13276      CKEDITOR.dialog.addUIElement("text", v);
13277      CKEDITOR.dialog.addUIElement("password", v);
13278      CKEDITOR.dialog.addUIElement("textarea", n);
13279      CKEDITOR.dialog.addUIElement("checkbox", n);
13280      CKEDITOR.dialog.addUIElement("radio", n);
13281      CKEDITOR.dialog.addUIElement("button", n);
13282      CKEDITOR.dialog.addUIElement("select", n);
13283      CKEDITOR.dialog.addUIElement("file", n);
13284      CKEDITOR.dialog.addUIElement("fileButton", n);
13285      CKEDITOR.dialog.addUIElement("html", n);
13286      CKEDITOR.dialog.addUIElement("fieldset", {
13287        build: function(b, a, d) {
13288          for (var f = a.children, c, e = [], h = [], g = 0; g < f.length && (c = f[g]); g++) {
13289            var k = [];
13290            e.push(k);
13291            h.push(CKEDITOR.dialog._.uiElementBuilders[c.type].build(b, c, k));
13292          }
13293          return new CKEDITOR.ui.dialog[a.type](b, h, e, d, a);
13294        },
13295      });
13296    },
13297  });
13298  CKEDITOR.DIALOG_RESIZE_NONE = 0;
13299  CKEDITOR.DIALOG_RESIZE_WIDTH = 1;
13300  CKEDITOR.DIALOG_RESIZE_HEIGHT = 2;
13301  CKEDITOR.DIALOG_RESIZE_BOTH = 3;
13302  CKEDITOR.DIALOG_STATE_IDLE = 1;
13303  CKEDITOR.DIALOG_STATE_BUSY = 2;
13304  (function() {
13305    function x() {
13306      for (
13307        var a = this._.tabIdList.length,
13308          b = CKEDITOR.tools.indexOf(this._.tabIdList, this._.currentTabId) + a,
13309          c = b - 1;
13310        c > b - a;
13311        c--
13312      )
13313        if (this._.tabs[this._.tabIdList[c % a]][0].$.offsetHeight) return this._.tabIdList[c % a];
13314      return null;
13315    }
13316    function A() {
13317      for (
13318        var a = this._.tabIdList.length,
13319          b = CKEDITOR.tools.indexOf(this._.tabIdList, this._.currentTabId),
13320          c = b + 1;
13321        c < b + a;
13322        c++
13323      )
13324        if (this._.tabs[this._.tabIdList[c % a]][0].$.offsetHeight) return this._.tabIdList[c % a];
13325      return null;
13326    }
13327    function K(a, b) {
13328      for (var c = a.$.getElementsByTagName("input"), e = 0, d = c.length; e < d; e++) {
13329        var f = new CKEDITOR.dom.element(c[e]);
13330        "text" == f.getAttribute("type").toLowerCase() &&
13331          (b
13332            ? (f.setAttribute("value", f.getCustomData("fake_value") || ""),
13333              f.removeCustomData("fake_value"))
13334            : (f.setCustomData("fake_value", f.getAttribute("value")),
13335              f.setAttribute("value", "")));
13336      }
13337    }
13338    function T(a, b) {
13339      var c = this.getInputElement();
13340      c && (a ? c.removeAttribute("aria-invalid") : c.setAttribute("aria-invalid", !0));
13341      a || (this.select ? this.select() : this.focus());
13342      b && alert(b);
13343      this.fire("validated", { valid: a, msg: b });
13344    }
13345    function U() {
13346      var a = this.getInputElement();
13347      a && a.removeAttribute("aria-invalid");
13348    }
13349    function V(a) {
13350      var b = CKEDITOR.dom.element.createFromHtml(
13351          CKEDITOR.addTemplate("dialog", W).output({
13352            id: CKEDITOR.tools.getNextNumber(),
13353            editorId: a.id,
13354            langDir: a.lang.dir,
13355            langCode: a.langCode,
13356            editorDialogClass: "cke_editor_" + a.name.replace(/\./g, "\\.") + "_dialog",
13357            closeTitle: a.lang.common.close,
13358            hidpi: CKEDITOR.env.hidpi ? "cke_hidpi" : "",
13359          }),
13360        ),
13361        c = b.getChild([0, 0, 0, 0, 0]),
13362        e = c.getChild(0),
13363        d = c.getChild(1);
13364      a.plugins.clipboard && CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(c);
13365      !CKEDITOR.env.ie ||
13366        CKEDITOR.env.quirks ||
13367        CKEDITOR.env.edge ||
13368        ((a =
13369          "javascript:void(function(){" +
13370          encodeURIComponent(
13371            "document.open();(" + CKEDITOR.tools.fixDomain + ")();document.close();",
13372          ) +
13373          "}())"),
13374        CKEDITOR.dom.element
13375          .createFromHtml(
13376            '\x3ciframe frameBorder\x3d"0" class\x3d"cke_iframe_shim" src\x3d"' +
13377              a +
13378              '" tabIndex\x3d"-1"\x3e\x3c/iframe\x3e',
13379          )
13380          .appendTo(c.getParent()));
13381      e.unselectable();
13382      d.unselectable();
13383      return {
13384        element: b,
13385        parts: {
13386          dialog: b.getChild(0),
13387          title: e,
13388          close: d,
13389          tabs: c.getChild(2),
13390          contents: c.getChild([3, 0, 0, 0]),
13391          footer: c.getChild([3, 0, 1, 0]),
13392        },
13393      };
13394    }
13395    function L(a, b, c) {
13396      this.element = b;
13397      this.focusIndex = c;
13398      this.tabIndex = 0;
13399      this.isFocusable = function() {
13400        return !b.getAttribute("disabled") && b.isVisible();
13401      };
13402      this.focus = function() {
13403        a._.currentFocusIndex = this.focusIndex;
13404        this.element.focus();
13405      };
13406      b.on("keydown", function(a) {
13407        a.data.getKeystroke() in { 32: 1, 13: 1 } && this.fire("click");
13408      });
13409      b.on("focus", function() {
13410        this.fire("mouseover");
13411      });
13412      b.on("blur", function() {
13413        this.fire("mouseout");
13414      });
13415    }
13416    function X(a) {
13417      function b() {
13418        a.layout();
13419      }
13420      var c = CKEDITOR.document.getWindow();
13421      c.on("resize", b);
13422      a.on("hide", function() {
13423        c.removeListener("resize", b);
13424      });
13425    }
13426    function M(a, b) {
13427      this._ = { dialog: a };
13428      CKEDITOR.tools.extend(this, b);
13429    }
13430    function Y(a) {
13431      function b(b) {
13432        var c = a.getSize(),
13433          k = CKEDITOR.document.getWindow().getViewPaneSize(),
13434          q = b.data.$.screenX,
13435          n = b.data.$.screenY,
13436          r = q - e.x,
13437          l = n - e.y;
13438        e = { x: q, y: n };
13439        d.x += r;
13440        d.y += l;
13441        a.move(
13442          d.x + h[3] < g
13443            ? -h[3]
13444            : d.x - h[1] > k.width - c.width - g
13445              ? k.width - c.width + ("rtl" == f.lang.dir ? 0 : h[1])
13446              : d.x,
13447          d.y + h[0] < g
13448            ? -h[0]
13449            : d.y - h[2] > k.height - c.height - g ? k.height - c.height + h[2] : d.y,
13450          1,
13451        );
13452        b.data.preventDefault();
13453      }
13454      function c() {
13455        CKEDITOR.document.removeListener("mousemove", b);
13456        CKEDITOR.document.removeListener("mouseup", c);
13457        if (CKEDITOR.env.ie6Compat) {
13458          var a = u.getChild(0).getFrameDocument();
13459          a.removeListener("mousemove", b);
13460          a.removeListener("mouseup", c);
13461        }
13462      }
13463      var e = null,
13464        d = null,
13465        f = a.getParentEditor(),
13466        g = f.config.dialog_magnetDistance,
13467        h = CKEDITOR.skin.margins || [0, 0, 0, 0];
13468      "undefined" == typeof g && (g = 20);
13469      a.parts.title.on(
13470        "mousedown",
13471        function(g) {
13472          e = { x: g.data.$.screenX, y: g.data.$.screenY };
13473          CKEDITOR.document.on("mousemove", b);
13474          CKEDITOR.document.on("mouseup", c);
13475          d = a.getPosition();
13476          if (CKEDITOR.env.ie6Compat) {
13477            var f = u.getChild(0).getFrameDocument();
13478            f.on("mousemove", b);
13479            f.on("mouseup", c);
13480          }
13481          g.data.preventDefault();
13482        },
13483        a,
13484      );
13485    }
13486    function Z(a) {
13487      function b(b) {
13488        var c = "rtl" == f.lang.dir,
13489          n = k.width,
13490          q = k.height,
13491          G = n + (b.data.$.screenX - m.x) * (c ? -1 : 1) * (a._.moved ? 1 : 2),
13492          H = q + (b.data.$.screenY - m.y) * (a._.moved ? 1 : 2),
13493          B = a._.element.getFirst(),
13494          B = c && B.getComputedStyle("right"),
13495          C = a.getPosition();
13496        C.y + H > p.height && (H = p.height - C.y);
13497        (c ? B : C.x) + G > p.width && (G = p.width - (c ? B : C.x));
13498        if (d == CKEDITOR.DIALOG_RESIZE_WIDTH || d == CKEDITOR.DIALOG_RESIZE_BOTH)
13499          n = Math.max(e.minWidth || 0, G - g);
13500        if (d == CKEDITOR.DIALOG_RESIZE_HEIGHT || d == CKEDITOR.DIALOG_RESIZE_BOTH)
13501          q = Math.max(e.minHeight || 0, H - h);
13502        a.resize(n, q);
13503        a._.moved || a.layout();
13504        b.data.preventDefault();
13505      }
13506      function c() {
13507        CKEDITOR.document.removeListener("mouseup", c);
13508        CKEDITOR.document.removeListener("mousemove", b);
13509        q && (q.remove(), (q = null));
13510        if (CKEDITOR.env.ie6Compat) {
13511          var a = u.getChild(0).getFrameDocument();
13512          a.removeListener("mouseup", c);
13513          a.removeListener("mousemove", b);
13514        }
13515      }
13516      var e = a.definition,
13517        d = e.resizable;
13518      if (d != CKEDITOR.DIALOG_RESIZE_NONE) {
13519        var f = a.getParentEditor(),
13520          g,
13521          h,
13522          p,
13523          m,
13524          k,
13525          q,
13526          n = CKEDITOR.tools.addFunction(function(d) {
13527            k = a.getSize();
13528            var e = a.parts.contents;
13529            e.$.getElementsByTagName("iframe").length &&
13530              ((q = CKEDITOR.dom.element.createFromHtml(
13531                '\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%;"\x3e\x3c/div\x3e',
13532              )),
13533              e.append(q));
13534            h =
13535              k.height -
13536              a.parts.contents.getSize(
13537                "height",
13538                !(CKEDITOR.env.gecko || (CKEDITOR.env.ie && CKEDITOR.env.quirks)),
13539              );
13540            g = k.width - a.parts.contents.getSize("width", 1);
13541            m = { x: d.screenX, y: d.screenY };
13542            p = CKEDITOR.document.getWindow().getViewPaneSize();
13543            CKEDITOR.document.on("mousemove", b);
13544            CKEDITOR.document.on("mouseup", c);
13545            CKEDITOR.env.ie6Compat &&
13546              ((e = u.getChild(0).getFrameDocument()), e.on("mousemove", b), e.on("mouseup", c));
13547            d.preventDefault && d.preventDefault();
13548          });
13549        a.on("load", function() {
13550          var b = "";
13551          d == CKEDITOR.DIALOG_RESIZE_WIDTH
13552            ? (b = " cke_resizer_horizontal")
13553            : d == CKEDITOR.DIALOG_RESIZE_HEIGHT && (b = " cke_resizer_vertical");
13554          b = CKEDITOR.dom.element.createFromHtml(
13555            '\x3cdiv class\x3d"cke_resizer' +
13556              b +
13557              " cke_resizer_" +
13558              f.lang.dir +
13559              '" title\x3d"' +
13560              CKEDITOR.tools.htmlEncode(f.lang.common.resize) +
13561              '" onmousedown\x3d"CKEDITOR.tools.callFunction(' +
13562              n +
13563              ', event )"\x3e' +
13564              ("ltr" == f.lang.dir ? "◢" : "◣") +
13565              "\x3c/div\x3e",
13566          );
13567          a.parts.footer.append(b, 1);
13568        });
13569        f.on("destroy", function() {
13570          CKEDITOR.tools.removeFunction(n);
13571        });
13572      }
13573    }
13574    function I(a) {
13575      a.data.preventDefault(1);
13576    }
13577    function N(a) {
13578      var b = CKEDITOR.document.getWindow(),
13579        c = a.config,
13580        e = CKEDITOR.skinName || a.config.skin,
13581        d = c.dialog_backgroundCoverColor || ("moono-lisa" == e ? "black" : "white"),
13582        e = c.dialog_backgroundCoverOpacity,
13583        f = c.baseFloatZIndex,
13584        c = CKEDITOR.tools.genKey(d, e, f),
13585        g = z[c];
13586      g
13587        ? g.show()
13588        : ((f = [
13589            '\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',
13590            CKEDITOR.env.ie6Compat ? "absolute" : "fixed",
13591            "; z-index: ",
13592            f,
13593            "; top: 0px; left: 0px; ",
13594            CKEDITOR.env.ie6Compat ? "" : "background-color: " + d,
13595            '" class\x3d"cke_dialog_background_cover"\x3e',
13596          ]),
13597          CKEDITOR.env.ie6Compat &&
13598            ((d =
13599              "\x3chtml\x3e\x3cbody style\x3d\\'background-color:" +
13600              d +
13601              ";\\'\x3e\x3c/body\x3e\x3c/html\x3e"),
13602            f.push(
13603              '\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:',
13604            ),
13605            f.push(
13606              "void((function(){" +
13607                encodeURIComponent(
13608                  "document.open();(" +
13609                    CKEDITOR.tools.fixDomain +
13610                    ")();document.write( '" +
13611                    d +
13612                    "' );document.close();",
13613                ) +
13614                "})())",
13615            ),
13616            f.push(
13617              '" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e',
13618            )),
13619          f.push("\x3c/div\x3e"),
13620          (g = CKEDITOR.dom.element.createFromHtml(f.join(""))),
13621          g.setOpacity(void 0 !== e ? e : 0.5),
13622          g.on("keydown", I),
13623          g.on("keypress", I),
13624          g.on("keyup", I),
13625          g.appendTo(CKEDITOR.document.getBody()),
13626          (z[c] = g));
13627      a.focusManager.add(g);
13628      u = g;
13629      a = function() {
13630        var a = b.getViewPaneSize();
13631        g.setStyles({ width: a.width + "px", height: a.height + "px" });
13632      };
13633      var h = function() {
13634        var a = b.getScrollPosition(),
13635          c = CKEDITOR.dialog._.currentTop;
13636        g.setStyles({ left: a.x + "px", top: a.y + "px" });
13637        if (c) {
13638          do (a = c.getPosition()), c.move(a.x, a.y);
13639          while ((c = c._.parentDialog));
13640        }
13641      };
13642      J = a;
13643      b.on("resize", a);
13644      a();
13645      (CKEDITOR.env.mac && CKEDITOR.env.webkit) || g.focus();
13646      if (CKEDITOR.env.ie6Compat) {
13647        var p = function() {
13648          h();
13649          arguments.callee.prevScrollHandler.apply(this, arguments);
13650        };
13651        b.$.setTimeout(function() {
13652          p.prevScrollHandler = window.onscroll || function() {};
13653          window.onscroll = p;
13654        }, 0);
13655        h();
13656      }
13657    }
13658    function O(a) {
13659      u &&
13660        (a.focusManager.remove(u),
13661        (a = CKEDITOR.document.getWindow()),
13662        u.hide(),
13663        a.removeListener("resize", J),
13664        CKEDITOR.env.ie6Compat &&
13665          a.$.setTimeout(function() {
13666            window.onscroll = (window.onscroll && window.onscroll.prevScrollHandler) || null;
13667          }, 0),
13668        (J = null));
13669    }
13670    var v = CKEDITOR.tools.cssLength,
13671      W =
13672        '\x3cdiv class\x3d"cke_reset_all {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"dialog" aria-labelledby\x3d"cke_dialog_title_{id}"\x3e\x3ctable class\x3d"cke_dialog ' +
13673        CKEDITOR.env.cssClass +
13674        ' cke_{langDir}" style\x3d"position:absolute" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_dialog_body" role\x3d"presentation"\x3e\x3cdiv id\x3d"cke_dialog_title_{id}" class\x3d"cke_dialog_title" role\x3d"presentation"\x3e\x3c/div\x3e\x3ca id\x3d"cke_dialog_close_button_{id}" class\x3d"cke_dialog_close_button" href\x3d"javascript:void(0)" title\x3d"{closeTitle}" role\x3d"button"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e\x3cdiv id\x3d"cke_dialog_tabs_{id}" class\x3d"cke_dialog_tabs" role\x3d"tablist"\x3e\x3c/div\x3e\x3ctable class\x3d"cke_dialog_contents" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_contents_{id}" class\x3d"cke_dialog_contents_body" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_footer_{id}" class\x3d"cke_dialog_footer" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e';
13675    CKEDITOR.dialog = function(a, b) {
13676      function c() {
13677        var a = l._.focusList;
13678        a.sort(function(a, b) {
13679          return a.tabIndex != b.tabIndex ? b.tabIndex - a.tabIndex : a.focusIndex - b.focusIndex;
13680        });
13681        for (var b = a.length, c = 0; c < b; c++) a[c].focusIndex = c;
13682      }
13683      function e(a) {
13684        var b = l._.focusList;
13685        a = a || 0;
13686        if (!(1 > b.length)) {
13687          var c = l._.currentFocusIndex;
13688          l._.tabBarMode && 0 > a && (c = 0);
13689          try {
13690            b[c].getInputElement().$.blur();
13691          } catch (d) {}
13692          var e = c,
13693            g = 1 < l._.pageCount;
13694          do {
13695            e += a;
13696            if (g && !l._.tabBarMode && (e == b.length || -1 == e)) {
13697              l._.tabBarMode = !0;
13698              l._.tabs[l._.currentTabId][0].focus();
13699              l._.currentFocusIndex = -1;
13700              return;
13701            }
13702            e = (e + b.length) % b.length;
13703            if (e == c) break;
13704          } while (a && !b[e].isFocusable());
13705          b[e].focus();
13706          "text" == b[e].type && b[e].select();
13707        }
13708      }
13709      function d(b) {
13710        if (l == CKEDITOR.dialog._.currentTop) {
13711          var c = b.data.getKeystroke(),
13712            d = "rtl" == a.lang.dir,
13713            g = [37, 38, 39, 40];
13714          q = n = 0;
13715          if (9 == c || c == CKEDITOR.SHIFT + 9) e(c == CKEDITOR.SHIFT + 9 ? -1 : 1), (q = 1);
13716          else if (c == CKEDITOR.ALT + 121 && !l._.tabBarMode && 1 < l.getPageCount())
13717            (l._.tabBarMode = !0),
13718              l._.tabs[l._.currentTabId][0].focus(),
13719              (l._.currentFocusIndex = -1),
13720              (q = 1);
13721          else if (-1 != CKEDITOR.tools.indexOf(g, c) && l._.tabBarMode)
13722            (c = -1 != CKEDITOR.tools.indexOf([d ? 39 : 37, 38], c) ? x.call(l) : A.call(l)),
13723              l.selectPage(c),
13724              l._.tabs[c][0].focus(),
13725              (q = 1);
13726          else if ((13 != c && 32 != c) || !l._.tabBarMode)
13727            if (13 == c)
13728              (c = b.data.getTarget()),
13729                c.is("a", "button", "select", "textarea") ||
13730                  (c.is("input") && "button" == c.$.type) ||
13731                  ((c = this.getButton("ok")) && CKEDITOR.tools.setTimeout(c.click, 0, c), (q = 1)),
13732                (n = 1);
13733            else if (27 == c)
13734              (c = this.getButton("cancel"))
13735                ? CKEDITOR.tools.setTimeout(c.click, 0, c)
13736                : !1 !== this.fire("cancel", { hide: !0 }).hide && this.hide(),
13737                (n = 1);
13738            else return;
13739          else
13740            this.selectPage(this._.currentTabId),
13741              (this._.tabBarMode = !1),
13742              (this._.currentFocusIndex = -1),
13743              e(1),
13744              (q = 1);
13745          f(b);
13746        }
13747      }
13748      function f(a) {
13749        q ? a.data.preventDefault(1) : n && a.data.stopPropagation();
13750      }
13751      var g = CKEDITOR.dialog._.dialogDefinitions[b],
13752        h = CKEDITOR.tools.clone(aa),
13753        p = a.config.dialog_buttonsOrder || "OS",
13754        m = a.lang.dir,
13755        k = {},
13756        q,
13757        n;
13758      (("OS" == p && CKEDITOR.env.mac) ||
13759        ("rtl" == p && "ltr" == m) ||
13760        ("ltr" == p && "rtl" == m)) &&
13761        h.buttons.reverse();
13762      g = CKEDITOR.tools.extend(g(a), h);
13763      g = CKEDITOR.tools.clone(g);
13764      g = new P(this, g);
13765      h = V(a);
13766      this._ = {
13767        editor: a,
13768        element: h.element,
13769        name: b,
13770        contentSize: { width: 0, height: 0 },
13771        size: { width: 0, height: 0 },
13772        contents: {},
13773        buttons: {},
13774        accessKeyMap: {},
13775        tabs: {},
13776        tabIdList: [],
13777        currentTabId: null,
13778        currentTabIndex: null,
13779        pageCount: 0,
13780        lastTab: null,
13781        tabBarMode: !1,
13782        focusList: [],
13783        currentFocusIndex: 0,
13784        hasFocus: !1,
13785      };
13786      this.parts = h.parts;
13787      CKEDITOR.tools.setTimeout(
13788        function() {
13789          a.fire("ariaWidget", this.parts.contents);
13790        },
13791        0,
13792        this,
13793      );
13794      h = { position: CKEDITOR.env.ie6Compat ? "absolute" : "fixed", top: 0, visibility: "hidden" };
13795      h["rtl" == m ? "right" : "left"] = 0;
13796      this.parts.dialog.setStyles(h);
13797      CKEDITOR.event.call(this);
13798      this.definition = g = CKEDITOR.fire("dialogDefinition", { name: b, definition: g }, a)
13799        .definition;
13800      if (!("removeDialogTabs" in a._) && a.config.removeDialogTabs) {
13801        h = a.config.removeDialogTabs.split(";");
13802        for (m = 0; m < h.length; m++)
13803          if (((p = h[m].split(":")), 2 == p.length)) {
13804            var r = p[0];
13805            k[r] || (k[r] = []);
13806            k[r].push(p[1]);
13807          }
13808        a._.removeDialogTabs = k;
13809      }
13810      if (a._.removeDialogTabs && (k = a._.removeDialogTabs[b]))
13811        for (m = 0; m < k.length; m++) g.removeContents(k[m]);
13812      if (g.onLoad) this.on("load", g.onLoad);
13813      if (g.onShow) this.on("show", g.onShow);
13814      if (g.onHide) this.on("hide", g.onHide);
13815      if (g.onOk)
13816        this.on("ok", function(b) {
13817          a.fire("saveSnapshot");
13818          setTimeout(function() {
13819            a.fire("saveSnapshot");
13820          }, 0);
13821          !1 === g.onOk.call(this, b) && (b.data.hide = !1);
13822        });
13823      this.state = CKEDITOR.DIALOG_STATE_IDLE;
13824      if (g.onCancel)
13825        this.on("cancel", function(a) {
13826          !1 === g.onCancel.call(this, a) && (a.data.hide = !1);
13827        });
13828      var l = this,
13829        t = function(a) {
13830          var b = l._.contents,
13831            c = !1,
13832            d;
13833          for (d in b) for (var e in b[d]) if ((c = a.call(this, b[d][e]))) return;
13834        };
13835      this.on(
13836        "ok",
13837        function(a) {
13838          t(function(b) {
13839            if (b.validate) {
13840              var c = b.validate(this),
13841                d = "string" == typeof c || !1 === c;
13842              d && ((a.data.hide = !1), a.stop());
13843              T.call(b, !d, "string" == typeof c ? c : void 0);
13844              return d;
13845            }
13846          });
13847        },
13848        this,
13849        null,
13850        0,
13851      );
13852      this.on(
13853        "cancel",
13854        function(b) {
13855          t(function(c) {
13856            if (c.isChanged())
13857              return (
13858                a.config.dialog_noConfirmCancel ||
13859                  confirm(a.lang.common.confirmCancel) ||
13860                  (b.data.hide = !1),
13861                !0
13862              );
13863          });
13864        },
13865        this,
13866        null,
13867        0,
13868      );
13869      this.parts.close.on(
13870        "click",
13871        function(a) {
13872          !1 !== this.fire("cancel", { hide: !0 }).hide && this.hide();
13873          a.data.preventDefault();
13874        },
13875        this,
13876      );
13877      this.changeFocus = e;
13878      var y = this._.element;
13879      a.focusManager.add(y, 1);
13880      this.on("show", function() {
13881        y.on("keydown", d, this);
13882        if (CKEDITOR.env.gecko) y.on("keypress", f, this);
13883      });
13884      this.on("hide", function() {
13885        y.removeListener("keydown", d);
13886        CKEDITOR.env.gecko && y.removeListener("keypress", f);
13887        t(function(a) {
13888          U.apply(a);
13889        });
13890      });
13891      this.on("iframeAdded", function(a) {
13892        new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document).on(
13893          "keydown",
13894          d,
13895          this,
13896          null,
13897          0,
13898        );
13899      });
13900      this.on(
13901        "show",
13902        function() {
13903          c();
13904          var b = 1 < l._.pageCount;
13905          a.config.dialog_startupFocusTab && b
13906            ? ((l._.tabBarMode = !0),
13907              l._.tabs[l._.currentTabId][0].focus(),
13908              (l._.currentFocusIndex = -1))
13909            : this._.hasFocus ||
13910              ((this._.currentFocusIndex = b ? -1 : this._.focusList.length - 1),
13911              g.onFocus ? (b = g.onFocus.call(this)) && b.focus() : e(1));
13912        },
13913        this,
13914        null,
13915        4294967295,
13916      );
13917      if (CKEDITOR.env.ie6Compat)
13918        this.on(
13919          "load",
13920          function() {
13921            var a = this.getElement(),
13922              b = a.getFirst();
13923            b.remove();
13924            b.appendTo(a);
13925          },
13926          this,
13927        );
13928      Y(this);
13929      Z(this);
13930      new CKEDITOR.dom.text(g.title, CKEDITOR.document).appendTo(this.parts.title);
13931      for (m = 0; m < g.contents.length; m++) (k = g.contents[m]) && this.addPage(k);
13932      this.parts.tabs.on(
13933        "click",
13934        function(a) {
13935          var b = a.data.getTarget();
13936          b.hasClass("cke_dialog_tab") &&
13937            ((b = b.$.id),
13938            this.selectPage(b.substring(4, b.lastIndexOf("_"))),
13939            this._.tabBarMode && ((this._.tabBarMode = !1), (this._.currentFocusIndex = -1), e(1)),
13940            a.data.preventDefault());
13941        },
13942        this,
13943      );
13944      m = [];
13945      k = CKEDITOR.dialog._.uiElementBuilders.hbox
13946        .build(
13947          this,
13948          { type: "hbox", className: "cke_dialog_footer_buttons", widths: [], children: g.buttons },
13949          m,
13950        )
13951        .getChild();
13952      this.parts.footer.setHtml(m.join(""));
13953      for (m = 0; m < k.length; m++) this._.buttons[k[m].id] = k[m];
13954    };
13955    CKEDITOR.dialog.prototype = {
13956      destroy: function() {
13957        this.hide();
13958        this._.element.remove();
13959      },
13960      resize: (function() {
13961        return function(a, b) {
13962          (this._.contentSize && this._.contentSize.width == a && this._.contentSize.height == b) ||
13963            (CKEDITOR.dialog.fire("resize", { dialog: this, width: a, height: b }, this._.editor),
13964            this.fire("resize", { width: a, height: b }, this._.editor),
13965            this.parts.contents.setStyles({ width: a + "px", height: b + "px" }),
13966            "rtl" == this._.editor.lang.dir &&
13967              this._.position &&
13968              (this._.position.x =
13969                CKEDITOR.document.getWindow().getViewPaneSize().width -
13970                this._.contentSize.width -
13971                parseInt(this._.element.getFirst().getStyle("right"), 10)),
13972            (this._.contentSize = { width: a, height: b }));
13973        };
13974      })(),
13975      getSize: function() {
13976        var a = this._.element.getFirst();
13977        return { width: a.$.offsetWidth || 0, height: a.$.offsetHeight || 0 };
13978      },
13979      move: function(a, b, c) {
13980        var e = this._.element.getFirst(),
13981          d = "rtl" == this._.editor.lang.dir,
13982          f = "fixed" == e.getComputedStyle("position");
13983        CKEDITOR.env.ie && e.setStyle("zoom", "100%");
13984        (f && this._.position && this._.position.x == a && this._.position.y == b) ||
13985          ((this._.position = { x: a, y: b }),
13986          f || ((f = CKEDITOR.document.getWindow().getScrollPosition()), (a += f.x), (b += f.y)),
13987          d &&
13988            ((f = this.getSize()),
13989            (a = CKEDITOR.document.getWindow().getViewPaneSize().width - f.width - a)),
13990          (b = { top: (0 < b ? b : 0) + "px" }),
13991          (b[d ? "right" : "left"] = (0 < a ? a : 0) + "px"),
13992          e.setStyles(b),
13993          c && (this._.moved = 1));
13994      },
13995      getPosition: function() {
13996        return CKEDITOR.tools.extend({}, this._.position);
13997      },
13998      show: function() {
13999        var a = this._.element,
14000          b = this.definition;
14001        a.getParent() && a.getParent().equals(CKEDITOR.document.getBody())
14002          ? a.setStyle("display", "block")
14003          : a.appendTo(CKEDITOR.document.getBody());
14004        this.resize(
14005          (this._.contentSize && this._.contentSize.width) || b.width || b.minWidth,
14006          (this._.contentSize && this._.contentSize.height) || b.height || b.minHeight,
14007        );
14008        this.reset();
14009        null === this._.currentTabId && this.selectPage(this.definition.contents[0].id);
14010        null === CKEDITOR.dialog._.currentZIndex &&
14011          (CKEDITOR.dialog._.currentZIndex = this._.editor.config.baseFloatZIndex);
14012        this._.element.getFirst().setStyle("z-index", (CKEDITOR.dialog._.currentZIndex += 10));
14013        null === CKEDITOR.dialog._.currentTop
14014          ? ((CKEDITOR.dialog._.currentTop = this), (this._.parentDialog = null), N(this._.editor))
14015          : ((this._.parentDialog = CKEDITOR.dialog._.currentTop),
14016            (this._.parentDialog.getElement().getFirst().$.style.zIndex -= Math.floor(
14017              this._.editor.config.baseFloatZIndex / 2,
14018            )),
14019            (CKEDITOR.dialog._.currentTop = this));
14020        a.on("keydown", Q);
14021        a.on("keyup", R);
14022        this._.hasFocus = !1;
14023        for (var c in b.contents)
14024          if (b.contents[c]) {
14025            var a = b.contents[c],
14026              e = this._.tabs[a.id],
14027              d = a.requiredContent,
14028              f = 0;
14029            if (e) {
14030              for (var g in this._.contents[a.id]) {
14031                var h = this._.contents[a.id][g];
14032                "hbox" != h.type &&
14033                  "vbox" != h.type &&
14034                  h.getInputElement() &&
14035                  (h.requiredContent && !this._.editor.activeFilter.check(h.requiredContent)
14036                    ? h.disable()
14037                    : (h.enable(), f++));
14038              }
14039              !f || (d && !this._.editor.activeFilter.check(d))
14040                ? e[0].addClass("cke_dialog_tab_disabled")
14041                : e[0].removeClass("cke_dialog_tab_disabled");
14042            }
14043          }
14044        CKEDITOR.tools.setTimeout(
14045          function() {
14046            this.layout();
14047            X(this);
14048            this.parts.dialog.setStyle("visibility", "");
14049            this.fireOnce("load", {});
14050            CKEDITOR.ui.fire("ready", this);
14051            this.fire("show", {});
14052            this._.editor.fire("dialogShow", this);
14053            this._.parentDialog || this._.editor.focusManager.lock();
14054            this.foreach(function(a) {
14055              a.setInitValue && a.setInitValue();
14056            });
14057          },
14058          100,
14059          this,
14060        );
14061      },
14062      layout: function() {
14063        var a = this.parts.dialog,
14064          b = this.getSize(),
14065          c = CKEDITOR.document.getWindow().getViewPaneSize(),
14066          e = (c.width - b.width) / 2,
14067          d = (c.height - b.height) / 2;
14068        CKEDITOR.env.ie6Compat ||
14069          (b.height + (0 < d ? d : 0) > c.height || b.width + (0 < e ? e : 0) > c.width
14070            ? a.setStyle("position", "absolute")
14071            : a.setStyle("position", "fixed"));
14072        this.move(this._.moved ? this._.position.x : e, this._.moved ? this._.position.y : d);
14073      },
14074      foreach: function(a) {
14075        for (var b in this._.contents)
14076          for (var c in this._.contents[b]) a.call(this, this._.contents[b][c]);
14077        return this;
14078      },
14079      reset: (function() {
14080        var a = function(a) {
14081          a.reset && a.reset(1);
14082        };
14083        return function() {
14084          this.foreach(a);
14085          return this;
14086        };
14087      })(),
14088      setupContent: function() {
14089        var a = arguments;
14090        this.foreach(function(b) {
14091          b.setup && b.setup.apply(b, a);
14092        });
14093      },
14094      commitContent: function() {
14095        var a = arguments;
14096        this.foreach(function(b) {
14097          CKEDITOR.env.ie &&
14098            this._.currentFocusIndex == b.focusIndex &&
14099            b.getInputElement().$.blur();
14100          b.commit && b.commit.apply(b, a);
14101        });
14102      },
14103      hide: function() {
14104        if (this.parts.dialog.isVisible()) {
14105          this.fire("hide", {});
14106          this._.editor.fire("dialogHide", this);
14107          this.selectPage(this._.tabIdList[0]);
14108          var a = this._.element;
14109          a.setStyle("display", "none");
14110          this.parts.dialog.setStyle("visibility", "hidden");
14111          for (ba(this); CKEDITOR.dialog._.currentTop != this; )
14112            CKEDITOR.dialog._.currentTop.hide();
14113          if (this._.parentDialog) {
14114            var b = this._.parentDialog.getElement().getFirst();
14115            b.setStyle(
14116              "z-index",
14117              parseInt(b.$.style.zIndex, 10) + Math.floor(this._.editor.config.baseFloatZIndex / 2),
14118            );
14119          } else O(this._.editor);
14120          if ((CKEDITOR.dialog._.currentTop = this._.parentDialog))
14121            CKEDITOR.dialog._.currentZIndex -= 10;
14122          else {
14123            CKEDITOR.dialog._.currentZIndex = null;
14124            a.removeListener("keydown", Q);
14125            a.removeListener("keyup", R);
14126            var c = this._.editor;
14127            c.focus();
14128            setTimeout(function() {
14129              c.focusManager.unlock();
14130              CKEDITOR.env.iOS && c.window.focus();
14131            }, 0);
14132          }
14133          delete this._.parentDialog;
14134          this.foreach(function(a) {
14135            a.resetInitValue && a.resetInitValue();
14136          });
14137          this.setState(CKEDITOR.DIALOG_STATE_IDLE);
14138        }
14139      },
14140      addPage: function(a) {
14141        if (!a.requiredContent || this._.editor.filter.check(a.requiredContent)) {
14142          for (
14143            var b = [],
14144              c = a.label ? ' title\x3d"' + CKEDITOR.tools.htmlEncode(a.label) + '"' : "",
14145              e = CKEDITOR.dialog._.uiElementBuilders.vbox.build(
14146                this,
14147                {
14148                  type: "vbox",
14149                  className: "cke_dialog_page_contents",
14150                  children: a.elements,
14151                  expand: !!a.expand,
14152                  padding: a.padding,
14153                  style: a.style || "width: 100%;",
14154                },
14155                b,
14156              ),
14157              d = (this._.contents[a.id] = {}),
14158              f = e.getChild(),
14159              g = 0;
14160            (e = f.shift());
14161
14162          )
14163            e.notAllowed || "hbox" == e.type || "vbox" == e.type || g++,
14164              (d[e.id] = e),
14165              "function" == typeof e.getChild && f.push.apply(f, e.getChild());
14166          g || (a.hidden = !0);
14167          b = CKEDITOR.dom.element.createFromHtml(b.join(""));
14168          b.setAttribute("role", "tabpanel");
14169          e = CKEDITOR.env;
14170          d = "cke_" + a.id + "_" + CKEDITOR.tools.getNextNumber();
14171          c = CKEDITOR.dom.element.createFromHtml(
14172            [
14173              '\x3ca class\x3d"cke_dialog_tab"',
14174              0 < this._.pageCount ? " cke_last" : "cke_first",
14175              c,
14176              a.hidden ? ' style\x3d"display:none"' : "",
14177              ' id\x3d"',
14178              d,
14179              '"',
14180              e.gecko && !e.hc ? "" : ' href\x3d"javascript:void(0)"',
14181              ' tabIndex\x3d"-1" hidefocus\x3d"true" role\x3d"tab"\x3e',
14182              a.label,
14183              "\x3c/a\x3e",
14184            ].join(""),
14185          );
14186          b.setAttribute("aria-labelledby", d);
14187          this._.tabs[a.id] = [c, b];
14188          this._.tabIdList.push(a.id);
14189          !a.hidden && this._.pageCount++;
14190          this._.lastTab = c;
14191          this.updateStyle();
14192          b.setAttribute("name", a.id);
14193          b.appendTo(this.parts.contents);
14194          c.unselectable();
14195          this.parts.tabs.append(c);
14196          a.accessKey &&
14197            (S(this, this, "CTRL+" + a.accessKey, ca, da),
14198            (this._.accessKeyMap["CTRL+" + a.accessKey] = a.id));
14199        }
14200      },
14201      selectPage: function(a) {
14202        if (
14203          this._.currentTabId != a &&
14204          !this._.tabs[a][0].hasClass("cke_dialog_tab_disabled") &&
14205          !1 !== this.fire("selectPage", { page: a, currentPage: this._.currentTabId })
14206        ) {
14207          for (var b in this._.tabs) {
14208            var c = this._.tabs[b][0],
14209              e = this._.tabs[b][1];
14210            b != a && (c.removeClass("cke_dialog_tab_selected"), e.hide());
14211            e.setAttribute("aria-hidden", b != a);
14212          }
14213          var d = this._.tabs[a];
14214          d[0].addClass("cke_dialog_tab_selected");
14215          CKEDITOR.env.ie6Compat || CKEDITOR.env.ie7Compat
14216            ? (K(d[1]),
14217              d[1].show(),
14218              setTimeout(function() {
14219                K(d[1], 1);
14220              }, 0))
14221            : d[1].show();
14222          this._.currentTabId = a;
14223          this._.currentTabIndex = CKEDITOR.tools.indexOf(this._.tabIdList, a);
14224        }
14225      },
14226      updateStyle: function() {
14227        this.parts.dialog[(1 === this._.pageCount ? "add" : "remove") + "Class"]("cke_single_page");
14228      },
14229      hidePage: function(a) {
14230        var b = this._.tabs[a] && this._.tabs[a][0];
14231        b &&
14232          1 != this._.pageCount &&
14233          b.isVisible() &&
14234          (a == this._.currentTabId && this.selectPage(x.call(this)),
14235          b.hide(),
14236          this._.pageCount--,
14237          this.updateStyle());
14238      },
14239      showPage: function(a) {
14240        if ((a = this._.tabs[a] && this._.tabs[a][0]))
14241          a.show(), this._.pageCount++, this.updateStyle();
14242      },
14243      getElement: function() {
14244        return this._.element;
14245      },
14246      getName: function() {
14247        return this._.name;
14248      },
14249      getContentElement: function(a, b) {
14250        var c = this._.contents[a];
14251        return c && c[b];
14252      },
14253      getValueOf: function(a, b) {
14254        return this.getContentElement(a, b).getValue();
14255      },
14256      setValueOf: function(a, b, c) {
14257        return this.getContentElement(a, b).setValue(c);
14258      },
14259      getButton: function(a) {
14260        return this._.buttons[a];
14261      },
14262      click: function(a) {
14263        return this._.buttons[a].click();
14264      },
14265      disableButton: function(a) {
14266        return this._.buttons[a].disable();
14267      },
14268      enableButton: function(a) {
14269        return this._.buttons[a].enable();
14270      },
14271      getPageCount: function() {
14272        return this._.pageCount;
14273      },
14274      getParentEditor: function() {
14275        return this._.editor;
14276      },
14277      getSelectedElement: function() {
14278        return this.getParentEditor()
14279          .getSelection()
14280          .getSelectedElement();
14281      },
14282      addFocusable: function(a, b) {
14283        if ("undefined" == typeof b)
14284          (b = this._.focusList.length), this._.focusList.push(new L(this, a, b));
14285        else {
14286          this._.focusList.splice(b, 0, new L(this, a, b));
14287          for (var c = b + 1; c < this._.focusList.length; c++) this._.focusList[c].focusIndex++;
14288        }
14289      },
14290      setState: function(a) {
14291        if (this.state != a) {
14292          this.state = a;
14293          if (a == CKEDITOR.DIALOG_STATE_BUSY) {
14294            if (!this.parts.spinner) {
14295              var b = this.getParentEditor().lang.dir,
14296                c = {
14297                  attributes: { class: "cke_dialog_spinner" },
14298                  styles: { float: "rtl" == b ? "right" : "left" },
14299                };
14300              c.styles["margin-" + ("rtl" == b ? "left" : "right")] = "8px";
14301              this.parts.spinner = CKEDITOR.document.createElement("div", c);
14302              this.parts.spinner.setHtml("\x26#8987;");
14303              this.parts.spinner.appendTo(this.parts.title, 1);
14304            }
14305            this.parts.spinner.show();
14306            this.getButton("ok").disable();
14307          } else
14308            a == CKEDITOR.DIALOG_STATE_IDLE &&
14309              (this.parts.spinner && this.parts.spinner.hide(), this.getButton("ok").enable());
14310          this.fire("state", a);
14311        }
14312      },
14313    };
14314    CKEDITOR.tools.extend(CKEDITOR.dialog, {
14315      add: function(a, b) {
14316        (this._.dialogDefinitions[a] && "function" != typeof b) ||
14317          (this._.dialogDefinitions[a] = b);
14318      },
14319      exists: function(a) {
14320        return !!this._.dialogDefinitions[a];
14321      },
14322      getCurrent: function() {
14323        return CKEDITOR.dialog._.currentTop;
14324      },
14325      isTabEnabled: function(a, b, c) {
14326        a = a.config.removeDialogTabs;
14327        return !(a && a.match(new RegExp("(?:^|;)" + b + ":" + c + "(?:$|;)", "i")));
14328      },
14329      okButton: (function() {
14330        var a = function(a, c) {
14331          c = c || {};
14332          return CKEDITOR.tools.extend(
14333            {
14334              id: "ok",
14335              type: "button",
14336              label: a.lang.common.ok,
14337              class: "cke_dialog_ui_button_ok",
14338              onClick: function(a) {
14339                a = a.data.dialog;
14340                !1 !== a.fire("ok", { hide: !0 }).hide && a.hide();
14341              },
14342            },
14343            c,
14344            !0,
14345          );
14346        };
14347        a.type = "button";
14348        a.override = function(b) {
14349          return CKEDITOR.tools.extend(
14350            function(c) {
14351              return a(c, b);
14352            },
14353            { type: "button" },
14354            !0,
14355          );
14356        };
14357        return a;
14358      })(),
14359      cancelButton: (function() {
14360        var a = function(a, c) {
14361          c = c || {};
14362          return CKEDITOR.tools.extend(
14363            {
14364              id: "cancel",
14365              type: "button",
14366              label: a.lang.common.cancel,
14367              class: "cke_dialog_ui_button_cancel",
14368              onClick: function(a) {
14369                a = a.data.dialog;
14370                !1 !== a.fire("cancel", { hide: !0 }).hide && a.hide();
14371              },
14372            },
14373            c,
14374            !0,
14375          );
14376        };
14377        a.type = "button";
14378        a.override = function(b) {
14379          return CKEDITOR.tools.extend(
14380            function(c) {
14381              return a(c, b);
14382            },
14383            { type: "button" },
14384            !0,
14385          );
14386        };
14387        return a;
14388      })(),
14389      addUIElement: function(a, b) {
14390        this._.uiElementBuilders[a] = b;
14391      },
14392    });
14393    CKEDITOR.dialog._ = {
14394      uiElementBuilders: {},
14395      dialogDefinitions: {},
14396      currentTop: null,
14397      currentZIndex: null,
14398    };
14399    CKEDITOR.event.implementOn(CKEDITOR.dialog);
14400    CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype);
14401    var aa = {
14402        resizable: CKEDITOR.DIALOG_RESIZE_BOTH,
14403        minWidth: 600,
14404        minHeight: 400,
14405        buttons: [CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton],
14406      },
14407      D = function(a, b, c) {
14408        for (var e = 0, d; (d = a[e]); e++)
14409          if (d.id == b || (c && d[c] && (d = D(d[c], b, c)))) return d;
14410        return null;
14411      },
14412      E = function(a, b, c, e, d) {
14413        if (c) {
14414          for (var f = 0, g; (g = a[f]); f++) {
14415            if (g.id == c) return a.splice(f, 0, b), b;
14416            if (e && g[e] && (g = E(g[e], b, c, e, !0))) return g;
14417          }
14418          if (d) return null;
14419        }
14420        a.push(b);
14421        return b;
14422      },
14423      F = function(a, b, c) {
14424        for (var e = 0, d; (d = a[e]); e++) {
14425          if (d.id == b) return a.splice(e, 1);
14426          if (c && d[c] && (d = F(d[c], b, c))) return d;
14427        }
14428        return null;
14429      },
14430      P = function(a, b) {
14431        this.dialog = a;
14432        for (var c = b.contents, e = 0, d; (d = c[e]); e++) c[e] = d && new M(a, d);
14433        CKEDITOR.tools.extend(this, b);
14434      };
14435    P.prototype = {
14436      getContents: function(a) {
14437        return D(this.contents, a);
14438      },
14439      getButton: function(a) {
14440        return D(this.buttons, a);
14441      },
14442      addContents: function(a, b) {
14443        return E(this.contents, a, b);
14444      },
14445      addButton: function(a, b) {
14446        return E(this.buttons, a, b);
14447      },
14448      removeContents: function(a) {
14449        F(this.contents, a);
14450      },
14451      removeButton: function(a) {
14452        F(this.buttons, a);
14453      },
14454    };
14455    M.prototype = {
14456      get: function(a) {
14457        return D(this.elements, a, "children");
14458      },
14459      add: function(a, b) {
14460        return E(this.elements, a, b, "children");
14461      },
14462      remove: function(a) {
14463        F(this.elements, a, "children");
14464      },
14465    };
14466    var J,
14467      z = {},
14468      u,
14469      w = {},
14470      Q = function(a) {
14471        var b = a.data.$.ctrlKey || a.data.$.metaKey,
14472          c = a.data.$.altKey,
14473          e = a.data.$.shiftKey,
14474          d = String.fromCharCode(a.data.$.keyCode);
14475        (b = w[(b ? "CTRL+" : "") + (c ? "ALT+" : "") + (e ? "SHIFT+" : "") + d]) &&
14476          b.length &&
14477          ((b = b[b.length - 1]),
14478          b.keydown && b.keydown.call(b.uiElement, b.dialog, b.key),
14479          a.data.preventDefault());
14480      },
14481      R = function(a) {
14482        var b = a.data.$.ctrlKey || a.data.$.metaKey,
14483          c = a.data.$.altKey,
14484          e = a.data.$.shiftKey,
14485          d = String.fromCharCode(a.data.$.keyCode);
14486        (b = w[(b ? "CTRL+" : "") + (c ? "ALT+" : "") + (e ? "SHIFT+" : "") + d]) &&
14487          b.length &&
14488          ((b = b[b.length - 1]),
14489          b.keyup && (b.keyup.call(b.uiElement, b.dialog, b.key), a.data.preventDefault()));
14490      },
14491      S = function(a, b, c, e, d) {
14492        (w[c] || (w[c] = [])).push({
14493          uiElement: a,
14494          dialog: b,
14495          key: c,
14496          keyup: d || a.accessKeyUp,
14497          keydown: e || a.accessKeyDown,
14498        });
14499      },
14500      ba = function(a) {
14501        for (var b in w) {
14502          for (var c = w[b], e = c.length - 1; 0 <= e; e--)
14503            (c[e].dialog != a && c[e].uiElement != a) || c.splice(e, 1);
14504          0 === c.length && delete w[b];
14505        }
14506      },
14507      da = function(a, b) {
14508        a._.accessKeyMap[b] && a.selectPage(a._.accessKeyMap[b]);
14509      },
14510      ca = function() {};
14511    (function() {
14512      CKEDITOR.ui.dialog = {
14513        uiElement: function(a, b, c, e, d, f, g) {
14514          if (!(4 > arguments.length)) {
14515            var h = (e.call ? e(b) : e) || "div",
14516              p = ["\x3c", h, " "],
14517              m = (d && d.call ? d(b) : d) || {},
14518              k = (f && f.call ? f(b) : f) || {},
14519              q = (g && g.call ? g.call(this, a, b) : g) || "",
14520              n = (this.domId = k.id || CKEDITOR.tools.getNextId() + "_uiElement");
14521            b.requiredContent &&
14522              !a.getParentEditor().filter.check(b.requiredContent) &&
14523              ((m.display = "none"), (this.notAllowed = !0));
14524            k.id = n;
14525            var r = {};
14526            b.type && (r["cke_dialog_ui_" + b.type] = 1);
14527            b.className && (r[b.className] = 1);
14528            b.disabled && (r.cke_disabled = 1);
14529            for (
14530              var l = k["class"] && k["class"].split ? k["class"].split(" ") : [], n = 0;
14531              n < l.length;
14532              n++
14533            )
14534              l[n] && (r[l[n]] = 1);
14535            l = [];
14536            for (n in r) l.push(n);
14537            k["class"] = l.join(" ");
14538            b.title && (k.title = b.title);
14539            r = (b.style || "").split(";");
14540            b.align &&
14541              ((l = b.align),
14542              (m["margin-left"] = "left" == l ? 0 : "auto"),
14543              (m["margin-right"] = "right" == l ? 0 : "auto"));
14544            for (n in m) r.p
14544ush(n + ":" + m[n]);
14545            b.hidden && r.push("display:none");
14546            for (n = r.length - 1; 0 <= n; n--) "" === r[n] && r.splice(n, 1);
14547            0 < r.length && (k.style = (k.style ? k.style + "; " : "") + r.join("; "));
14548            for (n in k) p.push(n + '\x3d"' + CKEDITOR.tools.htmlEncode(k[n]) + '" ');
14549            p.push("\x3e", q, "\x3c/", h, "\x3e");
14550            c.push(p.join(""));
14551            (this._ || (this._ = {})).dialog = a;
14552            "boolean" == typeof b.isChanged &&
14553              (this.isChanged = function() {
14554                return b.isChanged;
14555              });
14556            "function" == typeof b.isChanged && (this.isChanged = b.isChanged);
14557            "function" == typeof b.setValue &&
14558              (this.setValue = CKEDITOR.tools.override(this.setValue, function(a) {
14559                return function(c) {
14560                  a.call(this, b.setValue.call(this, c));
14561                };
14562              }));
14563            "function" == typeof b.getValue &&
14564              (this.getValue = CKEDITOR.tools.override(this.getValue, function(a) {
14565                return function() {
14566                  return b.getValue.call(this, a.call(this));
14567                };
14568              }));
14569            CKEDITOR.event.implementOn(this);
14570            this.registerEvents(b);
14571            this.accessKeyUp &&
14572              this.accessKeyDown &&
14573              b.accessKey &&
14574              S(this, a, "CTRL+" + b.accessKey);
14575            var t = this;
14576            a.on("load", function() {
14577              var b = t.getInputElement();
14578              if (b) {
14579                var c =
14580                  t.type in { checkbox: 1, ratio: 1 } && CKEDITOR.env.ie && 8 > CKEDITOR.env.version
14581                    ? "cke_dialog_ui_focused"
14582                    : "";
14583                b.on("focus", function() {
14584                  a._.tabBarMode = !1;
14585                  a._.hasFocus = !0;
14586                  t.fire("focus");
14587                  c && this.addClass(c);
14588                });
14589                b.on("blur", function() {
14590                  t.fire("blur");
14591                  c && this.removeClass(c);
14592                });
14593              }
14594            });
14595            CKEDITOR.tools.extend(this, b);
14596            this.keyboardFocusable &&
14597              ((this.tabIndex = b.tabIndex || 0),
14598              (this.focusIndex = a._.focusList.push(this) - 1),
14599              this.on("focus", function() {
14600                a._.currentFocusIndex = t.focusIndex;
14601              }));
14602          }
14603        },
14604        hbox: function(a, b, c, e, d) {
14605          if (!(4 > arguments.length)) {
14606            this._ || (this._ = {});
14607            var f = (this._.children = b),
14608              g = (d && d.widths) || null,
14609              h = (d && d.height) || null,
14610              p,
14611              m = { role: "presentation" };
14612            d && d.align && (m.align = d.align);
14613            CKEDITOR.ui.dialog.uiElement.call(
14614              this,
14615              a,
14616              d || { type: "hbox" },
14617              e,
14618              "table",
14619              {},
14620              m,
14621              function() {
14622                var a = ['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];
14623                for (p = 0; p < c.length; p++) {
14624                  var b = "cke_dialog_ui_hbox_child",
14625                    e = [];
14626                  0 === p && (b = "cke_dialog_ui_hbox_first");
14627                  p == c.length - 1 && (b = "cke_dialog_ui_hbox_last");
14628                  a.push('\x3ctd class\x3d"', b, '" role\x3d"presentation" ');
14629                  g
14630                    ? g[p] && e.push("width:" + v(g[p]))
14631                    : e.push("width:" + Math.floor(100 / c.length) + "%");
14632                  h && e.push("height:" + v(h));
14633                  d && void 0 !== d.padding && e.push("padding:" + v(d.padding));
14634                  CKEDITOR.env.ie &&
14635                    CKEDITOR.env.quirks &&
14636                    f[p].align &&
14637                    e.push("text-align:" + f[p].align);
14638                  0 < e.length && a.push('style\x3d"' + e.join("; ") + '" ');
14639                  a.push("\x3e", c[p], "\x3c/td\x3e");
14640                }
14641                a.push("\x3c/tr\x3e\x3c/tbody\x3e");
14642                return a.join("");
14643              },
14644            );
14645          }
14646        },
14647        vbox: function(a, b, c, e, d) {
14648          if (!(3 > arguments.length)) {
14649            this._ || (this._ = {});
14650            var f = (this._.children = b),
14651              g = (d && d.width) || null,
14652              h = (d && d.heights) || null;
14653            CKEDITOR.ui.dialog.uiElement.call(
14654              this,
14655              a,
14656              d || { type: "vbox" },
14657              e,
14658              "div",
14659              null,
14660              { role: "presentation" },
14661              function() {
14662                var b = ['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];
14663                b.push('style\x3d"');
14664                d && d.expand && b.push("height:100%;");
14665                b.push("width:" + v(g || "100%"), ";");
14666                CKEDITOR.env.webkit && b.push("float:none;");
14667                b.push('"');
14668                b.push(
14669                  'align\x3d"',
14670                  CKEDITOR.tools.htmlEncode(
14671                    (d && d.align) || ("ltr" == a.getParentEditor().lang.dir ? "left" : "right"),
14672                  ),
14673                  '" ',
14674                );
14675                b.push("\x3e\x3ctbody\x3e");
14676                for (var e = 0; e < c.length; e++) {
14677                  var k = [];
14678                  b.push('\x3ctr\x3e\x3ctd role\x3d"presentation" ');
14679                  g && k.push("width:" + v(g || "100%"));
14680                  h
14681                    ? k.push("height:" + v(h[e]))
14682                    : d && d.expand && k.push("height:" + Math.floor(100 / c.length) + "%");
14683                  d && void 0 !== d.padding && k.push("padding:" + v(d.padding));
14684                  CKEDITOR.env.ie &&
14685                    CKEDITOR.env.quirks &&
14686                    f[e].align &&
14687                    k.push("text-align:" + f[e].align);
14688                  0 < k.length && b.push('style\x3d"', k.join("; "), '" ');
14689                  b.push(
14690                    ' class\x3d"cke_dialog_ui_vbox_child"\x3e',
14691                    c[e],
14692                    "\x3c/td\x3e\x3c/tr\x3e",
14693                  );
14694                }
14695                b.push("\x3c/tbody\x3e\x3c/table\x3e");
14696                return b.join("");
14697              },
14698            );
14699          }
14700        },
14701      };
14702    })();
14703    CKEDITOR.ui.dialog.uiElement.prototype = {
14704      getElement: function() {
14705        return CKEDITOR.document.getById(this.domId);
14706      },
14707      getInputElement: function() {
14708        return this.getElement();
14709      },
14710      getDialog: function() {
14711        return this._.dialog;
14712      },
14713      setValue: function(a, b) {
14714        this.getInputElement().setValue(a);
14715        !b && this.fire("change", { value: a });
14716        return this;
14717      },
14718      getValue: function() {
14719        return this.getInputElement().getValue();
14720      },
14721      isChanged: function() {
14722        return !1;
14723      },
14724      selectParentTab: function() {
14725        for (
14726          var a = this.getInputElement();
14727          (a = a.getParent()) && -1 == a.$.className.search("cke_dialog_page_contents");
14728
14729        );
14730        if (!a) return this;
14731        a = a.getAttribute("name");
14732        this._.dialog._.currentTabId != a && this._.dialog.selectPage(a);
14733        return this;
14734      },
14735      focus: function() {
14736        this.selectParentTab()
14737          .getInputElement()
14738          .focus();
14739        return this;
14740      },
14741      registerEvents: function(a) {
14742        var b = /^on([A-Z]\w+)/,
14743          c,
14744          e = function(a, b, c, d) {
14745            b.on("load", function() {
14746              a.getInputElement().on(c, d, a);
14747            });
14748          },
14749          d;
14750        for (d in a)
14751          if ((c = d.match(b)))
14752            this.eventProcessors[d]
14753              ? this.eventProcessors[d].call(this, this._.dialog, a[d])
14754              : e(this, this._.dialog, c[1].toLowerCase(), a[d]);
14755        return this;
14756      },
14757      eventProcessors: {
14758        onLoad: function(a, b) {
14759          a.on("load", b, this);
14760        },
14761        onShow: function(a, b) {
14762          a.on("show", b, this);
14763        },
14764        onHide: function(a, b) {
14765          a.on("hide", b, this);
14766        },
14767      },
14768      accessKeyDown: function() {
14769        this.focus();
14770      },
14771      accessKeyUp: function() {},
14772      disable: function() {
14773        var a = this.getElement();
14774        this.getInputElement().setAttribute("disabled", "true");
14775        a.addClass("cke_disabled");
14776      },
14777      enable: function() {
14778        var a = this.getElement();
14779        this.getInputElement().removeAttribute("disabled");
14780        a.removeClass("cke_disabled");
14781      },
14782      isEnabled: function() {
14783        return !this.getElement().hasClass("cke_disabled");
14784      },
14785      isVisible: function() {
14786        return this.getInputElement().isVisible();
14787      },
14788      isFocusable: function() {
14789        return this.isEnabled() && this.isVisible() ? !0 : !1;
14790      },
14791    };
14792    CKEDITOR.ui.dialog.hbox.prototype = CKEDITOR.tools.extend(
14793      new CKEDITOR.ui.dialog.uiElement(),
14794      {
14795        getChild: function(a) {
14796          if (1 > arguments.length) return this._.children.concat();
14797          a.splice || (a = [a]);
14798          return 2 > a.length
14799            ? this._.children[a[0]]
14800            : this._.children[a[0]] && this._.children[a[0]].getChild
14801              ? this._.children[a[0]].getChild(a.slice(1, a.length))
14802              : null;
14803        },
14804      },
14805      !0,
14806    );
14807    CKEDITOR.ui.dialog.vbox.prototype = new CKEDITOR.ui.dialog.hbox();
14808    (function() {
14809      var a = {
14810        build: function(a, c, e) {
14811          for (var d = c.children, f, g = [], h = [], p = 0; p < d.length && (f = d[p]); p++) {
14812            var m = [];
14813            g.push(m);
14814            h.push(CKEDITOR.dialog._.uiElementBuilders[f.type].build(a, f, m));
14815          }
14816          return new CKEDITOR.ui.dialog[c.type](a, h, g, e, c);
14817        },
14818      };
14819      CKEDITOR.dialog.addUIElement("hbox", a);
14820      CKEDITOR.dialog.addUIElement("vbox", a);
14821    })();
14822    CKEDITOR.dialogCommand = function(a, b) {
14823      this.dialogName = a;
14824      CKEDITOR.tools.extend(this, b, !0);
14825    };
14826    CKEDITOR.dialogCommand.prototype = {
14827      exec: function(a) {
14828        var b = this.tabId;
14829        a.openDialog(this.dialogName, function(a) {
14830          b && a.selectPage(b);
14831        });
14832      },
14833      canUndo: !1,
14834      editorFocus: 1,
14835    };
14836    (function() {
14837      var a = /^([a]|[^a])+$/,
14838        b = /^\d*$/,
14839        c = /^\d*(?:\.\d+)?$/,
14840        e = /^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,
14841        d = /^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,
14842        f = /^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/;
14843      CKEDITOR.VALIDATE_OR = 1;
14844      CKEDITOR.VALIDATE_AND = 2;
14845      CKEDITOR.dialog.validate = {
14846        functions: function() {
14847          var a = arguments;
14848          return function() {
14849            var b = this && this.getValue ? this.getValue() : a[0],
14850              c,
14851              d = CKEDITOR.VALIDATE_AND,
14852              e = [],
14853              f;
14854            for (f = 0; f < a.length; f++)
14855              if ("function" == typeof a[f]) e.push(a[f]);
14856              else break;
14857            f < a.length && "string" == typeof a[f] && ((c = a[f]), f++);
14858            f < a.length && "number" == typeof a[f] && (d = a[f]);
14859            var n = d == CKEDITOR.VALIDATE_AND ? !0 : !1;
14860            for (f = 0; f < e.length; f++)
14861              n = d == CKEDITOR.VALIDATE_AND ? n && e[f](b) : n || e[f](b);
14862            return n ? !0 : c;
14863          };
14864        },
14865        regex: function(a, b) {
14866          return function(c) {
14867            c = this && this.getValue ? this.getValue() : c;
14868            return a.test(c) ? !0 : b;
14869          };
14870        },
14871        notEmpty: function(b) {
14872          return this.regex(a, b);
14873        },
14874        integer: function(a) {
14875          return this.regex(b, a);
14876        },
14877        number: function(a) {
14878          return this.regex(c, a);
14879        },
14880        cssLength: function(a) {
14881          return this.functions(function(a) {
14882            return d.test(CKEDITOR.tools.trim(a));
14883          }, a);
14884        },
14885        htmlLength: function(a) {
14886          return this.functions(function(a) {
14887            return e.test(CKEDITOR.tools.trim(a));
14888          }, a);
14889        },
14890        inlineStyle: function(a) {
14891          return this.functions(function(a) {
14892            return f.test(CKEDITOR.tools.trim(a));
14893          }, a);
14894        },
14895        equals: function(a, b) {
14896          return this.functions(function(b) {
14897            return b == a;
14898          }, b);
14899        },
14900        notEqual: function(a, b) {
14901          return this.functions(function(b) {
14902            return b != a;
14903          }, b);
14904        },
14905      };
14906      CKEDITOR.on("instanceDestroyed", function(a) {
14907        if (CKEDITOR.tools.isEmpty(CKEDITOR.instances)) {
14908          for (var b; (b = CKEDITOR.dialog._.currentTop); ) b.hide();
14909          for (var c in z) z[c].remove();
14910          z = {};
14911        }
14912        a = a.editor._.storedDialogs;
14913        for (var d in a) a[d].destroy();
14914      });
14915    })();
14916    CKEDITOR.tools.extend(CKEDITOR.editor.prototype, {
14917      openDialog: function(a, b) {
14918        var c = null,
14919          e = CKEDITOR.dialog._.dialogDefinitions[a];
14920        null === CKEDITOR.dialog._.currentTop && N(this);
14921        if ("function" == typeof e)
14922          (c = this._.storedDialogs || (this._.storedDialogs = {})),
14923            (c = c[a] || (c[a] = new CKEDITOR.dialog(this, a))),
14924            b && b.call(c, c),
14925            c.show();
14926        else {
14927          if ("failed" == e)
14928            throw (O(this),
14929            Error(
14930              '[CKEDITOR.dialog.openDialog] Dialog "' + a + '" failed when loading definition.',
14931            ));
14932          "string" == typeof e &&
14933            CKEDITOR.scriptLoader.load(
14934              CKEDITOR.getUrl(e),
14935              function() {
14936                "function" != typeof CKEDITOR.dialog._.dialogDefinitions[a] &&
14937                  (CKEDITOR.dialog._.dialogDefinitions[a] = "failed");
14938                this.openDialog(a, b);
14939              },
14940              this,
14941              0,
14942              1,
14943            );
14944        }
14945        CKEDITOR.skin.loadPart("dialog");
14946        return c;
14947      },
14948    });
14949  })();
14950  CKEDITOR.plugins.add("dialog", {
14951    requires: "dialogui",
14952    init: function(x) {
14953      x.on(
14954        "doubleclick",
14955        function(A) {
14956          A.data.dialog && x.openDialog(A.data.dialog);
14957        },
14958        null,
14959        null,
14960        999,
14961      );
14962    },
14963  });
14964  CKEDITOR.plugins.add("about", {
14965    requires: "dialog",
14966    init: function(a) {
14967      var b = a.addCommand("about", new CKEDITOR.dialogCommand("about"));
14968      b.modes = { wysiwyg: 1, source: 1 };
14969      b.canUndo = !1;
14970      b.readOnly = 1;
14971      a.ui.addButton &&
14972        a.ui.addButton("About", {
14973          label: a.lang.about.dlgTitle,
14974          command: "about",
14975          toolbar: "about",
14976        });
14977      CKEDITOR.dialog.add("about", this.path + "dialogs/about.js");
14978    },
14979  });
14980  (function() {
14981    CKEDITOR.plugins.add("a11yhelp", {
14982      requires: "dialog",
14983      availableLangs: {
14984        af: 1,
14985        ar: 1,
14986        az: 1,
14987        bg: 1,
14988        ca: 1,
14989        cs: 1,
14990        cy: 1,
14991        da: 1,
14992        de: 1,
14993        "de-ch": 1,
14994        el: 1,
14995        en: 1,
14996        "en-au": 1,
14997        "en-gb": 1,
14998        eo: 1,
14999        es: 1,
15000        "es-mx": 1,
15001        et: 1,
15002        eu: 1,
15003        fa: 1,
15004        fi: 1,
15005        fo: 1,
15006        fr: 1,
15007        "fr-ca": 1,
15008        gl: 1,
15009        gu: 1,
15010        he: 1,
15011        hi: 1,
15012        hr: 1,
15013        hu: 1,
15014        id: 1,
15015        it: 1,
15016        ja: 1,
15017        km: 1,
15018        ko: 1,
15019        ku: 1,
15020        lt: 1,
15021        lv: 1,
15022        mk: 1,
15023        mn: 1,
15024        nb: 1,
15025        nl: 1,
15026        no: 1,
15027        oc: 1,
15028        pl: 1,
15029        pt: 1,
15030        "pt-br": 1,
15031        ro: 1,
15032        ru: 1,
15033        si: 1,
15034        sk: 1,
15035        sl: 1,
15036        sq: 1,
15037        sr: 1,
15038        "sr-latn": 1,
15039        sv: 1,
15040        th: 1,
15041        tr: 1,
15042        tt: 1,
15043        ug: 1,
15044        uk: 1,
15045        vi: 1,
15046        zh: 1,
15047        "zh-cn": 1,
15048      },
15049      init: function(b) {
15050        var c = this;
15051        b.addCommand("a11yHelp", {
15052          exec: function() {
15053            var a = b.langCode,
15054              a = c.availableLangs[a]
15055                ? a
15056                : c.availableLangs[a.replace(/-.*/, "")] ? a.replace(/-.*/, "") : "en";
15057            CKEDITOR.scriptLoader.load(
15058              CKEDITOR.getUrl(c.path + "dialogs/lang/" + a + ".js"),
15059              function() {
15060                b.lang.a11yhelp = c.langEntries[a];
15061                b.openDialog("a11yHelp");
15062              },
15063            );
15064          },
15065          modes: { wysiwyg: 1, source: 1 },
15066          readOnly: 1,
15067          canUndo: !1,
15068        });
15069        b.setKeystroke(CKEDITOR.ALT + 48, "a11yHelp");
15070        CKEDITOR.dialog.add("a11yHelp", this.path + "dialogs/a11yhelp.js");
15071        b.on("ariaEditorHelpLabel", function(a) {
15072          a.data.label = b.lang.common.editorHelp;
15073        });
15074      },
15075    });
15076  })();
15077  (function() {
15078    function f(c) {
15079      var a = this.att;
15080      c = (c && c.hasAttribute(a) && c.getAttribute(a)) || "";
15081      void 0 !== c && this.setValue(c);
15082    }
15083    function g() {
15084      for (var c, a = 0; a < arguments.length; a++)
15085        if (arguments[a] instanceof CKEDITOR.dom.element) {
15086          c = arguments[a];
15087          break;
15088        }
15089      if (c) {
15090        var a = this.att,
15091          b = this.getValue();
15092        b ? c.setAttribute(a, b) : c.removeAttribute(a, b);
15093      }
15094    }
15095    var k = { id: 1, dir: 1, classes: 1, styles: 1 };
15096    CKEDITOR.plugins.add("dialogadvtab", {
15097      requires: "dialog",
15098      allowedContent: function(c) {
15099        c || (c = k);
15100        var a = [];
15101        c.id && a.push("id");
15102        c.dir && a.push("dir");
15103        var b = "";
15104        a.length && (b += "[" + a.join(",") + "]");
15105        c.classes && (b += "(*)");
15106        c.styles && (b += "{*}");
15107        return b;
15108      },
15109      createAdvancedTab: function(c, a, b) {
15110        a || (a = k);
15111        var d = c.lang.common,
15112          h = {
15113            id: "advanced",
15114            label: d.advancedTab,
15115            title: d.advancedTab,
15116            elements: [{ type: "vbox", padding: 1, children: [] }],
15117          },
15118          e = [];
15119        if (a.id || a.dir)
15120          a.id &&
15121            e.push({
15122              id: "advId",
15123              att: "id",
15124              type: "text",
15125              requiredContent: b ? b + "[id]" : null,
15126              label: d.id,
15127              setup: f,
15128              commit: g,
15129            }),
15130            a.dir &&
15131              e.push({
15132                id: "advLangDir",
15133                att: "dir",
15134                type: "select",
15135                requiredContent: b ? b + "[dir]" : null,
15136                label: d.langDir,
15137                default: "",
15138                style: "width:100%",
15139                items: [[d.notSet, ""], [d.langDirLTR, "ltr"], [d.langDirRTL, "rtl"]],
15140                setup: f,
15141                commit: g,
15142              }),
15143            h.elements[0].children.push({
15144              type: "hbox",
15145              widths: ["50%", "50%"],
15146              children: [].concat(e),
15147            });
15148        if (a.styles || a.classes)
15149          (e = []),
15150            a.styles &&
15151              e.push({
15152                id: "advStyles",
15153                att: "style",
15154                type: "text",
15155                requiredContent: b ? b + "{cke-xyz}" : null,
15156                label: d.styles,
15157                default: "",
15158                validate: CKEDITOR.dialog.validate.inlineStyle(d.invalidInlineStyle),
15159                onChange: function() {},
15160                getStyle: function(a, c) {
15161                  var b = this.getValue().match(
15162                    new RegExp("(?:^|;)\\s*" + a + "\\s*:\\s*([^;]*)", "i"),
15163                  );
15164                  return b ? b[1] : c;
15165                },
15166                updateStyle: function(a, b) {
15167                  var d = this.getValue(),
15168                    e = c.document.createElement("span");
15169                  e.setAttribute("style", d);
15170                  e.setStyle(a, b);
15171                  d = CKEDITOR.tools.normalizeCssText(e.getAttribute("style"));
15172                  this.setValue(d, 1);
15173                },
15174                setup: f,
15175                commit: g,
15176              }),
15177            a.classes &&
15178              e.push({
15179                type: "hbox",
15180                widths: ["45%", "55%"],
15181                children: [
15182                  {
15183                    id: "advCSSClasses",
15184                    att: "class",
15185                    type: "text",
15186                    requiredContent: b ? b + "(cke-xyz)" : null,
15187                    label: d.cssClasses,
15188                    default: "",
15189                    setup: f,
15190                    commit: g,
15191                  },
15192                ],
15193              }),
15194            h.elements[0].children.push({
15195              type: "hbox",
15196              widths: ["50%", "50%"],
15197              children: [].concat(e),
15198            });
15199        return h;
15200      },
15201    });
15202  })();
15203  CKEDITOR.plugins.add("basicstyles", {
15204    init: function(c) {
15205      var e = 0,
15206        d = function(g, d, b, a) {
15207          if (a) {
15208            a = new CKEDITOR.style(a);
15209            var f = h[b];
15210            f.unshift(a);
15211            c.attachStyleStateChange(a, function(a) {
15212              !c.readOnly && c.getCommand(b).setState(a);
15213            });
15214            c.addCommand(b, new CKEDITOR.styleCommand(a, { contentForms: f }));
15215            c.ui.addButton &&
15216              c.ui.addButton(g, { label: d, command: b, toolbar: "basicstyles," + (e += 10) });
15217          }
15218        },
15219        h = {
15220          bold: [
15221            "strong",
15222            "b",
15223            [
15224              "span",
15225              function(a) {
15226                a = a.styles["font-weight"];
15227                return "bold" == a || 700 <= +a;
15228              },
15229            ],
15230          ],
15231          italic: [
15232            "em",
15233            "i",
15234            [
15235              "span",
15236              function(a) {
15237                return "italic" == a.styles["font-style"];
15238              },
15239            ],
15240          ],
15241          underline: [
15242            "u",
15243            [
15244              "span",
15245              function(a) {
15246                return "underline" == a.styles["text-decoration"];
15247              },
15248            ],
15249          ],
15250          strike: [
15251            "s",
15252            "strike",
15253            [
15254              "span",
15255              function(a) {
15256                return "line-through" == a.styles["text-decoration"];
15257              },
15258            ],
15259          ],
15260          subscript: ["sub"],
15261          superscript: ["sup"],
15262        },
15263        b = c.config,
15264        a = c.lang.basicstyles;
15265      d("Bold", a.bold, "bold", b.coreStyles_bold);
15266      d("Italic", a.italic, "italic", b.coreStyles_italic);
15267      d("Underline", a.underline, "underline", b.coreStyles_underline);
15268      d("Strike", a.strike, "strike", b.coreStyles_strike);
15269      d("Subscript", a.subscript, "subscript", b.coreStyles_subscript);
15270      d("Superscript", a.superscript, "superscript", b.coreStyles_superscript);
15271      c.setKeystroke([
15272        [CKEDITOR.CTRL + 66, "bold"],
15273        [CKEDITOR.CTRL + 73, "italic"],
15274        [CKEDITOR.CTRL + 85, "underline"],
15275      ]);
15276    },
15277  });
15278  CKEDITOR.config.coreStyles_bold = { element: "strong", overrides: "b" };
15279  CKEDITOR.config.coreStyles_italic = { element: "em", overrides: "i" };
15280  CKEDITOR.config.coreStyles_underline = { element: "u" };
15281  CKEDITOR.config.coreStyles_strike = { element: "s", overrides: "strike" };
15282  CKEDITOR.config.coreStyles_subscript = { element: "sub" };
15283  CKEDITOR.config.coreStyles_superscript = { element: "sup" };
15284  (function() {
15285    function q(a, f, d, b) {
15286      if (!a.isReadOnly() && !a.equals(d.editable())) {
15287        CKEDITOR.dom.element.setMarker(b, a, "bidi_processed", 1);
15288        b = a;
15289        for (var c = d.editable(); (b = b.getParent()) && !b.equals(c); )
15290          if (b.getCustomData("bidi_processed")) {
15291            a.removeStyle("direction");
15292            a.removeAttribute("dir");
15293            return;
15294          }
15295        b = "useComputedState" in d.config ? d.config.useComputedState : 1;
15296        (b ? a.getComputedStyle("direction") : a.getStyle("direction") || a.hasAttribute("dir")) !=
15297          f &&
15298          (a.removeStyle("direction"),
15299          b
15300            ? (a.removeAttribute("dir"),
15301              f != a.getComputedStyle("direction") && a.setAttribute("dir", f))
15302            : a.setAttribute("dir", f),
15303          d.forceNextSelectionCheck());
15304      }
15305    }
15306    function v(a, f, d) {
15307      var b = a.getCommonAncestor(!1, !0);
15308      a = a.clone();
15309      a.enlarge(
15310        d == CKEDITOR.ENTER_BR
15311          ? CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS
15312          : CKEDITOR.ENLARGE_BLOCK_CONTENTS,
15313      );
15314      if (
15315        a.checkBoundaryOfElement(b, CKEDITOR.START) &&
15316        a.checkBoundaryOfElement(b, CKEDITOR.END)
15317      ) {
15318        for (
15319          var c;
15320          b &&
15321          b.type == CKEDITOR.NODE_ELEMENT &&
15322          (c = b.getParent()) &&
15323          1 == c.getChildCount() &&
15324          !(b.getName() in f);
15325
15326        )
15327          b = c;
15328        return b.type == CKEDITOR.NODE_ELEMENT && b.getName() in f && b;
15329      }
15330    }
15331    function p(a) {
15332      return {
15333        context: "p",
15334        allowedContent: {
15335          "h1 h2 h3 h4 h5 h6 table ul ol blockquote div tr p div li td": {
15336            propertiesOnly: !0,
15337            attributes: "dir",
15338          },
15339        },
15340        requiredContent: "p[dir]",
15341        refresh: function(a, d) {
15342          var b = a.config.useComputedState,
15343            c,
15344            b = void 0 === b || b;
15345          if (!b) {
15346            c = d.lastElement;
15347            for (var h = a.editable(); c && !(c.getName() in u || c.equals(h)); ) {
15348              var e = c.getParent();
15349              if (!e) break;
15350              c = e;
15351            }
15352          }
15353          c = c || d.block || d.blockLimit;
15354          c.equals(a.editable()) &&
15355            (h = a
15356              .getSelection()
15357              .getRanges()[0]
15358              .getEnclosedNode()) &&
15359            h.type == CKEDITOR.NODE_ELEMENT &&
15360            (c = h);
15361          c &&
15362            ((b = b
15363              ? c.getComputedStyle("direction")
15364              : c.getStyle("direction") || c.getAttribute("dir")),
15365            a
15366              .getCommand("bidirtl")
15367              .setState("rtl" == b ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF),
15368            a
15369              .getCommand("bidiltr")
15370              .setState("ltr" == b ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF));
15371          b = (d.block || d.blockLimit || a.editable()).getDirection(1);
15372          b != (a._.selDir || a.lang.dir) && ((a._.selDir = b), a.fire("contentDirChanged", b));
15373        },
15374        exec: function(f) {
15375          var d = f.getSelection(),
15376            b = f.config.enterMode,
15377            c = d.getRanges();
15378          if (c && c.length) {
15379            for (
15380              var h = {}, e = d.createBookmarks(), c = c.createIterator(), g, l = 0;
15381              (g = c.getNextRange(1));
15382
15383            ) {
15384              var k = g.getEnclosedNode();
15385              (k && (!k || (k.type == CKEDITOR.NODE_ELEMENT && k.getName() in r))) ||
15386                (k = v(g, t, b));
15387              k && q(k, a, f, h);
15388              var m = new CKEDITOR.dom.walker(g),
15389                n = e[l].startNode,
15390                p = e[l++].endNode;
15391              m.evaluator = function(a) {
15392                var c = b == CKEDITOR.ENTER_P ? "p" : "div",
15393                  d;
15394                if ((d = (a ? a.type == CKEDITOR.NODE_ELEMENT : !1) && a.getName() in t)) {
15395                  if ((c = a.is(c))) c = (c = a.getParent()) ? c.type == CKEDITOR.NODE_ELEMENT : !1;
15396                  d = !(c && a.getParent().is("blockquote"));
15397                }
15398                return !!(
15399                  d &&
15400                  a.getPosition(n) & CKEDITOR.POSITION_FOLLOWING &&
15401                  (a.getPosition(p) & (CKEDITOR.POSITION_PRECEDING + CKEDITOR.POSITION_CONTAINS)) ==
15402                    CKEDITOR.POSITION_PRECEDING
15403                );
15404              };
15405              for (; (k = m.next()); ) q(k, a, f, h);
15406              g = g.createIterator();
15407              for (
15408                g.enlargeBr = b != CKEDITOR.ENTER_BR;
15409                (k = g.getNextParagraph(b == CKEDITOR.ENTER_P ? "p" : "div"));
15410
15411              )
15412                q(k, a, f, h);
15413            }
15414            CKEDITOR.dom.element.clearAllMarkers(h);
15415            f.forceNextSelectionCheck();
15416            d.selectBookmarks(e);
15417            f.focus();
15418          }
15419        },
15420      };
15421    }
15422    function w(a) {
15423      var f = a == l.setAttribute,
15424        d = a == l.removeAttribute,
15425        b = /\bdirection\s*:\s*(.*?)\s*(:?$|;)/;
15426      return function(c, h) {
15427        if (!this.isReadOnly()) {
15428          var e;
15429          if ((e = c == (f || d ? "dir" : "direction") || ("style" == c && (d || b.test(h))))) {
15430            a: {
15431              e = this;
15432              for (
15433                var g = e
15434                  .getDocument()
15435                  .getBody()
15436                  .getParent();
15437                e;
15438
15439              ) {
15440                if (e.equals(g)) {
15441                  e = !1;
15442                  break a;
15443                }
15444                e = e.getParent();
15445              }
15446              e = !0;
15447            }
15448            e = !e;
15449          }
15450          if (
15451            e &&
15452            ((e = this.getDirection(1)), (g = a.apply(this, arguments)), e != this.getDirection(1))
15453          )
15454            return this.getDocument().fire("dirChanged", this), g;
15455        }
15456        return a.apply(this, arguments);
15457      };
15458    }
15459    var t = { table: 1, ul: 1, ol: 1, blockquote: 1, div: 1 },
15460      r = {},
15461      u = {};
15462    CKEDITOR.tools.extend(r, t, { tr: 1, p: 1, div: 1, li: 1 });
15463    CKEDITOR.tools.extend(u, r, { td: 1 });
15464    CKEDITOR.plugins.add("bidi", {
15465      init: function(a) {
15466        function f(b, c, d, e, f) {
15467          a.addCommand(d, new CKEDITOR.command(a, e));
15468          a.ui.addButton && a.ui.addButton(b, { label: c, command: d, toolbar: "bidi," + f });
15469        }
15470        if (!a.blockless) {
15471          var d = a.lang.bidi;
15472          f("BidiLtr", d.ltr, "bidiltr", p("ltr"), 10);
15473          f("BidiRtl", d.rtl, "bidirtl", p("rtl"), 20);
15474          a.on("contentDom", function() {
15475            a.document.on("dirChanged", function(b) {
15476              a.fire("dirChanged", { node: b.data, dir: b.data.getDirection(1) });
15477            });
15478          });
15479          a.on("contentDirChanged", function(b) {
15480            b = (a.lang.dir != b.data ? "add" : "remove") + "Class";
15481            var c = a.ui.space(a.config.toolbarLocation);
15482            if (c) c[b]("cke_mixed_dir_content");
15483          });
15484        }
15485      },
15486    });
15487    for (
15488      var l = CKEDITOR.dom.element.prototype,
15489        n = ["setStyle", "removeStyle", "setAttribute", "removeAttribute"],
15490        m = 0;
15491      m < n.length;
15492      m++
15493    )
15494      l[n[m]] = CKEDITOR.tools.override(l[n[m]], w);
15495  })();
15496  (function() {
15497    var m = {
15498      exec: function(g) {
15499        var a = g.getCommand("blockquote").state,
15500          k = g.getSelection(),
15501          c = k && k.getRanges()[0];
15502        if (c) {
15503          var h = k.createBookmarks();
15504          if (CKEDITOR.env.ie) {
15505            var e = h[0].startNode,
15506              b = h[0].endNode,
15507              d;
15508            if (e && "blockquote" == e.getParent().getName())
15509              for (d = e; (d = d.getNext()); )
15510                if (d.type == CKEDITOR.NODE_ELEMENT && d.isBlockBoundary()) {
15511                  e.move(d, !0);
15512                  break;
15513                }
15514            if (b && "blockquote" == b.getParent().getName())
15515              for (d = b; (d = d.getPrevious()); )
15516                if (d.type == CKEDITOR.NODE_ELEMENT && d.isBlockBoundary()) {
15517                  b.move(d);
15518                  break;
15519                }
15520          }
15521          var f = c.createIterator();
15522          f.enlargeBr = g.config.enterMode != CKEDITOR.ENTER_BR;
15523          if (a == CKEDITOR.TRISTATE_OFF) {
15524            for (e = []; (a = f.getNextParagraph()); ) e.push(a);
15525            1 > e.length &&
15526              ((a = g.document.createElement(g.config.enterMode == CKEDITOR.ENTER_P ? "p" : "div")),
15527              (b = h.shift()),
15528              c.insertNode(a),
15529              a.append(new CKEDITOR.dom.text("", g.document)),
15530              c.moveToBookmark(b),
15531              c.selectNodeContents(a),
15532              c.collapse(!0),
15533              (b = c.createBookmark()),
15534              e.push(a),
15535              h.unshift(b));
15536            d = e[0].getParent();
15537            c = [];
15538            for (b = 0; b < e.length; b++) (a = e[b]), (d = d.getCommonAncestor(a.getParent()));
15539            for (
15540              a = {
15541                table: 1,
15542                tbody: 1,
15543                tr: 1,
15544                ol: 1,
15545                ul: 1,
15546              };
15547              a[d.getName()];
15548
15549            )
15550              d = d.getParent();
15551            for (b = null; 0 < e.length; ) {
15552              for (a = e.shift(); !a.getParent().equals(d); ) a = a.getParent();
15553              a.equals(b) || c.push(a);
15554              b = a;
15555            }
15556            for (; 0 < c.length; )
15557              if (((a = c.shift()), "blockquote" == a.getName())) {
15558                for (b = new CKEDITOR.dom.documentFragment(g.document); a.getFirst(); )
15559                  b.append(a.getFirst().remove()), e.push(b.getLast());
15560                b.replace(a);
15561              } else e.push(a);
15562            c = g.document.createElement("blockquote");
15563            for (c.insertBefore(e[0]); 0 < e.length; ) (a = e.shift()), c.append(a);
15564          } else if (a == CKEDITOR.TRISTATE_ON) {
15565            b = [];
15566            for (d = {}; (a = f.getNextParagraph()); ) {
15567              for (e = c = null; a.getParent(); ) {
15568                if ("blockquote" == a.getParent().getName()) {
15569                  c = a.getParent();
15570                  e = a;
15571                  break;
15572                }
15573                a = a.getParent();
15574              }
15575              c &&
15576                e &&
15577                !e.getCustomData("blockquote_moveout") &&
15578                (b.push(e), CKEDITOR.dom.element.setMarker(d, e, "blockquote_moveout", !0));
15579            }
15580            CKEDITOR.dom.element.clearAllMarkers(d);
15581            a = [];
15582            e = [];
15583            for (d = {}; 0 < b.length; )
15584              (f = b.shift()),
15585                (c = f.getParent()),
15586                f.getPrevious()
15587                  ? f.getNext()
15588                    ? (f.breakParent(f.getParent()), e.push(f.getNext()))
15589                    : f.remove().insertAfter(c)
15590                  : f.remove().insertBefore(c),
15591                c.getCustomData("blockquote_processed") ||
15592                  (e.push(c), CKEDITOR.dom.element.setMarker(d, c, "blockquote_processed", !0)),
15593                a.push(f);
15594            CKEDITOR.dom.element.clearAllMarkers(d);
15595            for (b = e.length - 1; 0 <= b; b--) {
15596              c = e[b];
15597              a: {
15598                d = c;
15599                for (
15600                  var f = 0, m = d.getChildCount(), l = void 0;
15601                  f < m && (l = d.getChild(f));
15602                  f++
15603                )
15604                  if (l.type == CKEDITOR.NODE_ELEMENT && l.isBlockBoundary()) {
15605                    d = !1;
15606                    break a;
15607                  }
15608                d = !0;
15609              }
15610              d && c.remove();
15611            }
15612            if (g.config.enterMode == CKEDITOR.ENTER_BR)
15613              for (c = !0; a.length; )
15614                if (((f = a.shift()), "div" == f.getName())) {
15615                  b = new CKEDITOR.dom.documentFragment(g.document);
15616                  !c ||
15617                    !f.getPrevious() ||
15618                    (f.getPrevious().type == CKEDITOR.NODE_ELEMENT &&
15619                      f.getPrevious().isBlockBoundary()) ||
15620                    b.append(g.document.createElement("br"));
15621                  for (
15622                    c =
15623                      f.getNext() &&
15624                      !(f.getNext().type == CKEDITOR.NODE_ELEMENT && f.getNext().isBlockBoundary());
15625                    f.getFirst();
15626
15627                  )
15628                    f
15629                      .getFirst()
15630                      .remove()
15631                      .appendTo(b);
15632                  c && b.append(g.document.createElement("br"));
15633                  b.replace(f);
15634                  c = !1;
15635                }
15636          }
15637          k.selectBookmarks(h);
15638          g.focus();
15639        }
15640      },
15641      refresh: function(g, a) {
15642        this.setState(
15643          g.elementPath(a.block || a.blockLimit).contains("blockquote", 1)
15644            ? CKEDITOR.TRISTATE_ON
15645            : CKEDITOR.TRISTATE_OFF,
15646        );
15647      },
15648      context: "blockquote",
15649      allowedContent: "blockquote",
15650      requiredContent: "blockquote",
15651    };
15652    CKEDITOR.plugins.add("blockquote", {
15653      init: function(g) {
15654        g.blockless ||
15655          (g.addCommand("blockquote", m),
15656          g.ui.addButton &&
15657            g.ui.addButton("Blockquote", {
15658              label: g.lang.blockquote.toolbar,
15659              command: "blockquote",
15660              toolbar: "blocks,10",
15661            }));
15662      },
15663    });
15664  })();
15665  (function() {
15666    function q(b, a) {
15667      CKEDITOR.tools.extend(this, a, {
15668        editor: b,
15669        id: "cke-" + CKEDITOR.tools.getUniqueId(),
15670        area: b._.notificationArea,
15671      });
15672      a.type || (this.type = "info");
15673      this.element = this._createElement();
15674      b.plugins.clipboard && CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(this.element);
15675    }
15676    function r(b) {
15677      var a = this;
15678      this.editor = b;
15679      this.notifications = [];
15680      this.element = this._createElement();
15681      this._uiBuffer = CKEDITOR.tools.eventsBuffer(10, this._layout, this);
15682      this._changeBuffer = CKEDITOR.tools.eventsBuffer(500, this._layout, this);
15683      b.on("destroy", function() {
15684        a._removeListeners();
15685        a.element.remove();
15686      });
15687    }
15688    CKEDITOR.plugins.add("notification", {
15689      init: function(b) {
15690        function a(b) {
15691          var a = new CKEDITOR.dom.element("div");
15692          a.setStyles({ position: "fixed", "margin-left": "-9999px" });
15693          a.setAttributes({ "aria-live": "assertive", "aria-atomic": "true" });
15694          a.setText(b);
15695          CKEDITOR.document.getBody().append(a);
15696          setTimeout(function() {
15697            a.remove();
15698          }, 100);
15699        }
15700        b._.notificationArea = new r(b);
15701        b.showNotification = function(a, d, e) {
15702          var f, l;
15703          "progress" == d ? (f = e) : (l = e);
15704          a = new CKEDITOR.plugins.notification(b, {
15705            message: a,
15706            type: d,
15707            progress: f,
15708            duration: l,
15709          });
15710          a.show();
15711          return a;
15712        };
15713        b.on("key", function(c) {
15714          if (27 == c.data.keyCode) {
15715            var d = b._.notificationArea.notifications;
15716            d.length && (a(b.lang.notification.closed), d[d.length - 1].hide(), c.cancel());
15717          }
15718        });
15719      },
15720    });
15721    q.prototype = {
15722      show: function() {
15723        !1 !== this.editor.fire("notificationShow", { notification: this }) &&
15724          (this.area.add(this), this._hideAfterTimeout());
15725      },
15726      update: function(b) {
15727        var a = !0;
15728        !1 === this.editor.fire("notificationUpdate", { notification: this, options: b }) &&
15729          (a = !1);
15730        var c = this.element,
15731          d = c.findOne(".cke_notification_message"),
15732          e = c.findOne(".cke_notification_progress"),
15733          f = b.type;
15734        c.removeAttribute("role");
15735        b.progress && "progress" != this.type && (f = "progress");
15736        f &&
15737          (c.removeClass(this._getClass()),
15738          c.removeAttribute("aria-label"),
15739          (this.type = f),
15740          c.addClass(this._getClass()),
15741          c.setAttribute("aria-label", this.type),
15742          "progress" != this.type || e
15743            ? "progress" != this.type && e && e.remove()
15744            : ((e = this._createProgressElement()), e.insertBefore(d)));
15745        void 0 !== b.message && ((this.message = b.message), d.setHtml(this.message));
15746        void 0 !== b.progress &&
15747          ((this.progress = b.progress), e && e.setStyle("width", this._getPercentageProgress()));
15748        a &&
15749          b.important &&
15750          (c.setAttribute("role", "alert"), this.isVisible() || this.area.add(this));
15751        this.duration = b.duration;
15752        this._hideAfterTimeout();
15753      },
15754      hide: function() {
15755        !1 !== this.editor.fire("notificationHide", { notification: this }) &&
15756          this.area.remove(this);
15757      },
15758      isVisible: function() {
15759        return 0 <= CKEDITOR.tools.indexOf(this.area.notifications, this);
15760      },
15761      _createElement: function() {
15762        var b = this,
15763          a,
15764          c,
15765          d = this.editor.lang.common.close;
15766        a = new CKEDITOR.dom.element("div");
15767        a.addClass("cke_notification");
15768        a.addClass(this._getClass());
15769        a.setAttributes({ id: this.id, role: "alert", "aria-label": this.type });
15770        "progress" == this.type && a.append(this._createProgressElement());
15771        c = new CKEDITOR.dom.element("p");
15772        c.addClass("cke_notification_message");
15773        c.setHtml(this.message);
15774        a.append(c);
15775        c = CKEDITOR.dom.element.createFromHtml(
15776          '\x3ca class\x3d"cke_notification_close" href\x3d"javascript:void(0)" title\x3d"' +
15777            d +
15778            '" role\x3d"button" tabindex\x3d"-1"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e',
15779        );
15780        a.append(c);
15781        c.on("click", function() {
15782          b.editor.focus();
15783          b.hide();
15784        });
15785        return a;
15786      },
15787      _getClass: function() {
15788        return "progress" == this.type ? "cke_notification_info" : "cke_notification_" + this.type;
15789      },
15790      _createProgressElement: function() {
15791        var b = new CKEDITOR.dom.element("span");
15792        b.addClass("cke_notification_progress");
15793        b.setStyle("width", this._getPercentageProgress());
15794        return b;
15795      },
15796      _getPercentageProgress: function() {
15797        return Math.round(100 * (this.progress || 0)) + "%";
15798      },
15799      _hideAfterTimeout: function() {
15800        var b = this,
15801          a;
15802        this._hideTimeoutId && clearTimeout(this._hideTimeoutId);
15803        if ("number" == typeof this.duration) a = this.duration;
15804        else if ("info" == this.type || "success" == this.type)
15805          a =
15806            "number" == typeof this.editor.config.notification_duration
15807              ? this.editor.config.notification_duration
15808              : 5e3;
15809        a &&
15810          (b._hideTimeoutId = setTimeout(function() {
15811            b.hide();
15812          }, a));
15813      },
15814    };
15815    r.prototype = {
15816      add: function(b) {
15817        this.notifications.push(b);
15818        this.element.append(b.element);
15819        1 == this.element.getChildCount() &&
15820          (CKEDITOR.document.getBody().append(this.element), this._attachListeners());
15821        this._layout();
15822      },
15823      remove: function(b) {
15824        var a = CKEDITOR.tools.indexOf(this.notifications, b);
15825        0 > a ||
15826          (this.notifications.splice(a, 1),
15827          b.element.remove(),
15828          this.element.getChildCount() || (this._removeListeners(), this.element.remove()));
15829      },
15830      _createElement: function() {
15831        var b = this.editor,
15832          a = b.config,
15833          c = new CKEDITOR.dom.element("div");
15834        c.addClass("cke_notifications_area");
15835        c.setAttribute("id", "cke_notifications_area_" + b.name);
15836        c.setStyle("z-index", a.baseFloatZIndex - 2);
15837        return c;
15838      },
15839      _attachListeners: function() {
15840        var b = CKEDITOR.document.getWindow(),
15841          a = this.editor;
15842        b.on("scroll", this._uiBuffer.input);
15843        b.on("resize", this._uiBuffer.input);
15844        a.on("change", this._changeBuffer.input);
15845        a.on("floatingSpaceLayout", this._layout, this, null, 20);
15846        a.on("blur", this._layout, this, null, 20);
15847      },
15848      _removeListeners: function() {
15849        var b = CKEDITOR.document.getWindow(),
15850          a = this.editor;
15851        b.removeListener("scroll", this._uiBuffer.input);
15852        b.removeListener("resize", this._uiBuffer.input);
15853        a.removeListener("change", this._changeBuffer.input);
15854        a.removeListener("floatingSpaceLayout", this._layout);
15855        a.removeListener("blur", this._layout);
15856      },
15857      _layout: function() {
15858        function b() {
15859          a.setStyle("left", k(n + d.width - g - h));
15860        }
15861        var a = this.element,
15862          c = this.editor,
15863          d = c.ui.contentsElement.getClientRect(),
15864          e = c.ui.contentsElement.getDocumentPosition(),
15865          f,
15866          l,
15867          u = a.getClientRect(),
15868          m,
15869          g = this._notificationWidth,
15870          h = this._notificationMargin;
15871        m = CKEDITOR.document.getWindow();
15872        var p = m.getScrollPosition(),
15873          t = m.getViewPaneSize(),
15874          q = CKEDITOR.document.getBody(),
15875          r = q.getDocumentPosition(),
15876          k = CKEDITOR.tools.cssLength;
15877        (g && h) ||
15878          ((m = this.element.getChild(0)),
15879          (g = this._notificationWidth = m.getClientRect().width),
15880          (h = this._notificationMargin =
15881            parseInt(m.getComputedStyle("margin-left"), 10) +
15882            parseInt(m.getComputedStyle("margin-right"), 10)));
15883        c.toolbar && ((f = c.ui.space("top")), (l = f.getClientRect()));
15884        f && f.isVisible() && l.bottom > d.top && l.bottom < d.bottom - u.height
15885          ? a.setStyles({ position: "fixed", top: k(l.bottom) })
15886          : 0 < d.top
15887            ? a.setStyles({ position: "absolute", top: k(e.y) })
15888            : e.y + d.height - u.height > p.y
15889              ? a.setStyles({ position: "fixed", top: 0 })
15890              : a.setStyles({ position: "absolute", top: k(e.y + d.height - u.height) });
15891        var n =
15892          "fixed" == a.getStyle("position")
15893            ? d.left
15894            : "static" != q.getComputedStyle("position") ? e.x - r.x : e.x;
15895        d.width < g + h
15896          ? e.x + g + h > p.x + t.width ? b() : a.setStyle("left", k(n))
15897          : e.x + g + h > p.x + t.width
15898            ? a.setStyle("left", k(n))
15899            : e.x + d.width / 2 + g / 2 + h > p.x + t.width
15900              ? a.setStyle("left", k(n - e.x + p.x + t.width - g - h))
15901              : 0 > d.left + d.width - g - h
15902                ? b()
15903                : 0 > d.left + d.width / 2 - g / 2
15904                  ? a.setStyle("left", k(n - e.x + p.x))
15905                  : a.setStyle("left", k(n + d.width / 2 - g / 2 - h / 2));
15906      },
15907    };
15908    CKEDITOR.plugins.notification = q;
15909  })();
15910  (function() {
15911    var c =
15912      '\x3ca id\x3d"{id}" class\x3d"cke_button cke_button__{name} cke_button_{state} {cls}"' +
15913      (CKEDITOR.env.gecko && !CKEDITOR.env.hc ? "" : " href\x3d\"javascript:void('{titleJs}')\"") +
15914      ' title\x3d"{title}" tabindex\x3d"-1" hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasArrow}" aria-disabled\x3d"{ariaDisabled}"';
15915    CKEDITOR.env.gecko && CKEDITOR.env.mac && (c += ' onkeypress\x3d"return false;"');
15916    CKEDITOR.env.gecko && (c += ' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');
15917    var c =
15918        c +
15919        (' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" ' +
15920          (CKEDITOR.env.ie ? 'onclick\x3d"return false;" onmouseup' : "onclick") +
15921          '\x3d"CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"'),
15922      c =
15923        c +
15924        '\x3e\x26nbsp;\x3c/span\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_button_label cke_button__{name}_label" aria-hidden\x3d"false"\x3e{label}\x3c/span\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_button_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e{arrowHtml}\x3c/a\x3e',
15925      v = CKEDITOR.addTemplate(
15926        "buttonArrow",
15927        '\x3cspan class\x3d"cke_button_arrow"\x3e' +
15928          (CKEDITOR.env.hc ? "\x26#9660;" : "") +
15929          "\x3c/span\x3e",
15930      ),
15931      w = CKEDITOR.addTemplate("button", c);
15932    CKEDITOR.plugins.add("button", {
15933      beforeInit: function(a) {
15934        a.ui.addHandler(CKEDITOR.UI_BUTTON, CKEDITOR.ui.button.handler);
15935      },
15936    });
15937    CKEDITOR.UI_BUTTON = "button";
15938    CKEDITOR.ui.button = function(a) {
15939      CKEDITOR.tools.extend(this, a, {
15940        title: a.label,
15941        click:
15942          a.click ||
15943          function(b) {
15944            b.execCommand(a.command);
15945          },
15946      });
15947      this._ = {};
15948    };
15949    CKEDITOR.ui.button.handler = {
15950      create: function(a) {
15951        return new CKEDITOR.ui.button(a);
15952      },
15953    };
15954    CKEDITOR.ui.button.prototype = {
15955      render: function(a, b) {
15956        function c() {
15957          var f = a.mode;
15958          f &&
15959            ((f = this.modes[f]
15960              ? void 0 !== n[f] ? n[f] : CKEDITOR.TRISTATE_OFF
15961              : CKEDITOR.TRISTATE_DISABLED),
15962            (f = a.readOnly && !this.readOnly ? CKEDITOR.TRISTATE_DISABLED : f),
15963            this.setState(f),
15964            this.refresh && this.refresh());
15965        }
15966        var n = null,
15967          p = CKEDITOR.env,
15968          q = (this._.id = CKEDITOR.tools.getNextId()),
15969          g = "",
15970          d = this.command,
15971          t,
15972          k,
15973          l;
15974        this._.editor = a;
15975        var e = {
15976            id: q,
15977            button: this,
15978            editor: a,
15979            focus: function() {
15980              CKEDITOR.document.getById(q).focus();
15981            },
15982            execute: function() {
15983              this.button.click(a);
15984            },
15985            attach: function(a) {
15986              this.button.attach(a);
15987            },
15988          },
15989          x = CKEDITOR.tools.addFunction(function(a) {
15990            if (e.onkey)
15991              return (a = new CKEDITOR.dom.event(a)), !1 !== e.onkey(e, a.getKeystroke());
15992          }),
15993          y = CKEDITOR.tools.addFunction(function(a) {
15994            var b;
15995            e.onfocus && (b = !1 !== e.onfocus(e, new CKEDITOR.dom.event(a)));
15996            return b;
15997          }),
15998          u = 0;
15999        e.clickFn = t = CKEDITOR.tools.addFunction(function() {
16000          u && (a.unlockSelection(1), (u = 0));
16001          e.execute();
16002          p.iOS && a.focus();
16003        });
16004        this.modes
16005          ? ((n = {}),
16006            a.on(
16007              "beforeModeUnload",
16008              function() {
16009                a.mode && this._.state != CKEDITOR.TRISTATE_DISABLED && (n[a.mode] = this._.state);
16010              },
16011              this,
16012            ),
16013            a.on("activeFilterChange", c, this),
16014            a.on("mode", c, this),
16015            !this.readOnly && a.on("readOnly", c, this))
16016          : d &&
16017            (d = a.getCommand(d)) &&
16018            (d.on(
16019              "state",
16020              function() {
16021                this.setState(d.state);
16022              },
16023              this,
16024            ),
16025            (g +=
16026              d.state == CKEDITOR.TRISTATE_ON
16027                ? "on"
16028                : d.state == CKEDITOR.TRISTATE_DISABLED ? "disabled" : "off"));
16029        var m;
16030        if (this.directional)
16031          a.on(
16032            "contentDirChanged",
16033            function(b) {
16034              var c = CKEDITOR.document.getById(this._.id),
16035                d = c.getFirst();
16036              b = b.data;
16037              b != a.lang.dir
16038                ? c.addClass("cke_" + b)
16039                : c.removeClass("cke_ltr").removeClass("cke_rtl");
16040              d.setAttribute(
16041                "style",
16042                CKEDITOR.skin.getIconStyle(m, "rtl" == b, this.icon, this.iconOffset),
16043              );
16044            },
16045            this,
16046          );
16047        d
16048          ? (k = a.getCommandKeystroke(d)) &&
16049            (l = CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard, k))
16050          : (g += "off");
16051        k = this.name || this.command;
16052        var h = null,
16053          r = this.icon;
16054        m = k;
16055        this.icon && !/\./.test(this.icon)
16056          ? ((m = this.icon), (r = null))
16057          : (this.icon && (h = this.icon),
16058            CKEDITOR.env.hidpi && this.iconHiDpi && (h = this.iconHiDpi));
16059        h ? (CKEDITOR.skin.addIcon(h, h), (r = null)) : (h = m);
16060        g = {
16061          id: q,
16062          name: k,
16063          iconName: m,
16064          label: this.label,
16065          cls: this.className || "",
16066          state: g,
16067          ariaDisabled: "disabled" == g ? "true" : "false",
16068          title: this.title + (l ? " (" + l.display + ")" : ""),
16069          ariaShortcut: l ? a.lang.common.keyboardShortcut + " " + l.aria : "",
16070          titleJs: p.gecko && !p.hc ? "" : (this.title || "").replace("'", ""),
16071          hasArrow: th
16071is.hasArrow ? "true" : "false",
16072          keydownFn: x,
16073          focusFn: y,
16074          clickFn: t,
16075          style: CKEDITOR.skin.getIconStyle(h, "rtl" == a.lang.dir, r, this.iconOffset),
16076          arrowHtml: this.hasArrow ? v.output() : "",
16077        };
16078        w.output(g, b);
16079        if (this.onRender) this.onRender();
16080        return e;
16081      },
16082      setState: function(a) {
16083        if (this._.state == a) return !1;
16084        this._.state = a;
16085        var b = CKEDITOR.document.getById(this._.id);
16086        return b
16087          ? (b.setState(a, "cke_button"),
16088            a == CKEDITOR.TRISTATE_DISABLED
16089              ? b.setAttribute("aria-disabled", !0)
16090              : b.removeAttribute("aria-disabled"),
16091            this.hasArrow
16092              ? ((a =
16093                  a == CKEDITOR.TRISTATE_ON
16094                    ? this._.editor.lang.button.selectedLabel.replace(/%1/g, this.label)
16095                    : this.label),
16096                CKEDITOR.document.getById(this._.id + "_label").setText(a))
16097              : a == CKEDITOR.TRISTATE_ON
16098                ? b.setAttribute("aria-pressed", !0)
16099                : b.removeAttribute("aria-pressed"),
16100            !0)
16101          : !1;
16102      },
16103      getState: function() {
16104        return this._.state;
16105      },
16106      toFeature: function(a) {
16107        if (this._.feature) return this._.feature;
16108        var b = this;
16109        this.allowedContent ||
16110          this.requiredContent ||
16111          !this.command ||
16112          (b = a.getCommand(this.command) || b);
16113        return (this._.feature = b);
16114      },
16115    };
16116    CKEDITOR.ui.prototype.addButton = function(a, b) {
16117      this.add(a, CKEDITOR.UI_BUTTON, b);
16118    };
16119  })();
16120  (function() {
16121    function D(a) {
16122      function d() {
16123        for (
16124          var b = f(), e = CKEDITOR.tools.clone(a.config.toolbarGroups) || v(a), n = 0;
16125          n < e.length;
16126          n++
16127        ) {
16128          var g = e[n];
16129          if ("/" != g) {
16130            "string" == typeof g && (g = e[n] = { name: g });
16131            var l,
16132              d = g.groups;
16133            if (d) for (var h = 0; h < d.length; h++) (l = d[h]), (l = b[l]) && c(g, l);
16134            (l = b[g.name]) && c(g, l);
16135          }
16136        }
16137        return e;
16138      }
16139      function f() {
16140        var b = {},
16141          c,
16142          e,
16143          g;
16144        for (c in a.ui.items)
16145          (e = a.ui.items[c]),
16146            (g = e.toolbar || "others"),
16147            (g = g.split(",")),
16148            (e = g[0]),
16149            (g = parseInt(g[1] || -1, 10)),
16150            b[e] || (b[e] = []),
16151            b[e].push({ name: c, order: g });
16152        for (e in b)
16153          b[e] = b[e].sort(function(b, a) {
16154            return b.order == a.order
16155              ? 0
16156              : 0 > a.order ? -1 : 0 > b.order ? 1 : b.order < a.order ? -1 : 1;
16157          });
16158        return b;
16159      }
16160      function c(c, e) {
16161        if (e.length) {
16162          c.items ? c.items.push(a.ui.create("-")) : (c.items = []);
16163          for (var d; (d = e.shift()); )
16164            (d = "string" == typeof d ? d : d.name),
16165              (b && -1 != CKEDITOR.tools.indexOf(b, d)) ||
16166                ((d = a.ui.create(d)) && a.addFeature(d) && c.items.push(d));
16167        }
16168      }
16169      function h(b) {
16170        var a = [],
16171          e,
16172          d,
16173          h;
16174        for (e = 0; e < b.length; ++e)
16175          (d = b[e]),
16176            (h = {}),
16177            "/" == d
16178              ? a.push(d)
16179              : CKEDITOR.tools.isArray(d)
16180                ? (c(h, CKEDITOR.tools.clone(d)), a.push(h))
16181                : d.items && (c(h, CKEDITOR.tools.clone(d.items)), (h.name = d.name), a.push(h));
16182        return a;
16183      }
16184      var b = a.config.removeButtons,
16185        b = b && b.split(","),
16186        e = a.config.toolbar;
16187      "string" == typeof e && (e = a.config["toolbar_" + e]);
16188      return (a.toolbar = e ? h(e) : d());
16189    }
16190    function v(a) {
16191      return (
16192        a._.toolbarGroups ||
16193        (a._.toolbarGroups = [
16194          { name: "document", groups: ["mode", "document", "doctools"] },
16195          { name: "clipboard", groups: ["clipboard", "undo"] },
16196          { name: "editing", groups: ["find", "selection", "spellchecker"] },
16197          { name: "forms" },
16198          "/",
16199          { name: "basicstyles", groups: ["basicstyles", "cleanup"] },
16200          {
16201            name: "paragraph",
16202            groups: ["list", "indent", "blocks", "align", "bidi"],
16203          },
16204          { name: "links" },
16205          { name: "insert" },
16206          "/",
16207          { name: "styles" },
16208          { name: "colors" },
16209          { name: "tools" },
16210          { name: "others" },
16211          { name: "about" },
16212        ])
16213      );
16214    }
16215    var z = function() {
16216      this.toolbars = [];
16217      this.focusCommandExecuted = !1;
16218    };
16219    z.prototype.focus = function() {
16220      for (var a = 0, d; (d = this.toolbars[a++]); )
16221        for (var f = 0, c; (c = d.items[f++]); )
16222          if (c.focus) {
16223            c.focus();
16224            return;
16225          }
16226    };
16227    var E = {
16228      modes: { wysiwyg: 1, source: 1 },
16229      readOnly: 1,
16230      exec: function(a) {
16231        a.toolbox &&
16232          ((a.toolbox.focusCommandExecuted = !0),
16233          CKEDITOR.env.ie || CKEDITOR.env.air
16234            ? setTimeout(function() {
16235                a.toolbox.focus();
16236              }, 100)
16237            : a.toolbox.focus());
16238      },
16239    };
16240    CKEDITOR.plugins.add("toolbar", {
16241      requires: "button",
16242      init: function(a) {
16243        var d,
16244          f = function(c, h) {
16245            var b,
16246              e = "rtl" == a.lang.dir,
16247              k = a.config.toolbarGroupCycling,
16248              q = e ? 37 : 39,
16249              e = e ? 39 : 37,
16250              k = void 0 === k || k;
16251            switch (h) {
16252              case 9:
16253              case CKEDITOR.SHIFT + 9:
16254                for (; !b || !b.items.length; )
16255                  if (
16256                    ((b =
16257                      9 == h
16258                        ? (b ? b.next : c.toolbar.next) || a.toolbox.toolbars[0]
16259                        : (b ? b.previous : c.toolbar.previous) ||
16260                          a.toolbox.toolbars[a.toolbox.toolbars.length - 1]),
16261                    b.items.length)
16262                  )
16263                    for (c = b.items[d ? b.items.length - 1 : 0]; c && !c.focus; )
16264                      (c = d ? c.previous : c.next) || (b = 0);
16265                c && c.focus();
16266                return !1;
16267              case q:
16268                b = c;
16269                do (b = b.next), !b && k && (b = c.toolbar.items[0]);
16270                while (b && !b.focus);
16271                b ? b.focus() : f(c, 9);
16272                return !1;
16273              case 40:
16274                return c.button && c.button.hasArrow ? c.execute() : f(c, 40 == h ? q : e), !1;
16275              case e:
16276              case 38:
16277                b = c;
16278                do (b = b.previous), !b && k && (b = c.toolbar.items[c.toolbar.items.length - 1]);
16279                while (b && !b.focus);
16280                b ? b.focus() : ((d = 1), f(c, CKEDITOR.SHIFT + 9), (d = 0));
16281                return !1;
16282              case 27:
16283                return a.focus(), !1;
16284              case 13:
16285              case 32:
16286                return c.execute(), !1;
16287            }
16288            return !0;
16289          };
16290        a.on("uiSpace", function(c) {
16291          if (c.data.space == a.config.toolbarLocation) {
16292            c.removeListener();
16293            a.toolbox = new z();
16294            var d = CKEDITOR.tools.getNextId(),
16295              b = [
16296                '\x3cspan id\x3d"',
16297                d,
16298                '" class\x3d"cke_voice_label"\x3e',
16299                a.lang.toolbar.toolbars,
16300                "\x3c/span\x3e",
16301                '\x3cspan id\x3d"' +
16302                  a.ui.spaceId("toolbox") +
16303                  '" class\x3d"cke_toolbox" role\x3d"group" aria-labelledby\x3d"',
16304                d,
16305                '" onmousedown\x3d"return false;"\x3e',
16306              ],
16307              d = !1 !== a.config.toolbarStartupExpanded,
16308              e,
16309              k;
16310            a.config.toolbarCanCollapse &&
16311              a.elementMode != CKEDITOR.ELEMENT_MODE_INLINE &&
16312              b.push(
16313                '\x3cspan class\x3d"cke_toolbox_main"' +
16314                  (d ? "\x3e" : ' style\x3d"display:none"\x3e'),
16315              );
16316            for (var q = a.toolbox.toolbars, n = D(a), g = n.length, l = 0; l < g; l++) {
16317              var r,
16318                m = 0,
16319                w,
16320                p = n[l],
16321                v = "/" !== p && ("/" === n[l + 1] || l == g - 1),
16322                x;
16323              if (p)
16324                if ((e && (b.push("\x3c/span\x3e"), (k = e = 0)), "/" === p))
16325                  b.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');
16326                else {
16327                  x = p.items || p;
16328                  for (var y = 0; y < x.length; y++) {
16329                    var t = x[y],
16330                      A;
16331                    if (t) {
16332                      var B = function(c) {
16333                        c = c.render(a, b);
16334                        u = m.items.push(c) - 1;
16335                        0 < u && ((c.previous = m.items[u - 1]), (c.previous.next = c));
16336                        c.toolbar = m;
16337                        c.onkey = f;
16338                        c.onfocus = function() {
16339                          a.toolbox.focusCommandExecuted || a.focus();
16340                        };
16341                      };
16342                      if (t.type == CKEDITOR.UI_SEPARATOR) k = e && t;
16343                      else {
16344                        A = !1 !== t.canGroup;
16345                        if (!m) {
16346                          r = CKEDITOR.tools.getNextId();
16347                          m = { id: r, items: [] };
16348                          w = p.name && (a.lang.toolbar.toolbarGroups[p.name] || p.name);
16349                          b.push(
16350                            '\x3cspan id\x3d"',
16351                            r,
16352                            '" class\x3d"cke_toolbar' + (v ? ' cke_toolbar_last"' : '"'),
16353                            w ? ' aria-labelledby\x3d"' + r + '_label"' : "",
16354                            ' role\x3d"toolbar"\x3e',
16355                          );
16356                          w &&
16357                            b.push(
16358                              '\x3cspan id\x3d"',
16359                              r,
16360                              '_label" class\x3d"cke_voice_label"\x3e',
16361                              w,
16362                              "\x3c/span\x3e",
16363                            );
16364                          b.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');
16365                          var u = q.push(m) - 1;
16366                          0 < u && ((m.previous = q[u - 1]), (m.previous.next = m));
16367                        }
16368                        A
16369                          ? e ||
16370                            (b.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'),
16371                            (e = 1))
16372                          : e && (b.push("\x3c/span\x3e"), (e = 0));
16373                        k && (B(k), (k = 0));
16374                        B(t);
16375                      }
16376                    }
16377                  }
16378                  e && (b.push("\x3c/span\x3e"), (k = e = 0));
16379                  m && b.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e');
16380                }
16381            }
16382            a.config.toolbarCanCollapse && b.push("\x3c/span\x3e");
16383            if (a.config.toolbarCanCollapse && a.elementMode != CKEDITOR.ELEMENT_MODE_INLINE) {
16384              var C = CKEDITOR.tools.addFunction(function() {
16385                a.execCommand("toolbarCollapse");
16386              });
16387              a.on("destroy", function() {
16388                CKEDITOR.tools.removeFunction(C);
16389              });
16390              a.addCommand("toolbarCollapse", {
16391                readOnly: 1,
16392                exec: function(b) {
16393                  var a = b.ui.space("toolbar_collapser"),
16394                    c = a.getPrevious(),
16395                    d = b.ui.space("contents"),
16396                    e = c.getParent(),
16397                    h = parseInt(d.$.style.height, 10),
16398                    g = e.$.offsetHeight,
16399                    f = a.hasClass("cke_toolbox_collapser_min");
16400                  f
16401                    ? (c.show(),
16402                      a.removeClass("cke_toolbox_collapser_min"),
16403                      a.setAttribute("title", b.lang.toolbar.toolbarCollapse))
16404                    : (c.hide(),
16405                      a.addClass("cke_toolbox_collapser_min"),
16406                      a.setAttribute("title", b.lang.toolbar.toolbarExpand));
16407                  a.getFirst().setText(f ? "▲" : "◀");
16408                  d.setStyle("height", h - (e.$.offsetHeight - g) + "px");
16409                  b.fire("resize", {
16410                    outerHeight: b.container.$.offsetHeight,
16411                    contentsHeight: d.$.offsetHeight,
16412                    outerWidth: b.container.$.offsetWidth,
16413                  });
16414                },
16415                modes: { wysiwyg: 1, source: 1 },
16416              });
16417              a.setKeystroke(
16418                CKEDITOR.ALT + (CKEDITOR.env.ie || CKEDITOR.env.webkit ? 189 : 109),
16419                "toolbarCollapse",
16420              );
16421              b.push(
16422                '\x3ca title\x3d"' +
16423                  (d ? a.lang.toolbar.toolbarCollapse : a.lang.toolbar.toolbarExpand) +
16424                  '" id\x3d"' +
16425                  a.ui.spaceId("toolbar_collapser") +
16426                  '" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser',
16427              );
16428              d || b.push(" cke_toolbox_collapser_min");
16429              b.push(
16430                '" onclick\x3d"CKEDITOR.tools.callFunction(' + C + ')"\x3e',
16431                '\x3cspan class\x3d"cke_arrow"\x3e\x26#9650;\x3c/span\x3e',
16432                "\x3c/a\x3e",
16433              );
16434            }
16435            b.push("\x3c/span\x3e");
16436            c.data.html += b.join("");
16437          }
16438        });
16439        a.on("destroy", function() {
16440          if (this.toolbox) {
16441            var a,
16442              d = 0,
16443              b,
16444              e,
16445              f;
16446            for (a = this.toolbox.toolbars; d < a.length; d++)
16447              for (e = a[d].items, b = 0; b < e.length; b++)
16448                (f = e[b]),
16449                  f.clickFn && CKEDITOR.tools.removeFunction(f.clickFn),
16450                  f.keyDownFn && CKEDITOR.tools.removeFunction(f.keyDownFn);
16451          }
16452        });
16453        a.on("uiReady", function() {
16454          var c = a.ui.space("toolbox");
16455          c && a.focusManager.add(c, 1);
16456        });
16457        a.addCommand("toolbarFocus", E);
16458        a.setKeystroke(CKEDITOR.ALT + 121, "toolbarFocus");
16459        a.ui.add("-", CKEDITOR.UI_SEPARATOR, {});
16460        a.ui.addHandler(CKEDITOR.UI_SEPARATOR, {
16461          create: function() {
16462            return {
16463              render: function(a, d) {
16464                d.push(
16465                  '\x3cspan class\x3d"cke_toolbar_separator" role\x3d"separator"\x3e\x3c/span\x3e',
16466                );
16467                return {};
16468              },
16469            };
16470          },
16471        });
16472      },
16473    });
16474    CKEDITOR.ui.prototype.addToolbarGroup = function(a, d, f) {
16475      var c = v(this.editor),
16476        h = 0 === d,
16477        b = { name: a };
16478      if (f) {
16479        if (
16480          (f = CKEDITOR.tools.search(c, function(a) {
16481            return a.name == f;
16482          }))
16483        ) {
16484          !f.groups && (f.groups = []);
16485          if (d && ((d = CKEDITOR.tools.indexOf(f.groups, d)), 0 <= d)) {
16486            f.groups.splice(d + 1, 0, a);
16487            return;
16488          }
16489          h ? f.groups.splice(0, 0, a) : f.groups.push(a);
16490          return;
16491        }
16492        d = null;
16493      }
16494      d &&
16495        (d = CKEDITOR.tools.indexOf(c, function(a) {
16496          return a.name == d;
16497        }));
16498      h ? c.splice(0, 0, a) : "number" == typeof d ? c.splice(d + 1, 0, b) : c.push(a);
16499    };
16500  })();
16501  CKEDITOR.UI_SEPARATOR = "separator";
16502  CKEDITOR.config.toolbarLocation = "top";
16503  (function() {
16504    function r(a, b, c) {
16505      b.type || (b.type = "auto");
16506      if ((c && !1 === a.fire("beforePaste", b)) || (!b.dataValue && b.dataTransfer.isEmpty()))
16507        return !1;
16508      b.dataValue || (b.dataValue = "");
16509      if (CKEDITOR.env.gecko && "drop" == b.method && a.toolbox)
16510        a.once("afterPaste", function() {
16511          a.toolbox.focus();
16512        });
16513      return a.fire("paste", b);
16514    }
16515    function x(a) {
16516      function b() {
16517        var b = a.editable();
16518        if (CKEDITOR.plugins.clipboard.isCustomCopyCutSupported) {
16519          var c = function(b) {
16520            a.getSelection().isCollapsed() ||
16521              ((a.readOnly && "cut" == b.name) || p.initPasteDataTransfer(b, a),
16522              b.data.preventDefault());
16523          };
16524          b.on("copy", c);
16525          b.on("cut", c);
16526          b.on(
16527            "cut",
16528            function() {
16529              a.readOnly || a.extractSelectedHtml();
16530            },
16531            null,
16532            null,
16533            999,
16534          );
16535        }
16536        b.on(p.mainPasteEvent, function(a) {
16537          ("beforepaste" == p.mainPasteEvent && m) || l(a);
16538        });
16539        "beforepaste" == p.mainPasteEvent &&
16540          (b.on("paste", function(a) {
16541            u || (g(), a.data.preventDefault(), l(a), e("paste"));
16542          }),
16543          b.on("contextmenu", h, null, null, 0),
16544          b.on(
16545            "beforepaste",
16546            function(a) {
16547              !a.data || a.data.$.ctrlKey || a.data.$.shiftKey || h();
16548            },
16549            null,
16550            null,
16551            0,
16552          ));
16553        b.on("beforecut", function() {
16554          !m && f(a);
16555        });
16556        var d;
16557        b.attachListener(
16558          CKEDITOR.env.ie ? b : a.document.getDocumentElement(),
16559          "mouseup",
16560          function() {
16561            d = setTimeout(function() {
16562              t();
16563            }, 0);
16564          },
16565        );
16566        a.on("destroy", function() {
16567          clearTimeout(d);
16568        });
16569        b.on("keyup", t);
16570      }
16571      function c(b) {
16572        return {
16573          type: b,
16574          canUndo: "cut" == b,
16575          startDisabled: !0,
16576          fakeKeystroke: "cut" == b ? CKEDITOR.CTRL + 88 : CKEDITOR.CTRL + 67,
16577          exec: function() {
16578            "cut" == this.type && f();
16579            var b;
16580            var c = this.type;
16581            if (CKEDITOR.env.ie) b = e(c);
16582            else
16583              try {
16584                b = a.document.$.execCommand(c, !1, null);
16585              } catch (d) {
16586                b = !1;
16587              }
16588            b || a.showNotification(a.lang.clipboard[this.type + "Error"]);
16589            return b;
16590          },
16591        };
16592      }
16593      function d() {
16594        return {
16595          canUndo: !1,
16596          async: !0,
16597          fakeKeystroke: CKEDITOR.CTRL + 86,
16598          exec: function(a, b) {
16599            function c(b, h) {
16600              h = "undefined" !== typeof h ? h : !0;
16601              b
16602                ? ((b.method = "paste"),
16603                  b.dataTransfer || (b.dataTransfer = p.initPasteDataTransfer()
16603),
16604                  r(a, b, h))
16605                : e &&
16606                  !a._.forcePasteDialog &&
16607                  a.showNotification(n, "info", a.config.clipboard_notificationDuration);
16608              a._.forcePasteDialog = !1;
16609              a.fire("afterCommandExec", { name: "paste", command: d, returnValue: !!b });
16610            }
16611            b = "undefined" !== typeof b && null !== b ? b : {};
16612            var d = this,
16613              e = "undefined" !== typeof b.notification ? b.notification : !0,
16614              h = b.type,
16615              f = CKEDITOR.tools.keystrokeToString(
16616                a.lang.common.keyboard,
16617                a.getCommandKeystroke(this),
16618              ),
16619              n =
16620                "string" === typeof e
16621                  ? e
16622                  : a.lang.clipboard.pasteNotification.replace(
16623                      /%1/,
16624                      '\x3ckbd aria-label\x3d"' + f.aria + '"\x3e' + f.display + "\x3c/kbd\x3e",
16625                    ),
16626              f = "string" === typeof b ? b : b.dataValue;
16627            h &&
16628            !0 !== a.config.forcePasteAsPlainText &&
16629            "allow-word" !== a.config.forcePasteAsPlainText
16630              ? (a._.nextPasteType = h)
16631              : delete a._.nextPasteType;
16632            "string" === typeof f ? c({ dataValue: f }) : a.getClipboardData(c);
16633          },
16634        };
16635      }
16636      function g() {
16637        u = 1;
16638        setTimeout(function() {
16639          u = 0;
16640        }, 100);
16641      }
16642      function h() {
16643        m = 1;
16644        setTimeout(function() {
16645          m = 0;
16646        }, 10);
16647      }
16648      function e(b) {
16649        var c = a.document,
16650          d = c.getBody(),
16651          e = !1,
16652          h = function() {
16653            e = !0;
16654          };
16655        d.on(b, h);
16656        7 < CKEDITOR.env.version ? c.$.execCommand(b) : c.$.selection.createRange().execCommand(b);
16657        d.removeListener(b, h);
16658        return e;
16659      }
16660      function f() {
16661        if (CKEDITOR.env.ie && !CKEDITOR.env.quirks) {
16662          var b = a.getSelection(),
16663            c,
16664            d,
16665            e;
16666          b.getType() == CKEDITOR.SELECTION_ELEMENT &&
16667            (c = b.getSelectedElement()) &&
16668            ((d = b.getRanges()[0]),
16669            (e = a.document.createText("")),
16670            e.insertBefore(c),
16671            d.setStartBefore(e),
16672            d.setEndAfter(c),
16673            b.selectRanges([d]),
16674            setTimeout(function() {
16675              c.getParent() && (e.remove(), b.selectElement(c));
16676            }, 0));
16677        }
16678      }
16679      function k(b, c) {
16680        var d = a.document,
16681          e = a.editable(),
16682          h = function(a) {
16683            a.cancel();
16684          },
16685          f;
16686        if (!d.getById("cke_pastebin")) {
16687          var n = a.getSelection(),
16688            g = n.createBookmarks();
16689          CKEDITOR.env.ie && n.root.fire("selectionchange");
16690          var l = new CKEDITOR.dom.element(
16691            (!CKEDITOR.env.webkit && !e.is("body")) || CKEDITOR.env.ie ? "div" : "body",
16692            d,
16693          );
16694          l.setAttributes({ id: "cke_pastebin", "data-cke-temp": "1" });
16695          var k = 0,
16696            d = d.getWindow();
16697          CKEDITOR.env.webkit
16698            ? (e.append(l),
16699              l.addClass("cke_editable"),
16700              e.is("body") ||
16701                ((k =
16702                  "static" != e.getComputedStyle("position")
16703                    ? e
16704                    : CKEDITOR.dom.element.get(e.$.offsetParent)),
16705                (k = k.getDocumentPosition().y)))
16706            : e.getAscendant(CKEDITOR.env.ie ? "body" : "html", 1).append(l);
16707          l.setStyles({
16708            position: "absolute",
16709            top: d.getScrollPosition().y - k + 10 + "px",
16710            width: "1px",
16711            height: Math.max(1, d.getViewPaneSize().height - 20) + "px",
16712            overflow: "hidden",
16713            margin: 0,
16714            padding: 0,
16715          });
16716          CKEDITOR.env.safari && l.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select", "text"));
16717          (k = l.getParent().isReadOnly())
16718            ? (l.setOpacity(0), l.setAttribute("contenteditable", !0))
16719            : l.setStyle("ltr" == a.config.contentsLangDirection ? "left" : "right", "-10000px");
16720          a.on("selectionChange", h, null, null, 0);
16721          if (CKEDITOR.env.webkit || CKEDITOR.env.gecko) f = e.once("blur", h, null, null, -100);
16722          k && l.focus();
16723          k = new CKEDITOR.dom.range(l);
16724          k.selectNodeContents(l);
16725          var t = k.select();
16726          CKEDITOR.env.ie &&
16727            (f = e.once("blur", function() {
16728              a.lockSelection(t);
16729            }));
16730          var q = CKEDITOR.document.getWindow().getScrollPosition().y;
16731          setTimeout(function() {
16732            CKEDITOR.env.webkit && (CKEDITOR.document.getBody().$.scrollTop = q);
16733            f && f.removeListener();
16734            CKEDITOR.env.ie && e.focus();
16735            n.selectBookmarks(g);
16736            l.remove();
16737            var b;
16738            CKEDITOR.env.webkit &&
16739              (b = l.getFirst()) &&
16740              b.is &&
16741              b.hasClass("Apple-style-span") &&
16742              (l = b);
16743            a.removeListener("selectionChange", h);
16744            c(l.getHtml());
16745          }, 0);
16746        }
16747      }
16748      function y() {
16749        if ("paste" == p.mainPasteEvent)
16750          return a.fire("beforePaste", { type: "auto", method: "paste" }), !1;
16751        a.focus();
16752        g();
16753        var b = a.focusManager;
16754        b.lock();
16755        if (a.editable().fire(p.mainPasteEvent) && !e("paste")) return b.unlock(), !1;
16756        b.unlock();
16757        return !0;
16758      }
16759      function n(b) {
16760        if ("wysiwyg" == a.mode)
16761          switch (b.data.keyCode) {
16762            case CKEDITOR.CTRL + 86:
16763            case CKEDITOR.SHIFT + 45:
16764              b = a.editable();
16765              g();
16766              "paste" == p.mainPasteEvent && b.fire("beforepaste");
16767              break;
16768            case CKEDITOR.CTRL + 88:
16769            case CKEDITOR.SHIFT + 46:
16770              a.fire("saveSnapshot"),
16771                setTimeout(function() {
16772                  a.fire("saveSnapshot");
16773                }, 50);
16774          }
16775      }
16776      function l(b) {
16777        var c = { type: "auto", method: "paste", dataTransfer: p.initPasteDataTransfer(b) };
16778        c.dataTransfer.cacheData();
16779        var d = !1 !== a.fire("beforePaste", c);
16780        d && p.canClipboardApiBeTrusted(c.dataTransfer, a)
16781          ? (b.data.preventDefault(),
16782            setTimeout(function() {
16783              r(a, c);
16784            }, 0))
16785          : k(b, function(b) {
16786              c.dataValue = b.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/gi, "");
16787              d && r(a, c);
16788            });
16789      }
16790      function t() {
16791        if ("wysiwyg" == a.mode) {
16792          var b = q("paste");
16793          a.getCommand("cut").setState(q("cut"));
16794          a.getCommand("copy").setState(q("copy"));
16795          a.getCommand("paste").setState(b);
16796          a.fire("pasteState", b);
16797        }
16798      }
16799      function q(b) {
16800        if (v && b in { paste: 1, cut: 1 }) return CKEDITOR.TRISTATE_DISABLED;
16801        if ("paste" == b) return CKEDITOR.TRISTATE_OFF;
16802        b = a.getSelection();
16803        var c = b.getRanges();
16804        return b.getType() == CKEDITOR.SELECTION_NONE || (1 == c.length && c[0].c
16804ollapsed)
16805          ? CKEDITOR.TRISTATE_DISABLED
16806          : CKEDITOR.TRISTATE_OFF;
16807      }
16808      var p = CKEDITOR.plugins.clipboard,
16809        m = 0,
16810        u = 0,
16811        v = 0;
16812      (function() {
16813        a.on("key", n);
16814        a.on("contentDom", b);
16815        a.on("selectionChange", function(a) {
16816          v = a.data.selection.getRanges()[0].checkReadOnly();
16817          t();
16818        });
16819        if (a.contextMenu) {
16820          a.contextMenu.addListener(function(a, b) {
16821            v = b.getRanges()[0].checkReadOnly();
16822            return { cut: q("cut"), copy: q("copy"), paste: q("paste") };
16823          });
16824          var c = null;
16825          a.on("menuShow", function() {
16826            c && (c.removeListener(), (c = null));
16827            var b = a.contextMenu.findItemByCommandName("paste");
16828            b &&
16829              b.element &&
16830              (c = b.element.on("touchend", function() {
16831                a._.forcePasteDialog = !0;
16832              }));
16833          });
16834        }
16835        if (a.ui.addButton)
16836          a.once("instanceReady", function() {
16837            a._.pasteButtons &&
16838              CKEDITOR.tools.array.forEach(a._.pasteButtons, function(b) {
16839                if ((b = a.ui.get(b)))
16840                  CKEDITOR.document.getById(b._.id).on("touchend", function() {
16841                    a._.forcePasteDialog = !0;
16842                  });
16843              });
16844          });
16845      })();
16846      (function() {
16847        function b(c, d, e, h, f) {
16848          var n = a.lang.clipboard[d];
16849          a.addCommand(d, e);
16850          a.ui.addButton && a.ui.addButton(c, { label: n, command: d, toolbar: "clipboard," + h });
16851          a.addMenuItems &&
16852            a.addMenuItem(d, { label: n, command: d, group: "clipboard", order: f });
16853        }
16854        b("Cut", "cut", c("cut"), 10, 1);
16855        b("Copy", "copy", c("copy"), 20, 4);
16856        b("Paste", "paste", d(), 30, 8);
16857        a._.pasteButtons || (a._.pasteButtons = []);
16858        a._.pasteButtons.push("Paste");
16859      })();
16860      a.getClipboardData = function(b, c) {
16861        function d(a) {
16862          a.removeListener();
16863          a.cancel();
16864          c(a.data);
16865        }
16866        function e(a) {
16867          a.removeListener();
16868          a.cancel();
16869          c({
16870            type: f,
16871            dataValue: a.data.dataValue,
16872            dataTransfer: a.data.dataTransfer,
16873            method: "paste",
16874          });
16875        }
16876        var h = !1,
16877          f = "auto";
16878        c || ((c = b), (b = null));
16879        a.on(
16880          "beforePaste",
16881          function(a) {
16882            a.removeListener();
16883            h = !0;
16884            f = a.data.type;
16885          },
16886          null,
16887          null,
16888          1e3,
16889        );
16890        a.on("paste", d, null, null, 0);
16891        !1 === y() &&
16892          (a.removeListener("paste", d),
16893          a._.forcePasteDialog && h && a.fire("pasteDialog")
16894            ? (a.on("pasteDialogCommit", e),
16895              a.on("dialogHide", function(a) {
16896                a.removeListener();
16897                a.data.removeListener("pasteDialogCommit", e);
16898                a.data._.committed || c(null);
16899              }))
16900            : c(null));
16901      };
16902    }
16903    function z(a) {
16904      if (CKEDITOR.env.webkit) {
16905        if (!a.match(/^[^<]*$/g) && !a.match(/^(<div><br( ?\/)?><\/div>|<div>[^<]*<\/div>)*$/gi))
16906          return "html";
16907      } else if (CKEDITOR.env.ie) {
16908        if (
16909          !a.match(/^([^<]|<br( ?\/)?>)*$/gi) &&
16910          !a.match(/^(<p>([^<]|<br( ?\/)?>)*<\/p>|(\r\n))*$/gi)
16911        )
16912          return "html";
16913      } else if (CKEDITOR.env.gecko) {
16914        if (!a.match(/^([^<]|<br( ?\/)?>)*$/gi)) return "html";
16915      } else return "html";
16916      return "htmlifiedtext";
16917    }
16918    function A(a, b) {
16919      function c(a) {
16920        return (
16921          CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e", ~~(a / 2)) + (1 == a % 2 ? "\x3cbr\x3e" : "")
16922        );
16923      }
16924      b = b
16925        .replace(/\s+/g, " ")
16926        .replace(/> +</g, "\x3e\x3c")
16927        .replace(/<br ?\/>/gi, "\x3cbr\x3e");
16928      b = b.replace(/<\/?[A-Z]+>/g, function(a) {
16929        return a.toLowerCase();
16930      });
16931      if (b.match(/^[^<]$/)) return b;
16932      CKEDITOR.env.webkit &&
16933        -1 < b.indexOf("\x3cdiv\x3e") &&
16934        ((b = b
16935          .replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g, "\x3cbr\x3e")
16936          .replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g, "\x3cdiv\x3e\x3c/div\x3e")),
16937        b.match(/<div>(<br>|)<\/div>/) &&
16938          (b =
16939            "\x3cp\x3e" +
16940            b.replace(/(<div>(<br>|)<\/div>)+/g, function(a) {
16941              return c(a.split("\x3c/div\x3e\x3cdiv\x3e").length + 1);
16942            }) +
16943            "\x3c/p\x3e"),
16944        (b = b.replace(/<\/div><div>/g, "\x3cbr\x3e")),
16945        (b = b.replace(/<\/?div>/g, "")));
16946      CKEDITOR.env.gecko &&
16947        a.enterMode != CKEDITOR.ENTER_BR &&
16948        (CKEDITOR.env.gecko && (b = b.replace(/^<br><br>$/, "\x3cbr\x3e")),
16949        -1 < b.indexOf("\x3cbr\x3e\x3cbr\x3e") &&
16950          (b =
16951            "\x3cp\x3e" +
16952            b.replace(/(<br>){2,}/g, function(a) {
16953              return c(a.length / 4);
16954            }) +
16955            "\x3c/p\x3e"));
16956      return B(a, b);
16957    }
16958    function C() {
16959      function a() {
16960        var a = {},
16961          b;
16962        for (b in CKEDITOR.dtd) "$" != b.charAt(0) && "div" != b && "span" != b && (a[b] = 1);
16963        return a;
16964      }
16965      var b = {};
16966      return {
16967        get: function(c) {
16968          return "plain-text" == c
16969            ? b.plainText || (b.plainText = new CKEDITOR.filter("br"))
16970            : "semantic-content" == c
16971              ? ((c = b.semanticContent) ||
16972                  ((c = new CKEDITOR.filter()),
16973                  c.allow({ $1: { elements: a(), attributes: !0, styles: !1, classes: !1 } }),
16974                  (c = b.semanticContent = c)),
16975                c)
16976              : c ? new CKEDITOR.filter(c) : null;
16977        },
16978      };
16979    }
16980    function w(a, b, c) {
16981      b = CKEDITOR.htmlParser.fragment.fromHtml(b);
16982      var d = new CKEDITOR.htmlParser.basicWriter();
16983      c.applyTo(b, !0, !1, a.activeEnterMode);
16984      b.writeHtml(d);
16985      return d.getHtml();
16986    }
16987    function B(a, b) {
16988      a.enterMode == CKEDITOR.ENTER_BR
16989        ? (b = b
16990            .replace(/(<\/p><p>)+/g, function(a) {
16991              return CKEDITOR.tools.repeat("\x3cbr\x3e", a.length / 7 * 2);
16992            })
16993            .replace(/<\/?p>/g, ""))
16994        : a.enterMode == CKEDITOR.ENTER_DIV && (b = b.replace(/<(\/)?p>/g, "\x3c$1div\x3e"));
16995      return b;
16996    }
16997    function D(a) {
16998      a.data.preventDefault();
16999      a.data.$.dataTransfer.dropEffect = "none";
17000    }
17001    function E(a) {
17002      var b = CKEDITOR.plugins.clipboard;
17003      a.on("contentDom", function() {
17004        function c(b, c, e) {
17005          c.select();
17006          r(
17007            a,
17008            {
17009              dataTransfer: e,
17010              method: "drop",
17011            },
17012            1,
17013          );
17014          e.sourceEditor.fire("saveSnapshot");
17015          e.sourceEditor.editable().extractHtmlFromRange(b);
17016          e.sourceEditor.getSelection().selectRanges([b]);
17017          e.sourceEditor.fire("saveSnapshot");
17018        }
17019        function d(c, e) {
17020          c.select();
17021          r(a, { dataTransfer: e, method: "drop" }, 1);
17022          b.resetDragDataTransfer();
17023        }
17024        function g(b, c, e) {
17025          var d = { $: b.data.$, target: b.data.getTarget() };
17026          c && (d.dragRange = c);
17027          e && (d.dropRange = e);
17028          !1 === a.fire(b.name, d) && b.data.preventDefault();
17029        }
17030        function h(a) {
17031          a.type != CKEDITOR.NODE_ELEMENT && (a = a.getParent());
17032          return a.getChildCount();
17033        }
17034        var e = a.editable(),
17035          f = CKEDITOR.plugins.clipboard.getDropTarget(a),
17036          k = a.ui.space("top"),
17037          m = a.ui.space("bottom");
17038        b.preventDefaultDropOnElement(k);
17039        b.preventDefaultDropOnElement(m);
17040        e.attachListener(f, "dragstart", g);
17041        e.attachListener(a, "dragstart", b.resetDragDataTransfer, b, null, 1);
17042        e.attachListener(
17043          a,
17044          "dragstart",
17045          function(c) {
17046            b.initDragDataTransfer(c, a);
17047          },
17048          null,
17049          null,
17050          2,
17051        );
17052        e.attachListener(
17053          a,
17054          "dragstart",
17055          function() {
17056            var c = (b.dragRange = a.getSelection().getRanges()[0]);
17057            CKEDITOR.env.ie &&
17058              10 > CKEDITOR.env.version &&
17059              ((b.dragStartContainerChildCount = c ? h(c.startContainer) : null),
17060              (b.dragEndContainerChildCount = c ? h(c.endContainer) : null));
17061          },
17062          null,
17063          null,
17064          100,
17065        );
17066        e.attachListener(f, "dragend", g);
17067        e.attachListener(a, "dragend", b.initDragDataTransfer, b, null, 1);
17068        e.attachListener(a, "dragend", b.resetDragDataTransfer, b, null, 100);
17069        e.attachListener(f, "dragover", function(a) {
17070          if (CKEDITOR.env.edge) a.data.preventDefault();
17071          else {
17072            var b = a.data.getTarget();
17073            b && b.is && b.is("html")
17074              ? a.data.preventDefault()
17075              : CKEDITOR.env.ie &&
17076                CKEDITOR.plugins.clipboard.isFileApiSupported &&
17077                a.data.$.dataTransfer.types.contains("Files") &&
17078                a.data.preventDefault();
17079          }
17080        });
17081        e.attachListener(
17082          f,
17083          "drop",
17084          function(c) {
17085            if (!c.data.$.defaultPrevented) {
17086              c.data.preventDefault();
17087              var e = c.data.getTarget();
17088              if (!e.isReadOnly() || (e.type == CKEDITOR.NODE_ELEMENT && e.is("html"))) {
17089                var e = b.getRangeAtDropPosition(c, a),
17090                  d = b.dragRange;
17091                e && g(c, d, e);
17092              }
17093            }
17094          },
17095          null,
17096          null,
17097          9999,
17098        );
17099        e.attachListener(a, "drop", b.initDragDataTransfer, b, null, 1);
17100        e.attachListener(
17101          a,
17102          "drop",
17103          function(e) {
17104            if ((e = e.data)) {
17105              var h = e.dropRange,
17106                f = e.dragRange,
17107                g = e.dataTransfer;
17108              g.getTransferType(a) == CKEDITOR.DATA_TRANSFER_INTERNAL
17109                ? setTimeout(function() {
17110                    b.internalDrop(f, h, g, a);
17111                  }, 0)
17112                : g.getTransferType(a) == CKEDITOR.DATA_TRANSFER_CROSS_EDITORS
17113                  ? c(f, h, g)
17114                  : d(h, g);
17115            }
17116          },
17117          null,
17118          null,
17119          9999,
17120        );
17121      });
17122    }
17123    var m;
17124    CKEDITOR.plugins.add("clipboard", {
17125      requires: "dialog,notification,toolbar",
17126      init: function(a) {
17127        var b,
17128          c = C();
17129        a.config.forcePasteAsPlainText
17130          ? (b = "plain-text")
17131          : a.config.pasteFilter
17132            ? (b = a.config.pasteFilter)
17133            : !CKEDITOR.env.webkit || "pasteFilter" in a.config || (b = "semantic-content");
17134        a.pasteFilter = c.get(b);
17135        x(a);
17136        E(a);
17137        CKEDITOR.dialog.add("paste", CKEDITOR.getUrl(this.path + "dialogs/paste.js"));
17138        if (CKEDITOR.env.gecko) {
17139          var d = ["image/png", "image/jpeg", "image/gif"],
17140            g;
17141          a.on(
17142            "paste",
17143            function(b) {
17144              var c = b.data,
17145                f = c.dataTransfer;
17146              if (
17147                !c.dataValue &&
17148                "paste" == c.method &&
17149                f &&
17150                1 == f.getFilesCount() &&
17151                g != f.id &&
17152                ((f = f.getFile(0)), -1 != CKEDITOR.tools.indexOf(d, f.type))
17153              ) {
17154                var k = new FileReader();
17155                k.addEventListener(
17156                  "load",
17157                  function() {
17158                    b.data.dataValue = '\x3cimg src\x3d"' + k.result + '" /\x3e';
17159                    a.fire("paste", b.data);
17160                  },
17161                  !1,
17162                );
17163                k.addEventListener(
17164                  "abort",
17165                  function() {
17166                    a.fire("paste", b.data);
17167                  },
17168                  !1,
17169                );
17170                k.addEventListener(
17171                  "error",
17172                  function() {
17173                    a.fire("paste", b.data);
17174                  },
17175                  !1,
17176                );
17177                k.readAsDataURL(f);
17178                g = c.dataTransfer.id;
17179                b.stop();
17180              }
17181            },
17182            null,
17183            null,
17184            1,
17185          );
17186        }
17187        a.on(
17188          "paste",
17189          function(b) {
17190            b.data.dataTransfer ||
17191              (b.data.dataTransfer = new CKEDITOR.plugins.clipboard.dataTransfer()
17191);
17192            if (!b.data.dataValue) {
17193              var c = b.data.dataTransfer,
17194                d = c.getData("text/html");
17195              if (d) (b.data.dataValue = d), (b.data.type = "html");
17196              else if ((d = c.getData("text/plain")))
17197                (b.data.dataValue = a.editable().transformPlainTextToHtml(d)),
17198                  (b.data.type = "text");
17199            }
17200          },
17201          null,
17202          null,
17203          1,
17204        );
17205        a.on(
17206          "paste",
17207          function(a) {
17208            var b = a.data.dataValue,
17209              c = CKEDITOR.dtd.$block;
17210            -1 < b.indexOf("Apple-") &&
17211              ((b = b.replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi, " ")),
17212              "html" != a.data.type &&
17213                (b = b.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi, function(
17214                  a,
17215                  b,
17216                ) {
17217                  return b.replace(/\t/g, "\x26nbsp;\x26nbsp; \x26nbsp;");
17218                })),
17219              -1 < b.indexOf('\x3cbr class\x3d"Apple-interchange-newline"\x3e') &&
17220                ((a.data.startsWithEOL = 1),
17221                (a.data.preSniffing = "html"),
17222                (b = b.replace(/<br class="Apple-interchange-newline">/, ""))),
17223              (b = b.replace(/(<[^>]+) class="Apple-[^"]*"/gi, "$1")));
17224            if (b.match(/^<[^<]+cke_(editable|contents)/i)) {
17225              var d,
17226                g,
17227                n = new CKEDITOR.dom.element("div");
17228              for (
17229                n.setHtml(b);
17230                1 == n.getChildCount() &&
17231                (d = n.getFirst()) &&
17232                d.type == CKEDITOR.NODE_ELEMENT &&
17233                (d.hasClass("cke_editable") || d.hasClass("cke_contents"));
17234
17235              )
17236                n = g = d;
17237              g && (b = g.getHtml().replace(/<br>$/i, ""));
17238            }
17239            CKEDITOR.env.ie
17240              ? (b = b.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g, function(b, d) {
17241                  return d.toLowerCase() in c ? ((a.data.preSniffing = "html"), "\x3c" + d) : b;
17242                }))
17243              : CKEDITOR.env.webkit
17244                ? (b = b.replace(/<\/(\w+)><div><br><\/div>$/, function(b, d) {
17245                    return d in c ? ((a.data.endsWithEOL = 1), "\x3c/" + d + "\x3e") : b;
17246                  }))
17247                : CKEDITOR.env.gecko && (b = b.replace(/(\s)<br>$/, "$1"));
17248            a.data.dataValue = b;
17249          },
17250          null,
17251          null,
17252          3,
17253        );
17254        a.on(
17255          "paste",
17256          function(b) {
17257            b = b.data;
17258            var d = a._.nextPasteType || b.type,
17259              f = b.dataValue,
17260              g,
17261              m = a.config.clipboard_defaultContentType || "html",
17262              n = b.dataTransfer.getTransferType(a);
17263            g = "html" == d || "html" == b.preSniffing ? "html" : z(f);
17264            delete a._.nextPasteType;
17265            "htmlifiedtext" == g && (f = A(a.config, f));
17266            "text" == d && "html" == g
17267              ? (f = w(a, f, c.get("plain-text")))
17268              : n == CKEDITOR.DATA_TRANSFER_EXTERNAL &&
17269                a.pasteFilter &&
17270                !b.dontFilter &&
17271                (f = w(a, f, a.pasteFilter));
17272            b.startsWithEOL && (f = '\x3cbr data-cke-eol\x3d"1"\x3e' + f);
17273            b.endsWithEOL && (f += '\x3cbr data-cke-eol\x3d"1"\x3e');
17274            "auto" == d && (d = "html" == g || "html" == m ? "html" : "text");
17275            b.type = d;
17276            b.dataValue = f;
17277            delete b.preSniffing;
17278            delete b.startsWithEOL;
17279            delete b.endsWithEOL;
17280          },
17281          null,
17282          null,
17283          6,
17284        );
17285        a.on(
17286          "paste",
17287          function(b) {
17288            b = b.data;
17289            b.dataValue &&
17290              (a.insertHtml(b.dataValue, b.type, b.range),
17291              setTimeout(function() {
17292                a.fire("afterPaste");
17293              }, 0));
17294          },
17295          null,
17296          null,
17297          1e3,
17298        );
17299        a.on("pasteDialog", function(b) {
17300          setTimeout(function() {
17301            a.openDialog("paste", b.data);
17302          }, 0);
17303        });
17304      },
17305    });
17306    CKEDITOR.plugins.clipboard = {
17307      isCustomCopyCutSupported:
17308        (!CKEDITOR.env.ie || 16 <= CKEDITOR.env.version) && !CKEDITOR.env.iOS,
17309      isCustomDataTypesSupported: !CKEDITOR.env.ie || 16 <= CKEDITOR.env.version,
17310      isFileApiSupported: !CKEDITOR.env.ie || 9 < CKEDITOR.env.version,
17311      mainPasteEvent: CKEDITOR.env.ie && !CKEDITOR.env.edge ? "beforepaste" : "paste",
17312      addPasteButton: function(a, b, c) {
17313        a.ui.addButton &&
17314          (a.ui.addButton(b, c),
17315          a._.pasteButtons || (a._.pasteButtons = []),
17316          a._.pasteButtons.push(b));
17317      },
17318      canClipboardApiBeTrusted: function(a, b) {
17319        return a.getTransferType(b) != CKEDITOR.DATA_TRANSFER_EXTERNAL ||
17320          (CKEDITOR.env.chrome && !a.isEmpty()) ||
17321          (CKEDITOR.env.gecko && (a.getData("text/html") || a.getFilesCount())) ||
17322          (CKEDITOR.env.safari && 603 <= CKEDITOR.env.version && !CKEDITOR.env.iOS) ||
17323          (CKEDITOR.env.edge && 16 <= CKEDITOR.env.version)
17324          ? !0
17325          : !1;
17326      },
17327      getDropTarget: function(a) {
17328        var b = a.editable();
17329        return (CKEDITOR.env.ie && 9 > CKEDITOR.env.version) || b.isInline() ? b : a.document;
17330      },
17331      fixSplitNodesAfterDrop: function(a, b, c, d) {
17332        function g(a, c, d) {
17333          var g = a;
17334          g.type == CKEDITOR.NODE_TEXT && (g = a.getParent());
17335          if (g.equals(c) && d != c.getChildCount())
17336            return (
17337              (a = b.startContainer.getChild(b.startOffset - 1)),
17338              (c = b.startContainer.getChild(b.startOffset)),
17339              a &&
17340                a.type == CKEDITOR.NODE_TEXT &&
17341                c &&
17342                c.type == CKEDITOR.NODE_TEXT &&
17343                ((d = a.getLength()),
17344                a.setText(a.getText() + c.getText()),
17345                c.remove(),
17346                b.setStart(a, d),
17347                b.collapse(!0)),
17348              !0
17349            );
17350        }
17351        var h = b.startContainer;
17352        "number" == typeof d &&
17353          "number" == typeof c &&
17354          h.type == CKEDITOR.NODE_ELEMENT &&
17355          (g(a.startContainer, h, c) || g(a.endContainer, h, d));
17356      },
17357      isDropRangeAffectedByDragRange: function(a, b) {
17358        var c = b.startContainer,
17359          d = b.endOffset;
17360        return (a.endContainer.equals(c) && a.endOffset <= d) ||
17361          (a.startContainer.getParent().equals(c) && a.startContainer.getIndex() < d) ||
17362          (a.endContainer.getParent().equals(c) && a.endContainer.getIndex() < d)
17363          ? !0
17364          : !1;
17365      },
17366      internalDrop: function(a, b, c, d) {
17367        var g = CKEDITOR.plugins.clipboard,
17368          h = d.editable(),
17369          e,
17370          f;
17371        d.fire("saveSnapshot");
17372        d.fire("lockSnapshot", { dontUpdate: 1 });
17373        CKEDITOR.env.ie &&
17374          10 > CKEDITOR.env.version &&
17375          this.fixSplitNodesAfterDrop(
17376            a,
17377            b,
17378            g.dragStartContainerChildCount,
17379            g.dragEndContainerChildCount,
17380          );
17381        (f = this.isDropRangeAffectedByDragRange(a, b)) || (e = a.createBookmark(!1));
17382        g = b.clone().createBookmark(!1);
17383        f && (e = a.createBookmark(!1));
17384        a = e.startNode;
17385        b = e.endNode;
17386        f = g.startNode;
17387        b &&
17388          a.getPosition(f) & CKEDITOR.POSITION_PRECEDING &&
17389          b.getPosition(f) & CKEDITOR.POSITION_FOLLOWING &&
17390          f.insertBefore(a);
17391        a = d.createRange();
17392        a.moveToBookmark(e);
17393        h.extractHtmlFromRange(a, 1);
17394        b = d.createRange();
17395        b.moveToBookmark(g);
17396        r(d, { dataTransfer: c, method: "drop", range: b }, 1);
17397        d.fire("unlockSnapshot");
17398      },
17399      getRangeAtDropPosition: function(a, b) {
17400        var c = a.data.$,
17401          d = c.clientX,
17402          g = c.clientY,
17403          h = b.getSelection(!0).getRanges()[0],
17404          e = b.createRange();
17405        if (a.data.testRange) return a.data.testRange;
17406        if (document.caretRangeFromPoint && b.document.$.caretRangeFromPoint(d, g))
17407          (c = b.document.$.caretRangeFromPoint(d, g)),
17408            e.setStart(CKEDITOR.dom.node(c.startContainer), c.startOffset),
17409            e.collapse(!0);
17410        else if (c.rangeParent)
17411          e.setStart(CKEDITOR.dom.node(c.rangeParent), c.rangeOffset), e.collapse(!0);
17412        else {
17413          if (CKEDITOR.env.ie && 8 < CKEDITOR.env.version && h && b.editable().hasFocus) return h;
17414          if (document.body.createTextRange) {
17415            b.focus();
17416            c = b.document.getBody().$.createTextRange();
17417            try {
17418              for (var f = !1, k = 0; 20 > k && !f; k++) {
17419                if (!f)
17420                  try {
17421                    c.moveToPoint(d, g - k), (f = !0);
17422                  } catch (m) {}
17423                if (!f)
17424                  try {
17425                    c.moveToPoint(d, g + k), (f = !0);
17426                  } catch (n) {}
17427              }
17428              if (f) {
17429                var l = "cke-temp-" + new Date().getTime();
17430                c.pasteHTML('\x3cspan id\x3d"' + l + '"\x3e​\x3c/span\x3e');
17431                var t = b.document.getById(l);
17432                e.moveToPosition(t, CKEDITOR.POSITION_BEFORE_START);
17433                t.remove();
17434              } else {
17435                var q = b.document.$.elementFromPoint(d, g),
17436                  p = new CKEDITOR.dom.element(q),
17437                  r;
17438                if (p.equals(b.editable()) || "html" == p.getName())
17439                  return h && h.startContainer && !h.startContainer.equals(b.editable()) ? h : null;
17440                r = p.getClientRect();
17441                d < r.left
17442                  ? e.setStartAt(p, CKEDITOR.POSITION_AFTER_START)
17443                  : e.setStartAt(p, CKEDITOR.POSITION_BEFORE_END);
17444                e.collapse(!0);
17445              }
17446            } catch (u) {
17447              return null;
17448            }
17449          } else return null;
17450        }
17451        return e;
17452      },
17453      initDragDataTransfer: function(a, b) {
17454        var c = a.data.$ ? a.data.$.dataTransfer : null,
17455          d = new this.dataTransfer(c, b);
17456        "dragstart" === a.name && d.storeId();
17457        c
17458          ? this.dragData && d.id == this.dragData.id ? (d = this.dragData) : (this.dragData = d)
17459          : this.dragData ? (d = this.dragData) : (this.dragData = d);
17460        a.data.dataTransfer = d;
17461      },
17462      resetDragDataTransfer: function() {
17463        this.dragData = null;
17464      },
17465      initPasteDataTransfer: function(a, b) {
17466        if (this.isCustomCopyCutSupported) {
17467          if (a && a.data && a.data.$) {
17468            var c = a.data.$.clipboardData,
17469              d = new this.dataTransfer(c, b);
17470            ("copy" !== a.name && "cut" !== a.name) || d.storeId();
17471            this.copyCutData && d.id == this.copyCutData.id
17472              ? ((d = this.copyCutData), (d.$ = c))
17473              : (this.copyCutData = d);
17474            return d;
17475          }
17476          return new this.dataTransfer(null, b);
17477        }
17478        return new this.dataTransfer(
17479          (CKEDITOR.env.edge && a && a.data.$ && a.data.$.clipboardData) || null,
17480          b,
17481        );
17482      },
17483      preventDefaultDropOnElement: function(a) {
17484        a && a.on("dragover", D);
17485      },
17486    };
17487    m = CKEDITOR.plugins.clipboard.isCustomDataTypesSupported ? "cke/id" : "Text";
17488    CKEDITOR.plugins.clipboard.dataTransfer = function(a, b) {
17489      a && (this.$ = a);
17490      this._ = {
17491        metaRegExp: /^<meta.*?>/i,
17492        bodyRegExp: /<body(?:[\s\S]*?)>([\s\S]*)<\/body>/i,
17493        fragmentRegExp: /\x3c!--(?:Start|End)Fragment--\x3e/g,
17494        data: {},
17495        files: [],
17496        nativeHtmlCache: "",
17497        normalizeType: function(a) {
17498          a = a.toLowerCase();
17499          return "text" == a || "text/plain" == a ? "Text" : "url" == a ? "URL" : a;
17500        },
17501      };
17502      this._.fallbackDataTransfer = new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this);
17503      this.id = this.getData(m);
17504      this.id || (this.id = "Text" == m ? "" : "cke-" + CKEDITOR.tools.getUniqueId());
17505      b &&
17506        ((this.sourceEditor = b),
17507        this.setData("text/html", b.getSelectedHtml(1)),
17508        "Text" == m ||
17509          this.getData("text/plain") ||
17510          this.setData("text/plain", b.getSelection().getSelectedText()));
17511    };
17512    CKEDITOR.DATA_TRANSFER_INTERNAL = 1;
17513    CKEDITOR.DATA_TRANSFER_CROSS_EDITORS = 2;
17514    CKEDITOR.DATA_TRANSFER_EXTERNAL = 3;
17515    CKEDITOR.plugins.clipboard.dataTransfer.prototype = {
17516      getData: function(a, b) {
17517        a = this._.normalizeType(a);
17518        var c = "text/html" == a && b ? this._.nativeHtmlCache : this._.data[a];
17519        if (void 0 === c || null === c || "" === c) {
17520          if (this._.fallbackDataTransfer.isRequired())
17521            c = this._.fallbackDataTransfer.getData(a, b);
17522          else
17523            try {
17524              c = this.$.getData(a) || "";
17525            } catch (d) {
17526              c = "";
17527            }
17528          "text/html" != a || b || (c = this._stripHtml(c));
17529        }
17530        "Text" == a &&
17531          CKEDITOR.env.gecko &&
17532          this.getFilesCount() &&
17533          "file://" == c.substring(0, 7) &&
17534          (c = "");
17535        if ("string" === typeof c)
17536          var g = c.indexOf("\x3c/html\x3e"),
17537            c = -1 !== g ? c.substring(0, g + 7) : c;
17538        return c;
17539      },
17540      setData: function(a, b) {
17541        a = this._.normalizeType(a);
17542        "text/html" == a
17543          ? ((this._.data[a] = this._stripHtml(b)), (this._.nativeHtmlCache = b))
17544          : (this._.data[a] = b);
17545        if (CKEDITOR.plugins.clipboard.isCustomDataTypesSupported || "URL" == a || "Text" == a)
17546          if (
17547            ("Text" == m && "Text" == a && (this.id = b), this._.fallbackDataTransfer.isRequired())
17548          )
17549            this._.fallbackDataTransfer.setData(a, b);
17550          else
17551            try {
17552              this.$.setData(a, b);
17553            } catch (c) {}
17554      },
17555      storeId: function() {
17556        "Text" !== m && this.setData(m, this.id);
17557      },
17558      getTransferType: function(a) {
17559        return this.sourceEditor
17560          ? this.sourceEditor == a
17561            ? CKEDITOR.DATA_TRANSFER_INTERNAL
17562            : CKEDITOR.DATA_TRANSFER_CROSS_EDITORS
17563          : CKEDITOR.DATA_TRANSFER_EXTERNAL;
17564      },
17565      cacheData: function() {
17566        function a(a) {
17567          a = b._.normalizeType(a);
17568          var c = b.getData(a);
17569          "text/html" == a && ((b._.nativeHtmlCache = b.getData(a, !0)), (c = b._stripHtml(c)));
17570          c && (b._.data[a] = c);
17571        }
17572        if (this.$) {
17573          var b = this,
17574            c,
17575            d;
17576          if (CKEDITOR.plugins.clipboard.isCustomDataTypesSupported) {
17577            if (this.$.types) for (c = 0; c < this.$.types.length; c++) a(this.$.types[c]);
17578          } else a("Text"), a("URL");
17579          d = this._getImageFromClipboard();
17580          if ((this.$ && this.$.files) || d) {
17581            this._.files = [];
17582            if (this.$.files && this.$.files.length)
17583              for (c = 0; c < this.$.files.length; c++) this._.files.push(this.$.files[c]);
17584            0 === this._.files.length && d && this._.files.push(d);
17585          }
17586        }
17587      },
17588      getFilesCount: function() {
17589        return this._.files.length
17590          ? this._.files.length
17591          : this.$ && this.$.files && this.$.files.length
17592            ? this.$.files.length
17593            : this._getImageFromClipboard() ? 1 : 0;
17594      },
17595      getFile: function(a) {
17596        return this._.files.length
17597          ? this._.files[a]
17598          : this.$ && this.$.files && this.$.files.length
17599            ? this.$.files[a]
17600            : 0 === a ? this._getImageFromClipboard() : void 0;
17601      },
17602      isEmpty: function() {
17603        var a = {},
17604          b;
17605        if (this.getFilesCount()) return !1;
17606        CKEDITOR.tools.array.forEach(CKEDITOR.tools.objectKeys(this._.data), function(b) {
17607          a[b] = 1;
17608        });
17609        if (this.$)
17610          if (CKEDITOR.plugins.clipboard.isCustomDataTypesSupported) {
17611            if (this.$.types) for (var c = 0; c < this.$.types.length; c++) a[this.$.types[c]] = 1;
17612          } else (a.Text = 1), (a.URL = 1);
17613        "Text" != m && (a[m] = 0);
17614        for (b in a) if (a[b] && "" !== this.getData(b)) return !1;
17615        return !0;
17616      },
17617      _getImageFromClipboard: function() {
17618        var a;
17619        if (this.$ && this.$.items && this.$.items[0])
17620          try {
17621            if ((a = this.$.items[0].getAsFile()) && a.type) return a;
17622          } catch (b) {}
17623      },
17624      _stripHtml: function(a) {
17625        if (a && a.length) {
17626          a = a.replace(this._.metaRegExp, "");
17627          var b = this._.bodyRegExp.exec(a);
17628          b && b.length && ((a = b[1]), (a = a.replace(this._.fragmentRegExp, "")));
17629        }
17630        return a;
17631      },
17632    };
17633    CKEDITOR.plugins.clipboard.fallbackDataTransfer = function(a) {
17634      this._dataTransfer = a;
17635      this._customDataFallbackType = "text/html";
17636    };
17637    CKEDITOR.plugins.clipboard.fallbackDataTransfer._isCustomMimeTypeSupported = null;
17638    CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes = [];
17639    CKEDITOR.plugins.clipboard.fallbackDataTransfer.prototype = {
17640      isRequired: function() {
17641        var a = CKEDITOR.plugins.clipboard.fallbackDataTransfer,
17642          b = this._dataTransfer.$;
17643        if (null === a._isCustomMimeTypeSupported)
17644          if (b) {
17645            a._isCustomMimeTypeSupported = !1;
17646            try {
17647              b.setData("cke/mimetypetest", "cke test value"),
17648                (a._isCustomMimeTypeSupported = "cke test value" === b.getData("cke/mimetypetest")),
17649                b.clearData("cke/mimetypetest");
17650            } catch (c) {}
17651          } else return !1;
17652        return !a._isCustomMimeTypeSupported;
17653      },
17654      getData: function(a, b) {
17655        var c = this._getData(this._customDataFallbackType, !0);
17656        if (b) return c;
17657        var c = this._extractDataComment(c),
17658          d = null,
17659          d =
17660            a === this._customDataFallbackType
17661              ? c.content
17662              : c.data && c.data[a] ? c.data[a] : this._getData(a, !0);
17663        return null !== d ? d : "";
17664      },
17665      setData: function(a, b) {
17666        var c = a === this._customDataFallbackType;
17667        c && (b = this._applyDataComment(b, this._getFallbackTypeData()));
17668        var d = b,
17669          g = this._dataTransfer.$;
17670        try {
17671          g.setData(a, d), c && (this._dataTransfer._.nativeHtmlCache = d);
17672        } catch (h) {
17673          if (this._isUnsupportedMimeTypeError(h)) {
17674            c = CKEDITOR.plugins.clipboard.fallbackDataTransfer;
17675            -1 === CKEDITOR.tools.indexOf(c._customTypes, a) && c._customTypes.push(a);
17676            var c = this._getFallbackTypeContent(),
17677              e = this._getFallbackTypeData();
17678            e[a] = d;
17679            try {
17680              (d = this._applyDataComment(c, e)),
17681                g.setData(this._customDataFallbackType, d),
17682                (this._dataTransfer._.nativeHtmlCache = d);
17683            } catch (f) {
17684              d = "";
17685            }
17686          }
17687        }
17688        return d;
17689      },
17690      _getData: function(a, b) {
17691        var c = this._dataTransfer._.data;
17692        if (!b && c[a]) return c[a];
17693        try {
17694          return this._dataTransfer.$.getData(a);
17695        } catch (d) {
17696          return null;
17697        }
17698      },
17699      _getFallbackTypeContent: function() {
17700        var a = this._dataTransfer._.data[this._customDataFallbackType];
17701        a ||
17702          (a = this._extractDataComment(this._getData(this._customDataFallbackType, !0)).content);
17703        return a;
17704      },
17705      _getFallbackTypeData: function() {
17706        var a = CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes,
17707          b = this._extractDataComment(this._getData(this._customDataFallbackType, !0)).data || {},
17708          c = this._dataTransfer._.data;
17709        CKEDITOR.tools.array.forEach(
17710          a,
17711          function(a) {
17712            void 0 !== c[a] ? (b[a] = c[a]) : void 0 !== b[a] && (b[a] = b[a]);
17713          },
17714          this,
17715        );
17716        return b;
17717      },
17718      _isUnsupportedMimeTypeError: function(a) {
17719        return a.message && -1 !== a.message.search(/element not found/gi);
17720      },
17721      _extractDataComment: function(a) {
17722        var b = { data: null, content: a || "" };
17723        if (a && 16 < a.length) {
17724          var c;
17725          (c = /\x3c!--cke-data:(.*?)--\x3e/g.exec(a)) &&
17726            c[1] &&
17727            ((b.data = JSON.parse(decodeURIComponent(c[1]))), (b.content = a.replace(c[0], "")));
17728        }
17729        return b;
17730      },
17731      _applyDataComment: function(a, b) {
17732        var c = "";
17733        b &&
17734          CKEDITOR.tools.objectKeys(b).length &&
17735          (c = "\x3c!--cke-data:" + encodeURIComponent(JSON.stringify(b)) + "--\x3e");
17736        return c + (a && a.length ? a : "");
17737      },
17738    };
17739  })();
17740  CKEDITOR.config.clipboard_notificationDuration = 1e4;
17741  CKEDITOR.plugins.add("panelbutton", {
17742    requires: "button",
17743    onLoad: function() {
17744      function e(c) {
17745        var a = this._;
17746        a.state != CKEDITOR.TRISTATE_DISABLED &&
17747          (this.createPanel(c),
17748          a.on
17749            ? a.panel.hide()
17750            : a.panel.showBlock(this._.id, this.document.getById(this._.id), 4));
17751      }
17752      CKEDITOR.ui.panelButton = CKEDITOR.tools.createClass({
17753        base: CKEDITOR.ui.button,
17754        $: function(c) {
17755          var a = c.panel || {};
17756          delete c.panel;
17757          this.base(c);
17758          this.document = (a.parent && a.parent.getDocument()) || CKEDITOR.document;
17759          a.block = { attributes: a.attributes };
17760          this.hasArrow = a.toolbarRelated = !0;
17761          this.click = e;
17762          this._ = { panelDefinition: a };
17763        },
17764        statics: {
17765          handler: {
17766            create: function(c) {
17767              return new CKEDITOR.ui.panelButton(c);
17768            },
17769          },
17770        },
17771        proto: {
17772          createPanel: function(c) {
17773            var a = this._;
17774            if (!a.panel) {
17775              var f = this._.panelDefinition,
17776                e = this._.panelDefinition.block,
17777                g = f.parent || CKEDITOR.document.getBody(),
17778                d = (this._.panel = new CKEDITOR.ui.floatPanel(c, g, f)),
17779                f = d.addBlock(a.id, e),
17780                b = this;
17781              d.onShow = function() {
17782                b.className && this.element.addClass(b.className + "_panel");
17783                b.setState(CKEDITOR.TRISTATE_ON);
17784                a.on = 1;
17785                b.editorFocus && c.focus();
17786                if (b.onOpen) b.onOpen();
17787              };
17788              d.onHide = function(d) {
17789                b.className && this.element.getFirst().removeClass(b.className + "_panel");
17790                b.setState(
17791                  b.modes && b.modes[c.mode] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,
17792                );
17793                a.on = 0;
17794                if (!d && b.onClose) b.onClose();
17795              };
17796              d.onEscape = function() {
17797                d.hide(1);
17798                b.document.getById(a.id).focus();
17799              };
17800              if (this.onBlock) this.onBlock(d, f);
17801              f.onHide = function() {
17802                a.on = 0;
17803                b.setState(CKEDITOR.TRISTATE_OFF);
17804              };
17805            }
17806          },
17807        },
17808      });
17809    },
17810    beforeInit: function(e) {
17811      e.ui.addHandler(CKEDITOR.UI_PANELBUTTON, CKEDITOR.ui.panelButton.handler);
17812    },
17813  });
17814  CKEDITOR.UI_PANELBUTTON = "panelbutton";
17815  (function() {
17816    CKEDITOR.plugins.add("panel", {
17817      beforeInit: function(a) {
17818        a.ui.addHandler(CKEDITOR.UI_PANEL, CKEDITOR.ui.panel.handler);
17819      },
17820    });
17821    CKEDITOR.UI_PANEL = "panel";
17822    CKEDITOR.ui.panel = function(a, b) {
17823      b && CKEDITOR.tools.extend(this, b);
17824      CKEDITOR.tools.extend(this, { className: "", css: [] });
17825      this.id = CKEDITOR.tools.getNextId();
17826      this.document = a;
17827      this.isFramed = this.forceIFrame || this.css.length;
17828      this._ = { blocks: {} };
17829    };
17830    CKEDITOR.ui.panel.handler = {
17831      create: function(a) {
17832        return new CKEDITOR.ui.panel(a);
17833      },
17834    };
17835    var g = CKEDITOR.addTemplate(
17836        "panel",
17837        '\x3cdiv lang\x3d"{langCode}" id\x3d"{id}" dir\x3d{dir} class\x3d"cke cke_reset_all {editorId} cke_panel cke_panel {cls} cke_{dir}" style\x3d"z-index:{z-index}" role\x3d"presentation"\x3e{frame}\x3c/div\x3e',
17838      ),
17839      h = CKEDITOR.addTemplate(
17840        "panel-frame",
17841        '\x3ciframe id\x3d"{id}" class\x3d"cke_panel_frame" role\x3d"presentation" frameborder\x3d"0" src\x3d"{src}"\x3e\x3c/iframe\x3e',
17842      ),
17843      k = CKEDITOR.addTemplate(
17844        "panel-frame-inner",
17845        '\x3c!DOCTYPE html\x3e\x3chtml class\x3d"cke_panel_container {env}" dir\x3d"{dir}" lang\x3d"{langCode}"\x3e\x3chead\x3e{css}\x3c/head\x3e\x3cbody class\x3d"cke_{dir}" style\x3d"margin:0;padding:0" onload\x3d"{onload}"\x3e\x3c/body\x3e\x3c/html\x3e',
17846      );
17847    CKEDITOR.ui.panel.prototype = {
17848      render: function(a, b) {
17849        this.getHolderElement = function() {
17850          var a = this._.holder;
17851          if (!a) {
17852            if (this.isFramed) {
17853              var a = this.document.getById(this.id + "_frame"),
17854                b = a.getParent(),
17855                a = a.getFrameDocument();
17856              CKEDITOR.env.iOS &&
17857                b.setStyles({ overflow: "scroll", "-webkit-overflow-scrolling": "touch" });
17858              b = CKEDITOR.tools.addFunction(
17859                CKEDITOR.tools.bind(function() {
17860                  this.isLoaded = !0;
17861                  if (this.onLoad) this.onLoad();
17862                }, this),
17863              );
17864              a.write(
17865                k.output(
17866                  CKEDITOR.tools.extend(
17867                    {
17868                      css: CKEDITOR.tools.buildStyleHtml(this.css),
17869                      onload: "window.parent.CKEDITOR.tools.callFunction(" + b + ");",
17870                    },
17871                    e,
17872                  ),
17873                ),
17874              );
17875              a.getWindow().$.CKEDITOR = CKEDITOR;
17876              a.on(
17877                "keydown",
17878                function(a) {
17879                  var b = a.data.getKeystroke(),
17880                    c = this.document.getById(this.id).getAttribute("dir");
17881                  this._.onKeyDown && !1 === this._.onKeyDown(b)
17882                    ? a.data.preventDefault()
17883                    : (27 == b || b == ("rtl" == c ? 39 : 37)) &&
17884                      this.onEscape &&
17885                      !1 === this.onEscape(b) &&
17886                      a.data.preventDefault();
17887                },
17888                this,
17889              );
17890              a = a.getBody();
17891              a.unselectable();
17892              CKEDITOR.env.air && CKEDITOR.tools.callFunction(b);
17893            } else a = this.document.getById(this.id);
17894            this._.holder = a;
17895          }
17896          return a;
17897        };
17898        var e = {
17899          editorId: a.id,
17900          id: this.id,
17901          langCode: a.langCode,
17902          dir: a.lang.dir,
17903          cls: this.className,
17904          frame: "",
17905          env: CKEDITOR.env.cssClass,
17906          "z-index": a.config.baseFloatZIndex + 1,
17907        };
17908        if (this.isFramed) {
17909          var d = CKEDITOR.env.air
17910            ? "javascript:void(0)"
17911            : CKEDITOR.env.ie
17912              ? "javascript:void(function(){" +
17913                encodeURIComponent(
17914                  "document.open();(" + CKEDITOR.tools.fixDomain + ")();document.close();",
17915                ) +
17916                "}())"
17917              : "";
17918          e.frame = h.output({ id: this.id + "_frame", src: d });
17919        }
17920        d = g.output(e);
17921        b && b.push(d);
17922        return d;
17923      },
17924      addBlock: function(a, b) {
17925        b = this._.blocks[a] =
17926          b instanceof CKEDITOR.ui.panel.block
17927            ? b
17928            : new CKEDITOR.ui.panel.block(this.getHolderElement(), b);
17929        this._.currentBlock || this.showBlock(a);
17930        return b;
17931      },
17932      getBlock: function(a) {
17933        return this._.blocks[a];
17934      },
17935      showBlock: function(a) {
17936        a = this._.blocks[a];
17937        var b = this._.currentBlock,
17938          e =
17939            !this.forceIFrame || CKEDITOR.env.ie
17940              ? this._.holder
17941              : this.document.getById(this.id + "_frame");
17942        b && b.hide();
17943        this._.currentBlock = a;
17944        CKEDITOR.fire("ariaWidget", e);
17945        a._.focusIndex = -1;
17946        this._.onKeyDown = a.onKeyDown && CKEDITOR.tools.bind(a.onKeyDown, a);
17947        a.show();
17948        return a;
17949      },
17950      destroy: function() {
17951        this.element && this.element.remove();
17952      },
17953    };
17954    CKEDITOR.ui.panel.block = CKEDITOR.tools.createClass({
17955      $: function(a, b) {
17956        this.element = a.append(
17957          a.getDocument().createElement("div", {
17958            attributes: { tabindex: -1, class: "cke_panel_block" },
17959            styles: { display: "none" },
17960          }),
17961        );
17962        b && CKEDITOR.tools.extend(this, b);
17963        this.element.setAttributes({
17964          role: this.attributes.role || "presentation",
17965          "aria-label": this.attributes["aria-label"],
17966          title: this.attributes.title || this.attributes["aria-label"],
17967        });
17968        this.keys = {};
17969        this._.focusIndex = -1;
17970        this.element.disableContextMenu();
17971      },
17972      _: {
17973        markItem: function(a) {
17974          -1 != a &&
17975            ((a = this.element.getElementsByTag("a").getItem((this._.focusIndex = a))),
17976            CKEDITOR.env.webkit &&
17977              a
17978                .getDocument()
17979                .getWindow()
17980                .focus(),
17981            a.focus(),
17982            this.onMark && this.onMark(a));
17983        },
17984        markFirstDisplayed: function(a) {
17985          for (
17986            var b = function(a) {
17987                return a.type == CKEDITOR.NODE_ELEMENT && "none" == a.getStyle("display");
17988              },
17989              e = this._.getItems(),
17990              d,
17991              c,
17992              f = e.count() - 1;
17993            0 <= f;
17994            f--
17995          )
17996            if (
17997              ((d = e.getItem(f)),
17998              d.getAscendant(b) || ((c = d), (this._.focusIndex = f)),
17999              "true" == d.getAttribute("aria-selected"))
18000            ) {
18001              c = d;
18002              this._.focusIndex = f;
18003              break;
18004            }
18005          c &&
18006            (a && a(),
18007            CKEDITOR.env.webkit &&
18008              c
18009                .getDocument()
18010                .getWindow()
18011                .focus(),
18012            c.focus(),
18013            this.onMark && this.onMark(c));
18014        },
18015        getItems: function() {
18016          return this.element.getElementsByTag("a");
18017        },
18018      },
18019      proto: {
18020        show: function() {
18021          this.element.setStyle("display", "");
18022        },
18023        hide: function() {
18024          (this.onHide && !0 === this.onHide.call(this)) ||
18025            this.element.setStyle("display", "none");
18026        },
18027        onKeyDown: function(a, b) {
18028          var e = this.keys[a];
18029          switch (e) {
18030            case "next":
18031              for (
18032                var d = this._.focusIndex, e = this.element.getElementsByTag("a"), c;
18033                (c = e.getItem(++d));
18034
18035              )
18036                if (c.getAttribute("_cke_focus") && c.$.offsetWidth) {
18037                  this._.focusIndex = d;
18038                  c.focus();
18039                  break;
18040                }
18041              return c || b ? !1 : ((this._.focusIndex = -1), this.onKeyDown(a, 1));
18042            case "prev":
18043              d = this._.focusIndex;
18044              for (e = this.element.getElementsByTag("a"); 0 < d && (c = e.getItem(--d)); ) {
18045                if (c.getAttribute("_cke_focus") && c.$.offsetWidth) {
18046                  this._.focusIndex = d;
18047                  c.focus();
18048                  break;
18049                }
18050                c = null;
18051              }
18052              return c || b ? !1 : ((this._.focusIndex = e.count()), this.onKeyDown(a, 1));
18053            case "click":
18054            case "mouseup":
18055              return (
18056                (d = this._.focusIndex),
18057                (c = 0 <= d && this.element.getElementsByTag("a").getItem(d)) &&
18058                  (c.$[e] ? c.$[e]() : c.$["on" + e]()),
18059                !1
18060              );
18061          }
18062          return !0;
18063        },
18064      },
18065    });
18066  })();
18067  CKEDITOR.plugins.add("floatpanel", { requires: "panel" });
18068  (function() {
18069    function v(a, b, c, m, h) {
18070      h = CKEDITOR.tools.genKey(
18071        b.getUniqueId(),
18072        c.getUniqueId(),
18073        a.lang.dir,
18074        a.uiColor || "",
18075        m.css || "",
18076        h || "",
18077      );
18078      var g = f[h];
18079      g ||
18080        ((g = f[h] = new CKEDITOR.ui.panel(b, m)),
18081        (g.element = c.append(CKEDITOR.dom.element.createFromHtml(g.render(a), b))),
18082        g.element.setStyles({ display: "none", position: "absolute" }));
18083      return g;
18084    }
18085    var f = {};
18086    CKEDITOR.ui.floatPanel = CKEDITOR.tools.createClass({
18087      $: function(a, b, c, m) {
18088        function h() {
18089          e.hide();
18090        }
18091        c.forceIFrame = 1;
18092        c.toolbarRelated &&
18093          a.elementMode == CKEDITOR.ELEMENT_MODE_INLINE &&
18094          (b = CKEDITOR.document.getById("cke_" + a.name));
18095        var g = b.getDocument();
18096        m = v(a, g, b, c, m || 0);
18097        var n = m.element,
18098          k = n.getFirst(),
18099          e = this;
18100        n.disableContextMenu();
18101        this.element = n;
18102        this._ = {
18103          editor: a,
18104          panel: m,
18105          parentElement: b,
18106          definition: c,
18107          document: g,
18108          iframe: k,
18109          children: [],
18110          dir: a.lang.dir,
18111          showBlockParams: null,
18112        };
18113        a.on("mode", h);
18114        a.on("resize", h);
18115        g.getWindow().on(
18116          "resize",
18117          function() {
18118            this.reposition();
18119          },
18120          this,
18121        );
18122      },
18123      proto: {
18124        addBlock: function(a, b) {
18125          return this._.panel.addBlock(a, b);
18126        },
18127        addListBlock: function(a, b) {
18128          return this._.panel.addListBlock(a, b);
18129        },
18130        getBlock: function(a) {
18131          return this._.panel.getBlock(a);
18132        },
18133        showBlock: function(a, b, c, m, h, g) {
18134          var n = this._.panel,
18135            k = n.showBlock(a);
18136          this._.showBlockParams = [].slice.call(arguments);
18137          this.allowBlur(!1);
18138          var e = this._.editor.editable();
18139          this._.returnFocus = e.hasFocus
18140            ? e
18141            : new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);
18142          this._.hideTimeout = 0;
18143          var l = this.element,
18144            e = this._.iframe,
18145            e =
18146              CKEDITOR.env.ie && !CKEDITOR.env.edge
18147                ? e
18148                : new CKEDITOR.dom.window(e.$.contentWindow),
18149            f = l.getDocument(),
18150            r = this._.parentElement.getPositionedAncestor(),
18151            t = b.getDocumentPosition(f),
18152            f = r ? r.getDocumentPosition(f) : { x: 0, y: 0 },
18153            q = "rtl" == this._.dir,
18154            d = t.x + (m || 0) - f.x,
18155            p = t.y + (h || 0) - f.y;
18156          !q || (1 != c && 4 != c)
18157            ? q || (2 != c && 3 != c) || (d += b.$.offsetWidth - 1)
18158            : (d += b.$.offsetWidth);
18159          if (3 == c || 4 == c) p += b.$.offsetHeight - 1;
18160          this._.panel._.offsetParentId = b.getId();
18161          l.setStyles({ top: p + "px", left: 0, display: "" });
18162          l.setOpacity(0);
18163          l.getFirst().removeStyle("width");
18164          this._.editor.focusManager.add(e);
18165          this._.blurSet ||
18166            ((CKEDITOR.event.useCapture = !0),
18167            e.on(
18168              "blur",
18169              function(a) {
18170                function u() {
18171                  delete this._.returnFocus;
18172                  this.hide();
18173                }
18174                this.allowBlur() &&
18175                  a.data.getPhase() == CKEDITOR.EVENT_PHASE_AT_TARGET &&
18176                  this.visible &&
18177                  !this._.activeChild &&
18178                  (CKEDITOR.env.iOS
18179                    ? this._.hideTimeout ||
18180                      (this._.hideTimeout = CKEDITOR.tools.setTimeout(u, 0, this))
18181                    : u.call(this));
18182              },
18183              this,
18184            ),
18185            e.on(
18186              "focus",
18187              function() {
18188                this._.focused = !0;
18189                this.hideChild();
18190                this.allowBlur(!0);
18191              },
18192              this,
18193            ),
18194            CKEDITOR.env.iOS &&
18195              (e.on(
18196                "touchstart",
18197                function() {
18198                  clearTimeout(this._.hideTimeout);
18199                },
18200                this,
18201              ),
18202              e.on(
18203                "touchend",
18204                function() {
18205                  this._.hideTimeout = 0;
18206                  this.focus();
18207                },
18208                this,
18209              )),
18210            (CKEDITOR.event.useCapture = !1),
18211            (this._.blurSet = 1));
18212          n.onEscape = CKEDITOR.tools.bind(function(a) {
18213            if (this.onEscape && !1 === this.onEscape(a)) return !1;
18214          }, this);
18215          CKEDITOR.tools.setTimeout(
18216            function() {
18217              var a = CKEDITOR.tools.bind(function() {
18218                var a = l;
18219                a.removeStyle("width");
18220                if (k.autoSize) {
18221                  var b = k.element.getDocument(),
18222                    b = (CKEDITOR.env.webkit || CKEDITOR.env.edge ? k.element : b.getBody()).$
18223                      .scrollWidth;
18224                  CKEDITOR.env.ie &&
18225                    CKEDITOR.env.quirks &&
18226                    0 < b &&
18227                    (b += (a.$.offsetWidth || 0) - (a.$.clientWidth || 0) + 3);
18228                  a.setStyle("width", b + 10 + "px");
18229                  b = k.element.$.scrollHeight;
18230                  CKEDITOR.env.ie &&
18231                    CKEDITOR.env.quirks &&
18232                    0 < b &&
18233                    (b += (a.$.offsetHeight || 0) - (a.$.clientHeight || 0) + 3);
18234                  a.setStyle("height", b + "px");
18235                  n._.currentBlock.element.setStyle("display", "none").removeStyle("display");
18236                } else a.removeStyle("height");
18237                q && (d -= l.$.offsetWidth);
18238                l.setStyle("left", d + "px");
18239                var b = n.element.getWindow(),
18240                  a = l.$.getBoundingClientRect(),
18241                  b = b.getViewPaneSize(),
18242                  c = a.width || a.right - a.left,
18243                  e = a.height || a.bottom - a.top,
18244                  m = q ? a.right : b.width - a.left,
18245                  h = q ? b.width - a.right : a.left;
18246                q
18247                  ? m < c && (d = h > c ? d + c : b.width > c ? d - a.left : d - a.right + b.width)
18248                  : m < c && (d = h > c ? d - c : b.width > c ? d - a.right + b.width : d - a.left);
18249                c = a.top;
18250                b.height - a.top < e &&
18251                  (p = c > e ? p - e : b.height > e ? p - a.bottom + b.height : p - a.top);
18252                CKEDITOR.env.ie &&
18253                  ((b = a = new CKEDITOR.dom.element(l.$.offsetParent)),
18254                  "html" == b.getName() && (b = b.getDocument().getBody()),
18255                  "rtl" == b.getComputedStyle("direction") &&
18256                    (d = CKEDITOR.env.ie8Compat
18257                      ? d - 2 * l.getDocument().getDocumentElement().$.scrollLeft
18258                      : d - (a.$.scrollWidth - a.$.clientWidth)));
18259                var a = l.getFirst(),
18260                  f;
18261                (f = a.getCustomData("activePanel")) && f.onHide && f.onHide.call(this, 1);
18262                a.setCustomData("activePanel", this);
18263                l.setStyles({ top: p + "px", left: d + "px" });
18264                l.setOpacity(1);
18265                g && g();
18266              }, this);
18267              n.isLoaded ? a() : (n.onLoad = a);
18268              CKEDITOR.tools.setTimeout(
18269                function() {
18270                  var a =
18271                    CKEDITOR.env.webkit && CKEDITOR.document.getWindow().getScrollPosition().y;
18272                  this.focus();
18273                  k.element.focus();
18274                  CKEDITOR.env.webkit && (CKEDITOR.document.getBody().$.scrollTop = a);
18275                  this.allowBlur(!0);
18276                  CKEDITOR.env.ie
18277                    ? CKEDITOR.tools.setTimeout(function() {
18278                        k.markFirstDisplayed ? k.markFirstDisplayed() : k._.markFirstDisplayed();
18279                      }, 0)
18280                    : k.markFirstDisplayed ? k.markFirstDisplayed() : k._.markFirstDisplayed();
18281                  this._.editor.fire("panelShow", this);
18282                },
18283                0,
18284                this,
18285              );
18286            },
18287            CKEDITOR.env.air ? 200 : 0,
18288            this,
18289          );
18290          this.visible = 1;
18291          this.onShow && this.onShow.call(this);
18292        },
18293        reposition: function() {
18294          var a = this._.showBlockParams;
18295          this.visible && this._.showBlockParams && (this.hide(), this.showBlock.apply(this, a));
18296        },
18297        focus: function() {
18298          if (CKEDITOR.env.webkit) {
18299            var a = CKEDITOR.document.getActive();
18300            a && !a.equals(this._.iframe) && a.$.blur();
18301          }
18302          (this._.lastFocused || this._.iframe.getFrameDocument().getWindow()).focus();
18303        },
18304        blur: function() {
18305          var a = this._.iframe.getFrameDocument().getActive();
18306          a && a.is("a") && (this._.lastFocused = a);
18307        },
18308        hide: function(a) {
18309          if (this.visible && (!this.onHide || !0 !== this.onHide.call(this))) {
18310            this.hideChild();
18311            CKEDITOR.env.gecko && this._.iframe.getFrameDocument().$.activeElement.blur();
18312            this.element.setStyle("display", "none");
18313            this.visible = 0;
18314            this.element.getFirst().removeCustomData("activePanel");
18315            if ((a = a && this._.returnFocus))
18316              CKEDITOR.env.webkit && a.type && a.getWindow().$.focus(), a.focus();
18317            delete this._.lastFocused;
18318            this._.showBlockParams = null;
18319            this._.editor.fire("panelHide", this);
18320          }
18321        },
18322        allowBlur: function(a) {
18323          var b = this._.panel;
18324          void 0 !== a && (b.allowBlur = a);
18325          return b.allowBlur;
18326        },
18327        showAsChild: function(a, b, c, f, h, g) {
18328          if (this._.activeChild != a || a._.panel._.offsetParentId != c.getId())
18329            this.hideChild(),
18330              (a.onHide = CKEDITOR.tools.bind(function() {
18331                CKEDITOR.tools.setTimeout(
18332                  function() {
18333                    this._.focused || this.hide();
18334                  },
18335                  0,
18336                  this,
18337                );
18338              }, this)),
18339              (this._.activeChild = a),
18340              (this._.focused = !1),
18341              a.showBlock(b, c, f, h, g),
18342              this.blur(),
18343              (CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat) &&
18344                setTimeout(function() {
18345                  a.element.getChild(0).$.style.cssText += "";
18346                }, 100);
18347        },
18348        hideChild: function(a) {
18349          var b = this._.activeChild;
18350          b && (delete b.onHide, delete this._.activeChild, b.hide(), a && this.focus());
18351        },
18352      },
18353    });
18354    CKEDITOR.on("instanceDestroyed", function() {
18355      var a = CKEDITOR.tools.isEmpty(CKEDITOR.instances),
18356        b;
18357      for (b in f) {
18358        var c = f[b];
18359        a ? c.destroy() : c.element.hide();
18360      }
18361      a && (f = {});
18362    });
18363  })();
18364  CKEDITOR.plugins.add("colorbutton", {
18365    requires: "panelbutton,floatpanel",
18366    init: function(d) {
18367      function t(a, e, g, r, l) {
18368        var n = new CKEDITOR.style(k["colorButton_" + e + "Style"]),
18369          m = CKEDITOR.tools.getNextId() + "_colorBox",
18370          p;
18371        l = l || {};
18372        d.ui.add(a, CKEDITOR.UI_PANELBUTTON, {
18373          label: g,
18374          title: g,
18375          modes: { wysiwyg: 1 },
18376          editorFocus: 0,
18377          toolbar: "colors," + r,
18378          allowedContent: n,
18379          requiredContent: n,
18380          contentTransformations: l.contentTransformations,
18381          panel: {
18382            css: CKEDITOR.skin.getPath("editor"),
18383            attributes: { role: "listbox", "aria-label": h.panelTitle },
18384          },
18385          onBlock: function(a, b) {
18386            p = b;
18387            b.autoSize = !0;
18388            b.element.addClass("cke_colorblock");
18389            b.element.setHtml(y(a, e, m));
18390            b.element
18391              .getDocument()
18392              .getBody()
18393              .setStyle("overflow", "hidden");
18394            CKEDITOR.ui.fire("ready", this);
18395            var c = b.keys,
18396              f = "rtl" == d.lang.dir;
18397            c[f ? 37 : 39] = "next";
18398            c[40] = "next";
18399            c[9] = "next";
18400            c[f ? 39 : 37] = "prev";
18401            c[38] = "prev";
18402            c[CKEDITOR.SHIFT + 9] = "prev";
18403            c[32] = "click";
18404          },
18405          refresh: function() {
18406            d.activeFilter.check(n) || this.setState(CKEDITOR.TRISTATE_DISABLED);
18407          },
18408          onOpen: function() {
18409            var a = d.getSelection(),
18410              b = a && a.getStartElement(),
18411              c = d.elementPath(b);
18412            if (c) {
18413              b = c.block || c.blockLimit || d.document.getBody();
18414              do
18415                c =
18416                  (b && b.getComputedStyle("back" == e ? "background-color" : "color")) ||
18417                  "transparent";
18418              while ("back" == e && "transparent" == c && b && (b = b.getParent()));
18419              (c && "transparent" != c) || (c = "#ffffff");
18420              !1 !== k.colorButton_enableAutomatic &&
18421                this._.panel._.iframe
18422                  .getFrameDocument()
18423                  .getById(m)
18424                  .setStyle("background-color", c);
18425              if ((b = a && a.getRanges()[0])) {
18426                for (
18427                  var a = new CKEDITOR.dom.walker(b),
18428                    f = b.collapsed ? b.startContainer : a.next(),
18429                    b = "";
18430                  f;
18431
18432                ) {
18433                  f.type === CKEDITOR.NODE_TEXT && (f = f.getParent());
18434                  f = u(f.getComputedStyle("back" == e ? "background-color" : "color"));
18435                  b = b || f;
18436                  if (b !== f) {
18437                    b = "";
18438                    break;
18439                  }
18440                  f = a.next();
18441                }
18442                a = b;
18443                b = p._.getItems();
18444                for (f = 0; f < b.count(); f++) {
18445                  var g = b.getItem(f);
18446                  g.removeAttribute("aria-selected");
18447                  a && a == u(g.getAttribute("data-value")) && g.setAttribute("aria-selected", !0);
18448                }
18449              }
18450              return c;
18451            }
18452          },
18453        });
18454      }
18455      function y(a, e, g) {
18456        a = [];
18457        var r = k.colorButton_colors.split(","),
18458          l = k.colorButton_colorsPerRow || 6,
18459          n = d.plugins.colordialog && !1 !== k.colorButton_enableMore,
18460          m = r.length + (n ? 2 : 1),
18461          p = CKEDITOR.tools.addFunction(function(a, b) {
18462            function c(a) {
18463              d.removeStyle(
18464                new CKEDITOR.style(k["colorButton_" + b + "Style"], { color: "inherit" }),
18465              );
18466              var e = k["colorButton_" + b + "Style"];
18467              e.childRule =
18468                "back" == b
18469                  ? function(a) {
18470                      return v(a);
18471                    }
18472                  : function(a) {
18473                      return !(a.is("a") || a.getElementsByTag("a").count()) || v(a);
18474                    };
18475              d.focus();
18476              d.applyStyle(new CKEDITOR.style(e, { color: a }));
18477              d.fire("saveSnapshot");
18478            }
18479            d.focus();
18480            d.fire("saveSnapshot");
18481            if ("?" == a)
18482              d.getColorFromDialog(function(a) {
18483                if (a) return c(a);
18484              });
18485            else return c(a);
18486          });
18487        !1 !== k.colorButton_enableAutomatic &&
18488          a.push(
18489            '\x3ca class\x3d"cke_colorauto" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',
18490            h.auto,
18491            '" onclick\x3d"CKEDITOR.tools.callFunction(',
18492            p,
18493            ",null,'",
18494            e,
18495            "');return false;\" href\x3d\"javascript:void('",
18496            h.auto,
18497            '\')" role\x3d"option" aria-posinset\x3d"1" aria-setsize\x3d"',
18498            m,
18499            '"\x3e\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e\x3ctr\x3e\x3ctd colspan\x3d"' +
18500              l +
18501              '" align\x3d"center"\x3e\x3cspan class\x3d"cke_colorbox" id\x3d"',
18502            g,
18503            '"\x3e\x3c/span\x3e',
18504            h.auto,
18505            "\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/a\x3e",
18506          );
18507        a.push(
18508          '\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e',
18509        );
18510        for (g = 0; g < r.length; g++) {
18511          0 === g % l && a.push("\x3c/tr\x3e\x3ctr\x3e");
18512          var q = r[g].split("/"),
18513            b = q[0],
18514            c = q[1] || b;
18515          q[1] || (b = "#" + b.replace(/^(.)(.)(.)$/, "$1$1$2$2$3$3"));
18516          q = d.lang.colorbutton.colors[c] || c;
18517          a.push(
18518            '\x3ctd\x3e\x3ca class\x3d"cke_colorbox" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',
18519            q,
18520            '" onclick\x3d"CKEDITOR.tools.callFunction(',
18521            p,
18522            ",'",
18523            b,
18524            "','",
18525            e,
18526            "'); return false;\" href\x3d\"javascript:void('",
18527            q,
18528            '\')" data-value\x3d"' + c + '" role\x3d"option" aria-posinset\x3d"',
18529            g + 2,
18530            '" aria-setsize\x3d"',
18531            m,
18532            '"\x3e\x3cspan class\x3d"cke_colorbox" style\x3d"background-color:#',
18533            c,
18534            '"\x3e\x3c/span\x3e\x3c/a\x3e\x3c/td\x3e',
18535          );
18536        }
18537        n &&
18538          a.push(
18539            '\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d"' +
18540              l +
18541              '" align\x3d"center"\x3e\x3ca class\x3d"cke_colormore" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',
18542            h.more,
18543            '" onclick\x3d"CKEDITOR.tools.callFunction(',
18544            p,
18545            ",'?','",
18546            e,
18547            "');return false;\" href\x3d\"javascript:void('",
18548            h.more,
18549            "')\"",
18550            ' role\x3d"option" aria-posinset\x3d"',
18551            m,
18552            '" aria-setsize\x3d"',
18553            m,
18554            '"\x3e',
18555            h.more,
18556            "\x3c/a\x3e\x3c/td\x3e",
18557          );
18558        a.push("\x3c/tr\x3e\x3c/table\x3e");
18559        return a.join("");
18560      }
18561      function v(a) {
18562        return "false" == a.getAttribute("contentEditable") || a.getAttribute("data-nostyle");
18563      }
18564      function u(a) {
18565        return CKEDITOR.tools
18566          .normalizeHex("#" + CKEDITOR.tools.convertRgbToHex(a || ""))
18567          .replace(/#/g, "");
18568      }
18569      var k = d.config,
18570        h = d.lang.colorbutton;
18571      if (!CKEDITOR.env.hc) {
18572        t("TextColor", "fore", h.textColorTitle, 10, {
18573          contentTransformations: [
18574            [
18575              {
18576                element: "font",
18577                check: "span{color}",
18578                left: function(a) {
18579                  return !!a.attributes.color;
18580                },
18581                right: function(a) {
18582                  a.name = "span";
18583                  a.attributes.color && (a.styles.color = a.attributes.color);
18584                  delete a.attributes.color;
18585                },
18586              },
18587            ],
18588          ],
18589        });
18590        var w = {},
18591          x = d.config.colorButton_normalizeBackground;
18592        if (void 0 === x || x)
18593          w.contentTransformations = [
18594            [
18595              {
18596                element: "span",
18597                left: function(a) {
18598                  var d = CKEDITOR.tools;
18599                  if ("span" != a.name || !a.styles || !a.styles.background) return !1;
18600                  a = d.style.parse.background(a.styles.background);
18601                  return a.color && 1 === d.objectKeys(a).length;
18602                },
18603                right: function(a) {
18604                  var e = new CKEDITOR.style(d.config.colorButton_backStyle, {
18605                    color: a.styles.background,
18606                  }).getDefinition();
18607                  a.name = e.element;
18608                  a.styles = e.styles;
18609                  a.attributes = e.attributes || {};
18610                  return a;
18611                },
18612              },
18613            ],
18614          ];
18615        t("BGColor", "back", h.bgColorTitle, 20, w);
18616      }
18617    },
18618  });
18619  CKEDITOR.config.colorButton_colors =
18620    "1ABC9C,2ECC71,3498DB,9B59B6,4E5F70,F1C40F,16A085,27AE60,2980B9,8E44AD,2C3E50,F39C12,E67E22,E74C3C,ECF0F1,95A5A6,DDD,FFF,D35400,C0392B,BDC3C7,7F8C8D,999,000";
18621  CKEDITOR.config.colorButton_foreStyle = {
18622    element: "span",
18623    styles: { color: "#(color)" },
18624    overrides: [{ element: "font", attributes: { color: null } }],
18625  };
18626  CKEDITOR.config.colorButton_backStyle = {
18627    element: "span",
18628    styles: { "background-color": "#(color)" },
18629  };
18630  CKEDITOR.plugins.colordialog = {
18631    requires: "dialog",
18632    init: function(b) {
18633      var d = new CKEDITOR.dialogCommand("colordialog");
18634      d.editorFocus = !1;
18635      b.addCommand("colordialog", d);
18636      CKEDITOR.dialog.add("colordialog", this.path + "dialogs/colordialog.js");
18637      b.getColorFromDialog = function(d, g) {
18638        var c, f, e;
18639        c = function(a) {
18640          f(this);
18641          a = "ok" == a.name ? this.getValueOf("picker", "selectedColor") : null;
18642          /^[0-9a-f]{3}([0-9a-f]{3})?$/i.test(a) && (a = "#" + a);
18643          d.call(g, a);
18644        };
18645        f = function(a) {
18646          a.removeListener("ok", c);
18647          a.removeListener("cancel", c);
18648        };
18649        e = function(a) {
18650          a.on("ok", c);
18651          a.on("cancel", c);
18652        };
18653        b.execCommand("colordialog");
18654        if (b._.storedDialogs && b._.storedDialogs.colordialog) e(b._.storedDialogs.colordialog);
18655        else
18656          CKEDITOR.on("dialogDefinition", function(a) {
18657            if ("colordialog" == a.data.name) {
18658              var b = a.data.definition;
18659              a.removeListener();
18660              b.onLoad = CKEDITOR.tools.override(b.onLoad, function(a) {
18661                return function() {
18662                  e(this);
18663                  b.onLoad = a;
18664                  "function" == typeof a && a.call(this);
18665                };
18666              });
18667            }
18668          });
18669      };
18670    },
18671  };
18672  CKEDITOR.plugins.add("colordialog", CKEDITOR.plugins.colordialog);
18673  (function() {
18674    CKEDITOR.plugins.add("templates", {
18675      requires: "dialog",
18676      init: function(a) {
18677        CKEDITOR.dialog.add("templates", CKEDITOR.getUrl(this.path + "dialogs/templates.js"));
18678        a.addCommand("templates", new CKEDITOR.dialogCommand("templates"));
18679        a.ui.addButton &&
18680          a.ui.addButton("Templates", {
18681            label: a.lang.templates.button,
18682            command: "templates",
18683            toolbar: "doctools,10",
18684          });
18685      },
18686    });
18687    var c = {},
18688      f = {};
18689    CKEDITOR.addTemplates = function(a, d) {
18690      c[a] = d;
18691    };
18692    CKEDITOR.getTemplates = function(a) {
18693      return c[a];
18694    };
18695    CKEDITOR.loadTemplates = function(a, d) {
18696      for (var e = [], b = 0, c = a.length; b < c; b++) f[a[b]] || (e.push(a[b]), (f[a[b]] = 1));
18697      e.length ? CKEDITOR.scriptLoader.load(e, d) : setTimeout(d, 0);
18698    };
18699  })();
18700  CKEDITOR.config.templates_files = [CKEDITOR.getUrl("plugins/templates/templates/default.js")];
18701  CKEDITOR.config.templates_replaceContent = !0;
18702  CKEDITOR.plugins.add("menu", {
18703    requires: "floatpanel",
18704    beforeInit: function(l) {
18705      for (
18706        var h = l.config.menu_groups.split(","),
18707          r = (l._.menuGroups = {}),
18708          t = (l._.menuItems = {}),
18709          n = 0;
18710        n < h.length;
18711        n++
18712      )
18713        r[h[n]] = n + 1;
18714      l.addMenuGroup = function(a, b) {
18715        r[a] = b || 100;
18716      };
18717      l.addMenuItem = function(a, b) {
18718        r[b.group] && (t[a] = new CKEDITOR.menuItem(this, a, b));
18719      };
18720      l.addMenuItems = function(a) {
18721        for (var b in a) this.addMenuItem(b, a[b]);
18722      };
18723      l.getMenuItem = function(a) {
18724        return t[a];
18725      };
18726      l.removeMenuItem = function(a) {
18727        delete t[a];
18728      };
18729    },
18730  });
18731  (function() {
18732    function l(a) {
18733      a.sort(function(a, d) {
18734        return a.group < d.group
18735          ? -1
18736          : a.group > d.group ? 1 : a.order < d.order ? -1 : a.order > d.order ? 1 : 0;
18737      });
18738    }
18739    var h =
18740      '\x3cspan class\x3d"cke_menuitem"\x3e\x3ca id\x3d"{id}" class\x3d"cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href\x3d"{href}" title\x3d"{title}" tabindex\x3d"-1" _cke_focus\x3d1 hidefocus\x3d"true" role\x3d"{role}" aria-label\x3d"{label}" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked} draggable\x3d"false"';
18741    CKEDITOR.env.gecko && CKEDITOR.env.mac && (h += ' onkeypress\x3d"return false;"');
18742    CKEDITOR.env.gecko &&
18743      (h +=
18744        ' onblur\x3d"this.style.cssText \x3d this.style.cssText;" ondragstart\x3d"return false;"');
18745    var h =
18746        h +
18747        (' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" ' +
18748          (CKEDITOR.env.ie ? 'onclick\x3d"return false;" onmouseup' : "onclick") +
18749          '\x3d"CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e'),
18750      r = CKEDITOR.addTemplate(
18751        "menuItem",
18752        h +
18753          '\x3cspan class\x3d"cke_menubutton_inner"\x3e\x3cspan class\x3d"cke_menubutton_icon"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{iconStyle}"\x3e\x3c/span\x3e\x3c/span\x3e\x3cspan class\x3d"cke_menubutton_label"\x3e{label}\x3c/span\x3e{shortcutHtml}{arrowHtml}\x3c/span\x3e\x3c/a\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_voice_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e\x3c/span\x3e',
18754      ),
18755      t = CKEDITOR.addTemplate(
18756        "menuArrow",
18757        '\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e',
18758      ),
18759      n = CKEDITOR.addTemplate(
18760        "menuShortcut",
18761        '\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e',
18762      );
18763    CKEDITOR.menu = CKEDITOR.tools.createClass({
18764      $: function(a, b) {
18765        b = this._.definition = b || {};
18766        this.id = CKEDITOR.tools.getNextId();
18767        this.editor = a;
18768        this.items = [];
18769        this._.listeners = [];
18770        this._.level = b.level || 1;
18771        var d = CKEDITOR.tools.extend({}, b.panel, {
18772            css: [CKEDITOR.skin.getPath("editor")],
18773            level: this._.level - 1,
18774            block: {},
18775          }),
18776          m = (d.block.attributes = d.attributes || {});
18777        !m.role && (m.role = "menu");
18778        this._.panelDefinition = d;
18779      },
18780      _: {
18781        onShow: function() {
18782          var a = this.editor.getSelection(),
18783            b = a && a.getStartElement(),
18784            d = this.editor.elementPath(),
18785            m = this._.listeners;
18786          this.removeAll();
18787          for (var g = 0; g < m.length; g++) {
18788            var k = m[g](b, a, d);
18789            if (k)
18790              for (var e in k) {
18791                var f = this.editor.getMenuItem(e);
18792                !f ||
18793                  (f.command && !this.editor.getCommand(f.command).state) ||
18794                  ((f.state = k[e]), this.add(f));
18795              }
18796          }
18797        },
18798        onClick: function(a) {
18799          this.hide();
18800          if (a.onClick) a.onClick();
18801          else a.command && this.editor.execCommand(a.command);
18802        },
18803        onEscape: function(a) {
18804          var b = this.parent;
18805          b ? b._.panel.hideChild(1) : 27 == a && this.hide(1);
18806          return !1;
18807        },
18808        onHide: function() {
18809          this.onHide && this.onHide();
18810        },
18811        showSubMenu: function(a) {
18812          var b = this._.subMenu,
18813            d = this.items[a];
18814          if ((d = d.getItems && d.getItems())) {
18815            b
18816              ? b.removeAll()
18817              : ((b = this._.subMenu = new CKEDITOR.menu(
18818                  this.editor,
18819                  CKEDITOR.tools.extend({}, this._.definition, { level: this._.level + 1 }, !0),
18820                )),
18821                (b.parent = this),
18822                (b._.onClick = CKEDITOR.tools.bind(this._.onClick, this)));
18823            for (var m in d) {
18824              var g = this.editor.getMenuItem(m);
18825              g && ((g.state = d[m]), b.add(g));
18826            }
18827            var k = this._.panel
18828              .getBlock(this.id)
18829              .element.getDocument()
18830              .getById(this.id + String(a));
18831            setTimeout(function() {
18832              b.show(k, 2);
18833            }, 0);
18834          } else this._.panel.hideChild(1);
18835        },
18836      },
18837      proto: {
18838        add: function(a) {
18839          a.order || (a.order = this.items.length);
18840          this.items.push(a);
18841        },
18842        removeAll: function() {
18843          this.items = [];
18844        },
18845        show: function(a, b, d, m) {
18846          if (!this.parent && (this._.onShow(), !this.items.length)) return;
18847          b = b || ("rtl" == this.editor.lang.dir ? 2 : 1);
18848          var g = this.items,
18849            k = this.editor,
18850            e = this._.panel,
18851            f = this._.element;
18852          if (!e) {
18853            e = this._.panel = new CKEDITOR.ui.floatPanel(
18854              this.editor,
18855              CKEDITOR.document.getBody(),
18856              this._.panelDefinition,
18857              this._.level,
18858            );
18859            e.onEscape = CKEDITOR.tools.bind(function(a) {
18860              if (!1 === this._.onEscape(a)) return !1;
18861            }, this);
18862            e.onShow = function() {
18863              e._.panel
18864                .getHolderElement()
18865                .getParent()
18866                .addClass("cke")
18867                .addClass("cke_reset_all");
18868            };
18869            e.onHide = CKEDITOR.tools.bind(function() {
18870              this._.onHide && this._.onHide();
18871            }, this);
18872            f = e.addBlock(this.id, this._.panelDefinition.block);
18873            f.autoSize = !0;
18874            var c = f.keys;
18875            c[40] = "next";
18876            c[9] = "next";
18877            c[38] = "prev";
18878            c[CKEDITOR.SHIFT + 9] = "prev";
18879            c["rtl" == k.lang.dir ? 37 : 39] = CKEDITOR.env.ie ? "mouseup" : "click";
18880            c[32] = CKEDITOR.env.ie ? "mouseup" : "click";
18881            CKEDITOR.env.ie && (c[13] = "mouseup");
18882            f = this._.element = f.element;
18883            c = f.getDocument();
18884            c.getBody().setStyle("overflow", "hidden");
18885            c
18886              .getElementsByTag("html")
18887              .getItem(0)
18888              .setStyle("overflow", "hidden");
18889            this._.itemOverFn = CKEDITOR.tools.addFunction(function(a) {
18890              clearTimeout(this._.showSubTimeout);
18891              this._.showSubTimeout = CKEDITOR.tools.setTimeout(
18892                this._.showSubMenu,
18893                k.config.menu_subMenuDelay || 400,
18894                this,
18895                [a],
18896              );
18897            }, this);
18898            this._.itemOutFn = CKEDITOR.tools.addFunction(function() {
18899              clearTimeout(this._.showSubTimeout);
18900            }, this);
18901            this._.itemClickFn = CKEDITOR.tools.addFunction(function(a) {
18902              var b = this.items[a];
18903              if (b.state == CKEDITOR.TRISTATE_DISABLED) this.hide(1);
18904              else if (b.getItems) this._.showSubMenu(a);
18905              else this._.onClick(b);
18906            }, this);
18907          }
18908          l(g);
18909          for (
18910            var c = k.elementPath(),
18911              c = [
18912                '\x3cdiv class\x3d"cke_menu' +
18913                  (c && c.direction() != k.lang.dir ? " cke_mixed_dir_content" : "") +
18914                  '" role\x3d"presentation"\x3e',
18915              ],
18916              h = g.length,
18917              n = h && g[0].group,
18918              q = 0;
18919            q < h;
18920            q++
18921          ) {
18922            var p = g[q];
18923            n != p.group &&
18924              (c.push('\x3cdiv class\x3d"cke_menuseparator" role\x3d"separator"\x3e\x3c/div\x3e'),
18925              (n = p.group));
18926            p.render(this, q, c);
18927          }
18928          c.push("\x3c/div\x3e");
18929          f.setHtml(c.join(""));
18930          CKEDITOR.ui.fire("ready", this);
18931          this.parent
18932            ? this.parent._.panel.showAsChild(e, this.id, a, b, d, m)
18933            : e.showBlock(this.id, a, b, d, m);
18934          k.fire("menuShow", [e]);
18935        },
18936        addListener: function(a) {
18937          this._.listeners.push(a);
18938        },
18939        hide: function(a) {
18940          this._.onHide && this._.onHide();
18941          this._.panel && this._.panel.hide(a);
18942        },
18943        findItemByCommandName: function(a) {
18944          var b = CKEDITOR.tools.array.filter(this.items, function(b) {
18945            return a === b.command;
18946          });
18947          return b.length
18948            ? ((b = b[0]),
18949              {
18950                item: b,
18951                element: this._.element.findOne("." + b.className),
18952              })
18953            : null;
18954        },
18955      },
18956    });
18957    CKEDITOR.menuItem = CKEDITOR.tools.createClass({
18958      $: function(a, b, d) {
18959        CKEDITOR.tools.extend(this, d, { order: 0, className: "cke_menubutton__" + b });
18960        this.group = a._.menuGroups[this.group];
18961        this.editor = a;
18962        this.name = b;
18963      },
18964      proto: {
18965        render: function(a, b, d) {
18966          var h = a.id + String(b),
18967            g = "undefined" == typeof this.state ? CKEDITOR.TRISTATE_OFF : this.state,
18968            k = "",
18969            e = this.editor,
18970            f,
18971            c,
18972            l =
18973              g == CKEDITOR.TRISTATE_ON
18974                ? "on"
18975                : g == CKEDITOR.TRISTATE_DISABLED ? "disabled" : "off";
18976          this.role in
18977            {
18978              menuitemcheckbox: 1,
18979              menuitemradio: 1,
18980            } && (k = ' aria-checked\x3d"' + (g == CKEDITOR.TRISTATE_ON ? "true" : "false") + '"');
18981          var u = this.getItems,
18982            q = "\x26#" + ("rtl" == this.editor.lang.dir ? "9668" : "9658") + ";",
18983            p = this.name;
18984          this.icon && !/\./.test(this.icon) && (p = this.icon);
18985          this.command &&
18986            ((f = e.getCommand(this.command)),
18987            (f = e.getCommandKeystroke(f)) &&
18988              (c = CKEDITOR.tools.keystrokeToString(e.lang.common.keyboard, f)));
18989          a = {
18990            id: h,
18991            name: this.name,
18992            iconName: p,
18993            label: this.label,
18994            cls: this.className || "",
18995            state: l,
18996            hasPopup: u ? "true" : "false",
18997            disabled: g == CKEDITOR.TRISTATE_DISABLED,
18998            title: this.label + (c ? " (" + c.display + ")" : ""),
18999            ariaShortcut: c ? e.lang.common.keyboardShortcut + " " + c.aria : "",
19000            href: "javascript:void('" + (this.label || "").replace("'") + "')",
19001            hoverFn: a._.itemOverFn,
19002            moveOutFn: a._.itemOutFn,
19003            clickFn: a._.itemClickFn,
19004            index: b,
19005            iconStyle: CKEDITOR.skin.getIconStyle(
19006              p,
19007              "rtl" == this.editor.lang.dir,
19008              p == this.icon ? null : this.icon,
19009              this.iconOffset,
19010            ),
19011            shortcutHtml: c ? n.output({ shortcut: c.display }) : "",
19012            arrowHtml: u ? t.output({ label: q }) : "",
19013            role: this.role ? this.role : "menuitem",
19014            ariaChecked: k,
19015          };
19016          r.output(a, d);
19017        },
19018      },
19019    });
19020  })();
19021  CKEDITOR.config.menu_groups =
19022    "clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div";
19023  CKEDITOR.plugins.add("contextmenu", {
19024    requires: "menu",
19025    onLoad: function() {
19026      CKEDITOR.plugins.contextMenu = CKEDITOR.tools.createClass({
19027        base: CKEDITOR.menu,
19028        $: function(a) {
19029          this.base.call(this, a, {
19030            panel: {
19031              className: "cke_menu_panel",
19032              attributes: { "aria-label": a.lang.contextmenu.options },
19033            },
19034          });
19035        },
19036        proto: {
19037          addTarget: function(a, e) {
19038            a.on(
19039              "contextmenu",
19040              function(a) {
19041                a = a.data;
19042                var c = CKEDITOR.env.webkit ? f : CKEDITOR.env.mac ? a.$.metaKey : a.$.ctrlKey;
19043                if (!e || !c) {
19044                  a.preventDefault();
19045                  if (CKEDITOR.env.mac && CKEDITOR.env.webkit) {
19046                    var c = this.editor,
19047                      b = new CKEDITOR.dom.elementPath(a.getTarget(), c.editable()).contains(
19048                        function(a) {
19049                          return a.hasAttribute("contenteditable");
19050                        },
19051                        !0,
19052                      );
19053                    b && "false" == b.getAttribute("contenteditable") && c.getSelection().fake(b);
19054                  }
19055                  var b = a.getTarget().getDocument(),
19056                    d = a
19057                      .getTarget()
19058                      .getDocument()
19059                      .getDocumentElement(),
19060                    c = !b.equals(CKEDITOR.document),
19061                    b = b.getWindow().getScrollPosition(),
19062                    g = c ? a.$.clientX : a.$.pageX || b.x + a.$.clientX,
19063                    h = c ? a.$.clientY : a.$.pageY || b.y + a.$.clientY;
19064                  CKEDITOR.tools.setTimeout(
19065                    function() {
19066                      this.open(d, null, g, h);
19067                    },
19068                    CKEDITOR.env.ie ? 200 : 0,
19069                    this,
19070                  );
19071                }
19072              },
19073              this,
19074            );
19075            if (CKEDITOR.env.webkit) {
19076              var f,
19077                d = function() {
19078                  f = 0;
19079                };
19080              a.on("keydown", function(a) {
19081                f = CKEDITOR.env.mac ? a.data.$.metaKey : a.data.$.ctrlKey;
19082              });
19083              a.on("keyup", d);
19084              a.on("contextmenu", d);
19085            }
19086          },
19087          open: function(a, e, f, d) {
19088            !1 !== this.editor.config.enableContextMenu &&
19089              (this.editor.focus(),
19090              (a = a || CKEDITOR.document.getDocumentElement()),
19091              this.editor.selectionChange(1),
19092              this.show(a, e, f, d));
19093          },
19094        },
19095      });
19096    },
19097    beforeInit: function(a) {
19098      var e = (a.contextMenu = new CKEDITOR.plugins.contextMenu(a));
19099      a.on("contentDom", function() {
19100        e.addTarget(a.editable(), !1 !== a.config.browserContextMenuOnCtrl);
19101      });
19102      a.addCommand("contextMenu", {
19103        exec: function() {
19104          a.contextMenu.open(a.document.getBody());
19105        },
19106      });
19107      a.setKeystroke(CKEDITOR.SHIFT + 121, "contextMenu");
19108      a.setKeystroke(CKEDITOR.CTRL + CKEDITOR.SHIFT + 121, "contextMenu");
19109    },
19110  });
19111  (function() {
19112    function k(a, b, d, e) {
19113      var c = new CKEDITOR.dom.walker(a);
19114      if ((a = a.startContainer.getAscendant(b, !0) || a.endContainer.getAscendant(b, !0)))
19115        if ((d(a), e)) return;
19116      for (; (a = c.next()); ) if ((a = a.getAscendant(b, !0))) if ((d(a), e)) break;
19117    }
19118    function u(a, b) {
19119      var d = { ul: "ol", ol: "ul" };
19120      return (
19121        -1 !==
19122        l(b, function(b) {
19123          return b.element === a || b.element === d[a];
19124        })
19125      );
19126    }
19127    function q(a) {
19128      this.styles = null;
19129      this.sticky = !1;
19130      this.editor = a;
19131      this.filter = new CKEDITOR.filter(a.config.copyFormatting_allowRules);
19132      !0 === a.config.copyFormatting_allowRules && (this.filter.disabled = !0);
19133      a.config.copyFormatting_disallowRules &&
19134        this.filter.disallow(a.config.copyFormatting_disallowRules);
19135    }
19136    var l = CKEDITOR.tools.indexOf,
19137      r = CKEDITOR.tools.getMouseButton,
19138      t = !1;
19139    CKEDITOR.plugins.add("copyformatting", {
19140      lang: "az,de,en,it,ja,nb,nl,oc,pl,pt-br,ru,sv,tr,zh,zh-cn",
19141      icons: "copyformatting",
19142      hidpi: !0,
19143      init: function(a) {
19144        var b = CKEDITOR.plugins.copyformatting;
19145        b._addScreenReaderContainer();
19146        t ||
19147          (CKEDITOR.document.appendStyleSheet(this.path + "styles/copyformatting.css"), (t = !0));
19148        a.addContentsCss && a.addContentsCss(this.path + "styles/copyformatting.css");
19149        a.copyFormatting = new b.state(a);
19150        a.addCommand("copyFormatting", b.commands.copyFormatting);
19151        a.addCommand("applyFormatting", b.commands.applyFormatting);
19152        a.ui.addButton("CopyFormatting", {
19153          label: a.lang.copyformatting.label,
19154          command: "copyFormatting",
19155          toolbar: "cleanup,0",
19156        });
19157        a.on("contentDom", function() {
19158          var d = a.editable(),
19159            b = d.isInline() ? d : a.document,
19160            c = a.ui.get("CopyFormatting");
19161          d.attachListener(b, "mouseup", function(b) {
19162            r(b) === CKEDITOR.MOUSE_BUTTON_LEFT && a.execCommand("applyFormatting");
19163          });
19164          d.attachListener(CKEDITOR.document, "mouseup", function(b) {
19165            var e = a.getCommand("copyFormatting");
19166            r(b) !== CKEDITOR.MOUSE_BUTTON_LEFT ||
19167              e.state !== CKEDITOR.TRISTATE_ON ||
19168              d.contains(b.data.getTarget()) ||
19169              a.execCommand("copyFormatting");
19170          });
19171          c &&
19172            ((b = CKEDITOR.document.getById(c._.id)),
19173            d.attachListener(b, "dblclick", function() {
19174              a.execCommand("copyFormatting", { sticky: !0 });
19175            }),
19176            d.attachListener(b, "mouseup", function(a) {
19177              a.data.stopPropagation();
19178            }));
19179        });
19180        a.config.copyFormatting_keystrokeCopy &&
19181          a.setKeystroke(a.config.copyFormatting_keystrokeCopy, "copyFormatting");
19182        a.on("key", function(b) {
19183          var e = a.getCommand("copyFormatting");
19184          b = b.data.domEvent;
19185          b.getKeystroke &&
19186            27 === b.getKeystroke() &&
19187            e.state === CKEDITOR.TRISTATE_ON &&
19188            a.execCommand("copyFormatting");
19189        });
19190        a.copyFormatting.on("extractFormatting", function(d) {
19191          var e = d.data.element;
19192          if (e.contains(a.editable()) || e.equals(a.editable())) return d.cancel();
19193          e = b._convertElementToStyleDef(e);
19194          if (!a.copyFormatting.filter.check(new CKEDITOR.style(e), !0, !0)) return d.cancel();
19195          d.data.styleDef = e;
19196        });
19197        a.copyFormatting.on("applyFormatting", function(d) {
19198          if (!d.data.preventFormatStripping) {
19199            var e = d.data.range,
19200              c = b._extractStylesFromRange(a, e),
19201              f = b._determineContext(e),
19202              g,
19203              h;
19204            if (a.copyFormatting._isContextAllowed(f))
19205              for (h = 0; h < c.length; h++)
19206                (f = c[h]),
19207                  (g = e.createBookmark()),
19208                  -1 === l(b.preservedElements, f.element)
19209                    ? CKEDITOR.env.webkit && !CKEDITOR.env.chrome
19210                      ? c[h].removeFromRange(d.data.range, d.editor)
19211                      : c[h].remove(d.editor)
19212                    : u(f.element, d.data.styles) &&
19213                      b._removeStylesFromElementInRange(e, f.element),
19214                  e.moveToBookmark(g);
19215          }
19216        });
19217        a.copyFormatting.on(
19218          "applyFormatting",
19219          function(b) {
19220            var e = CKEDITOR.plugins.copyformatting,
19221              c = e._determineContext(b.data.range);
19222            "list" === c && a.copyFormatting._isContextAllowed("list")
19223              ? e._applyStylesToListContext(b.editor, b.data.range, b.data.styles)
19224              : "table" === c && a.copyFormatting._isContextAllowed("table")
19225                ? e._applyStylesToTableContext(b.editor, b.data.range, b.data.styles)
19226                : a.copyFormatting._isContextAllowed("text") &&
19227                  e._applyStylesToTextContext(b.editor, b.data.range, b.data.styles);
19228          },
19229          null,
19230          null,
19231          999,
19232        );
19233      },
19234    });
19235    q.prototype._isContextAllowed = function(a) {
19236      var b = this.editor.config.copyFormatting_allowedContexts;
19237      return !0 === b || -1 !== l(b, a);
19238    };
19239    CKEDITOR.event.implementOn(q.prototype);
19240    CKEDITOR.plugins.copyformatting = {
19241      state: q,
19242      inlineBoundary: "h1 h2 h3 h4 h5 h6 p div".split(" "),
19243      excludedAttributes: ["id", "style", "href", "data-cke-saved-href", "dir"],
19244      elementsForInlineTransform: ["li"],
19245      excludedElementsFromInlineTransform: ["table", "thead", "tbody", "ul", "ol"],
19246      excludedAttributesFromInlineTransform: ["value", "type"],
19247      preservedElements: "ul ol li td th tr thead tbody table".split(" "),
19248      breakOnElements: ["ul", "ol", "table"],
19249      _initialKeystrokePasteCommand: null,
19250      commands: {
19251        copyFormatting: {
19252          exec: function(a, b) {
19253            var d = CKEDITOR.plugins.copyformatting,
19254              e = a.copyFormatting,
19255              c = b ? "keystrokeHandler" == b.from : !1,
19256              f = b ? b.sticky || c : !1,
19257              g = d._getCursorContainer(a),
19258              h = CKEDITOR.document.getDocumentElement();
19259            if (this.state === CKEDITOR.TRISTATE_ON)
19260              return (
19261                (e.styles = null),
19262                (e.sticky = !1),
19263                g.removeClass("cke_copyformatting_active"),
19264                h.removeClass("cke_copyformatting_disabled"),
19265                h.removeClass("cke_copyformatting_tableresize_cursor"),
19266                d._putScreenReaderMessage(a, "canceled"),
19267                d._detachPasteKeystrokeHandler(a),
19268                this.setState(CKEDITOR.TRISTATE_OFF)
19269              );
19270            e.styles = d._extractStylesFromElement(a, a.elementPath().lastElement);
19271            this.setState(CKEDITOR.TRISTATE_ON);
19272            c ||
19273              (g.addClass("cke_copyformatting_active"),
19274              h.addClass("cke_copyformatting_tableresize_cursor"),
19275              a.config.copyFormatting_outerCursor && h.addClass("cke_copyformatting_disabled"));
19276            e.sticky = f;
19277            d._putScreenReaderMessage(a, "copied");
19278            d._attachPasteKeystrokeHandler(a);
19279          },
19280        },
19281        applyFormatting: {
19282          editorFocus: !1,
19283          exec: function(a, b) {
19284            var d = a.getCommand("copyFormatting"),
19285              e = b ? "keystrokeHandler" == b.from : !1,
19286              c = CKEDITOR.plugins.copyformatting,
19287              f = a.copyFormatting,
19288              g = c._getCursorContainer(a),
19289              h = CKEDITOR.document.getDocumentElement();
19290            if (e || d.state === CKEDITOR.TRISTATE_ON) {
19291              if (e && !f.styles)
19292                return (
19293                  c._putScreenReaderMessage(a, "failed"), c._detachPasteKeystrokeHandler(a), !1
19294                );
19295              e = c._applyFormat(a, f.styles);
19296              f.sticky ||
19297                ((f.styles = null),
19298                g.removeClass("cke_copyformatting_active"),
19299                h.removeClass("cke_copyformatting_disabled"),
19300                h.removeClass("cke_copyformatting_tableresize_cursor"),
19301                d.setState(CKEDITOR.TRISTATE_OFF),
19302                c._detachPasteKeystrokeHandler(a));
19303              c._putScreenReaderMessage(a, e ? "applied" : "canceled");
19304            }
19305          },
19306        },
19307      },
19308      _getCursorContainer: function(a) {
19309        return a.elementMode === CKEDITOR.ELEMENT_MODE_INLINE
19310          ? a.editable()
19311          : a.editable().getParent();
19312      },
19313      _convertElementToStyleDef: function(a) {
19314        var b = CKEDITOR.tools,
19315          d = a.getAttributes(CKEDITOR.plugins.copyformatting.excludedAttributes),
19316          b = b.parseCssText(a.getAttribute("style"), !0, !0);
19317        return { element: a.getName(), type: CKEDITOR.STYLE_INLINE, attributes: d, styles: b };
19318      },
19319      _extractStylesFromElement: function(a, b) {
19320        var d = {},
19321          e = [];
19322        do
19323          if (
19324            b.type === CKEDITOR.NODE_ELEMENT &&
19325            !b.hasAttribute("data-cke-bookmark") &&
19326            ((d.element = b),
19327            a.copyFormatting.fire("extractFormatting", d, a) &&
19328              d.styleDef &&
19329              e.push(new CKEDITOR.style(d.styleDef)),
19330            b.getName && -1 !== l(CKEDITOR.plugins.copyformatting.breakOnElements, b.getName()))
19331          )
19332            break;
19333        while ((b = b.getParent()) && b.type === CKEDITOR.NODE_ELEMENT);
19334        return e;
19335      },
19336      _extractStylesFromRange: function(a, b) {
19337        for (var d = [], e = new CKEDITOR.dom.walker(b), c; (c = e.next()); )
19338          d = d.concat(CKEDITOR.plugins.copyformatting._extractStylesFromElement(a, c));
19339        return d;
19340      },
19341      _removeStylesFromElementInRange: function(a, b) {
19342        for (
19343          var d = -1 !== l(["ol", "ul", "table"], b), e = new CKEDITOR.dom.walker(a), c;
19344          (c = e.next());
19345
19346        )
19347          if ((c = c.getAscendant(b, !0))) if ((c.removeAttributes(c.getAttributes()), d)) break;
19348      },
19349      _getSelectedWordOffset: function(a) {
19350        function b(a, b) {
19351          return a[b ? "getPrevious" : "getNext"](function(a) {
19352            return a.type !== CKEDITOR.NODE_COMMENT;
19353          });
19354        }
19355        function d(a) {
19356          return a.type == CKEDITOR.NODE_ELEMENT
19357            ? ((a = a.getHtml().replace(/<span.*?>&nbsp;<\/span>/g, "")), a.replace(/<.*?>/g, ""))
19358            : a.getText();
19359        }
19360        function e(a, c) {
19361          var f = a,
19362            g = /\s/g,
19363            h = "p br ol ul li td th div caption body".split(" "),
19364            m = !1,
19365            k = !1,
19366            p,
19367            n;
19368          do {
19369            for (p = b(f, c); !p && f.getParent(); ) {
19370              f = f.getParent();
19371              if (-1 !== l(h, f.getName())) {
19372                k = m = !0;
19373                break;
19374              }
19375              p = b(f, c);
19376            }
19377            if (p && p.getName && -1 !== l(h, p.getName())) {
19378              m = !0;
19379              break;
19380            }
19381            f = p;
19382          } while (f && f.getStyle && ("none" == f.getStyle("display") || !f.getText()));
19383          for (f || (f = a); f.type !== CKEDITOR.NODE_TEXT; )
19384            f = !m || c || k ? f.getChild(0) : f.getChild(f.getChildCount() - 1);
19385          for (h = d(f); null != (k = g.exec(h)) && ((n = k.index), c); );
19386          if ("number" !== typeof n && !m) return e(f, c);
19387          if (m) c ? (n = 0) : ((g = /([\.\b]*$)/), (n = (k = g.exec(h)) ? k.index : h.length));
19388          else if (c && ((n += 1), n > h.length)) return e(f);
19389          return { node: f, offset: n };
19390        }
19391        var c = /\b\w+\b/gi,
19392          f,
19393          g,
19394          h,
19395          m,
19396          k;
19397        h = m = k = a.startContainer;
19398        for (f = d(h); null != (g = c.exec(f)); )
19399          if (g.index + g[0].length >= a.startOffset)
19400            return (
19401              (a = g.index),
19402              (c = g.index + g[0].length),
19403              0 === g.index && ((g = e(h, !0)), (m = g.node), (a = g.offset)),
19404              c >= f.length && ((f = e(h)), (k = f.node), (c = f.offset)),
19405              { startNode: m, startOffset: a, endNode: k, endOffset: c }
19406            );
19407        return null;
19408      },
19409      _filterStyles: function(a) {
19410        var b = CKEDITOR.tools.isEmpty,
19411          d = [],
19412          e,
19413          c;
19414        for (c = 0; c < a.length; c++)
19415          (e = a[c]._.definition),
19416            -1 !==
19417              CKEDITOR.tools.indexOf(CKEDITOR.plugins.copyformatting.inlineBoundary, e.element) &&
19418              (e.element = a[c].element = "span"),
19419            ("span" === e.element && b(e.attributes) && b(e.styles)) || d.push(a[c]);
19420        return d;
19421      },
19422      _determineContext: function(a) {
19423        function b(b) {
19424          var e = new CKEDITOR.dom.walker(a),
19425            c;
19426          if (a.startContainer.getAscendant(b, !0) || a.endContainer.getAscendant(b, !0)) return !0;
19427          for (; (c = e.next()); ) if (c.getAscendant(b, !0)) return !0;
19428        }
19429        return b({ ul: 1, ol: 1 }) ? "list" : b("table") ? "table" : "text";
19430      },
19431      _applyStylesToTextContext: function(a, b, d) {
19432        var e = CKEDITOR.plugins.copyformatting,
19433          c = e.excludedAttributesFromInlineTransform,
19434          f,
19435          g;
19436        CKEDITOR.env.webkit && !CKEDITOR.env.chrome && a.getSelection().selectRanges([b]);
19437        for (f = 0; f < d.length; f++)
19438          if (((b = d[f]), -1 === l(e.excludedElementsFromInlineTransform, b.element))) {
19439            if (-1 !== l(e.elementsForInlineTransform, b.element))
19440              for (b.element = b._.definition.element = "span", g = 0; g < c.length; g++)
19441                b._.definition.attributes[c[g]] && delete b._.definition.attributes[c[g]];
19442            b.apply(a);
19443          }
19444      },
19445      _applyStylesToListContext: function(a, b, d) {
19446        var e, c, f;
19447        for (f = 0; f < d.length; f++)
19448          (e = d[f]),
19449            (c = b.createBookmark()),
19450            "ol" === e.element || "ul" === e.element
19451              ? k(
19452                  b,
19453                  { ul: 1, ol: 1 },
19454                  function(a) {
19455                    var b = e;
19456                    a.getName() !== b.element && a.renameNode(b.element);
19457                    b.applyToObject(a);
19458                  },
19459                  !0,
19460                )
19461              : "li" === e.element
19462                ? k(b, "li", function(a) {
19463                    e.applyToObject(a);
19464                  })
19465                : CKEDITOR.plugins.copyformatting._applyStylesToTextContext(a, b, [e]),
19466            b.moveToBookmark(c);
19467      },
19468      _applyStylesToTableContext: function(a, b, d) {
19469        function e(a, b) {
19470          a.getName() !== b.element &&
19471            ((b = b.getDefinition()), (b.element = a.getName()), (b = new CKEDITOR.style(b)));
19472          b.applyToObject(a);
19473        }
19474        var c, f, g;
19475        for (g = 0; g < d.length; g++)
19476          (c = d[g]),
19477            (f = b.createBookmark()),
19478            -1 !== l(["table", "tr"], c.element)
19479              ? k(b, c.element, function(a) {
19480                  c.applyToObject(a);
19481                })
19482              : -1 !== l(["td", "th"], c.element)
19483                ? k(b, { td: 1, th: 1 }, function(a) {
19484                    e(a, c);
19485                  })
19486                : -1 !== l(["thead", "tbody"], c.element)
19487                  ? k(b, { thead: 1, tbody: 1 }, function(a) {
19488                      e(a, c);
19489                    })
19490                  : CKEDITOR.plugins.copyformatting._applyStylesToTextContext(a, b, [c]),
19491            b.moveToBookmark(f);
19492      },
19493      _applyFormat: function(a, b) {
19494        var d = a.getSelection().getRanges()[0],
19495          e = CKEDITOR.plugins.copyformatting,
19496          c,
19497          f;
19498        if (!d) return !1;
19499        if (d.collapsed) {
19500          f = a.getSelection().createBookmarks();
19501          if (!(c = e._getSelectedWordOffset(d))) return;
19502          d = a.createRange();
19503          d.setStart(c.startNode, c.startOffset);
19504          d.setEnd(c.endNode, c.endOffset);
19505          d.select();
19506        }
19507        b = e._filterStyles(b);
19508        if (
19509          !a.copyFormatting.fire(
19510            "applyFormatting",
19511            { styles: b, range: d, preventFormatStripping: !1 },
19512            a,
19513          )
19514        )
19515          return !1;
19516        f && a.getSelection().selectBookmarks(f);
19517        return !0;
19518      },
19519      _putScreenReaderMessage: function(a, b) {
19520        var d = this._getScreenReaderContainer();
19521        d && d.setText(a.lang.copyformatting.notification[b]);
19522      },
19523      _addScreenReaderContainer: function() {
19524        if (this._getScreenReaderContainer()) return this._getScreenReaderContainer();
19525        if (!CKEDITOR.env.ie6Compat && !CKEDITOR.env.ie7Compat)
19526          return CKEDITOR.document
19527            .getBody()
19528            .append(
19529              CKEDITOR.dom.element.createFromHtml(
19530                '\x3cdiv class\x3d"cke_screen_reader_only cke_copyformatting_notification"\x3e\x3cdiv aria-live\x3d"polite"\x3e\x3c/div\x3e\x3c/div\x3e',
19531              ),
19532            )
19533            .getChild(0);
19534      },
19535      _getScreenReaderContainer: function() {
19536        if (!CKEDITOR.env.ie6Compat && !CKEDITOR.env.ie7Compat)
19537          return CKEDITOR.document
19538            .getBody()
19539            .findOne(".cke_copyformatting_notification div[aria-live]");
19540      },
19541      _attachPasteKeystrokeHandler: function(a) {
19542        var b = a.config.copyFormatting_keystrokePaste;
19543        b &&
19544          ((this._initialKeystrokePasteCommand = a.keystrokeHandler.keystrokes[b]),
19545          a.setKeystroke(b, "applyFormatting"));
19546      },
19547      _detachPasteKeystrokeHandler: function(a) {
19548        var b = a.config.copyFormatting_keystrokePaste;
19549        b && a.setKeystroke(b, this._initialKeystrokePasteCommand || !1);
19550      },
19551    };
19552    CKEDITOR.config.copyFormatting_outerCursor = !0;
19553    CKEDITOR.config.copyFormatting_allowRules =
19554      "b s u i em strong span p div td th ol ul li(*)[*]{*}";
19555    CKEDITOR.config.copyFormatting_disallowRules =
19556      "*[data-cke-widget*,data-widget*,data-cke-realelement](cke_widget*)";
19557    CKEDITOR.config.copyFormatting_allowedContexts = !0;
19558    CKEDITOR.config.copyFormatting_keystrokeCopy = CKEDITOR.CTRL + CKEDITOR.SH
19558IFT + 67;
19559    CKEDITOR.config.copyFormatting_keystrokePaste = CKEDITOR.CTRL + CKEDITOR.SHIFT + 86;
19560  })();
19561  (function() {
19562    CKEDITOR.plugins.add("div", {
19563      requires: "dialog",
19564      init: function(a) {
19565        if (!a.blockless) {
19566          var c = a.lang.div,
19567            b = "div(*)";
19568          CKEDITOR.dialog.isTabEnabled(a, "editdiv", "advanced") &&
19569            (b += ";div[dir,id,lang,title]{*}");
19570          a.addCommand(
19571            "creatediv",
19572            new CKEDITOR.dialogCommand("creatediv", {
19573              allowedContent: b,
19574              requiredContent: "div",
19575              contextSensitive: !0,
19576              contentTransformations: [["div: alignmentToStyle"]],
19577              refresh: function(a, c) {
19578                this.setState(
19579                  "div" in (a.config.div_wrapTable ? c.root : c.blockLimit).getDtd()
19580                    ? CKEDITOR.TRISTATE_OFF
19581                    : CKEDITOR.TRISTATE_DISABLED,
19582                );
19583              },
19584            }),
19585          );
19586          a.addCommand(
19587            "editdiv",
19588            new CKEDITOR.dialogCommand("editdiv", { requiredContent: "div" }),
19589          );
19590          a.addCommand("removediv", {
19591            requiredContent: "div",
19592            exec: function(a) {
19593              function c(b) {
19594                (b = CKEDITOR.plugins.div.getSurroundDiv(a, b)) &&
19595                  !b.data("cke-div-added") &&
19596                  (f.push(b), b.data("cke-div-added"));
19597              }
19598              for (
19599                var b = a.getSelection(),
19600                  g = b && b.getRanges(),
19601                  e,
19602                  h = b.createBookmarks(),
19603                  f = [],
19604                  d = 0;
19605                d < g.length;
19606                d++
19607              )
19608                (e = g[d]),
19609                  e.collapsed
19610                    ? c(b.getStartElement())
19611                    : ((e = new CKEDITOR.dom.walker(e)), (e.evaluator = c), e.lastForward());
19612              for (d = 0; d < f.length; d++) f[d].remove(!0);
19613              b.selectBookmarks(h);
19614            },
19615          });
19616          a.ui.addButton &&
19617            a.ui.addButton("CreateDiv", {
19618              label: c.toolbar,
19619              command: "creatediv",
19620              toolbar: "blocks,50",
19621            });
19622          a.addMenuItems &&
19623            (a.addMenuItems({
19624              editdiv: { label: c.edit, command: "editdiv", group: "div", order: 1 },
19625              removediv: { label: c.remove, command: "removediv", group: "div", order: 5 },
19626            }),
19627            a.contextMenu &&
19628              a.contextMenu.addListener(function(b) {
19629                return !b || b.isReadOnly()
19630                  ? null
19631                  : CKEDITOR.plugins.div.getSurroundDiv(a)
19632                    ? { editdiv: CKEDITOR.TRISTATE_OFF, removediv: CKEDITOR.TRISTATE_OFF }
19633                    : null;
19634              }));
19635          CKEDITOR.dialog.add("creatediv", this.path + "dialogs/div.js");
19636          CKEDITOR.dialog.add("editdiv", this.path + "dialogs/div.js");
19637        }
19638      },
19639    });
19640    CKEDITOR.plugins.div = {
19641      getSurroundDiv: function(a, c) {
19642        var b = a.elementPath(c);
19643        return a.elementPath(b.blockLimit).contains(function(a) {
19644          return a.is("div") && !a.isReadOnly();
19645        }, 1);
19646      },
19647    };
19648  })();
19649  CKEDITOR.plugins.add("resize", {
19650    init: function(b) {
19651      function f(d) {
19652        var e = c.width,
19653          m = c.height,
19654          f = e + (d.data.$.screenX - n.x) * ("rtl" == g ? -1 : 1);
19655        d = m + (d.data.$.screenY - n.y);
19656        h && (e = Math.max(a.resize_minWidth, Math.min(f, a.resize_maxWidth)));
19657        p && (m = Math.max(a.resize_minHeight, Math.min(d, a.resize_maxHeight)));
19658        b.resize(h ? e : null, m);
19659      }
19660      function k() {
19661        CKEDITOR.document.removeListener("mousemove", f);
19662        CKEDITOR.document.removeListener("mouseup", k);
19663        b.document &&
19664          (b.document.removeListener("mousemove", f), b.document.removeListener("mouseup", k));
19665      }
19666      var a = b.config,
19667        r = b.ui.spaceId("resizer"),
19668        g = b.element ? b.element.getDirection(1) : "ltr";
19669      !a.resize_dir && (a.resize_dir = "vertical");
19670      void 0 === a.resize_maxWidth && (a.resize_maxWidth = 3e3);
19671      void 0 === a.resize_maxHeight && (a.resize_maxHeight = 3e3);
19672      void 0 === a.resize_minWidth && (a.resize_minWidth = 750);
19673      void 0 === a.resize_minHeight && (a.resize_minHeight = 250);
19674      if (!1 !== a.resize_enabled) {
19675        var l = null,
19676          n,
19677          c,
19678          h =
19679            ("both" == a.resize_dir || "horizontal" == a.resize_dir) &&
19680            a.resize_minWidth != a.resize_maxWidth,
19681          p =
19682            ("both" == a.resize_dir || "vertical" == a.resize_dir) &&
19683            a.resize_minHeight != a.resize_maxHeight,
19684          q = CKEDITOR.tools.addFunction(function(d) {
19685            l || (l = b.getResizable());
19686            c = { width: l.$.offsetWidth || 0, height: l.$.offsetHeight || 0 };
19687            n = { x: d.screenX, y: d.screenY };
19688            a.resize_minWidth > c.width && (a.resize_minWidth = c.width);
19689            a.resize_minHeight > c.height && (a.resize_minHeight = c.height);
19690            CKEDITOR.document.on("mousemove", f);
19691            CKEDITOR.document.on("mouseup", k);
19692            b.document && (b.document.on("mousemove", f), b.document.on("mouseup", k));
19693            d.preventDefault && d.preventDefault();
19694          });
19695        b.on("destroy", function() {
19696          CKEDITOR.tools.removeFunction(q);
19697        });
19698        b.on(
19699          "uiSpace",
19700          function(a) {
19701            if ("bottom" == a.data.space) {
19702              var e = "";
19703              h && !p && (e = " cke_resizer_horizontal");
19704              !h && p && (e = " cke_resizer_vertical");
19705              var c =
19706                '\x3cspan id\x3d"' +
19707                r +
19708                '" class\x3d"cke_resizer' +
19709                e +
19710                " cke_resizer_" +
19711                g +
19712                '" title\x3d"' +
19713                CKEDITOR.tools.htmlEncode(b.lang.common.resize) +
19714                '" onmousedown\x3d"CKEDITOR.tools.callFunction(' +
19715                q +
19716                ', event)"\x3e' +
19717                ("ltr" == g ? "◢" : "◣") +
19718                "\x3c/span\x3e";
19719              "ltr" == g && "ltr" == e ? (a.data.html += c) : (a.data.html = c + a.data.html);
19720            }
19721          },
19722          b,
19723          null,
19724          100,
19725        );
19726        b.on("maximize", function(a) {
19727          b.ui.space("resizer")[a.data == CKEDITOR.TRISTATE_ON ? "hide" : "show"]();
19728        });
19729      }
19730    },
19731  });
19732  (function() {
19733    function q(a, c) {
19734      function k(b) {
19735        b = h.list[b];
19736        var e;
19737        b.equals(a.editable()) || "true" == b.getAttribute("contenteditable")
19738          ? ((e = a.createRange()), e.selectNodeContents(b), (e = e.select()))
19739          : ((e = a.getSelection()), e.selectElement(b));
19740        CKEDITOR.env.ie &&
19741          a.fire("selectionChange", { selection: e, path: new CKEDITOR.dom.elementPath(b) });
19742        a.focus();
19743      }
19744      function l() {
19745        m && m.setHtml('\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');
19746        delete h.list;
19747      }
19748      var n = a.ui.spaceId("path"),
19749        m,
19750        h = a._.elementsPath,
19751        q = h.idBase;
19752      c.html +=
19753        '\x3cspan id\x3d"' +
19754        n +
19755        '_label" class\x3d"cke_voice_label"\x3e' +
19756        a.lang.elementspath.eleLabel +
19757        '\x3c/span\x3e\x3cspan id\x3d"' +
19758        n +
19759        '" class\x3d"cke_path" role\x3d"group" aria-labelledby\x3d"' +
19760        n +
19761        '_label"\x3e\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e\x3c/span\x3e';
19762      a.on("uiReady", function() {
19763        var b = a.ui.space("path");
19764        b && a.focusManager.add(b, 1);
19765      });
19766      h.onClick = k;
19767      var v = CKEDITOR.tools.addFunction(k),
19768        w = CKEDITOR.tools.addFunction(function(b, e) {
19769          var g = h.idBase,
19770            d;
19771          e = new CKEDITOR.dom.event(e);
19772          d = "rtl" == a.lang.dir;
19773          switch (e.getKeystroke()) {
19774            case d ? 39 : 37:
19775            case 9:
19776              return (
19777                (d = CKEDITOR.document.getById(g + (b + 1))) ||
19778                  (d = CKEDITOR.document.getById(g + "0")),
19779                d.focus(),
19780                !1
19781              );
19782            case d ? 37 : 39:
19783            case CKEDITOR.SHIFT + 9:
19784              return (
19785                (d = CKEDITOR.document.getById(g + (b - 1))) ||
19786                  (d = CKEDITOR.document.getById(g + (h.list.length - 1))),
19787                d.focus(),
19788                !1
19789              );
19790            case 27:
19791              return a.focus(), !1;
19792            case 13:
19793            case 32:
19794              return k(b), !1;
19795          }
19796          return !0;
19797        });
19798      a.on("selectionChange", function(b) {
19799        for (
19800          var e = [],
19801            g = (h.list = []),
19802            d = [],
19803            c = h.filters,
19804            p = !0,
19805            k = b.data.path.elements,
19806            u = k.length;
19807          u--;
19808
19809        ) {
19810          var f = k[u],
19811            r = 0;
19812          b = f.data("cke-display-name")
19813            ? f.data("cke-display-name")
19814            : f.data("cke-real-element-type") ? f.data("cke-real-element-type") : f.getName();
19815          (p = f.hasAttribute("contenteditable")
19816            ? "true" == f.getAttribute("contenteditable")
19817            : p) ||
19818            f.hasAttribute("contenteditable") ||
19819            (r = 1);
19820          for (var t = 0; t < c.length; t++) {
19821            var l = c[t](f, b);
19822            if (!1 === l) {
19823              r = 1;
19824              break;
19825            }
19826            b = l || b;
19827          }
19828          r || (g.unshift(f), d.unshift(b));
19829        }
19830        g = g.length;
19831        for (c = 0; c < g; c++)
19832          (b = d[c]),
19833            (p = a.lang.elementspath.eleTitle.replace(/%1/, b)),
19834            (b = x.output({
19835              id: q + c,
19836              label: p,
19837              text: b,
19838              jsTitle: "javascript:void('" + b + "')",
19839              index: c,
19840              keyDownFn: w,
19841              clickFn: v,
19842            })),
19843            e.unshift(b);
19844        m || (m = CKEDITOR.document.getById(n));
19845        d = m;
19846        d.setHtml(e.join("") + '\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');
19847        a.fire("elementsPathUpdate", { space: d });
19848      });
19849      a.on("readOnly", l);
19850      a.on("contentDomUnload", l);
19851      a.addCommand("elementsPathFocus", y.toolbarFocus);
19852      a.setKeystroke(CKEDITOR.ALT + 122, "elementsPathFocus");
19853    }
19854    var y = {
19855        toolbarFocus: {
19856          editorFocus: !1,
19857          readOnly: 1,
19858          exec: function(a) {
19859            (a = CKEDITOR.document.getById(a._.elementsPath.idBase + "0")) &&
19860              a.focus(CKEDITOR.env.ie || CKEDITOR.env.air);
19861          },
19862        },
19863      },
19864      c = "";
19865    CKEDITOR.env.gecko && CKEDITOR.env.mac && (c += ' onkeypress\x3d"return false;"');
19866    CKEDITOR.env.gecko && (c += ' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');
19867    var x = CKEDITOR.addTemplate(
19868      "pathItem",
19869      '\x3ca id\x3d"{id}" href\x3d"{jsTitle}" tabindex\x3d"-1" class\x3d"cke_path_item" title\x3d"{label}"' +
19870        c +
19871        ' hidefocus\x3d"true"  onkeydown\x3d"return CKEDITOR.tools.callFunction({keyDownFn},{index}, event );" onclick\x3d"CKEDITOR.tools.callFunction({clickFn},{index}); return false;" role\x3d"button" aria-label\x3d"{label}"\x3e{text}\x3c/a\x3e',
19872    );
19873    CKEDITOR.plugins.add("elementspath", {
19874      init: function(a) {
19875        a._.elementsPath = {
19876          idBase: "cke_elementspath_" + CKEDITOR.tools.getNextNumber() + "_",
19877          filters: [],
19878        };
19879        a.on("uiSpace", function(c) {
19880          "bottom" == c.data.space && q(a, c.data);
19881        });
19882      },
19883    });
19884  })();
19885  (function() {
19886    function q(b, d, a) {
19887      a = b.config.forceEnterMode || a;
19888      if ("wysiwyg" == b.mode) {
19889        d || (d = b.activeEnterMode);
19890        var h = b.elementPath();
19891        h && !h.isContextFor("p") && ((d = CKEDITOR.ENTER_BR), (a = 1));
19892        b.fire("saveSnapshot");
19893        d == CKEDITOR.ENTER_BR ? t(b, d, null, a) : u(b, d, null, a);
19894        b.fire("saveSnapshot");
19895      }
19896    }
19897    function v(b) {
19898      b = b.getSelection().getRanges(!0);
19899      for (var d = b.length - 1; 0 < d; d--) b[d].deleteContents();
19900      return b[0];
19901    }
19902    function y(b) {
19903      var d = b.startContainer.getAscendant(function(a) {
19904        return a.type == CKEDITOR.NODE_ELEMENT && "true" == a.getAttribute("contenteditable");
19905      }, !0);
19906      if (b.root.equals(d)) return b;
19907      d = new CKEDITOR.dom.range(d);
19908      d.moveToRange(b);
19909      return d;
19910    }
19911    CKEDITOR.plugins.add("enterkey", {
19912      init: function(b) {
19913        b.addCommand("enter", {
19914          modes: { wysiwyg: 1 },
19915          editorFocus: !1,
19916          exec: function(b) {
19917            q(b);
19918          },
19919        });
19920        b.addCommand("shiftEnter", {
19921          modes: { wysiwyg: 1 },
19922          editorFocus: !1,
19923          exec: function(b) {
19924            q(b, b.activeShiftEnterMode, 1);
19925          },
19926        });
19927        b.setKeystroke([[13, "enter"], [CKEDITOR.SHIFT + 13, "shiftEnter"]]);
19928      },
19929    });
19930    var z = CKEDITOR.dom.walker.whitespaces(),
19931      A = CKEDITOR.dom.walker.bookmark();
19932    CKEDITOR.plugins.enterkey = {
19933      enterBlock: function(b, d, a, h) {
19934        if ((a = a || v(b))) {
19935          a = y(a);
19936          var f = a.document,
19937            k = a.checkStartOfBlock(),
19938            m = a.checkEndOfBlock(),
19939            l = b.elementPath(a.startContainer),
19940            c = l.block,
19941            n = d == CKEDITOR.ENTER_DIV ? "div" : "p",
19942            e;
19943          if (k && m) {
19944            if (c && (c.is("li") || c.getParent().is("li"))) {
19945              c.is("li") || (c = c.getParent());
19946              a = c.getParent();
19947              e = a.getParent();
19948              h = !c.hasPrevious();
19949              var p = !c.hasNext(),
19950                n = b.getSelection(),
19951                g = n.createBookmarks(),
19952                k = c.getDirection(1),
19953                m = c.getAttribute("class"),
19954                r = c.getAttribute("style"),
19955                q = e.getDirection(1) != k;
19956              b = b.enterMode != CKEDITOR.ENTER_BR || q || r || m;
19957              if (e.is("li"))
19958                h || p
19959                  ? (h && p && a.remove(), c[p ? "insertAfter" : "insertBefore"](e))
19960                  : c.breakParent(e);
19961              else {
19962                if (b)
19963                  if (
19964                    (l.block.is("li")
19965                      ? ((e = f.createElement(d == CKEDITOR.ENTER_P ? "p" : "div")),
19966                        q && e.setAttribute("dir", k),
19967                        r && e.setAttribute("style", r),
19968                        m && e.setAttribute("class", m),
19969                        c.moveChildren(e))
19970                      : (e = l.block),
19971                    h || p)
19972                  )
19973                    e[h ? "insertBefore" : "insertAfter"](a);
19974                  else c.breakParent(a), e.insertAfter(a);
19975                else if ((c.appendBogus(!0), h || p))
19976                  for (; (f = c[h ? "getFirst" : "getLast"]()); )
19977                    f[h ? "insertBefore" : "insertAfter"](a);
19978                else for (c.breakParent(a); (f = c.getLast()); ) f.insertAfter(a);
19979                c.remove();
19980              }
19981              n.selectBookmarks(g);
19982              return;
19983            }
19984            if (c && c.getParent().is("blockquote")) {
19985              c.breakParent(c.getParent());
19986              c.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1)) ||
19987                c.getPrevious().remove();
19988              c.getNext().getFirst(CKEDITOR.dom.walker.invisible(1)) || c.getNext().remove();
19989              a.moveToElementEditStart(c);
19990              a.select();
19991              return;
19992            }
19993          } else if (c && c.is("pre") && !m) {
19994            t(b, d, a, h);
19995            return;
19996          }
19997          if ((k = a.splitBlock(n))) {
19998            d = k.previousBlock;
19999            c = k.nextBlock;
20000            l = k.wasStartOfBlock;
20001            b = k.wasEndOfBlock;
20002            c
20003              ? ((g = c.getParent()), g.is("li") && (c.breakParent(g), c.move(c.getNext(), 1)))
20004              : d &&
20005                (g = d.getParent()) &&
20006                g.is("li") &&
20007                (d.breakParent(g),
20008                (g = d.getNext()),
20009                a.moveToElementEditStart(g),
20010                d.move(d.getPrevious()));
20011            if (l || b) {
20012              if (d) {
20013                if (d.is("li") || (!w.test(d.getName()) && !d.is("pre"))) e = d.clone();
20014              } else c && (e = c.clone());
20015              e
20016                ? h && !e.is("li") && e.renameNode(n)
20017                : g && g.is("li")
20018                  ? (e = g)
20019                  : ((e = f.createElement(n)),
20020                    d && (p = d.getDirection()) && e.setAttribute("dir", p));
20021              if ((f = k.elementPath))
20022                for (h = 0, n = f.elements.length; h < n; h++) {
20023                  g = f.elements[h];
20024                  if (g.equals(f.block) || g.equals(f.blockLimit)) break;
20025                  CKEDITOR.dtd.$removeEmpty[g.getName()] &&
20026                    ((g = g.clone()), e.moveChildren(g), e.append(g));
20027                }
20028              e.appendBogus();
20029              e.getParent() || a.insertNode(e);
20030              e.is("li") && e.removeAttribute("value");
20031              !CKEDITOR.env.ie ||
20032                !l ||
20033                (b && d.getChildCount()) ||
20034                (a.moveToElementEditStart(b ? d : e), a.select());
20035              a.moveToElementEditStart(l && !b ? c : e);
20036            } else
20037              c.is("li") &&
20038                ((e = a.clone()),
20039                e.selectNodeContents(c),
20040                (e = new CKEDITOR.dom.walker(e)),
20041                (e.evaluator = function(a) {
20042                  return !(
20043                    A(a) ||
20044                    z(a) ||
20045                    (a.type == CKEDITOR.NODE_ELEMENT &&
20046                      a.getName() in CKEDITOR.dtd.$inline &&
20047                      !(a.getName() in CKEDITOR.dtd.$empty))
20048                  );
20049                }),
20050                (g = e.next()) &&
20051                  g.type == CKEDITOR.NODE_ELEMENT &&
20052                  g.is("ul", "ol") &&
20053                  (CKEDITOR.env.needsBrFiller
20054                    ? f.createElement("br")
20055                    : f.createText(" ")
20056                  ).insertBefore(g)),
20057                c && a.moveToElementEditStart(c);
20058            a.select();
20059            a.scrollIntoView();
20060          }
20061        }
20062      },
20063      enterBr: function(b, d, a, h) {
20064        if ((a = a || v(b))) {
20065          var f = a.document,
20066            k = a.checkEndOfBlock(),
20067            m = new CKEDITOR.dom.elementPath(b.getSelection().getStartElement()),
20068            l = m.block,
20069            c = l && m.block.getName();
20070          h || "li" != c
20071            ? (!h && k && w.test(c)
20072                ? (k = l.getDirection())
20073                  ? ((f = f.createElement("div")),
20074                    f.setAttribute("dir", k),
20075                    f.insertAfter(l),
20076                    a.setStart(f, 0))
20077                  : (f.createElement("br").insertAfter(l),
20078                    CKEDITOR.env.gecko && f.createText("").insertAfter(l),
20079                    a.setStartAt(
20080                      l.getNext(),
20081                      CKEDITOR.env.ie
20082                        ? CKEDITOR.POSITION_BEFORE_START
20083                        : CKEDITOR.POSITION_AFTER_START,
20084                    ))
20085                : ((b =
20086                    "pre" == c && CKEDITOR.env.ie && 8 > CKEDITOR.env.version
20087                      ? f.createText("\r")
20088                      : f.createElement("br")),
20089                  a.deleteContents(),
20090                  a.insertNode(b),
20091                  CKEDITOR.env.needsBrFiller
20092                    ? (f.createText("").insertAfter(b),
20093                      k && (l || m.blockLimit).appendBogus(),
20094                      (b.getNext().$.nodeValue = ""),
20095                      a.setStartAt(b.getNext(), CKEDITOR.POSITION_AFTER_START))
20096                    : a.setStartAt(b, CKEDITOR.POSITION_AFTER_END)),
20097              a.collapse(!0),
20098              a.select(),
20099              a.scrollIntoView())
20100            : u(b, d, a, h);
20101        }
20102      },
20103    };
20104    var x = CKEDITOR.plugins.enterkey,
20105      t = x.enterBr,
20106      u = x.enterBlock,
20107      w = /^h[1-6]$/;
20108  })();
20109  (function() {
20110    function k(b, f) {
20111      var g = {},
20112        c = [],
20113        e = { nbsp: " ", shy: "­", gt: "\x3e", lt: "\x3c", amp: "\x26", apos: "'", quot: '"' };
20114      b = b.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g, function(b, a) {
20115        var d = f ? "\x26" + a + ";" : e[a];
20116        g[d] = f ? e[a] : "\x26" + a + ";";
20117        c.push(d);
20118        return "";
20119      });
20120      if (!f && b) {
20121        b = b.split(",");
20122        var a = document.createElement("div"),
20123          d;
20124        a.innerHTML = "\x26" + b.join(";\x26") + ";";
20125        d = a.innerHTML;
20126        a = null;
20127        for (a = 0; a < d.length; a++) {
20128          var h = d.charAt(a);
20129          g[h] = "\x26" + b[a] + ";";
20130          c.push(h);
20131        }
20132      }
20133      g.regex = c.join(f ? "|" : "");
20134      return g;
20135    }
20136    CKEDITOR.plugins.add("entities", {
20137      afterInit: function(b) {
20138        function f(a) {
20139          return h[a];
20140        }
20141        function g(b) {
20142          return "force" != c.entities_processNumerical && a[b]
20143            ? a[b]
20144            : "\x26#" + b.charCodeAt(0) + ";";
20145        }
20146        var c = b.config;
20147        if ((b = (b = b.dataProcessor) && b.htmlFilter)) {
20148          var e = [];
20149          !1 !== c.basicEntities && e.push("nbsp,gt,lt,amp");
20150          c.entities &&
20151            (e.length &&
20152              e.push(
20153                "quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro",
20154              ),
20155            c.entities_latin &&
20156              e.push(
20157                "Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml",
20158              ),
20159            c.entities_greek &&
20160              e.push(
20161                "Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv",
20162              ),
20163            c.entities_additional && e.push(c.entities_additional));
20164          var a = k(e.join(",")),
20165            d = a.regex ? "[" + a.regex + "]" : "a^";
20166          delete a.regex;
20167          c.entities && c.entities_processNumerical && (d = "[^ -~]|" + d);
20168          var d = new RegExp(d, "g"),
20169            h = k("nbsp,gt,lt,amp,shy", !0),
20170            l = new RegExp(h.regex, "g");
20171          b.addRules(
20172            {
20173              text: function(a) {
20174                return a.replace(l, f).replace(d, g);
20175              },
20176            },
20177            { applyToAll: !0, excludeNestedEditable: !0 },
20178          );
20179        }
20180      },
20181    });
20182  })();
20183  CKEDITOR.config.basicEntities = !0;
20184  CKEDITOR.config.entities = !0;
20185  CKEDITOR.config.entities_latin = !0;
20186  CKEDITOR.config.entities_greek = !0;
20187  CKEDITOR.config.entities_additional = "#39";
20188  CKEDITOR.plugins.add("popup");
20189  CKEDITOR.tools.extend(CKEDITOR.editor.prototype, {
20190    popup: function(e, a, b, d) {
20191      a = a || "80%";
20192      b = b || "70%";
20193      "string" == typeof a &&
20194        1 < a.length &&
20195        "%" == a.substr(a.length - 1, 1) &&
20196        (a = parseInt(window.screen.width * parseInt(a, 10) / 100, 10));
20197      "string" == typeof b &&
20198        1 < b.length &&
20199        "%" == b.substr(b.length - 1, 1) &&
20200        (b = parseInt(window.screen.height * parseInt(b, 10) / 100, 10));
20201      640 > a && (a = 640);
20202      420 > b && (b = 420);
20203      var f = parseInt((window.screen.height - b) / 2, 10),
20204        g = parseInt((window.screen.width - a) / 2, 10);
20205      d =
20206        (d ||
20207          "location\x3dno,menubar\x3dno,toolbar\x3dno,dependent\x3dyes,minimizable\x3dno,modal\x3dyes,alwaysRaised\x3dyes,resizable\x3dyes,scrollbars\x3dyes") +
20208        ",width\x3d" +
20209        a +
20210        ",height\x3d" +
20211        b +
20212        ",top\x3d" +
20213        f +
20214        ",left\x3d" +
20215        g;
20216      var c = window.open("", null, d, !0);
20217      if (!c) return !1;
20218      try {
20219        -1 == navigator.userAgent.toLowerCase().indexOf(" chrome/") &&
20220          (c.moveTo(g, f), c.resizeTo(a, b)),
20221          c.focus(),
20222          (c.location.href = e);
20223      } catch (h) {
20224        window.open(e, null, d, !0);
20225      }
20226      return !0;
20227    },
20228  });
20229  (function() {
20230    function k(a) {
20231      this.editor = a;
20232      this.loaders = [];
20233    }
20234    function l(a, c, b) {
20235      var d = a.config.fileTools_defaultFileName;
20236      this.editor = a;
20237      this.lang = a.lang;
20238      "string" === typeof c
20239        ? ((this.data = c), (this.file = n(this.data)), (this.loaded = this.total = this.file.size))
20240        : ((this.data = null), (this.file = c), (this.total = this.file.size), (this.loaded = 0));
20241      b
20242        ? (this.fileName = b)
20243        : this.file.name
20244          ? (this.fileName = this.file.name)
20245          : ((a = this.file.type.split("/")), d && (a[0] = d), (this.fileName = a.join(".")));
20246      this.uploaded = 0;
20247      this.responseData = this.uploadTotal = null;
20248      this.status = "created";
20249      this.abort = function() {
20250        this.changeStatus("abort");
20251      };
20252    }
20253    function n(a) {
20254      var c = a.match(m)[1];
20255      a = a.replace(m, "");
20256      a = atob(a);
20257      var b = [],
20258        d,
20259        f,
20260        g,
20261        e;
20262      for (d = 0; d < a.length; d += 512) {
20263        f = a.slice(d, d + 512);
20264        g = Array(f.length);
20265        for (e = 0; e < f.length; e++) g[e] = f.charCodeAt(e);
20266        f = new Uint8Array(g);
20267        b.push(f);
20268      }
20269      return new Blob(b, { type: c });
20270    }
20271    CKEDITOR.plugins.add("filetools", {
20272      beforeInit: function(a) {
20273        a.uploadRepository = new k(a);
20274        a.on(
20275          "fileUploadRequest",
20276          function(a) {
20277            var b = a.data.fileLoader;
20278            b.xhr.open("POST", b.uploadUrl, !0);
20279            a.data.requestData.upload = { file: b.file, name: b.fileName };
20280          },
20281          null,
20282          null,
20283          5,
20284        );
20285        a.on(
20286          "fileUploadRequest",
20287          function(c) {
20288            var b = c.data.fileLoader,
20289              d = new FormData();
20290            c = c.data.requestData;
20291            var f = a.config.fileTools_requestHeaders,
20292              g,
20293              e;
20294            for (e in c) {
20295              var h = c[e];
20296              "object" === typeof h && h.file ? d.append(e, h.file, h.name) : d.append(e, h);
20297            }
20298            d.append("ckCsrfToken", CKEDITOR.tools.getCsrfToken());
20299            if (f) for (g in f) b.xhr.setRequestHeader(g, f[g]);
20300            b.xhr.send(d);
20301          },
20302          null,
20303          null,
20304          999,
20305        );
20306        a.on(
20307          "fileUploadResponse",
20308          function(a) {
20309            var b = a.data.fileLoader,
20310              d = b.xhr,
20311              f = a.data;
20312            try {
20313              var g = JSON.parse(d.responseText);
20314              g.error && g.error.message && (f.message = g.error.message);
20315              if (g.uploaded) for (var e in g) f[e] = g[e];
20316              else a.cancel();
20317            } catch (h) {
20318              (f.message = b.lang.filetools.responseError),
20319                CKEDITOR.warn("filetools-response-error", { responseText: d.responseText }),
20320                a.cancel();
20321            }
20322          },
20323          null,
20324          null,
20325          999,
20326        );
20327      },
20328    });
20329    k.prototype = {
20330      create: function(a, c, b) {
20331        b = b || l;
20332        var d = this.loaders.length;
20333        a = new b(this.editor, a, c);
20334        a.id = d;
20335        this.loaders[d] = a;
20336        this.fire("instanceCreated", a);
20337        return a;
20338      },
20339      isFinished: function() {
20340        for (var a = 0; a < this.loaders.length; ++a) if (!this.loaders[a].isFinished()) return !1;
20341        return !0;
20342      },
20343    };
20344    l.prototype = {
20345      loadAndUpload: function(a, c) {
20346        var b = this;
20347        this.once(
20348          "loaded",
20349          function(d) {
20350            d.cancel();
20351            b.once(
20352              "update",
20353              function(a) {
20354                a.cancel();
20355              },
20356              null,
20357              null,
20358              0,
20359            );
20360            b.upload(a, c);
20361          },
20362          null,
20363          null,
20364          0,
20365        );
20366        this.load();
20367      },
20368      load: function() {
20369        var a = this,
20370          c = (this.reader = new FileReader());
20371        a.changeStatus("loading");
20372        this.abort = function() {
20373          a.reader.abort();
20374        };
20375        c.onabort = function() {
20376          a.changeStatus("abort");
20377        };
20378        c.onerror = function() {
20379          a.message = a.lang.filetools.loadError;
20380          a.changeStatus("error");
20381        };
20382        c.onprogress = function(b) {
20383          a.loaded = b.loaded;
20384          a.update();
20385        };
20386        c.onload = function() {
20387          a.loaded = a.total;
20388          a.data = c.result;
20389          a.changeStatus("loaded");
20390        };
20391        c.readAsDataURL(this.file);
20392      },
20393      upload: function(a, c) {
20394        var b = c || {};
20395        a
20396          ? ((this.uploadUrl = a),
20397            (this.xhr = new XMLHttpRequest()),
20398            this.attachRequestListeners(),
20399            this.editor.fire("fileUploadRequest", { fileLoader: this, requestData: b }) &&
20400              this.changeStatus("uploading"))
20401          : ((this.message = this.lang.filetools.noUrlError), this.changeStatus("error"));
20402      },
20403      attachRequestListeners: function() {
20404        function a() {
20405          "error" != b.status &&
20406            ((b.message = b.lang.filetools.networkError), b.changeStatus("error"));
20407        }
20408        function c() {
20409          "abort" != b.status && b.changeStatus("abort");
20410        }
20411        var b = this,
20412          d = this.xhr;
20413        b.abort = function() {
20414          d.abort();
20415          c();
20416        };
20417        d.onerror = a;
20418        d.onabort = c;
20419        d.upload
20420          ? ((d.upload.onprogress = function(a) {
20421              a.lengthComputable &&
20422                (b.uploadTotal || (b.uploadTotal = a.total), (b.uploaded = a.loaded), b.update(
20422));
20423            }),
20424            (d.upload.onerror = a),
20425            (d.upload.onabort = c))
20426          : ((b.uploadTotal = b.total), b.update());
20427        d.onload = function() {
20428          b.update();
20429          if ("abort" != b.status)
20430            if (((b.uploaded = b.uploadTotal), 200 > d.status || 299 < d.status))
20431              (b.message = b.lang.filetools["httpError" + d.status]),
20432                b.message || (b.message = b.lang.filetools.httpError.replace("%1", d.status)),
20433                b.changeStatus("error");
20434            else {
20435              for (
20436                var a = { fileLoader: b },
20437                  c = ["message", "fileName", "url"],
20438                  e = b.editor.fire("fileUploadResponse", a),
20439                  h = 0;
20440                h < c.length;
20441                h++
20442              ) {
20443                var k = c[h];
20444                "string" === typeof a[k] && (b[k] = a[k]);
20445              }
20446              b.responseData = a;
20447              delete b.responseData.fileLoader;
20448              !1 === e ? b.changeStatus("error") : b.changeStatus("uploaded");
20449            }
20450        };
20451      },
20452      changeStatus: function(a) {
20453        this.status = a;
20454        if ("error" == a || "abort" == a || "loaded" == a || "uploaded" == a)
20455          this.abort = function() {};
20456        this.fire(a);
20457        this.update();
20458      },
20459      update: function() {
20460        this.fire("update");
20461      },
20462      isFinished: function() {
20463        return !!this.status.match(/^(?:loaded|uploaded|error|abort)$/);
20464      },
20465    };
20466    CKEDITOR.event.implementOn(k.prototype);
20467    CKEDITOR.event.implementOn(l.prototype);
20468    var m = /^data:(\S*?);base64,/;
20469    CKEDITOR.fileTools || (CKEDITOR.fileTools = {});
20470    CKEDITOR.tools.extend(CKEDITOR.fileTools, {
20471      uploadRepository: k,
20472      fileLoader: l,
20473      getUploadUrl: function(a, c) {
20474        var b = CKEDITOR.tools.capitalize;
20475        return c && a[c + "UploadUrl"]
20476          ? a[c + "UploadUrl"]
20477          : a.uploadUrl
20478            ? a.uploadUrl
20479            : c && a["filebrowser" + b(c, 1) + "UploadUrl"]
20480              ? a["filebrowser" + b(c, 1) + "UploadUrl"] + "\x26responseType\x3djson"
20481              : a.filebrowserUploadUrl ? a.filebrowserUploadUrl + "\x26responseType\x3djson" : null;
20482      },
20483      isTypeSupported: function(a, c) {
20484        return !!a.type.match(c);
20485      },
20486      isFileUploadSupported:
20487        "function" === typeof FileReader &&
20488        "function" === typeof new FileReader().readAsDataURL &&
20489        "function" === typeof FormData &&
20490        "function" === typeof new FormData().append &&
20491        "function" === typeof XMLHttpRequest &&
20492        "function" === typeof Blob,
20493    });
20494  })();
20495  (function() {
20496    function g(a, b) {
20497      var d = [];
20498      if (b) for (var c in b) d.push(c + "\x3d" + encodeURIComponent(b[c]));
20499      else return a;
20500      return a + (-1 != a.indexOf("?") ? "\x26" : "?") + d.join("\x26");
20501    }
20502    function p(a) {
20503      return !a.match(/command=QuickUpload/) || a.match(/(\?|&)responseType=json/)
20504        ? a
20505        : g(a, { responseType: "json" });
20506    }
20507    function k(a) {
20508      a += "";
20509      return a.charAt(0).toUpperCase() + a.substr(1);
20510    }
20511    function q() {
20512      var a = this.getDialog(),
20513        b = a.getParentEditor();
20514      b._.filebrowserSe = this;
20515      var d =
20516          b.config["filebrowser" + k(a.getName()) + "WindowWidth"] ||
20517          b.config.filebrowserWindowWidth ||
20518          "80%",
20519        a =
20520          b.config["filebrowser" + k(a.getName()) + "WindowHeight"] ||
20521          b.config.filebrowserWindowHeight ||
20522          "70%",
20523        c = this.filebrowser.params || {};
20524      c.CKEditor = b.name;
20525      c.CKEditorFuncNum = b._.filebrowserFn;
20526      c.langCode || (c.langCode = b.langCode);
20527      c = g(this.filebrowser.url, c);
20528      b.popup(c, d, a, b.config.filebrowserWindowFeatures || b.config.fileBrowserWindowFeatures);
20529    }
20530    function r(a) {
20531      var b = new CKEDITOR.dom.element(a.$.form);
20532      b &&
20533        ((a = b.$.elements.ckCsrfToken)
20534          ? (a = new CKEDITOR.dom.element(a))
20535          : ((a = new CKEDITOR.dom.element("input")),
20536            a.setAttributes({
20537              name: "ckCsrfToken",
20538              type: "hidden",
20539            }),
20540            b.append(a)),
20541        a.setAttribute("value", CKEDITOR.tools.getCsrfToken()));
20542    }
20543    function t() {
20544      var a = this.getDialog();
20545      a.getParentEditor()._.filebrowserSe = this;
20546      return a.getContentElement(this["for"][0], this["for"][1]).getInputElement().$.value &&
20547        a.getContentElement(this["for"][0], this["for"][1]).getAction()
20548        ? !0
20549        : !1;
20550    }
20551    function u(a, b, d) {
20552      var c = d.params || {};
20553      c.CKEditor = a.name;
20554      c.CKEditorFuncNum = a._.filebrowserFn;
20555      c.langCode || (c.langCode = a.langCode);
20556      b.action = g(d.url, c);
20557      b.filebrowser = d;
20558    }
20559    function l(a, b, d, c) {
20560      if (c && c.length)
20561        for (var e, g = c.length; g--; )
20562          if (
20563            ((e = c[g]),
20564            ("hbox" != e.type && "vbox" != e.type && "fieldset" != e.type) ||
20565              l(a, b, d, e.children),
20566            e.filebrowser)
20567          )
20568            if (
20569              ("string" == typeof e.filebrowser &&
20570                (e.filebrowser = {
20571                  action: "fileButton" == e.type ? "QuickUpload" : "Browse",
20572                  target: e.filebrowser,
20573                }),
20574              "Browse" == e.filebrowser.action)
20575            ) {
20576              var f = e.filebrowser.url;
20577              void 0 === f &&
20578                ((f = a.config["filebrowser" + k(b) + "BrowseUrl"]),
20579                void 0 === f && (f = a.config.filebrowserBrowseUrl));
20580              f && ((e.onClick = q), (e.filebrowser.url = f), (e.hidden = !1));
20581            } else if (
20582              "QuickUpload" == e.filebrowser.action &&
20583              e["for"] &&
20584              ((f = e.filebrowser.url),
20585              void 0 === f &&
20586                ((f = a.config["filebrowser" + k(b) + "UploadUrl"]),
20587                void 0 === f && (f = a.config.filebrowserUploadUrl)),
20588              f)
20589            ) {
20590              var h = e.onClick;
20591              e.onClick = function(b) {
20592                var c = b.sender,
20593                  d = c
20594                    .getDialog()
20595                    .getContentElement(this["for"][0], this["for"][1])
20596                    .getInputElement(),
20597                  e = CKEDITOR.fileTools && CKEDITOR.fileTools.isFileUploadSupported;
20598                if (h && !1 === h.call(c, b)) return !1;
20599                if (t.call(c, b)) {
20600                  if ("form" !== a.config.filebrowserUploadMethod && e)
20601                    return (
20602                      (b = a.uploadRepository.create(d.$.files[0])),
20603                      b.on("uploaded", function(a) {
20604                        var b = a.sender.responseData;
20605                        m.call(a.sender.editor, b.url, b.message);
20606                      }),
20607                      b.on("error", n.bind(this)),
20608                      b.on("abort", n.bind(this)),
20609                      b.loadAndUpload(p(f)),
20610                      "xhr"
20611                    );
20612                  r(d);
20613                  return !0;
20614                }
20615                return !1;
20616              };
20617              e.filebrowser.url = f;
20618              e.hidden = !1;
20619              u(a, d.getContents(e["for"][0]).get(e["for"][1]), e.filebrowser);
20620            }
20621    }
20622    function n(a) {
20623      var b = {};
20624      try {
20625        b = JSON.parse(a.sender.xhr.response) || {};
20626      } catch (d) {}
20627      this.enable();
20628      alert(b.error ? b.error.message : a.sender.message);
20629    }
20630    function h(a, b, d) {
20631      if (-1 !== d.indexOf(";")) {
20632        d = d.split(";");
20633        for (var c = 0; c < d.length; c++) if (h(a, b, d[c])) return !0;
20634        return !1;
20635      }
20636      return (a = a.getContents(b).get(d).filebrowser) && a.url;
20637    }
20638    function m(a, b) {
20639      var d = this._.filebrowserSe.getDialog(),
20640        c = this._.filebrowserSe["for"],
20641        e = this._.filebrowserSe.filebrowser.onSelect;
20642      c && d.getContentElement(c[0], c[1]).reset();
20643      if ("function" != typeof b || !1 !== b.call(this._.filebrowserSe))
20644        if (!e || !1 !== e.call(this._.filebrowserSe, a, b))
20645          if (
20646            ("string" == typeof b && b && alert(b),
20647            a &&
20648              ((c = this._.filebrowserSe), (d = c.getDialog()), (c = c.filebrowser.target || null)))
20649          )
20650            if (((c = c.split(":")), (e = d.getContentElement(c[0], c[1]))))
20651              e.setValue(a), d.selectPage(c[0]);
20652    }
20653    CKEDITOR.plugins.add("filebrowser", {
20654      requires: "popup,filetools",
20655      init: function(a) {
20656        a._.filebrowserFn = CKEDITOR.tools.addFunction(m, a);
20657        a.on("destroy", function() {
20658          CKEDITOR.tools.removeFunction(this._.filebrowserFn);
20659        });
20660      },
20661    });
20662    CKEDITOR.on("dialogDefinition", function(a) {
20663      if (a.editor.plugins.filebrowser)
20664        for (var b = a.data.definition, d, c = 0; c < b.contents.length; ++c)
20665          if ((d = b.contents[c]))
20666            l(a.editor, a.data.name, b, d.elements),
20667              d.hidden && d.filebrowser && (d.hidden = !h(b, d.id, d.filebrowser));
20668    });
20669  })();
20670  CKEDITOR.plugins.add("find", {
20671    requires: "dialog",
20672    init: function(a) {
20673      var b = a.addCommand("find", new CKEDITOR.dialogCommand("find"));
20674      b.canUndo = !1;
20675      b.readOnly = 1;
20676      a.addCommand("replace", new CKEDITOR.dialogCommand("replace")).canUndo = !1;
20677      a.ui.addButton &&
20678        (a.ui.addButton("Find", { label: a.lang.find.find, command: "find", toolbar: "find,10" }),
20679        a.ui.addButton("Replace", {
20680          label: a.lang.find.replace,
20681          command: "replace",
20682          toolbar: "find,20",
20683        }));
20684      CKEDITOR.dialog.add("find", this.path + "dialogs/find.js");
20685      CKEDITOR.dialog.add("replace", this.path + "dialogs/find.js");
20686    },
20687  });
20688  CKEDITOR.config.find_highlight = {
20689    element: "span",
20690    styles: { "background-color": "#004", color: "#fff" },
20691  };
20692  (function() {
20693    function g(a, b) {
20694      var c = l.exec(a),
20695        d = l.exec(b);
20696      if (c) {
20697        if (!c[2] && "px" == d[2]) return d[1];
20698        if ("px" == c[2] && !d[2]) return d[1] + "px";
20699      }
20700      return b;
20701    }
20702    var k = CKEDITOR.htmlParser.cssStyle,
20703      h = CKEDITOR.tools.cssLength,
20704      l = /^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i,
20705      m = {
20706        elements: {
20707          $: function(a) {
20708            var b = a.attributes;
20709            if (
20710              (b =
20711                (b =
20712                  (b = b && b["data-cke-realelement"]) &&
20713                  new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(b))) &&
20714                b.children[0]) &&
20715              a.attributes["data-cke-resizable"]
20716            ) {
20717              var c = new k(a).rules;
20718              a = b.attributes;
20719              var d = c.width,
20720                c = c.height;
20721              d && (a.width = g(a.width, d));
20722              c && (a.height = g(a.height, c));
20723            }
20724            return b;
20725          },
20726        },
20727      };
20728    CKEDITOR.plugins.add("fakeobjects", {
20729      init: function(a) {
20730        a.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}", "fakeobjects");
20731      },
20732      afterInit: function(a) {
20733        (a = (a = a.dataProcessor) && a.htmlFilter) && a.addRules(m, { applyToAll: !0 });
20734      },
20735    });
20736    CKEDITOR.editor.prototype.createFakeElement = function(a, b, c, d) {
20737      var e = this.lang.fakeobjects,
20738        e = e[c] || e.unknown;
20739      b = {
20740        class: b,
20741        "data-cke-realelement": encodeURIComponent(a.getOuterHtml()),
20742        "data-cke-real-node-type": a.type,
20743        alt: e,
20744        title: e,
20745        align: a.getAttribute("align") || "",
20746      };
20747      CKEDITOR.env.hc || (b.src = CKEDITOR.tools.transparentImageData);
20748      c && (b["data-cke-real-element-type"] = c);
20749      d &&
20750        ((b["data-cke-resizable"] = d),
20751        (c = new k()),
20752        (d = a.getAttribute("width")),
20753        (a = a.getAttribute("height")),
20754        d && (c.rules.width = h(d)),
20755        a && (c.rules.height = h(a)),
20756        c.populate(b));
20757      return this.document.createElement("img", { attributes: b });
20758    };
20759    CKEDITOR.editor.prototype.createFakeParserElement = function(a, b, c, d) {
20760      var e = this.lang.fakeobjects,
20761        e = e[c] || e.unknown,
20762        f;
20763      f = new CKEDITOR.htmlParser.basicWriter();
20764      a.writeHtml(f);
20765      f = f.getHtml();
20766      b = {
20767        class: b,
20768        "data-cke-realelement": encodeURIComponent(f),
20769        "data-cke-real-node-type": a.type,
20770        alt: e,
20771        title: e,
20772        align: a.attributes.align || "",
20773      };
20774      CKEDITOR.env.hc || (b.src = CKEDITOR.tools.transparentImageData);
20775      c && (b["data-cke-real-element-type"] = c);
20776      d &&
20777        ((b["data-cke-resizable"] = d),
20778        (d = a.attributes),
20779        (a = new k()),
20780        (c = d.width),
20781        (d = d.height),
20782        void 0 !== c && (a.rules.width = h(c)),
20783        void 0 !== d && (a.rules.height = h(d)),
20784        a.populate(b));
20785      return new CKEDITOR.htmlParser.element("img", b);
20786    };
20787    CKEDITOR.editor.prototype.restoreRealElement = function(a) {
20788      if (a.data("cke-real-node-type") != CKEDITOR.NODE_ELEMENT) return null;
20789      var b = CKEDITOR.dom.element.createFromHtml(
20790        decodeURIComponent(a.data("cke-realelement")),
20791        this.document,
20792      );
20793      if (a.data("cke-resizable")) {
20794        var c = a.getStyle("width");
20795        a = a.getStyle("height");
20796        c && b.setAttribute("width", g(b.getAttribute("width"), c));
20797        a && b.setAttribute("height", g(b.getAttribute("height"), a));
20798      }
20799      return b;
20800    };
20801  })();
20802  (function() {
20803    function d(a) {
20804      a = a.attributes;
20805      return "application/x-shockwave-flash" == a.type || f.test(a.src || "");
20806    }
20807    function e(a, b) {
20808      return a.createFakeParserElement(b, "cke_flash", "flash", !0);
20809    }
20810    var f = /\.swf(?:$|\?)/i;
20811    CKEDITOR.plugins.add("flash", {
20812      requires: "dialog,fakeobjects",
20813      onLoad: function() {
20814        CKEDITOR.addCss(
20815          "img.cke_flash{background-image: url(" +
20816            CKEDITOR.getUrl(this.path + "images/placeholder.png") +
20817            ");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 80px;height: 80px;}",
20818        );
20819      },
20820      init: function(a) {
20821        var b =
20822          "object[classid,codebase,height,hspace,vspace,width];param[name,value];embed[height,hspace,pluginspage,src,type,vspace,width]";
20823        CKEDITOR.dialog.isTabEnabled(a, "flash", "properties") &&
20824          (b += ";object[align];
20824 embed[allowscriptaccess,quality,scale,wmode]");
20825        CKEDITOR.dialog.isTabEnabled(a, "flash", "advanced") &&
20826          (b += ";object[id]{*}; embed[bgcolor]{*}(*)");
20827        a.addCommand(
20828          "flash",
20829          new CKEDITOR.dialogCommand("flash", { allowedContent: b, requiredContent: "embed" }),
20830        );
20831        a.ui.addButton &&
20832          a.ui.addButton("Flash", {
20833            label: a.lang.common.flash,
20834            command: "flash",
20835            toolbar: "insert,20",
20836          });
20837        CKEDITOR.dialog.add("flash", this.path + "dialogs/flash.js");
20838        a.addMenuItems &&
20839          a.addMenuItems({
20840            flash: { label: a.lang.flash.properties, command: "flash", group: "flash" },
20841          });
20842        a.on("doubleclick", function(a) {
20843          var b = a.data.element;
20844          b.is("img") && "flash" == b.data("cke-real-element-type") && (a.data.dialog = "flash");
20845        });
20846        a.contextMenu &&
20847          a.contextMenu.addListener(function(a) {
20848            if (a && a.is("img") && !a.isReadOnly() && "flash" == a.data("cke-real-element-type"))
20849              return { flash: CKEDITOR.TRISTATE_OFF };
20850          });
20851      },
20852      afterInit: function(a) {
20853        var b = a.dataProcessor;
20854        (b = b && b.dataFilter) &&
20855          b.addRules(
20856            {
20857              elements: {
20858                "cke:object": function(b) {
20859                  var c = b.attributes;
20860                  if (!((c.classid && String(c.classid).toLowerCase()) || d(b))) {
20861                    for (c = 0; c < b.children.length; c++)
20862                      if ("cke:embed" == b.children[c].name) {
20863                        if (!d(b.children[c])) break;
20864                        return e(a, b);
20865                      }
20866                    return null;
20867                  }
20868                  return e(a, b);
20869                },
20870                "cke:embed": function(b) {
20871                  return d(b) ? e(a, b) : null;
20872                },
20873              },
20874            },
20875            5,
20876          );
20877      },
20878    });
20879  })();
20880  CKEDITOR.tools.extend(CKEDITOR.config, {
20881    flashEmbedTagOnly: !1,
20882    flashAddEmbedTag: !0,
20883    flashConvertOnEdit: !1,
20884  });
20885  (function() {
20886    function k(a) {
20887      var l = a.config,
20888        p = a.fire("uiSpace", { space: "top", html: "" }).html,
20889        t = (function() {
20890          function f(a, c, e) {
20891            b.setStyle(c, w(e));
20892            b.setStyle("position", a);
20893          }
20894          function e(a) {
20895            var b = k.getDocumentPosition();
20896            switch (a) {
20897              case "top":
20898                f("absolute", "top", b.y - q - r);
20899                break;
20900              case "pin":
20901                f("fixed", "top", x);
20902                break;
20903              case "bottom":
20904                f("absolute", "top", b.y + (c.height || c.bottom - c.top) + r);
20905            }
20906            m = a;
20907          }
20908          var m,
20909            k,
20910            n,
20911            c,
20912            h,
20913            q,
20914            v,
20915            p = l.floatSpaceDockedOffsetX || 0,
20916            r = l.floatSpaceDockedOffsetY || 0,
20917            u = l.floatSpacePinnedOffsetX || 0,
20918            x = l.floatSpacePinnedOffsetY || 0;
20919          return function(d) {
20920            if ((k = a.editable())) {
20921              var f = d && "focus" == d.name;
20922              f && b.show();
20923              a.fire("floatingSpaceLayout", { show: f });
20924              b.removeStyle("left");
20925              b.removeStyle("right");
20926              n = b.getClientRect();
20927              c = k.getClientRect();
20928              h = g.getViewPaneSize();
20929              q = n.height;
20930              v =
20931                "pageXOffset" in g.$
20932                  ? g.$.pageXOffset
20933                  : CKEDITOR.document.$.documentElement.scrollLeft;
20934              m
20935                ? (q + r <= c.top ? e("top") : q + r > h.height - c.bottom ? e("pin") : e("bottom"),
20936                  (d = h.width / 2),
20937                  (d = l.floatSpacePreferRight
20938                    ? "right"
20939                    : 0 < c.left && c.right < h.width && c.width > n.width
20940                      ? "rtl" == l.contentsLangDirection ? "right" : "left"
20941                      : d - c.left > c.right - d ? "left" : "right"),
20942                  n.width > h.width
20943                    ? ((d = "left"), (f = 0))
20944                    : ((f =
20945                        "left" == d
20946                          ? 0 < c.left ? c.left : 0
20947                          : c.right < h.width ? h.width - c.right : 0),
20948                      f + n.width > h.width && ((d = "left" == d ? "right" : "left"), (f = 0))),
20949                  b.setStyle(
20950                    d,
20951                    w(("pin" == m ? u : p) + f + ("pin" == m ? 0 : "left" == d ? v : -v)),
20952                  ))
20953                : ((m = "pin"), e("pin"), t(d));
20954            }
20955          };
20956        })();
20957      if (p) {
20958        var k = new CKEDITOR.template(
20959            '\x3cdiv id\x3d"cke_{name}" class\x3d"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} ' +
20960              CKEDITOR.env.cssClass +
20961              '" dir\x3d"{langDir}" title\x3d"' +
20962              (CKEDITOR.env.gecko ? " " : "") +
20963              '" lang\x3d"{langCode}" role\x3d"application" style\x3d"{style}"' +
20964              (a.title ? ' aria-labelledby\x3d"cke_{name}_arialbl"' : " ") +
20965              "\x3e" +
20966              (a.title
20967                ? '\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e'
20968                : " ") +
20969              '\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{topId}" class\x3d"cke_top" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e',
20970          ),
20971          b = CKEDITOR.document.getBody().append(
20972            CKEDITOR.dom.element.createFromHtml(
20973              k.output({
20974                content: p,
20975                id: a.id,
20976                langDir: a.lang.dir,
20977                langCode: a.langCode,
20978                name: a.name,
20979                style: "display:none;z-index:" + (l.baseFloatZIndex - 1),
20980                topId: a.ui.spaceId("top"),
20981                voiceLabel: a.title,
20982              }),
20983            ),
20984          ),
20985          u = CKEDITOR.tools.eventsBuffer(500, t),
20986          e = CKEDITOR.tools.eventsBuffer(100, t);
20987        b.unselectable();
20988        b.on("mousedown", function(a) {
20989          a = a.data;
20990          a.getTarget().hasAscendant("a", 1) || a.preventDefault();
20991        });
20992        a.on("focus", function(b) {
20993          t(b);
20994          a.on("change", u.input);
20995          g.on("scroll", e.input);
20996          g.on("resize", e.input);
20997        });
20998        a.on("blur", function() {
20999          b.hide();
21000          a.removeListener("change", u.input);
21001          g.removeListener("scroll", e.input);
21002          g.removeListener("resize", e.input);
21003        });
21004        a.on("destroy", function() {
21005          g.removeListener("scroll", e.input);
21006          g.removeListener("resize", e.input);
21007          b.clearCustomData();
21008          b.remove();
21009        });
21010        a.focusManager.hasFocus && b.show();
21011        a.focusManager.add(b, 1);
21012      }
21013    }
21014    var g = CKEDITOR.document.getWindow(),
21015      w = CKEDITOR.tools.cssLength;
21016    CKEDITOR.plugins.add("floatingspace", {
21017      init: function(a) {
21018        a.on(
21019          "loaded",
21020          function() {
21021            k(this);
21022          },
21023          null,
21024          null,
21025          20,
21026        );
21027      },
21028    });
21029  })();
21030  CKEDITOR.plugins.add("listblock", {
21031    requires: "panel",
21032    onLoad: function() {
21033      var f = CKEDITOR.addTemplate(
21034          "panel-list",
21035          '\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e',
21036        ),
21037        g = CKEDITOR.addTemplate(
21038          "panel-list-item",
21039          '\x3cli id\x3d"{id}" class\x3d"cke_panel_listItem" role\x3dpresentation\x3e\x3ca id\x3d"{id}_option" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"{title}" href\x3d"javascript:void(\'{val}\')"  {onclick}\x3d"CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role\x3d"option"\x3e{text}\x3c/a\x3e\x3c/li\x3e',
21040        ),
21041        h = CKEDITOR.addTemplate(
21042          "panel-list-group",
21043          '\x3ch1 id\x3d"{id}" class\x3d"cke_panel_grouptitle" role\x3d"presentation" \x3e{label}\x3c/h1\x3e',
21044        ),
21045        k = /\'/g;
21046      CKEDITOR.ui.panel.prototype.addListBlock = function(a, b) {
21047        return this.addBlock(a, new CKEDITOR.ui.listBlock(this.getHolderElement(), b));
21048      };
21049      CKEDITOR.ui.listBlock = CKEDITOR.tools.createClass({
21050        base: CKEDITOR.ui.panel.block,
21051        $: function(a, b) {
21052          b = b || {};
21053          var c = b.attributes || (b.attributes = {});
21054          (this.multiSelect = !!b.multiSelect) && (c["aria-multiselectable"] = !0);
21055          !c.role && (c.role = "listbox");
21056          this.base.apply(this, arguments);
21057          this.element.setAttribute("role", c.role);
21058          c = this.keys;
21059          c[40] = "next";
21060          c[9] = "next";
21061          c[38] = "prev";
21062          c[CKEDITOR.SHIFT + 9] = "prev";
21063          c[32] = CKEDITOR.env.ie ? "mouseup" : "click";
21064          CKEDITOR.env.ie && (c[13] = "mouseup");
21065          this._.pendingHtml = [];
21066          this._.pendingList = [];
21067          this._.items = {};
21068          this._.groups = {};
21069        },
21070        _: {
21071          close: function() {
21072            if (this._.started) {
21073              var a = f.output({ items: this._.pendingList.join("") });
21074              this._.pendingList = [];
21075              this._.pendingHtml.push(a);
21076              delete this._.started;
21077            }
21078          },
21079          getClick: function() {
21080            this._.click ||
21081              (this._.click = CKEDITOR.tools.addFunction(function(a) {
21082                var b = this.toggle(a);
21083                if (this.onClick) this.onClick(a, b);
21084              }, this));
21085            return this._.click;
21086          },
21087        },
21088        proto: {
21089          add: function(a, b, c) {
21090            var d = CKEDITOR.tools.getNextId();
21091            this._.started || ((this._.started = 1), (this._.size = this._.size || 0));
21092            this._.items[a] = d;
21093            var e;
21094            e = CKEDITOR.tools.htmlEncodeAttr(a).replace(k, "\\'");
21095            a = {
21096              id: d,
21097              val: e,
21098              onclick: CKEDITOR.env.ie ? 'onclick\x3d"return false;" onmouseup' : "onclick",
21099              clickFn: this._.getClick(),
21100              title: CKEDITOR.tools.htmlEncodeAttr(c || a),
21101              text: b || a,
21102            };
21103            this._.pendingList.push(g.output(a));
21104          },
21105          startGroup: function(a) {
21106            this._.close();
21107            var b = CKEDITOR.tools.getNextId();
21108            this._.groups[a] = b;
21109            this._.pendingHtml.push(h.output({ id: b, label: a }));
21110          },
21111          commit: function() {
21112            this._.close();
21113            this.element.appendHtml(this._.pendingHtml.join(""));
21114            delete this._.size;
21115            this._.pendingHtml = [];
21116          },
21117          toggle: function(a) {
21118            var b = this.isMarked(a);
21119            b ? this.unmark(a) : this.mark(a);
21120            return !b;
21121          },
21122          hideGroup: function(a) {
21123            var b = (a = this.element.getDocument().getById(this._.groups[a])) && a.getNext();
21124            a &&
21125              (a.setStyle("display", "none"),
21126              b && "ul" == b.getName() && b.setStyle("display", "none"));
21127          },
21128          hideItem: function(a) {
21129            this.element
21130              .getDocument()
21131              .getById(this._.items[a])
21132              .setStyle("display", "none");
21133          },
21134          showAll: function() {
21135            var a = this._.items,
21136              b = this._.groups,
21137              c = this.element.getDocument(),
21138              d;
21139            for (d in a) c.getById(a[d]).setStyle("display", "");
21140            for (var e in b)
21141              (a = c.getById(b[e])),
21142                (d = a.getNext()),
21143                a.setStyle("display", ""),
21144                d && "ul" == d.getName() && d.setStyle("display", "");
21145          },
21146          mark: function(a) {
21147            this.multiSelect || this.unmarkAll();
21148            a = this._.items[a];
21149            var b = this.element.getDocument().getById(a);
21150            b.addClass("cke_selected");
21151            this.element
21152              .getDocument()
21153              .getById(a + "_option")
21154              .setAttribute("aria-selected", !0);
21155            this.onMark && this.onMark(b);
21156          },
21157          markFirstDisplayed: function() {
21158            var a = this;
21159            this._.markFirstDisplayed(function() {
21160              a.multiSelect || a.unmarkAll();
21161            });
21162          },
21163          unmark: function(a) {
21164            var b = this.element.getDocument();
21165            a = this._.items[a];
21166            var c = b.getById(a);
21167            c.removeClass("cke_selected");
21168            b.getById(a + "_option").removeAttribute("aria-selected");
21169            this.onUnmark && this.onUnmark(c);
21170          },
21171          unmarkAll: function() {
21172            var a = this._.items,
21173              b = this.element.getDocument(),
21174              c;
21175            for (c in a) {
21176              var d = a[c];
21177              b.getById(d).removeClass("cke_selected");
21178              b.getById(d + "_option").removeAttribute("aria-selected");
21179            }
21180            this.onUnmark && this.onUnmark();
21181          },
21182          isMarked: function(a) {
21183            return this.element
21184              .getDocument()
21185              .getById(this._.items[a])
21186              .hasClass("cke_selected");
21187          },
21188          focus: function(a) {
21189            this._.focusIndex = -1;
21190            var b = this.element.getElementsByTag("a"),
21191              c,
21192              d = -1;
21193            if (a)
21194              for (
21195                c = this.element
21196                  .getDocument()
21197                  .getById(this._.items[a])
21198                  .getFirst();
21199                (a = b.getItem(++d));
21200
21201              ) {
21202                if (a.equals(c)) {
21203                  this._.focusIndex = d;
21204                  break;
21205                }
21206              }
21207            else this.element.focus();
21208            c &&
21209              setTimeout(function() {
21210                c.focus();
21211              }, 0);
21212          },
21213        },
21214      });
21215    },
21216  });
21217  CKEDITOR.plugins.add("richcombo", {
21218    requires: "floatpanel,listblock,button",
21219    beforeInit: function(c) {
21220      c.ui.addHandler(CKEDITOR.UI_RICHCOMBO, CKEDITOR.ui.richCombo.handler);
21221    },
21222  });
21223  (function() {
21224    var c =
21225      '\x3cspan id\x3d"{id}" class\x3d"cke_combo cke_combo__{name} {cls}" role\x3d"presentation"\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_combo_label"\x3e{label}\x3c/span\x3e\x3ca class\x3d"cke_combo_button" title\x3d"{title}" tabindex\x3d"-1"' +
21226      (CKEDITOR.env.gecko && !CKEDITOR.env.hc ? "" : " href\x3d\"javascript:void('{titleJs}')\"") +
21227      ' hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-haspopup\x3d"true"';
21228    CKEDITOR.env.gecko && CKEDITOR.env.mac && (c += ' onkeypress\x3d"return false;"');
21229    CKEDITOR.env.gecko && (c += ' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');
21230    var c =
21231        c +
21232        (' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" ' +
21233          (CKEDITOR.env.ie ? 'onclick\x3d"return false;" onmouseup' : "onclick") +
21234          '\x3d"CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan id\x3d"{id}_text" class\x3d"cke_combo_text cke_combo_inlinelabel"\x3e{label}\x3c/span\x3e\x3cspan class\x3d"cke_combo_open"\x3e\x3cspan class\x3d"cke_combo_arrow"\x3e' +
21235          (CKEDITOR.env.hc ? "\x26#9660;" : CKEDITOR.env.air ? "\x26nbsp;" : "") +
21236          "\x3c/span\x3e\x3c/span\x3e\x3c/a\x3e\x3c/span\x3e"),
21237      k = CKEDITOR.addTemplate("combo", c);
21238    CKEDITOR.UI_RICHCOMBO = "richcombo";
21239    CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass({
21240      $: function(a) {
21241        CKEDITOR.tools.extend(this, a, {
21242          canGroup: !1,
21243          title: a.label,
21244          modes: { wysiwyg: 1 },
21245          editorFocus: 1,
21246        });
21247        a = this.panel || {};
21248        delete this.panel;
21249        this.id = CKEDITOR.tools.getNextNumber();
21250        this.document = (a.parent && a.parent.getDocument()) || CKEDITOR.document;
21251        a.className = "cke_combopanel";
21252        a.block = { multiSelect: a.multiSelect, attributes: a.attributes };
21253        a.toolbarRelated = !0;
21254        this._ = { panelDefinition: a, items: {} };
21255      },
21256      proto: {
21257        renderHtml: function(a) {
21258          var b = [];
21259          this.render(a, b);
21260          return b.join("");
21261        },
21262        render: function(a, b) {
21263          function f() {
21264            if (this.getState() != CKEDITOR.TRISTATE_ON) {
21265              var b = this.modes[a.mode] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED;
21266              a.readOnly && !this.readOnly && (b = CKEDITOR.TRISTATE_DISABLED);
21267              this.setState(b);
21268              this.setValue("");
21269              b != CKEDITOR.TRISTATE_DISABLED && this.refresh && this.refresh();
21270            }
21271          }
21272          var c = CKEDITOR.env,
21273            h = "cke_" + this.id,
21274            e = CKEDITOR.tools.addFunction(function(b) {
21275              l && (a.unlockSelection(1), (l = 0));
21276              g.execute(b);
21277            }, this),
21278            d = this,
21279            g = {
21280              id: h,
21281              combo: this,
21282              focus: function() {
21283                CKEDITOR.document
21284                  .getById(h)
21285                  .getChild(1)
21286                  .focus();
21287              },
21288              execute: function(b) {
21289                var c = d._;
21290                if (c.state != CKEDITOR.TRISTATE_DISABLED)
21291                  if ((d.createPanel(a), c.on)) c.panel.hide();
21292                  else {
21293                    d.commit();
21294                    var f = d.getValue();
21295                    f ? c.list.mark(f) : c.list.unmarkAll();
21296                    c.panel.showBlock(d.id, new CKEDITOR.dom.element(b), 4);
21297                  }
21298              },
21299              clickFn: e,
21300            };
21301          a.on("activeFilterChange", f, this);
21302          a.on("mode", f, this);
21303          a.on("selectionChange", f, this);
21304          !this.readOnly && a.on("readOnly", f, this);
21305          var m = CKEDITOR.tools.addFunction(function(a, b) {
21306              a = new CKEDITOR.dom.event(a);
21307              var d = a.getKeystroke();
21308              switch (d) {
21309                case 13:
21310                case 32:
21311                case 40:
21312                  CKEDITOR.tools.callFunction(e, b);
21313                  break;
21314                default:
21315                  g.onkey(g, d);
21316              }
21317              a.preventDefault();
21318            }),
21319            n = CKEDITOR.tools.addFunction(function() {
21320              g.onfocus && g.onfocus();
21321            }),
21322            l = 0;
21323          g.keyDownFn = m;
21324          c = {
21325            id: h,
21326            name: this.name || this.command,
21327            label: this.label,
21328            title: this.title,
21329            cls: this.className || "",
21330            titleJs: c.gecko && !c.hc ? "" : (this.title || "").replace("'", ""),
21331            keydownFn: m,
21332            focusFn: n,
21333            clickFn: e,
21334          };
21335          k.output(c, b);
21336          if (this.onRender) this.onRender();
21337          return g;
21338        },
21339        createPanel: function(a) {
21340          if (!this._.panel) {
21341            var b = this._.panelDefinition,
21342              c = this._.panelDefinition.block,
21343              k = b.parent || CKEDITOR.document.getBody(),
21344              h = "cke_combopanel__" + this.name,
21345              e = new CKEDITOR.ui.floatPanel(a, k, b),
21346              b = e.addListBlock(this.id, c),
21347              d = this;
21348            e.onShow = function() {
21349              this.element.addClass(h);
21350              d.setState(CKEDITOR.TRISTATE_ON);
21351              d._.on = 1;
21352              d.editorFocus && !a.focusManager.hasFocus && a.focus();
21353              if (d.onOpen) d.onOpen();
21354            };
21355            e.onHide = function(b) {
21356              this.element.removeClass(h);
21357              d.setState(
21358                d.modes && d.modes[a.mode] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,
21359              );
21360              d._.on = 0;
21361              if (!b && d.onClose) d.onClose();
21362            };
21363            e.onEscape = function() {
21364              e.hide(1);
21365            };
21366            b.onClick = function(a, b) {
21367              d.onClick && d.onClick.call(d, a, b);
21368              e.hide();
21369            };
21370            this._.panel = e;
21371            this._.list = b;
21372            e.getBlock(this.id).onHide = function() {
21373              d._.on = 0;
21374              d.setState(CKEDITOR.TRISTATE_OFF);
21375            };
21376            this.init && this.init();
21377          }
21378        },
21379        setValue: function(a, b) {
21380          this._.value = a;
21381          var c = this.document.getById("cke_" + this.id + "_text");
21382          c &&
21383            (a || b
21384              ? c.removeClass("cke_combo_inlinelabel")
21385              : ((b = this.label), c.addClass("cke_combo_inlinelabel")),
21386            c.setText("undefined" != typeof b ? b : a));
21387        },
21388        getValue: function() {
21389          return this._.value || "";
21390        },
21391        unmarkAll: function() {
21392          this._.list.unmarkAll();
21393        },
21394        mark: function(a) {
21395          this._.list.mark(a);
21396        },
21397        hideItem: function(a) {
21398          this._.list.hideItem(a);
21399        },
21400        hideGroup: function(a) {
21401          this._.list.hideGroup(a);
21402        },
21403        showAll: function() {
21404          this._.list.showAll();
21405        },
21406        add: function(a, b, c) {
21407          this._.items[a] = c || a;
21408          this._.list.add(a, b, c);
21409        },
21410        startGroup: function(a) {
21411          this._.list.startGroup(a);
21412        },
21413        commit: function() {
21414          this._.committed ||
21415            (this._.list.commit(), (this._.committed = 1), CKEDITOR.ui.fire("ready", this));
21416          this._.committed = 1;
21417        },
21418        setState: function(a) {
21419          if (this._.state != a) {
21420            var b = this.document.getById("cke_" + this.id);
21421            b.setState(a, "cke_combo");
21422            a == CKEDITOR.TRISTATE_DISABLED
21423              ? b.setAttribute("aria-disabled", !0)
21424              : b.removeAttribute("aria-disabled");
21425            this._.state = a;
21426          }
21427        },
21428        getState: function() {
21429          return this._.state;
21430        },
21431        enable: function() {
21432          this._.state == CKEDITOR.TRISTATE_DISABLED && this.setState(this._.lastState);
21433        },
21434        disable: function() {
21435          this._.state != CKEDITOR.TRISTATE_DISABLED &&
21436            ((this._.lastState = this._.state), this.setState(CKEDITOR.TRISTATE_DISABLED));
21437        },
21438      },
21439      statics: {
21440        handler: {
21441          create: function(a) {
21442            return new CKEDITOR.ui.richCombo(a);
21443          },
21444        },
21445      },
21446    });
21447    CKEDITOR.ui.prototype.addRichCombo = function(a, b) {
21448      this.add(a, CKEDITOR.UI_RICHCOMBO, b);
21449    };
21450  })();
21451  (function() {
21452    function p(b, f, e, d, r, p, v, x) {
21453      var y = b.config,
21454        t = new CKEDITOR.style(v),
21455        g = r.split(";");
21456      r = [];
21457      for (var k = {}, l = 0; l < g.length; l++) {
21458        var m = g[l];
21459        if (m) {
21460          var m = m.split("/"),
21461            w = {},
21462            q = (g[l] = m[0]);
21463          w[e] = r[l] = m[1] || q;
21464          k[q] = new CKEDITOR.style(v, w);
21465          k[q]._.definition.name = q;
21466        } else g.splice(l--, 1);
21467      }
21468      b.ui.addRichCombo(f, {
21469        label: d.label,
21470        title: d.panelTitle,
21471        toolbar: "styles," + x,
21472        defaultValue: "cke-default",
21473        allowedContent: t,
21474        requiredContent: t,
21475        contentTransformations: [
21476          [
21477            {
21478              element: "font",
21479              check: "span",
21480              left: function(a) {
21481                return !!a.attributes.size || !!a.attributes.align || !!a.attributes.face;
21482              },
21483              right: function(a) {
21484                var b = " x-small small medium large x-large xx-large 48px".split(" ");
21485                a.name = "span";
21486                a.attributes.size &&
21487                  ((a.styles["font-size"] = b[a.attributes.size]), delete a.attributes.size);
21488                a.attributes.align &&
21489                  ((a.styles["text-align"] = a.attributes.align), delete a.attributes.align);
21490                a.attributes.face &&
21491                  ((a.styles["font-family"] = a.attributes.face), delete a.attributes.face);
21492              },
21493            },
21494          ],
21495        ],
21496        panel: {
21497          css: [CKEDITOR.skin.getPath("editor")].concat(y.contentsCss),
21498          multiSelect: !1,
21499          attributes: { "aria-label": d.panelTitle },
21500        },
21501        init: function() {
21502          var a;
21503          a = "(" + b.lang.common.optionDefault + ")";
21504          this.startGroup(d.panelTitle);
21505          this.add(this.defaultValue, a, a);
21506          for (var c = 0; c < g.length; c++) (a = g[c]), this.add(a, k[a].buildPreview(), a);
21507        },
21508        onClick: function(a) {
21509          b.focus();
21510          b.fire("saveSnapshot");
21511          var c = this.getValue(),
21512            f = k[a],
21513            e,
21514            n,
21515            h,
21516            d,
21517            g;
21518          if (c && a != c)
21519            if (((e = k[c]), (c = b.getSelection().getRanges()[0]), c.collapsed)) {
21520              if (
21521                ((n = b.elementPath()),
21522                (h = n.contains(function(a) {
21523                  return e.checkElementRemovable(a);
21524                })))
21525              ) {
21526                d = c.checkBoundaryOfElement(h, CKEDITOR.START);
21527                g = c.checkBoundaryOfElement(h, CKEDITOR.END);
21528                if (d && g) {
21529                  for (d = c.createBookmark(); (n = h.getFirst()); ) n.insertBefore(h);
21530                  h.remove();
21531                  c.moveToBookmark(d);
21532                } else
21533                  d || g
21534                    ? c.moveToPosition(
21535                        h,
21536                        d ? CKEDITOR.POSITION_BEFORE_START : CKEDITOR.POSITION_AFTER_END,
21537                      )
21538                    : (c.splitElement(h), c.moveToPosition(h, CKEDITOR.POSITION_AFTER_END)),
21539                    u(c, n.elements.slice(), h);
21540                b.getSelection().selectRanges([c]);
21541              }
21542            } else b.removeStyle(e);
21543          a === this.defaultValue ? e && b.removeStyle(e) : b.applyStyle(f);
21544          b.fire("saveSnapshot");
21545        },
21546        onRender: function() {
21547          b.on(
21548            "selectionChange",
21549            function(a) {
21550              var c = this.getValue();
21551              a = a.data.path.elements;
21552              for (var d = 0, f; d < a.length; d++) {
21553                f = a[d];
21554                for (var e in k)
21555                  if (k[e].checkElementMatch(f, !0, b)) {
21556                    e != c && this.setValue(e);
21557                    return;
21558                  }
21559              }
21560              this.setValue("", p);
21561            },
21562            this,
21563          );
21564        },
21565        refresh: function() {
21566          b.activeFilter.check(t) || this.setState(CKEDITOR.TRISTATE_DISABLED);
21567        },
21568      });
21569    }
21570    function u(b, f, e) {
21571      var d = f.pop();
21572      if (d) {
21573        if (e) return u(b, f, d.equals(e) ? null : e);
21574        e = d.clone();
21575        b.insertNode(e);
21576        b.moveToPosition(e, CKEDITOR.POSITION_AFTER_START);
21577        u(b, f);
21578      }
21579    }
21580    CKEDITOR.plugins.add("font", {
21581      requires: "richcombo",
21582      init: function(b) {
21583        var f = b.config;
21584        p(b, "Font", "family", b.lang.font, f.font_names, f.font_defaultLabel, f.font_style, 30);
21585        p(
21586          b,
21587          "FontSize",
21588          "size",
21589          b.lang.font.fontSize,
21590          f.fontSize_sizes,
21591          f.fontSize_defaultLabel,
21592          f.fontSize_style,
21593          40,
21594        );
21595      },
21596    });
21597  })();
21598  CKEDITOR.config.font_names =
21599    "Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif";
21600  CKEDITOR.config.font_defaultLabel = "";
21601  CKEDITOR.config.font_style = {
21602    element: "span",
21603    styles: { "font-family": "#(family)" },
21604    overrides: [{ element: "font", attributes: { face: null } }],
21605  };
21606  CKEDITOR.config.fontSize_sizes =
21607    "8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px";
21608  CKEDITOR.config.fontSize_defaultLabel = "";
21609  CKEDITOR.config.fontSize_style = {
21610    element: "span",
21611    styles: { "font-size": "#(size)" },
21612    overrides: [{ element: "font", attributes: { size: null } }],
21613  };
21614  CKEDITOR.plugins.add("forms", {
21615    requires: "dialog,fakeobjects",
21616    onLoad: function() {
21617      CKEDITOR.addCss(".cke_editable form{border: 1px dotted #FF0000;padding: 2px;}\n");
21618      CKEDITOR.addCss(
21619        "img.cke_hidden{background-image: url(" +
21620          CKEDITOR.getUrl(this.path + "images/hiddenfield.gif") +
21621          ");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 16px !important;height: 16px !important;}",
21622      );
21623    },
21624    init: function(a) {
21625      var b = a.lang,
21626        g = 0,
21627        h = { email: 1, password: 1, search: 1, tel: 1, text: 1, url: 1 },
21628        l = {
21629          checkbox: "input[type,name,checked,required]",
21630          radio: "input[type,name,checked,required]",
21631          textfield: "input[type,name,value,size,maxlength,required]",
21632          textarea: "textarea[cols,rows,name,required]",
21633          select: "select[name,size,multiple,required]; option[value,selected]",
21634          button: "input[type,name,value]",
21635          form: "form[action,name,id,enctype,target,method]",
21636          hiddenfield: "input[type,name,value]",
21637          imagebutton:
21638            "input[type,alt,src]{width,height,border,border-width,border-style,margin,float}",
21639        },
21640        m = {
21641          checkbox: "input",
21642          radio: "input",
21643          textfield: "input",
21644          textarea: "textarea",
21645          select: "select",
21646          button: "input",
21647          form: "form",
21648          hiddenfield: "input",
21649          imagebutton: "input",
21650        },
21651        e = function(d, c, e) {
21652          var h = { allowedContent: l[c], requiredContent: m[c] };
21653          "form" == c && (h.context = "form");
21654          a.addCommand(c, new CKEDITOR.dialogCommand(c, h));
21655          a.ui.addButton &&
21656            a.ui.addButton(d, {
21657              label: b.common[d.charAt(0).toLowerCase() + d.slice(1)],
21658              command: c,
21659              toolbar: "forms," + (g += 10),
21660            });
21661          CKEDITOR.dialog.add(c, e);
21662        },
21663        f = this.path + "dialogs/";
21664      !a.blockless && e("Form", "form", f + "form.js");
21665      e("Checkbox", "checkbox", f + "checkbox.js");
21666      e("Radio", "radio", f + "radio.js");
21667      e("TextField", "textfield", f + "textfield.js");
21668      e("Textarea", "textarea", f + "textarea.js");
21669      e("Select", "select", f + "select.js");
21670      e("Button", "button", f + "button.js");
21671      var k = a.plugins.image;
21672      k &&
21673        !a.plugins.image2 &&
21674        e("ImageButton", "imagebutton", CKEDITOR.plugins.getPath("image") + "dialogs/image.js");
21675      e("HiddenField", "hiddenfield", f + "hiddenfield.js");
21676      a.addMenuItems &&
21677        ((e = {
21678          checkbox: {
21679            label: b.forms.checkboxAndRadio.checkboxTitle,
21680            command: "checkbox",
21681            group: "checkbox",
21682          },
21683          radio: {
21684            label: b.forms.checkboxAndRadio.radioTitle,
21685            command: "radio",
21686            group: "radio",
21687          },
21688          textfield: { label: b.forms.textfield.title, command: "textfield", group: "textfield" },
21689          hiddenfield: {
21690            label: b.forms.hidden.title,
21691            command: "hiddenfield",
21692            group: "hiddenfield",
21693          },
21694          button: { label: b.forms.button.title, command: "button", group: "button" },
21695          select: { label: b.forms.select.title, command: "select", group: "select" },
21696          textarea: { label: b.forms.textarea.title, command: "textarea", group: "textarea" },
21697        }),
21698        k &&
21699          (e.imagebutton = {
21700            label: b.image.titleButton,
21701            command: "imagebutton",
21702            group: "imagebutton",
21703          }),
21704        !a.blockless && (e.form = { label: b.forms.form.menu, command: "form", group: "form" }),
21705        a.addMenuItems(e));
21706      a.contextMenu &&
21707        (!a.blockless &&
21708          a.contextMenu.addListener(function(d, c, a) {
21709            if ((d = a.contains("form", 1)) && !d.isReadOnly())
21710              return { form: CKEDITOR.TRISTATE_OFF };
21711          }),
21712        a.contextMenu.addListener(function(d) {
21713          if (d && !d.isReadOnly()) {
21714            var c = d.getName();
21715            if ("select" == c) return { select: CKEDITOR.TRISTATE_OFF };
21716            if ("textarea" == c) return { textarea: CKEDITOR.TRISTATE_OFF };
21717            if ("input" == c) {
21718              var a = d.getAttribute("type") || "text";
21719              switch (a) {
21720                case "button":
21721                case "submit":
21722                case "reset":
21723                  return { button: CKEDITOR.TRISTATE_OFF };
21724                case "checkbox":
21725                  return { checkbox: CKEDITOR.TRISTATE_OFF };
21726                case "radio":
21727                  return { radio: CKEDITOR.TRISTATE_OFF };
21728                case "image":
21729                  return k ? { imagebutton: CKEDITOR.TRISTATE_OFF } : null;
21730              }
21731              if (h[a]) return { textfield: CKEDITOR.TRISTATE_OFF };
21732            }
21733            if ("img" == c && "hiddenfield" == d.data("cke-real-element-type"))
21734              return { hiddenfield: CKEDITOR.TRISTATE_OFF };
21735          }
21736        }));
21737      a.on("doubleclick", function(d) {
21738        var c = d.data.element;
21739        if (!a.blockless && c.is("form")) d.data.dialog = "form";
21740        else if (c.is("select")) d.data.dialog = "select";
21741        else if (c.is("textarea")) d.data.dialog = "textarea";
21742        else if (c.is("img") && "hiddenfield" == c.data("cke-real-element-type"))
21743          d.data.dialog = "hiddenfield";
21744        else if (c.is("input")) {
21745          c = c.getAttribute("type") || "text";
21746          switch (c) {
21747            case "button":
21748            case "submit":
21749            case "reset":
21750              d.data.dialog = "button";
21751              break;
21752            case "checkbox":
21753              d.data.dialog = "checkbox";
21754              break;
21755            case "radio":
21756              d.data.dialog = "radio";
21757              break;
21758            case "image":
21759              d.data.dialog = "imagebutton";
21760          }
21761          h[c] && (d.data.dialog = "textfield");
21762        }
21763      });
21764    },
21765    afterInit: function(a) {
21766      var b = a.dataProcessor,
21767        g = b && b.htmlFilter,
21768        b = b && b.dataFilter;
21769      CKEDITOR.env.ie &&
21770        g &&
21771        g.addRules(
21772          {
21773            elements: {
21774              input: function(a) {
21775                a = a.attributes;
21776                var b = a.type;
21777                b || (a.type = "text");
21778                ("checkbox" != b && "radio" != b) || "on" != a.value || delete a.value;
21779              },
21780            },
21781          },
21782          { applyToAll: !0 },
21783        );
21784      b &&
21785        b.addRules(
21786          {
21787            elements: {
21788              input: function(b) {
21789                if ("hidden" == b.attributes.type)
21790                  return a.createFakeParserElement(b, "cke_hidden", "hiddenfield");
21791              },
21792            },
21793          },
21794          { applyToAll: !0 },
21795        );
21796    },
21797  });
21798  CKEDITOR.plugins.add("format", {
21799    requires: "richcombo",
21800    init: function(a) {
21801      if (!a.blockless) {
21802        for (
21803          var f = a.config,
21804            c = a.lang.format,
21805            l = f.format_tags.split(";"),
21806            d = {},
21807            m = 0,
21808            n = [],
21809            g = 0;
21810          g < l.length;
21811          g++
21812        ) {
21813          var h = l[g],
21814            k = new CKEDITOR.style(f["format_" + h]);
21815          if (!a.filter.customConfig || a.filter.check(k))
21816            m++, (d[h] = k), (d[h]._.enterMode = a.config.enterMode), n.push(k);
21817        }
21818        0 !== m &&
21819          a.ui.addRichCombo("Format", {
21820            label: c.label,
21821            title: c.panelTitle,
21822            toolbar: "styles,20",
21823            allowedContent: n,
21824            panel: {
21825              css: [CKEDITOR.skin.getPath("editor")].concat(f.contentsCss),
21826              multiSelect: !1,
21827              attributes: { "aria-label": c.panelTitle },
21828            },
21829            init: function() {
21830              this.startGroup(c.panelTitle);
21831              for (var a in d) {
21832                var e = c["tag_" + a];
21833                this.add(a, d[a].buildPreview(e), e);
21834              }
21835            },
21836            onClick: function(b) {
21837              a.focus();
21838              a.fire("saveSnapshot");
21839              b = d[b];
21840              var e = a.elementPath();
21841              b.checkActive(e, a) || a.applyStyle(b);
21842              setTimeout(function() {
21843                a.fire("saveSnapshot");
21844              }, 0);
21845            },
21846            onRender: function() {
21847              a.on(
21848                "selectionChange",
21849                function(b) {
21850                  var e = this.getValue();
21851                  b = b.data.path;
21852                  this.refresh();
21853                  for (var c in d)
21854                    if (d[c].checkActive(b, a)) {
21855                      c != e && this.setValue(c, a.lang.format["tag_" + c]);
21856                      return;
21857                    }
21858                  this.setValue("");
21859                },
21860                this,
21861              );
21862            },
21863            onOpen: function() {
21864              this.showAll();
21865              for (var b in d) a.activeFilter.check(d[b]) || this.hideItem(b);
21866            },
21867            refresh: function() {
21868              var b = a.elementPath();
21869              if (b) {
21870                if (b.isContextFor("p")) for (var c in d) if (a.activeFilter.check(d[c])) return;
21871                this.setState(CKEDITOR.TRISTATE_DISABLED);
21872              }
21873            },
21874          });
21875      }
21876    },
21877  });
21878  CKEDITOR.config.format_tags = "p;h1;h2;h3;h4;h5;h6;pre;address;div";
21879  CKEDITOR.config.format_p = { element: "p" };
21880  CKEDITOR.config.format_div = { element: "div" };
21881  CKEDITOR.config.format_pre = { element: "pre" };
21882  CKEDITOR.config.format_address = { element: "address" };
21883  CKEDITOR.config.format_h1 = { element: "h1" };
21884  CKEDITOR.config.format_h2 = { element: "h2" };
21885  CKEDITOR.config.format_h3 = { element: "h3" };
21886  CKEDITOR.config.format_h4 = { element: "h4" };
21887  CKEDITOR.config.format_h5 = { element: "h5" };
21888  CKEDITOR.config.format_h6 = { element: "h6" };
21889  (function() {
21890    var b = {
21891      canUndo: !1,
21892      exec: function(a) {
21893        var b = a.document.createElement("hr");
21894        a.insertElement(b);
21895      },
21896      allowedContent: "hr",
21897      requiredContent: "hr",
21898    };
21899    CKEDITOR.plugins.add("horizontalrule", {
21900      init: function(a) {
21901        a.blockless ||
21902          (a.addCommand("horizontalrule", b),
21903          a.ui.addButton &&
21904            a.ui.addButton("HorizontalRule", {
21905              label: a.lang.horizontalrule.toolbar,
21906              command: "horizontalrule",
21907              toolbar: "insert,40",
21908            }));
21909      },
21910    });
21911  })();
21912  CKEDITOR.plugins.add("htmlwriter", {
21913    init: function(b) {
21914      var a = new CKEDITOR.htmlWriter();
21915      a.forceSimpleAmpersand = b.config.forceSimpleAmpersand;
21916      a.indentationChars = b.config.dataIndentationChars || "\t";
21917      b.dataProcessor.writer = a;
21918    },
21919  });
21920  CKEDITOR.htmlWriter = CKEDITOR.tools.createClass({
21921    base: CKEDITOR.htmlParser.basicWriter,
21922    $: function() {
21923      this.base();
21924      this.indentationChars = "\t";
21925      this.selfClosingEnd = " /\x3e";
21926      this.lineBreakChars = "\n";
21927      this.sortAttributes = 1;
21928      this._.indent = 0;
21929      this._.indentation = "";
21930      this._.inPre = 0;
21931      this._.rules = {};
21932      var b = CKEDITOR.dtd,
21933        a;
21934      for (a in CKEDITOR.tools.extend(
21935        {},
21936        b.$nonBodyContent,
21937        b.$block,
21938        b.$listItem,
21939        b.$tableContent,
21940      ))
21941        this.setRules(a, {
21942          indent: !b[a]["#"],
21943          breakBeforeOpen: 1,
21944          breakBeforeClose: !b[a]["#"],
21945          breakAfterClose: 1,
21946          needsSpace: a in b.$block && !(a in { li: 1, dt: 1, dd: 1 }),
21947        });
21948      this.setRules("br", { breakAfterOpen: 1 });
21949      this.setRules("title", { indent: 0, breakAfterOpen: 0 });
21950      this.setRules("style", { indent: 0, breakBeforeClose: 1 });
21951      this.setRules("pre", { breakAfterOpen: 1, indent: 0 });
21952    },
21953    proto: {
21954      openTag: function(b) {
21955        var a = this._.rules[b];
21956        this._.afterCloser && a && a.needsSpace && this._.needsSpace && this._.output.push("\n");
21957        this._.indent
21958          ? this.indentation()
21959          : a && a.breakBeforeOpen && (this.lineBreak(), this.indentation());
21960        this._.output.push("\x3c", b);
21961        this._.afterCloser = 0;
21962      },
21963      openTagClose: function(b, a) {
21964        var c = this._.rules[b];
21965        a
21966          ? (this._.output.push(this.selfClosingEnd),
21967            c && c.breakAfterClose && (this._.needsSpace = c.needsSpace))
21968          : (this._.output.push("\x3e"),
21969            c && c.indent && (this._.indentation += this.indentationChars));
21970        c && c.breakAfterOpen && this.lineBreak();
21971        "pre" == b && (this._.inPre = 1);
21972      },
21973      attribute: function(b, a) {
21974        "string" == typeof a &&
21975          (this.forceSimpleAmpersand && (a = a.replace(/&amp;/g, "\x26")),
21976          (a = CKEDITOR.tools.htmlEncodeAttr(a)));
21977        this._.output.push(" ", b, '\x3d"', a, '"');
21978      },
21979      closeTag: function(b) {
21980        var a = this._.rules[b];
21981        a &&
21982          a.indent &&
21983          (this._.indentation = this._.indentation.substr(this.indentationChars.length));
21984        this._.indent
21985          ? this.indentation()
21986          : a && a.breakBeforeClose && (this.lineBreak(), this.indentation());
21987        this._.output.push("\x3c/", b, "\x3e");
21988        "pre" == b && (this._.inPre = 0);
21989        a && a.breakAfterClose && (this.lineBreak(), (this._.needsSpace = a.needsSpace));
21990        this._.afterCloser = 1;
21991      },
21992      text: function(b) {
21993        this._.indent && (this.indentation(), !this._.inPre && (b = CKEDITOR.tools.ltrim(b)));
21994        this._.output.push(b);
21995      },
21996      comment: function(b) {
21997        this._.indent && this.indentation();
21998        this._.output.push("\x3c!--", b, "--\x3e");
21999      },
22000      lineBreak: function() {
22001        !this._.inPre && 0 < this._.output.length && this._.output.push(this.lineBreakChars);
22002        this._.indent = 1;
22003      },
22004      indentation: function() {
22005        !this._.inPre && this._.indentation && this._.output.push(this._.indentation);
22006        this._.indent = 0;
22007      },
22008      reset: function() {
22009        this._.output = [];
22010        this._.indent = 0;
22011        this._.indentation = "";
22012        this._.afterCloser = 0;
22013        this._.inPre = 0;
22014        this._.needsSpace = 0;
22015      },
22016      setRules: function(b, a) {
22017        var c = this._.rules[b];
22018        c ? CKEDITOR.tools.extend(c, a, !0) : (this._.rules[b] = a);
22019      },
22020    },
22021  });
22022  (function() {
22023    CKEDITOR.plugins.add("iframe", {
22024      requires: "dialog,fakeobjects",
22025      onLoad: function() {
22026        CKEDITOR.addCss(
22027          "img.cke_iframe{background-image: url(" +
22028            CKEDITOR.getUrl(this.path + "images/placeholder.png") +
22029            ");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 80px;height: 80px;}",
22030        );
22031      },
22032      init: function(a) {
22033        var b = a.lang.iframe,
22034          c = "iframe[align,longdesc,frameborder,height,name,scrolling,src,title,width]";
22035        a.plugins.dialogadvtab &&
22036          (c +=
22037            ";iframe" +
22038            a.plugins.dialogadvtab.allowedContent({
22039              id: 1,
22040              classes: 1,
22041              styles: 1,
22042            }));
22043        CKEDITOR.dialog.add("iframe", this.path + "dialogs/iframe.js");
22044        a.addCommand(
22045          "iframe",
22046          new CKEDITOR.dialogCommand("iframe", { allowedContent: c, requiredContent: "iframe" }),
22047        );
22048        a.ui.addButton &&
22049          a.ui.addButton("Iframe", { label: b.toolbar, command: "iframe", toolbar: "insert,80" });
22050        a.on("doubleclick", function(a) {
22051          var b = a.data.element;
22052          b.is("img") && "iframe" == b.data("cke-real-element-type") && (a.data.dialog = "iframe");
22053        });
22054        a.addMenuItems &&
22055          a.addMenuItems({ iframe: { label: b.title, command: "iframe", group: "image" } });
22056        a.contextMenu &&
22057          a.contextMenu.addListener(function(a) {
22058            if (a && a.is("img") && "iframe" == a.data("cke-real-element-type"))
22059              return { iframe: CKEDITOR.TRISTATE_OFF };
22060          });
22061      },
22062      afterInit: function(a) {
22063        var b = a.dataProcessor;
22064        (b = b && b.dataFilter) &&
22065          b.addRules({
22066            elements: {
22067              iframe: function(b) {
22068                return a.createFakeParserElement(b, "cke_iframe", "iframe", !0);
22069              },
22070            },
22071          });
22072      },
22073    });
22074  })();
22075  (function() {
22076    function m(a) {
22077      function f(a) {
22078        var b = !1;
22079        g.attachListener(
22080          g,
22081          "keydown",
22082          function() {
22083            var d = c.getBody().getElementsByTag(a);
22084            if (!b) {
22085              for (var e = 0; e < d.count(); e++) d.getItem(e).setCustomData("retain", !0);
22086              b = !0;
22087            }
22088          },
22089          null,
22090          null,
22091          1,
22092        );
22093        g.attachListener(g, "keyup", function() {
22094          var d = c.getElementsByTag(a);
22095          b &&
22096            (1 == d.count() &&
22097              !d.getItem(0).getCustomData("retain") &&
22098              CKEDITOR.tools.isEmpty(d.getItem(0).getAttributes()) &&
22099              d.getItem(0).remove(1),
22100            (b = !1));
22101        });
22102      }
22103      var b = this.editor,
22104        c = a.document,
22105        d = c.body,
22106        e = c.getElementById("cke_actscrpt");
22107      e && e.parentNode.removeChild(e);
22108      (e = c.getElementById("cke_shimscrpt")) && e.parentNode.removeChild(e);
22109      (e = c.getElementById("cke_basetagscrpt")) && e.parentNode.removeChild(e);
22110      d.contentEditable = !0;
22111      CKEDITOR.env.ie && ((d.hideFocus = !0), (d.disabled = !0), d.removeAttribute("disabled"));
22112      delete this._.isLoadingData;
22113      this.$ = d;
22114      c = new CKEDITOR.dom.document(c);
22115      this.setup();
22116      this.fixInitialSelection();
22117      var g = this;
22118      CKEDITOR.env.ie && !CKEDITOR.env.edge && c.getDocumentElement().addClass(c.$.compatMode);
22119      CKEDITOR.env.ie && !CKEDITOR.env.edge && b.enterMode != CKEDITOR.ENTER_P
22120        ? f("p")
22121        : CKEDITOR.env.edge &&
22122          15 > CKEDITOR.env.version &&
22123          b.enterMode != CKEDITOR.ENTER_DIV &&
22124          f("div");
22125      if (CKEDITOR.env.webkit || (CKEDITOR.env.ie && 10 < CKEDITOR.env.version))
22126        c.getDocumentElement().on("mousedown", function(a) {
22127          a.data.getTarget().is("html") &&
22128            setTimeout(function() {
22129              b.editable().focus();
22130            });
22131        });
22132      n(b);
22133      try {
22134        b.document.$.execCommand("2D-position", !1, !0);
22135      } catch (h) {}
22136      (CKEDITOR.env.gecko || (CKEDITOR.env.ie && "CSS1Compat" == b.document.$.compatMode)) &&
22137        this.attachListener(this, "keydown", function(a) {
22138          var c = a.data.getKeystroke();
22139          if (33 == c || 34 == c)
22140            if (CKEDITOR.env.ie)
22141              setTimeout(function() {
22142                b.getSelection().scrollIntoView();
22143              }, 0);
22144            else if (b.window.$.innerHeight > this.$.offsetHeight) {
22145              var d = b.createRange();
22146              d[33 == c ? "moveToElementEditStart" : "moveToElementEditEnd"](this);
22147              d.select();
22148              a.data.preventDefault();
22149            }
22150        });
22151      CKEDITOR.env.ie &&
22152        this.attachListener(c, "blur", function() {
22153          try {
22154            c.$.selection.empty();
22155          } catch (a) {}
22156        });
22157      CKEDITOR.env.iOS &&
22158        this.attachListener(c, "touchend", function() {
22159          a.focus();
22160        });
22161      d = b.document.getElementsByTag("title").getItem(0);
22162      d.data("cke-title", d.getText());
22163      CKEDITOR.env.ie && (b.document.$.title = this._.docTitle);
22164      CKEDITOR.tools.setTimeout(
22165        function() {
22166          "unloaded" == this.status && (this.status = "ready");
22167          b.fire("contentDom");
22168          this._.isPendingFocus && (b.focus(), (this._.isPendingFocus = !1));
22169          setTimeout(function() {
22170            b.fire("dataReady");
22171          }, 0);
22172        },
22173        0,
22174        this,
22175      );
22176    }
22177    function n(a) {
22178      function f() {
22179        var c;
22180        a.editable().attachListener(a, "selectionChange", function() {
22181          var d = a.getSelection().getSelectedElement();
22182          d &&
22183            (c && (c.detachEvent("onresizestart", b), (c = null)),
22184            d.$.attachEvent("onresizestart", b),
22185            (c = d.$));
22186        });
22187      }
22188      function b(a) {
22189        a.returnValue = !1;
22190      }
22191      if (CKEDITOR.env.gecko)
22192        try {
22193          var c = a.document.$;
22194          c.execCommand("enableObjectResizing", !1, !a.config.disableObjectResizing);
22195          c.execCommand("enableInlineTableEditing", !1, !a.config.disableNativeTableHandles);
22196        } catch (d) {}
22197      else CKEDITOR.env.ie && 11 > CKEDITOR.env.version && a.config.disableObjectResizing && f(a);
22198    }
22199    function p() {
22200      var a = [];
22201      if (8 <= CKEDITOR.document.$.documentMode) {
22202        a.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");
22203        var f = [],
22204          b;
22205        for (b in CKEDITOR.dtd.$removeEmpty)
22206          f.push("html.CSS1Compat " + b + "[contenteditable\x3dfalse]");
22207        a.push(f.join(",") + "{display:inline-block}");
22208      } else
22209        CKEDITOR.env.gecko &&
22210          (a.push("html{height:100% !important}"),
22211          a.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));
22212      a.push("html{cursor:text;*cursor:auto}");
22213      a.push("img,input,textarea{cursor:default}");
22214      return a.join("\n");
22215    }
22216    var l;
22217    CKEDITOR.plugins.add("wysiwygarea", {
22218      init: function(a) {
22219        a.config.fullPage &&
22220          a.addFeature({
22221            allowedContent: "html head title; style [media,type]; body (*)[id]; meta link [*]",
22222            requiredContent: "body",
22223          });
22224        a.addMode("wysiwyg", function(f) {
22225          function b(b) {
22226            b && b.removeListener();
22227            a.editable(new l(a, d.$.contentWindow.document.body));
22228            a.setData(a.getData(1), f);
22229          }
22230          var c =
22231              "document.open();" +
22232              (CKEDITOR.env.ie ? "(" + CKEDITOR.tools.fixDomain + ")();" : "") +
22233              "document.close();",
22234            c = CKEDITOR.env.air
22235              ? "javascript:void(0)"
22236              : CKEDITOR.env.ie && !CKEDITOR.env.edge
22237                ? "javascript:void(function(){" + encodeURIComponent(c) + "}())"
22238                : "",
22239            d = CKEDITOR.dom.element.createFromHtml(
22240              '\x3ciframe src\x3d"' + c + '" frameBorder\x3d"0"\x3e\x3c/iframe\x3e',
22241            );
22242          d.setStyles({ width: "100%", height: "100%" });
22243          d.addClass("cke_wysiwyg_frame").addClass("cke_reset");
22244          c = a.ui.space("contents");
22245          c.append(d);
22246          var e = (CKEDITOR.env.ie && !CKEDITOR.env.edge) || CKEDITOR.env.gecko;
22247          if (e) d.on("load", b);
22248          var g = a.title,
22249            h = a.fire("ariaEditorHelpLabel", {}).label;
22250          g && (CKEDITOR.env.ie && h && (g += ", " + h), d.setAttribute("title", g));
22251          if (h) {
22252            var g = CKEDITOR.tools.getNextId(),
22253              k = CKEDITOR.dom.element.createFromHtml(
22254                '\x3cspan id\x3d"' + g + '" class\x3d"cke_voice_label"\x3e' + h + "\x3c/span\x3e",
22255              );
22256            c.append(k, 1);
22257            d.setAttribute("aria-describedby", g);
22258          }
22259          a.on("beforeModeUnload", function(a) {
22260            a.removeListener();
22261            k && k.remove();
22262          });
22263          d.setAttributes({ tabIndex: a.tabIndex, allowTransparency: "true" });
22264          !e && b();
22265          a.fire("ariaWidget", d);
22266        });
22267      },
22268    });
22269    CKEDITOR.editor.prototype.addContentsCss = function(a) {
22270      var f = this.config,
22271        b = f.contentsCss;
22272      CKEDITOR.tools.isArray(b) || (f.contentsCss = b ? [b] : []);
22273      f.contentsCss.push(a);
22274    };
22275    l = CKEDITOR.tools.createClass({
22276      $: function() {
22277        this.base.apply(this, arguments);
22278        this._.frameLoadedHandler = CKEDITOR.tools.addFunction(function(a) {
22279          CKEDITOR.tools.setTimeout(m, 0, this, a);
22280        }, this);
22281        this._.docTitle = this.getWindow()
22282          .getFrame()
22283          .getAttribute("title");
22284      },
22285      base: CKEDITOR.editable,
22286      proto: {
22287        setData: function(a, f) {
22288          var b = this.editor;
22289          if (f) this.setHtml(a), this.fixInitialSelection(), b.fire("dataReady");
22290          else {
22291            this._.isLoadingData = !0;
22292            b._.dataStore = { id: 1 };
22293            var c = b.config,
22294              d = c.fullPage,
22295              e = c.docType,
22296              g = CKEDITOR.tools
22297                .buildStyleHtml(p())
22298                .replace(/<style>/, '\x3cstyle data-cke-temp\x3d"1"\x3e');
22299            d || (g += CKEDITOR.tools.buildStyleHtml(b.config.contentsCss));
22300            var h = c.baseHref
22301              ? '\x3cbase href\x3d"' + c.baseHref + '" data-cke-temp\x3d"1" /\x3e'
22302              : "";
22303            d &&
22304              (a = a
22305                .replace(/<!DOCTYPE[^>]*>/i, function(a) {
22306                  b.docType = e = a;
22307                  return "";
22308                })
22309                .replace(/<\?xml\s[^\?]*\?>/i, function(a) {
22310                  b.xmlDeclaration = a;
22311                  return "";
22312                }));
22313            a = b.dataProcessor.toHtml(a);
22314            d
22315              ? (/<body[\s|>]/.test(a) || (a = "\x3cbody\x3e" + a),
22316                /<html[\s|>]/.test(a) || (a = "\x3chtml\x3e" + a + "\x3c/html\x3e"),
22317                /<head[\s|>]/.test(a)
22318                  ? /<title[\s|>]/.test(a) ||
22319                    (a = a.replace(/<head[^>]*>/, "$\x26\x3ctitle\x3e\x3c/title\x3e"))
22320                  : (a = a.replace(
22321                      /<html[^>]*>/,
22322                      "$\x26\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e",
22323                    )),
22324                h && (a = a.replace(/<head[^>]*?>/, "$\x26" + h)),
22325                (a = a.replace(/<\/head\s*>/, g + "$\x26")),
22326                (a = e + a))
22327              : (a =
22328                  c.docType +
22329                  '\x3chtml dir\x3d"' +
22330                  c.contentsLangDirection +
22331                  '" lang\x3d"' +
22332                  (c.contentsLanguage || b.langCode) +
22333                  '"\x3e\x3chead\x3e\x3ctitle\x3e' +
22334                  this._.docTitle +
22335                  "\x3c/title\x3e" +
22336                  h +
22337                  g +
22338                  "\x3c/head\x3e\x3cbody" +
22339                  (c.bodyId ? ' id\x3d"' + c.bodyId + '"' : "") +
22340                  (c.bodyClass ? ' class\x3d"' + c.bodyClass + '"' : "") +
22341                  "\x3e" +
22342                  a +
22343                  "\x3c/body\x3e\x3c/html\x3e");
22344            CKEDITOR.env.gecko &&
22345              ((a = a.replace(/<body/, '\x3cbody contenteditable\x3d"true" ')),
22346              2e4 > CKEDITOR.env.version &&
22347                (a = a.replace(/<body[^>]*>/, "$\x26\x3c!-- cke-content-start --\x3e")));
22348            c =
22349              '\x3cscript id\x3d"cke_actscrpt" type\x3d"text/javascript"' +
22350              (CKEDITOR.env.ie ? ' defer\x3d"defer" ' : "") +
22351              "\x3evar wasLoaded\x3d0;function onload(){if(!wasLoaded)window.parent.CKEDITOR.tools.callFunction(" +
22352              this._.frameLoadedHandler +
22353              ",window);wasLoaded\x3d1;}" +
22354              (CKEDITOR.env.ie
22355                ? "onload();"
22356                : 'document.addEventListener("DOMContentLoaded", onload, false );') +
22357              "\x3c/script\x3e";
22358            CKEDITOR.env.ie &&
22359              9 > CKEDITOR.env.version &&
22360              (c +=
22361                '\x3cscript id\x3d"cke_shimscrpt"\x3ewindow.parent.CKEDITOR.tools.enableHtml5Elements(document)\x3c/script\x3e');
22362            h &&
22363              CKEDITOR.env.ie &&
22364              10 > CKEDITOR.env.version &&
22365              (c +=
22366                '\x3cscript id\x3d"cke_basetagscrpt"\x3evar baseTag \x3d document.querySelector( "base" );baseTag.href \x3d baseTag.href;\x3c/script\x3e');
22367            a = a.replace(/(?=\s*<\/(:?head)>)/, c);
22368            this.clearCustomData();
22369            this.clearListeners();
22370            b.fire("contentDomUnload");
22371            var k = this.getDocument();
22372            try {
22373              k.write(a);
22374            } catch (l) {
22375              setTimeout(function() {
22376                k.write(a);
22377              }, 0);
22378            }
22379          }
22380        },
22381        getData: function(a) {
22382          if (a) return this.getHtml();
22383          a = this.editor;
22384          var f = a.config,
22385            b = f.fullPage,
22386            c = b && a.docType,
22387            d = b && a.xmlDeclaration,
22388            e = this.getDocument(),
22389            b = b ? e.getDocumentElement().getOuterHtml() : e.getBody().getHtml();
22390          CKEDITOR.env.gecko &&
22391            f.enterMode != CKEDITOR.ENTER_BR &&
22392            (b = b.replace(/<br>(?=\s*(:?$|<\/body>))/, ""));
22393          b = a.dataProcessor.toDataFormat(b);
22394          d && (b = d + "\n" + b);
22395          c && (b = c + "\n" + b);
22396          return b;
22397        },
22398        focus: function() {
22399          this._.isLoadingData ? (this._.isPendingFocus = !0) : l.baseProto.focus.call(this);
22400        },
22401        detach: function() {
22402          var a = this.editor,
22403            f = a.document,
22404            b;
22405          try {
22406            b = a.window.getFrame();
22407          } catch (c) {}
22408          l.baseProto.detach.call(this);
22409          this.clearCustomData();
22410          f.getDocumentElement().clearCustomData();
22411          CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);
22412          b && b.getParent()
22413            ? (b.clearCustomData(),
22414              (a = b.removeCustomData("onResize")) && a.removeListener(),
22415              b.remove())
22416            : CKEDITOR.warn("editor-destroy-iframe");
22417        },
22418      },
22419    });
22420  })();
22421  CKEDITOR.config.disableObjectResizing = !1;
22422  CKEDITOR.config.disableNativeTableHandles = !0;
22423  CKEDITOR.config.disableNativeSpellChecker = !0;
22424  (function() {
22425    function e(b, a) {
22426      a || (a = b.getSelection().getSelectedElement());
22427      if (a && a.is("img") && !a.data("cke-realelement") && !a.isReadOnly()) return a;
22428    }
22429    function f(b) {
22430      var a = b.getStyle("float");
22431      if ("inherit" == a || "none" == a) a = 0;
22432      a || (a = b.getAttribute("align"));
22433      return a;
22434    }
22435    CKEDITOR.plugins.add("image", {
22436      requires: "dialog",
22437      init: function(b) {
22438        if (!b.plugins.image2) {
22439          CKEDITOR.dialog.add("image", this.path + "dialogs/image.js");
22440          var a =
22441            "img[alt,!src]{border-style,border-width,float,height,margin,margin-bottom,margin-left,margin-right,margin-top,width}";
22442          CKEDITOR.dialog.isTabEnabled(b, "image", "advanced") &&
22443            (a = "img[alt,dir,id,lang,longdesc,!src,title]{*}(*)");
22444          b.addCommand(
22445            "image",
22446            new CKEDITOR.dialogCommand("image", {
22447              allowedContent: a,
22448              requiredContent: "img[alt,src]",
22449              contentTransformations: [
22450                ["img{width}: sizeToStyle", "img[width]: sizeToAttribute"],
22451                ["img{float}: alignmentToStyle", "img[align]: alignmentToAttribute"],
22452              ],
22453            }),
22454          );
22455          b.ui.addButton &&
22456            b.ui.addButton("Image", {
22457              label: b.lang.common.image,
22458              command: "image",
22459              toolbar: "insert,10",
22460            });
22461          b.on("doubleclick", function(b) {
22462            var a = b.data.element;
22463            !a.is("img") ||
22464              a.data("cke-realelement") ||
22465              a.isReadOnly() ||
22466              (b.data.dialog = "image");
22467          });
22468          b.addMenuItems &&
22469            b.addMenuItems({
22470              image: { label: b.lang.image.menu, command: "image", group: "image" },
22471            });
22472          b.contextMenu &&
22473            b.contextMenu.addListener(function(a) {
22474              if (e(b, a)) return { image: CKEDITOR.TRISTATE_OFF };
22475            });
22476        }
22477      },
22478      afterInit: function(b) {
22479        function a(a) {
22480          var d = b.getCommand("justify" + a);
22481          if (d) {
22482            if ("left" == a || "right" == a)
22483              d.on("exec", function(d) {
22484                var c = e(b),
22485                  g;
22486                c &&
22487                  ((g = f(c)),
22488                  g == a
22489                    ? (c.removeStyle("float"), a == f(c) && c.removeAttribute("align"))
22490                    : c.setStyle("float", a),
22491                  d.cancel());
22492              });
22493            d.on("refresh", function(d) {
22494              var c = e(b);
22495              c &&
22496                ((c = f(c)),
22497                this.setState(
22498                  c == a
22499                    ? CKEDITOR.TRISTATE_ON
22500                    : "right" == a || "left" == a
22501                      ? CKEDITOR.TRISTATE_OFF
22502                      : CKEDITOR.TRISTATE_DISABLED,
22503                ),
22504                d.cancel());
22505            });
22506          }
22507        }
22508        b.plugins.image2 || (a("left"), a("right"), a("center"), a("block"));
22509      },
22510    });
22511  })();
22512  CKEDITOR.config.image_removeLinkByEmptyURL = !0;
22513  (function() {
22514    function m(a, b) {
22515      var e, f;
22516      b.on(
22517        "refresh",
22518        function(a) {
22519          var b = [k],
22520            c;
22521          for (c in a.data.states) b.push(a.data.states[c]);
22522          this.setState(CKEDITOR.tools.search(b, p) ? p : k);
22523        },
22524        b,
22525        null,
22526        100,
22527      );
22528      b.on(
22529        "exec",
22530        function(b) {
22531          e = a.getSelection();
22532          f = e.createBookmarks(1);
22533          b.data || (b.data = {});
22534          b.data.done = !1;
22535        },
22536        b,
22537        null,
22538        0,
22539      );
22540      b.on(
22541        "exec",
22542        function() {
22543          a.forceNextSelectionCheck();
22544          e.selectBookmarks(f);
22545        },
22546        b,
22547        null,
22548        100,
22549      );
22550    }
22551    var k = CKEDITOR.TRISTATE_DISABLED,
22552      p = CKEDITOR.TRISTATE_OFF;
22553    CKEDITOR.plugins.add("indent", {
22554      init: function(a) {
22555        var b = CKEDITOR.plugins.indent.genericDefinition;
22556        m(a, a.addCommand("indent", new b(!0)));
22557        m(a, a.addCommand("outdent", new b()));
22558        a.ui.addButton &&
22559          (a.ui.addButton("Indent", {
22560            label: a.lang.indent.indent,
22561            command: "indent",
22562            directional: !0,
22563            toolbar: "indent,20",
22564          }),
22565          a.ui.addButton("Outdent", {
22566            label: a.lang.indent.outdent,
22567            command: "outdent",
22568            directional: !0,
22569            toolbar: "indent,10",
22570          }));
22571        a.on("dirChanged", function(b) {
22572          var f = a.createRange(),
22573            l = b.data.node;
22574          f.setStartBefore(l);
22575          f.setEndAfter(l);
22576          for (var n = new CKEDITOR.dom.walker(f), c; (c = n.next()); )
22577            if (c.type == CKEDITOR.NODE_ELEMENT)
22578              if (!c.equals(l) && c.getDirection())
22579                f.setStartAfter(c), (n = new CKEDITOR.dom.walker(f));
22580              else {
22581                var d = a.config.indentClasses;
22582                if (d)
22583                  for (
22584                    var g = "ltr" == b.data.dir ? ["_rtl", ""] : ["", "_rtl"], h = 0;
22585                    h < d.length;
22586                    h++
22587                  )
22588                    c.hasClass(d[h] + g[0]) &&
22589                      (c.removeClass(d[h] + g[0]), c.addClass(d[h] + g[1]));
22590                d = c.getStyle("margin-right");
22591                g = c.getStyle("margin-left");
22592                d ? c.setStyle("margin-left", d) : c.removeStyle("margin-left");
22593                g ? c.setStyle("margin-right", g) : c.removeStyle("margin-right");
22594              }
22595        });
22596      },
22597    });
22598    CKEDITOR.plugins.indent = {
22599      genericDefinition: function(a) {
22600        this.isIndent = !!a;
22601        this.startDisabled = !this.isIndent;
22602      },
22603      specificDefinition: function(a, b, e) {
22604        this.name = b;
22605        this.editor = a;
22606        this.jobs = {};
22607        this.enterBr = a.config.enterMode == CKEDITOR.ENTER_BR;
22608        this.isIndent = !!e;
22609        this.relatedGlobal = e ? "indent" : "outdent";
22610        this.indentKey = e ? 9 : CKEDITOR.SHIFT + 9;
22611        this.database = {};
22612      },
22613      registerCommands: function(a, b) {
22614        a.on("pluginsLoaded", function() {
22615          for (var a in b)
22616            (function(a, b) {
22617              var e = a.getCommand(b.relatedGlobal),
22618                c;
22619              for (c in b.jobs)
22620                e.on(
22621                  "exec",
22622                  function(d) {
22623                    d.data.done ||
22624                      (a.fire("lockSnapshot"),
22625                      b.execJob(a, c) && (d.data.done = !0),
22626                      a.fire("unlockSnapshot"),
22627                      CKEDITOR.dom.element.clearAllMarkers(b.database));
22628                  },
22629                  this,
22630                  null,
22631                  c,
22632                ),
22633                  e.on(
22634                    "refresh",
22635                    function(d) {
22636                      d.data.states || (d.data.states = {});
22637                      d.data.states[b.name + "@" + c] = b.refreshJob(a, c, d.data.path);
22638                    },
22639                    this,
22640                    null,
22641                    c,
22642                  );
22643              a.addFeature(b);
22644            })(this, b[a]);
22645        });
22646      },
22647    };
22648    CKEDITOR.plugins.indent.genericDefinition.prototype = { context: "p", exec: function() {} };
22649    CKEDITOR.plugins.indent.specificDefinition.prototype = {
22650      execJob: function(a, b) {
22651        var e = this.jobs[b];
22652        if (e.state != k) return e.exec.call(this, a);
22653      },
22654      refreshJob: function(a, b, e) {
22655        b = this.jobs[b];
22656        a.activeFilter.checkFeature(this) ? (b.state = b.refresh.call(this, a, e)) : (b.state = k);
22657        return b.state;
22658      },
22659      getContext: function(a) {
22660        return a.contains(this.context);
22661      },
22662    };
22663  })();
22664  (function() {
22665    function f(b, c, a) {
22666      if (!b.getCustomData("indent_processed")) {
22667        var d = this.editor,
22668          l = this.isIndent;
22669        if (c) {
22670          d = b.$.className.match(this.classNameRegex);
22671          a = 0;
22672          d && ((d = d[1]), (a = CKEDITOR.tools.indexOf(c, d) + 1));
22673          if (0 > (a += l ? 1 : -1)) return;
22674          a = Math.min(a, c.length);
22675          a = Math.max(a, 0);
22676          b.$.className = CKEDITOR.tools.ltrim(b.$.className.replace(this.classNameRegex, ""));
22677          0 < a && b.addClass(c[a - 1]);
22678        } else {
22679          c = m(b, a);
22680          a = parseInt(b.getStyle(c), 10);
22681          var g = d.config.indentOffset || 40;
22682          isNaN(a) && (a = 0);
22683          a += (l ? 1 : -1) * g;
22684          if (0 > a) return;
22685          a = Math.max(a, 0);
22686          a = Math.ceil(a / g) * g;
22687          b.setStyle(c, a ? a + (d.config.indentUnit || "px") : "");
22688          "" === b.getAttribute("style") && b.removeAttribute("style");
22689        }
22690        CKEDITOR.dom.element.setMarker(this.database, b, "indent_processed", 1);
22691      }
22692    }
22693    function m(b, c) {
22694      return "ltr" == (c || b.getComputedStyle("direction")) ? "margin-left" : "margin-right";
22695    }
22696    var h = CKEDITOR.dtd.$listItem,
22697      p = CKEDITOR.dtd.$list,
22698      k = CKEDITOR.TRISTATE_DISABLED,
22699      n = CKEDITOR.TRISTATE_OFF;
22700    CKEDITOR.plugins.add("indentblock", {
22701      requires: "indent",
22702      init: function(b) {
22703        function c() {
22704          a.specificDefinition.apply(this, arguments);
22705          this.allowedContent = {
22706            "div h1 h2 h3 h4 h5 h6 ol p pre ul": {
22707              propertiesOnly: !0,
22708              styles: d ? null : "margin-left,margin-right",
22709              classes: d || null,
22710            },
22711          };
22712          this.contentTransformations = [
22713            ["div: splitMarginShorthand"],
22714            ["h1: splitMarginShorthand"],
22715            ["h2: splitMarginShorthand"],
22716            ["h3: splitMarginShorthand"],
22717            ["h4: splitMarginShorthand"],
22718            ["h5: splitMarginShorthand"],
22719            ["h6: splitMarginShorthand"],
22720            ["ol: splitMarginShorthand"],
22721            ["p: splitMarginShorthand"],
22722            ["pre: splitMarginShorthand"],
22723            ["ul: splitMarginShorthand"],
22724          ];
22725          this.enterBr && (this.allowedContent.div = !0);
22726          this.requiredContent =
22727            (this.enterBr ? "div" : "p") + (d ? "(" + d.join(",") + ")" : "{margin-left}");
22728          this.jobs = {
22729            20: {
22730              refresh: function(a, b) {
22731                var e = b.block || b.blockLimit;
22732                if (!e.is(h))
22733                  var c = e.getAscendant(h),
22734                    e = (c && b.contains(c)) || e;
22735                e.is(h) && (e = e.getParent());
22736                if (this.enterBr || this.getContext(b)) {
22737                  if (d) {
22738                    var c = d,
22739                      e = e.$.className.match(this.classNameRegex),
22740                      f = this.isIndent,
22741                      c = e ? (f ? e[1] != c.slice(-1) : !0) : f;
22742                    return c ? n : k;
22743                  }
22744                  return this.isIndent
22745                    ? n
22746                    : e
22747                      ? CKEDITOR[
22748                          0 >= (parseInt(e.getStyle(m(e)), 10) || 0)
22749                            ? "TRISTATE_DISABLED"
22750                            : "TRISTATE_OFF"
22751                        ]
22752                      : k;
22753                }
22754                return k;
22755              },
22756              exec: function(a) {
22757                var b = a.getSelection(),
22758                  b = b && b.getRanges()[0],
22759                  c;
22760                if ((c = a.elementPath().contains(p))) f.call(this, c, d);
22761                else
22762                  for (
22763                    b = b.createIterator(),
22764                      a = a.config.enterMode,
22765                      b.enforceRealBlocks = !0,
22766                      b.enlargeBr = a != CKEDITOR.ENTER_BR;
22767                    (c = b.getNextParagraph(a == CKEDITOR.ENTER_P ? "p" : "div"));
22768
22769                  )
22770                    c.isReadOnly() || f.call(this, c, d);
22771                return !0;
22772              },
22773            },
22774          };
22775        }
22776        var a = CKEDITOR.plugins.indent,
22777          d = b.config.indentClasses;
22778        a.registerCommands(b, {
22779          indentblock: new c(b, "indentblock", !0),
22780          outdentblock: new c(b, "outdentblock"),
22781        });
22782        CKEDITOR.tools.extend(c.prototype, a.specificDefinition.prototype, {
22783          context: {
22784            div: 1,
22785            dl: 1,
22786            h1: 1,
22787            h2: 1,
22788            h3: 1,
22789            h4: 1,
22790            h5: 1,
22791            h6: 1,
22792            ul: 1,
22793            ol: 1,
22794            p: 1,
22795            pre: 1,
22796            table: 1,
22797          },
22798          classNameRegex: d ? new RegExp("(?:^|\\s+)(" + d.join("|") + ")(?\x3d$|\\s)") : null,
22799        });
22800      },
22801    });
22802  })();
22803  (function() {
22804    function w(f) {
22805      function g(b) {
22806        for (var e = c.startContainer, a = c.endContainer; e && !e.getParent().equals(b); )
22807          e = e.getParent();
22808        for (; a && !a.getParent().equals(b); ) a = a.getParent();
22809        if (!e || !a) return !1;
22810        for (var d = [], h = !1; !h; ) e.equals(a) && (h = !0), d.push(e), (e = e.getNext());
22811        if (1 > d.length) return !1;
22812        e = b.getParents(!0);
22813        for (a = 0; a < e.length; a++)
22814          if (e[a].getName && p[e[a].getName()]) {
22815            b = e[a];
22816            break;
22817          }
22818        for (
22819          var e = k.isIndent ? 1 : -1,
22820            a = d[0],
22821            d = d[d.length - 1],
22822            h = CKEDITOR.plugins.list.listToArray(b, q),
22823            m = h[d.getCustomData("listarray_index")].indent,
22824            a = a.getCustomData("listarray_index");
22825          a <= d.getCustomData("listarray_index");
22826          a++
22827        )
22828          if (((h[a].indent += e), 0 < e)) {
22829            for (var g = h[a].parent, n = a - 1; 0 <= n; n--)
22830              if (h[n].indent === e) {
22831                g = h[n].parent;
22832                break;
22833              }
22834            h[a].parent = new CKEDITOR.dom.element(g.getName(), g.getDocument());
22835          }
22836        for (a = d.getCustomData("listarray_index") + 1; a < h.length && h[a].indent > m; a++)
22837          h[a].indent += e;
22838        e = CKEDITOR.plugins.list.arrayToList(h, q, null, f.config.enterMode, b.getDirection());
22839        if (!k.isIndent) {
22840          var t;
22841          if ((t = b.getParent()) && t.is("li"))
22842            for (var d = e.listNode.getChildren(), r = [], l, a = d.count() - 1; 0 <= a; a--)
22843              (l = d.getItem(a)) && l.is && l.is("li") && r.push(l);
22844        }
22845        e && e.listNode.replace(b);
22846        if (r && r.length)
22847          for (a = 0; a < r.length; a++) {
22848            for (l = b = r[a]; (l = l.getNext()) && l.is && l.getName() in p; )
22849              CKEDITOR.env.needsNbspFiller &&
22850                !b.getFirst(x) &&
22851                b.append(c.document.createText(" ")),
22852                b.append(l);
22853            b.insertAfter(t);
22854          }
22855        e && f.fire("contentDomInvalidated");
22856        return !0;
22857      }
22858      for (
22859        var k = this,
22860          q = this.database,
22861          p = this.context,
22862          c,
22863          m = f.getSelection(),
22864          m = (m && m.getRanges()).createIterator();
22865        (c = m.getNextRange());
22866
22867      ) {
22868        for (
22869          var b = c.getCommonAncestor();
22870          b && (b.type != CKEDITOR.NODE_ELEMENT || !p[b.getName()]);
22871
22872        ) {
22873          if (f.editable().equals(b)) {
22874            b = !1;
22875            break;
22876          }
22877          b = b.getParent();
22878        }
22879        b || ((b = c.startPath().contains(p)) && c.setEndAt(b, CKEDITOR.POSITION_BEFORE_END));
22880        if (!b) {
22881          var d = c.getEnclosedNode();
22882          d &&
22883            d.type == CKEDITOR.NODE_ELEMENT &&
22884            d.getName() in p &&
22885            (c.setStartAt(d, CKEDITOR.POSITION_AFTER_START),
22886            c.setEndAt(d, CKEDITOR.POSITION_BEFORE_END),
22887            (b = d));
22888        }
22889        b &&
22890          c.startContainer.type == CKEDITOR.NODE_ELEMENT &&
22891          c.startContainer.getName() in p &&
22892          ((d = new CKEDITOR.dom.walker(c)), (d.evaluator = n), (c.startContainer = d.next()));
22893        b &&
22894          c.endContainer.type == CKEDITOR.NODE_ELEMENT &&
22895          c.endContainer.getName() in p &&
22896          ((d = new CKEDITOR.dom.walker(c)), (d.evaluator = n), (c.endContainer = d.previous()));
22897        if (b) return g(b);
22898      }
22899      return 0;
22900    }
22901    function n(f) {
22902      return f.type == CKEDITOR.NODE_ELEMENT && f.is("li");
22903    }
22904    function x(f) {
22905      return y(f) && z(f);
22906    }
22907    var y = CKEDITOR.dom.walker.whitespaces(!0),
22908      z = CKEDITOR.dom.walker.bookmark(!1, !0),
22909      u = CKEDITOR.TRISTATE_DISABLED,
22910      v = CKEDITOR.TRISTATE_OFF;
22911    CKEDITOR.plugins.add("indentlist", {
22912      requires: "indent",
22913      init: function(f) {
22914        function g(f) {
22915          k.specificDefinition.apply(this, arguments);
22916          this.requiredContent = ["ul", "ol"];
22917          f.on(
22918            "key",
22919            function(g) {
22920              var c = f.elementPath();
22921              if ("wysiwyg" == f.mode && g.data.keyCode == this.indentKey && c) {
22922                var m = this.getContext(c);
22923                !m ||
22924                  (this.isIndent &&
22925                    CKEDITOR.plugins.indentList.firstItemInPath(this.context, c, m)) ||
22926                  (f.execCommand(this.relatedGlobal), g.cancel());
22927              }
22928            },
22929            this,
22930          );
22931          this.jobs[this.isIndent ? 10 : 30] = {
22932            refresh: this.isIndent
22933              ? function(f, c) {
22934                  var g = this.getContext(c),
22935                    b = CKEDITOR.plugins.indentList.firstItemInPath(this.context, c, g);
22936                  return g && this.isIndent && !b ? v : u;
22937                }
22938              : function(f, c) {
22939                  return !this.getContext(c) || this.isIndent ? u : v;
22940                },
22941            exec: CKEDITOR.tools.bind(w, this),
22942          };
22943        }
22944        var k = CKEDITOR.plugins.indent;
22945        k.registerCommands(f, {
22946          indentlist: new g(f, "indentlist", !0),
22947          outdentlist: new g(f, "outdentlist"),
22948        });
22949        CKEDITOR.tools.extend(g.prototype, k.specificDefinition.prototype, {
22950          context: { ol: 1, ul: 1 },
22951        });
22952      },
22953    });
22954    CKEDITOR.plugins.indentList = {};
22955    CKEDITOR.plugins.indentList.firstItemInPath = function(f, g, k) {
22956      var q = g.contains(n);
22957      k || (k = g.contains(f));
22958      return k && q && q.equals(k.getFirst(n));
22959    };
22960  })();
22961  CKEDITOR.plugins.add("smiley", {
22962    requires: "dialog",
22963    init: function(a) {
22964      a.config.smiley_path = a.config.smiley_path || this.path + "images/";
22965      a.addCommand(
22966        "smiley",
22967        new CKEDITOR.dialogCommand("smiley", {
22968          allowedContent: "img[alt,height,!src,title,width]",
22969          requiredContent: "img",
22970        }),
22971      );
22972      a.ui.addButton &&
22973        a.ui.addButton("Smiley", {
22974          label: a.lang.smiley.toolbar,
22975          command: "smiley",
22976          toolbar: "insert,50",
22977        });
22978      CKEDITOR.dialog.add("smiley", this.path + "dialogs/smiley.js");
22979    },
22980  });
22981  CKEDITOR.config.smiley_images = "regular_smile.png sad_smile.png wink_smile.png teeth_smile.png confused_smile.png tongue_smile.png embarrassed_smile.png omg_smile.png whatchutalkingabout_smile.png angry_smile.png angel_smile.png shades_smile.png devil_smile.png cry_smile.png lightbulb.png thumbs_down.png thumbs_up.png heart.png broken_heart.png kiss.png envelope.png".split(
22982    " ",
22983  );
22984  CKEDITOR.config.smiley_descriptions = "smiley;sad;wink;laugh;frown;cheeky;blush;surprise;indecision;angry;angel;cool;devil;crying;enlightened;no;yes;heart;broken heart;kiss;mail".split(
22985    ";",
22986  );
22987  (function() {
22988    function q(a, c) {
22989      c = void 0 === c || c;
22990      var b;
22991      if (c) b = a.getComputedStyle("text-align");
22992      else {
22993        for (; !a.hasAttribute || (!a.hasAttribute("align") && !a.getStyle("text-align")); ) {
22994          b = a.getParent();
22995          if (!b) break;
22996          a = b;
22997        }
22998        b = a.getStyle("text-align") || a.getAttribute("align") || "";
22999      }
23000      b && (b = b.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i, ""));
23001      !b && c && (b = "rtl" == a.getComputedStyle("direction") ? "right" : "left");
23002      return b;
23003    }
23004    function h(a, c, b) {
23005      this.editor = a;
23006      this.name = c;
23007      this.value = b;
23008      this.context = "p";
23009      c = a.config.justifyClasses;
23010      var f = a.config.enterMode == CKEDITOR.ENTER_P ? "p" : "div";
23011      if (c) {
23012        switch (b) {
23013          case "left":
23014            this.cssClassName = c[0];
23015            break;
23016          case "center":
23017            this.cssClassName = c[1];
23018            break;
23019          case "right":
23020            this.cssClassName = c[2];
23021            break;
23022          case "justify":
23023            this.cssClassName = c[3];
23024        }
23025        this.cssClassRegex = new RegExp("(?:^|\\s+)(?:" + c.join("|") + ")(?\x3d$|\\s)");
23026        this.requiredContent = f + "(" + this.cssClassName + ")";
23027      } else this.requiredContent = f + "{text-align}";
23028      this.allowedContent = {
23029        "caption div h1 h2 h3 h4 h5 h6 p pre td th li": {
23030          propertiesOnly: !0,
23031          styles: this.cssClassName ? null : "text-align",
23032          classes: this.cssClassName || null,
23033        },
23034      };
23035      a.config.enterMode == CKEDITOR.ENTER_BR && (this.allowedContent.div = !0);
23036    }
23037    function m(a) {
23038      var c = a.editor,
23039        b = c.createRange();
23040      b.setStartBefore(a.data.node);
23041      b.setEndAfter(a.data.node);
23042      for (var f = new CKEDITOR.dom.walker(b), d; (d = f.next()); )
23043        if (d.type == CKEDITOR.NODE_ELEMENT)
23044          if (!d.equals(a.data.node) && d.getDirection())
23045            b.setStartAfter(d), (f = new CKEDITOR.dom.walker(b));
23046          else {
23047            var e = c.config.justifyClasses;
23048            e &&
23049              (d.hasClass(e[0])
23050                ? (d.removeClass(e[0]), d.addClass(e[2]))
23051                : d.hasClass(e[2]) && (d.removeClass(e[2]), d.addClass(e[0])));
23052            e = d.getStyle("text-align");
23053            "left" == e
23054              ? d.setStyle("text-align", "right")
23055              : "right" == e && d.setStyle("text-align", "left");
23056          }
23057    }
23058    h.prototype = {
23059      exec: function(a) {
23060        var c = a.getSelection(),
23061          b = a.config.enterMode;
23062        if (c) {
23063          for (
23064            var f = c.createBookmarks(),
23065              d = c.getRanges(),
23066              e = this.cssClassName,
23067              h,
23068              g,
23069              k = a.config.useComputedState,
23070              k = void 0 === k || k,
23071              n = d.length - 1;
23072            0 <= n;
23073            n--
23074          )
23075            for (
23076              h = d[n].createIterator(), h.enlargeBr = b != CKEDITOR.ENTER_BR;
23077              (g = h.getNextParagraph(b == CKEDITOR.ENTER_P ? "p" : "div"));
23078
23079            )
23080              if (!g.isReadOnly()) {
23081                var l = g.getName(),
23082                  p;
23083                p = a.activeFilter.check(l + "{text-align}");
23084                if ((l = a.activeFilter.check(l + "(" + e + ")")) || p) {
23085                  g.removeAttribute("align");
23086                  g.removeStyle("text-align");
23087                  var m =
23088                      e &&
23089                      (g.$.className = CKEDITOR.tools.ltrim(
23090                        g.$.className.replace(this.cssClassRegex, ""),
23091                      )),
23092                    r = this.state == CKEDITOR.TRISTATE_OFF && (!k || q(g, !0) != this.value);
23093                  e && l
23094                    ? r ? g.addClass(e) : m || g.removeAttribute("class")
23095                    : r && p && g.setStyle("text-align", this.value);
23096                }
23097              }
23098          a.focus();
23099          a.forceNextSelectionCheck();
23100          c.selectBookmarks(f);
23101        }
23102      },
23103      refresh: function(a, c) {
23104        var b = c.block || c.blockLimit,
23105          f = b.getName(),
23106          d = b.equals(a.editable()),
23107          f = this.cssClassName
23108            ? a.activeFilter.check(f + "(" + this.cssClassName + ")")
23109            : a.activeFilter.check(f + "{text-align}");
23110        d && 1 === c.elements.length
23111          ? this.setState(CKEDITOR.TRISTATE_OFF)
23112          : !d && f
23113            ? this.setState(
23114                q(b, this.editor.config.useComputedState) == this.value
23115                  ? CKEDITOR.TRISTATE_ON
23116                  : CKEDITOR.TRISTATE_OFF,
23117              )
23118            : this.setState(CKEDITOR.TRISTATE_DISABLED);
23119      },
23120    };
23121    CKEDITOR.plugins.add("justify", {
23122      init: function(a) {
23123        if (!a.blockless) {
23124          var c = new h(a, "justifyleft", "left"),
23125            b = new h(a, "justifycenter", "center"),
23126            f = new h(a, "justifyright", "right"),
23127            d = new h(a, "justifyblock", "justify");
23128          a.addCommand("justifyleft", c);
23129          a.addCommand("justifycenter", b);
23130          a.addCommand("justifyright", f);
23131          a.addCommand("justifyblock", d);
23132          a.ui.addButton &&
23133            (a.ui.addButton("JustifyLeft", {
23134              label: a.lang.common.alignLeft,
23135              command: "justifyleft",
23136              toolbar: "align,10",
23137            }),
23138            a.ui.addButton("JustifyCenter", {
23139              label: a.lang.common.center,
23140              command: "justifycenter",
23141              toolbar: "align,20",
23142            }),
23143            a.ui.addButton("JustifyRight", {
23144              label: a.lang.common.alignRight,
23145              command: "justifyright",
23146              toolbar: "align,30",
23147            }),
23148            a.ui.addButton("JustifyBlock", {
23149              label: a.lang.common.justify,
23150              command: "justifyblock",
23151              toolbar: "align,40",
23152            }));
23153          a.on("dirChanged", m);
23154        }
23155      },
23156    });
23157  })();
23158  CKEDITOR.plugins.add("menubutton", {
23159    requires: "button,menu",
23160    onLoad: function() {
23161      var d = function(c) {
23162        var a = this._,
23163          b = a.menu;
23164        a.state !== CKEDITOR.TRISTATE_DISABLED &&
23165          (a.on && b
23166            ? b.hide()
23167            : ((a.previousState = a.state),
23168              b ||
23169                ((b = a.menu = new CKEDITOR.menu(c, {
23170                  panel: {
23171                    className: "cke_menu_panel",
23172                    attributes: { "aria-label": c.lang.common.options },
23173                  },
23174                })),
23175                (b.onHide = CKEDITOR.tools.bind(function() {
23176                  var b = this.command ? c.getCommand(this.command).modes : this.modes;
23177                  this.setState(!b || b[c.mode] ? a.previousState : CKEDITOR.TRISTATE_DISABLED);
23178                  a.on = 0;
23179                }, this)),
23180                this.onMenu && b.addListener(this.onMenu)),
23181              this.setState(CKEDITOR.TRISTATE_ON),
23182              (a.on = 1),
23183              setTimeout(function() {
23184                b.show(CKEDITOR.document.getById(a.id), 4);
23185              }, 0)));
23186      };
23187      CKEDITOR.ui.menuButton = CKEDITOR.tools.createClass({
23188        base: CKEDITOR.ui.button,
23189        $: function(c) {
23190          delete c.panel;
23191          this.base(c);
23192          this.hasArrow = !0;
23193          this.click = d;
23194        },
23195        statics: {
23196          handler: {
23197            create: function(c) {
23198              return new CKEDITOR.ui.menuButton(c);
23199            },
23200          },
23201        },
23202      });
23203    },
23204    beforeInit: function(d) {
23205      d.ui.addHandler(CKEDITOR.UI_MENUBUTTON, CKEDITOR.ui.menuButton.handler);
23206    },
23207  });
23208  CKEDITOR.UI_MENUBUTTON = "menubutton";
23209  (function() {
23210    CKEDITOR.plugins.add("language", {
23211      requires: "menubutton",
23212      init: function(a) {
23213        var b = a.config.language_list || ["ar:Arabic:rtl", "fr:French", "es:Spanish"],
23214          c = this,
23215          d = a.lang.language,
23216          e = {},
23217          g,
23218          h,
23219          k,
23220          f;
23221        a.addCommand("language", {
23222          allowedContent: "span[!lang,!dir]",
23223          requiredContent: "span[lang,dir]",
23224          contextSensitive: !0,
23225          exec: function(a, b) {
23226            var c = e["language_" + b];
23227            if (c)
23228              a[c.style.checkActive(a.elementPath(), a) ? "removeStyle" : "applyStyle"](c.style);
23229          },
23230          refresh: function(a) {
23231            this.setState(
23232              c.getCurrentLangElement(a) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF,
23233            );
23234          },
23235        });
23236        for (f = 0; f < b.length; f++)
23237          (g = b[f].split(":")),
23238            (h = g[0]),
23239            (k = "language_" + h),
23240            (e[k] = {
23241              label: g[1],
23242              langId: h,
23243              group: "language",
23244              order: f,
23245              ltr: "rtl" != ("" + g[2]).toLowerCase(),
23246              onClick: function() {
23247                a.execCommand("language", this.langId);
23248              },
23249              role: "menuitemcheckbox",
23250            }),
23251            (e[k].style = new CKEDITOR.style({
23252              element: "span",
23253              attributes: { lang: h, dir: e[k].ltr ? "ltr" : "rtl" },
23254            }));
23255        e.language_remove = {
23256          label: d.remove,
23257          group: "language_remove",
23258          state: CKEDITOR.TRISTATE_DISABLED,
23259          order: e.length,
23260          onClick: function() {
23261            var b = c.getCurrentLangElement(a);
23262            b && a.execCommand("language", b.getAttribute("lang"));
23263          },
23264        };
23265        a.addMenuGroup("language", 1);
23266        a.addMenuGroup("language_remove");
23267        a.addMenuItems(e);
23268        a.ui.add("Language", CKEDITOR.UI_MENUBUTTON, {
23269          label: d.button,
23270          allowedContent: "span[!lang,!dir]",
23271          requiredContent: "span[lang,dir]",
23272          toolbar: "bidi,30",
23273          command: "language",
23274          onMenu: function() {
23275            var b = {},
23276              d = c.getCurrentLangElement(a),
23277              f;
23278            for (f in e) b[f] = CKEDITOR.TRISTATE_OFF;
23279            b.language_remove = d ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED;
23280            d && (b["language_" + d.getAttribute("lang")] = CKEDITOR.TRISTATE_ON);
23281            return b;
23282          },
23283        });
23284        a.addRemoveFormatFilter &&
23285          a.addRemoveFormatFilter(function(a) {
23286            return !(a.is("span") && a.getAttribute("dir") && a.getAttribute("lang"));
23287          });
23288      },
23289      getCurrentLangElement: function(a) {
23290        var b = a.elementPath();
23291        a = b && b.elements;
23292        var c;
23293        if (b)
23294          for (var d = 0; d < a.length; d++)
23295            (b = a[d]),
23296              !c &&
23297                "span" == b.getName() &&
23298                b.hasAttribute("dir") &&
23299                b.hasAttribute("lang") &&
23300                (c = b);
23301        return c;
23302      },
23303    });
23304  })();
23305  (function() {
23306    function p(c) {
23307      return c.replace(/'/g, "\\$\x26");
23308    }
23309    function q(c) {
23310      for (var b, a = c.length, d = [], f = 0; f < a;
23310 f++) (b = c.charCodeAt(f)), d.push(b);
23311      return "String.fromCharCode(" + d.join(",") + ")";
23312    }
23313    function r(c, b) {
23314      var a = c.plugins.link,
23315        d = a.compiledProtectionFunction.params,
23316        f,
23317        e;
23318      e = [a.compiledProtectionFunction.name, "("];
23319      for (var g = 0; g < d.length; g++)
23320        (a = d[g].toLowerCase()),
23321          (f = b[a]),
23322          0 < g && e.push(","),
23323          e.push("'", f ? p(encodeURIComponent(b[a])) : "", "'");
23324      e.push(")");
23325      return e.join("");
23326    }
23327    function n(c) {
23328      c = c.config.emailProtection || "";
23329      var b;
23330      c &&
23331        "encode" != c &&
23332        ((b = {}),
23333        c.replace(/^([^(]+)\(([^)]+)\)$/, function(a, c, f) {
23334          b.name = c;
23335          b.params = [];
23336          f.replace(/[^,\s]+/g, function(a) {
23337            b.params.push(a);
23338          });
23339        }));
23340      return b;
23341    }
23342    CKEDITOR.plugins.add("link", {
23343      requires: "dialog,fakeobjects",
23344      onLoad: function() {
23345        function c(b) {
23346          return a
23347            .replace(/%1/g, "rtl" == b ? "right" : "left")
23348            .replace(/%2/g, "cke_contents_" + b);
23349        }
23350        var b =
23351            "background:url(" +
23352            CKEDITOR.getUrl(
23353              this.path + "images" + (CKEDITOR.env.hidpi ? "/hidpi" : "") + "/anchor.png",
23354            ) +
23355            ") no-repeat %1 center;border:1px dotted #00f;background-size:16px;",
23356          a =
23357            ".%2 a.cke_anchor,.%2 a.cke_anchor_empty,.cke_editable.%2 a[name],.cke_editable.%2 a[data-cke-saved-name]{" +
23358            b +
23359            "padding-%1:18px;cursor:auto;}.%2 img.cke_anchor{" +
23360            b +
23361            "width:16px;min-height:15px;height:1.15em;vertical-align:text-bottom;}";
23362        CKEDITOR.addCss(c("ltr") + c("rtl"));
23363      },
23364      init: function(c) {
23365        var b = "a[!href]";
23366        CKEDITOR.dialog.isTabEnabled(c, "link", "advanced") &&
23367          (b = b.replace(
23368            "]",
23369            ",accesskey,charset,dir,id,lang,name,rel,tabindex,title,type,download]{*}(*)",
23370          ));
23371        CKEDITOR.dialog.isTabEnabled(c, "link", "target") &&
23372          (b = b.replace("]", ",target,onclick]"));
23373        c.addCommand(
23374          "link",
23375          new CKEDITOR.dialogCommand("link", { allowedContent: b, requiredContent: "a[href]" }),
23376        );
23377        c.addCommand(
23378          "anchor",
23379          new CKEDITOR.dialogCommand("anchor", {
23380            allowedContent: "a[!name,id]",
23381            requiredContent: "a[name]",
23382          }),
23383        );
23384        c.addCommand("unlink", new CKEDITOR.unlinkCommand());
23385        c.addCommand("removeAnchor", new CKEDITOR.removeAnchorCommand());
23386        c.setKeystroke(CKEDITOR.CTRL + 76, "link");
23387        c.ui.addButton &&
23388          (c.ui.addButton("Link", {
23389            label: c.lang.link.toolbar,
23390            command: "link",
23391            toolbar: "links,10",
23392          }),
23393          c.ui.addButton("Unlink", {
23394            label: c.lang.link.unlink,
23395            command: "unlink",
23396            toolbar: "links,20",
23397          }),
23398          c.ui.addButton("Anchor", {
23399            label: c.lang.link.anchor.toolbar,
23400            command: "anchor",
23401            toolbar: "links,30",
23402          }));
23403        CKEDITOR.dialog.add("link", this.path + "dialogs/link.js");
23404        CKEDITOR.dialog.add("anchor", this.path + "dialogs/anchor.js");
23405        c.on(
23406          "doubleclick",
23407          function(a) {
23408            var b = a.data.element.getAscendant({ a: 1, img: 1 }, !0);
23409            b &&
23410              !b.isReadOnly() &&
23411              (b.is("a")
23412                ? ((a.data.dialog =
23413                    !b.getAttribute("name") || (b.getAttribute("href") && b.getChildCount())
23414                      ? "link"
23415                      : "anchor"),
23416                  (a.data.link = b))
23417                : CKEDITOR.plugins.link.tryRestoreFakeAnchor(c, b) && (a.data.dialog = "anchor"));
23418          },
23419          null,
23420          null,
23421          0,
23422        );
23423        c.on(
23424          "doubleclick",
23425          function(a) {
23426            a.data.dialog in { link: 1, anchor: 1 } &&
23427              a.data.link &&
23428              c.getSelection().selectElement(a.data.link);
23429          },
23430          null,
23431          null,
23432          20,
23433        );
23434        c.addMenuItems &&
23435          c.addMenuItems({
23436            anchor: {
23437              label: c.lang.link.anchor.menu,
23438              command: "anchor",
23439              group: "anchor",
23440              order: 1,
23441            },
23442            removeAnchor: {
23443              label: c.lang.link.anchor.remove,
23444              command: "removeAnchor",
23445              group: "anchor",
23446              order: 5,
23447            },
23448            link: {
23449              label: c.lang.link.menu,
23450              command: "link",
23451              group: "link",
23452              order: 1,
23453            },
23454            unlink: { label: c.lang.link.unlink, command: "unlink", group: "link", order: 5 },
23455          });
23456        c.contextMenu &&
23457          c.contextMenu.addListener(function(a) {
23458            if (!a || a.isReadOnly()) return null;
23459            a = CKEDITOR.plugins.link.tryRestoreFakeAnchor(c, a);
23460            if (!a && !(a = CKEDITOR.plugins.link.getSelectedLink(c))) return null;
23461            var b = {};
23462            a.getAttribute("href") &&
23463              a.getChildCount() &&
23464              (b = { link: CKEDITOR.TRISTATE_OFF, unlink: CKEDITOR.TRISTATE_OFF });
23465            a && a.hasAttribute("name") && (b.anchor = b.removeAnchor = CKEDITOR.TRISTATE_OFF);
23466            return b;
23467          });
23468        this.compiledProtectionFunction = n(c);
23469      },
23470      afterInit: function(c) {
23471        c.dataProcessor.dataFilter.addRules({
23472          elements: {
23473            a: function(a) {
23474              return a.attributes.name
23475                ? a.children.length ? null : c.createFakeParserElement(a, "cke_anchor", "anchor")
23476                : null;
23477            },
23478          },
23479        });
23480        var b = c._.elementsPath && c._.elementsPath.filters;
23481        b &&
23482          b.push(function(a, b) {
23483            if (
23484              "a" == b &&
23485              (CKEDITOR.plugins.link.tryRestoreFakeAnchor(c, a) ||
23486                (a.getAttribute("name") && (!a.getAttribute("href") || !a.getChildCount())))
23487            )
23488              return "anchor";
23489          });
23490      },
23491    });
23492    var t = /^javascript:/,
23493      u = /^mailto:([^?]+)(?:\?(.+))?$/,
23494      v = /subject=([^;?:@&=$,\/]*)/i,
23495      w = /body=([^;?:@&=$,\/]*)/i,
23496      x = /^#(.*)$/,
23497      y = /^((?:http|https|ftp|news):\/\/)?(.*)$/,
23498      z = /^(_(?:self|top|parent|blank))$/,
23499      A = /^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,
23500      B = /^javascript:([^(]+)\(([^)]+)\)$/,
23501      C = /\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/,
23502      D = /(?:^|,)([^=]+)=(\d+|yes|no)/gi,
23503      m = {
23504        id: "advId",
23505        dir: "advLangDir",
23506        accessKey: "advAccessKey",
23507        name: "advName",
23508        lang: "advLangCode",
23509        tabindex: "advTabIndex",
23510        title: "advTitle",
23511        type: "advContentType",
23512        class: "advCSSClasses",
23513        charset: "advCharset",
23514        style: "advStyles",
23515        rel: "advRel",
23516      };
23517    CKEDITOR.plugins.link = {
23518      getSelectedLink: function(c, b) {
23519        var a = c.getSelection(),
23520          d = a.getSelectedElement(),
23521          f = a.getRanges(),
23522          e = [],
23523          g;
23524        if (!b && d && d.is("a")) return d;
23525        for (d = 0; d < f.length; d++)
23526          if (
23527            ((g = a.getRanges()[d]),
23528            g.shrink(CKEDITOR.SHRINK_ELEMENT, !0, { skipBogus: !0 }),
23529            (g = c.elementPath(g.getCommonAncestor()).contains("a", 1)) && b)
23530          )
23531            e.push(g);
23532          else if (g) return g;
23533        return b ? e : null;
23534      },
23535      getEditorAnchors: function(c) {
23536        for (
23537          var b = c.editable(),
23538            a = b.isInline() && !c.plugins.divarea ? c.document : b,
23539            b = a.getElementsByTag("a"),
23540            a = a.getElementsByTag("img"),
23541            d = [],
23542            f = 0,
23543            e;
23544          (e = b.getItem(f++));
23545
23546        )
23547          (e.data("cke-saved-name") || e.hasAttribute("name")) &&
23548            d.push({
23549              name: e.data("cke-saved-name") || e.getAttribute("name"),
23550              id: e.getAttribute("id"),
23551            });
23552        for (f = 0; (e = a.getItem(f++)); )
23553          (e = this.tryRestoreFakeAnchor(c, e)) &&
23554            d.push({ name: e.getAttribute("name"), id: e.getAttribute("id") });
23555        return d;
23556      },
23557      fakeAnchor: !0,
23558      tryRestoreFakeAnchor: function(c, b) {
23559        if (b && b.data("cke-real-element-type") && "anchor" == b.data("cke-real-element-type")) {
23560          var a = c.restoreRealElement(b);
23561          if (a.data("cke-saved-name")) return a;
23562        }
23563      },
23564      parseLinkAttributes: function(c, b) {
23565        var a = (b && (b.data("cke-saved-href") || b.getAttribute("href"))) || "",
23566          d = c.plugins.link.compiledProtectionFunction,
23567          f = c.config.emailProtection,
23568          e,
23569          g = {};
23570        a.match(t) &&
23571          ("encode" == f
23572            ? (a = a.replace(A, function(a, b, c) {
23573                c = c || "";
23574                return (
23575                  "mailto:" +
23576                  String.fromCharCode.apply(String, b.split(",")) +
23577                  c.replace(/\\'/g, "'")
23578                );
23579              }))
23580            : f &&
23581              a.replace(B, function(a, b, c) {
23582                if (b == d.name) {
23583                  g.type = "email";
23584                  a = g.email = {};
23585                  b = /(^')|('$)/g;
23586                  c = c.match(/[^,\s]+/g);
23587                  for (var e = c.length, f, h, k = 0; k < e; k++)
23588                    (f = decodeURIComponent),
23589                      (h = c[k].replace(b, "").replace(/\\'/g, "'")),
23590                      (h = f(h)),
23591                      (f = d.params[k].toLowerCase()),
23592                      (a[f] = h);
23593                  a.address = [a.name, a.domain].join("@");
23594                }
23595              }));
23596        if (!g.type)
23597          if ((f = a.match(x)))
23598            (g.type = "anchor"), (g.anchor = {}), (g.anchor.name = g.anchor.id = f[1]);
23599          else if ((f = a.match(u))) {
23600            e = a.match(v);
23601            a = a.match(w);
23602            g.type = "email";
23603            var k = (g.email = {});
23604            k.address = f[1];
23605            e && (k.subject = decodeURIComponent(e[1]));
23606            a && (k.body = decodeURIComponent(a[1]));
23607          } else
23608            a &&
23609              (e = a.match(y)) &&
23610              ((g.type = "url"), (g.url = {}), (g.url.protocol = e[1]), (g.url.url = e[2]));
23611        if (b) {
23612          if ((a = b.getAttribute("target")))
23613            g.target = { type: a.match(z) ? a : "frame", name: a };
23614          else if ((a = (a = b.data("cke-pa-onclick") || b.getAttribute("onclick")) && a.match(C)))
23615            for (g.target = { type: "popup", name: a[1] }; (f = D.exec(a[2])); )
23616              ("yes" != f[2] && "1" != f[2]) || f[1] in { height: 1, width: 1, top: 1, left: 1 }
23617                ? isFinite(f[2]) && (g.target[f[1]] = f[2])
23618                : (g.target[f[1]] = !0);
23619          null !== b.getAttribute("download") && (g.download = !0);
23620          var a = {},
23621            h;
23622          for (h in m) (f = b.getAttribute(h)) && (a[m[h]] = f);
23623          if ((h = b.data("cke-saved-name") || a.advName)) a.advName = h;
23624          CKEDITOR.tools.isEmpty(a) || (g.advanced = a);
23625        }
23626        return g;
23627      },
23628      getLinkAttributes: function(c, b) {
23629        var a = c.config.emailProtection || "",
23630          d = {};
23631        switch (b.type) {
23632          case "url":
23633            var a = b.url && void 0 !== b.url.protocol ? b.url.protocol : "http://",
23634              f = (b.url && CKEDITOR.tools.trim(b.url.url)) || "";
23635            d["data-cke-saved-href"] = 0 === f.indexOf("/") ? f : a + f;
23636            break;
23637          case "anchor":
23638            a = b.anchor && b.anchor.id;
23639            d["data-cke-saved-href"] = "#" + ((b.anchor && b.anchor.name) || a || "");
23640            break;
23641          case "email":
23642            var e = b.email,
23643              f = e.address;
23644            switch (a) {
23645              case "":
23646              case "encode":
23647                var g = encodeURIComponent(e.subject || ""),
23648                  k = encodeURIComponent(e.body || ""),
23649                  e = [];
23650                g && e.push("subject\x3d" + g);
23651                k && e.push("body\x3d" + k);
23652                e = e.length ? "?" + e.join("\x26") : "";
23653                "encode" == a
23654                  ? ((a = ["javascript:void(location.href\x3d'mailto:'+", q(f)]),
23655                    e && a.push("+'", p(e), "'"),
23656                    a.push(")"))
23657                  : (a = ["mailto:", f, e]);
23658                break;
23659              default:
23660                (a = f.split("@", 2)),
23661                  (e.name = a[0]),
23662                  (e.domain = a[1]),
23663                  (a = ["javascript:", r(c, e)]);
23664            }
23665            d["data-cke-saved-href"] = a.join("");
23666        }
23667        if (b.target)
23668          if ("popup" == b.target.type) {
23669            for (
23670              var a = ["window.open(this.href, '", b.target.name || "", "', '"],
23671                h = "resizable status location toolbar menubar fullscreen scrollbars dependent".split(
23672                  " ",
23673                ),
23674                f = h.length,
23675                g = function(a) {
23676                  b.target[a] && h.push(a + "\x3d" + b.target[a]);
23677                },
23678                e = 0;
23679              e < f;
23680              e++
23681            )
23682              h[e] += b.target[h[e]] ? "\x3dyes" : "\x3dno";
23683            g("width");
23684            g("left");
23685            g("height");
23686            g("top");
23687            a.push(h.join(","), "'); return false;");
23688            d["data-cke-pa-onclick"] = a.join("");
23689          } else "notSet" != b.target.type && b.target.name && (d.target = b.target.name);
23690        b.download && (d.download = "");
23691        if (b.advanced) {
23692          for (var l in m) (a = b.advanced[m[l]]) && (d[l] = a);
23693          d.name && (d["data-cke-saved-name"] = d.name);
23694        }
23695        d["data-cke-saved-href"] && (d.href = d["data-cke-saved-href"]);
23696        l = {
23697          target: 1,
23698          onclick: 1,
23699          "data-cke-pa-onclick": 1,
23700          "data-cke-saved-name": 1,
23701          download: 1,
23702        };
23703        b.advanced && CKEDITOR.tools.extend(l, m);
23704        for (var n in d) delete l[n];
23705        return { set: d, removed: CKEDITOR.tools.objectKeys(l) };
23706      },
23707      showDisplayTextForElement: function(c, b) {
23708        var a = {
23709            img: 1,
23710            table: 1,
23711            tbody: 1,
23712            thead: 1,
23713            tfoot: 1,
23714            input: 1,
23715            select: 1,
23716            textarea: 1,
23717          },
23718          d = b.getSelection();
23719        return (b.widgets && b.widgets.focused) || (d && 1 < d.getRanges().length)
23720          ? !1
23721          : !c || !c.getName || !c.is(a);
23722      },
23723    };
23724    CKEDITOR.unlinkCommand = function() {};
23725    CKEDITOR.unlinkCommand.prototype = {
23726      exec: function(c) {
23727        if (CKEDITOR.env.ie) {
23728          var b = c.getSelection().getRanges()[0],
23729            a =
23730              (b.getPreviousEditableNode() && b.getPreviousEditableNode().getAscendant("a", !0)) ||
23731              (b.getNextEditableNode() && b.getNextEditableNode().getAscendant("a", !0)),
23732            d;
23733          b.collapsed && a && ((d = b.createBookmark()), b.selectNodeContents(a), b.select());
23734        }
23735        a = new CKEDITOR.style({
23736          element: "a",
23737          type: CKEDITOR.STYLE_INLINE,
23738          alwaysRemoveElement: 1,
23739        });
23740        c.removeStyle(a);
23741        d && (b.moveToBookmark(d), b.select());
23742      },
23743      refresh: function(c, b) {
23744        var a = b.lastElement && b.lastElement.getAscendant("a", !0);
23745        a && "a" == a.getName() && a.getAttribute("href") && a.getChildCount()
23746          ? this.setState(CKEDITOR.TRISTATE_OFF)
23747          : this.setState(CKEDITOR.TRISTATE_DISABLED);
23748      },
23749      contextSensitive: 1,
23750      startDisabled: 1,
23751      requiredContent: "a[href]",
23752      editorFocus: 1,
23753    };
23754    CKEDITOR.removeAnchorCommand = function() {};
23755    CKEDITOR.removeAnchorCommand.prototype = {
23756      exec: function(c) {
23757        var b = c.getSelection(),
23758          a = b.createBookmarks(),
23759          d;
23760        if (
23761          b &&
23762          (d = b.getSelectedElement()) &&
23763          (d.getChildCount() ? d.is("a") : CKEDITOR.plugins.link.tryRestoreFakeAnchor(c, d))
23764        )
23765          d.remove(1);
23766        else if ((d = CKEDITOR.plugins.link.getSelectedLink(c)))
23767          d.hasAttribute("href")
23768            ? (d.removeAttributes({ name: 1, "data-cke-saved-name": 1 }),
23769              d.removeClass("cke_anchor"))
23770            : d.remove(1);
23771        b.selectBookmarks(a);
23772      },
23773      requiredContent: "a[name]",
23774    };
23775    CKEDITOR.tools.extend(CKEDITOR.config, { linkShowAdvancedTab: !0, linkShowTargetTab: !0 });
23776  })();
23777  (function() {
23778    function I(b, m, e) {
23779      function c(c) {
23780        if (
23781          !(
23782            !(a = d[c ? "getFirst" : "getLast"]()) ||
23783            (a.is && a.isBlockBoundary()) ||
23784            !(p = m.root[c ? "getPrevious" : "getNext"](CKEDITOR.dom.walker.invisible(!0))) ||
23785            (p.is && p.isBlockBoundary({ br: 1 }))
23786          )
23787        )
23788          b.document.createElement("br")[c ? "insertBefore" : "insertAfter"](a);
23789      }
23790      for (
23791        var f = CKEDITOR.plugins.list.listToArray(m.root, e), g = [], k = 0;
23792        k < m.contents.length;
23793        k++
23794      ) {
23795        var h = m.contents[k];
23796        (h = h.getAscendant("li", !0)) &&
23797          !h.getCustomData("list_item_processed") &&
23798          (g.push(h), CKEDITOR.dom.element.setMarker(e, h, "list_item_processed", !0));
23799      }
23800      h = null;
23801      for (k = 0; k < g.length; k++)
23802        (h = g[k].getCustomData("listarray_index")), (f[h].indent = -1);
23803      for (k = h + 1; k < f.length; k++)
23804        if (f[k].indent > f[k - 1].indent + 1) {
23805          g = f[k - 1].indent + 1 - f[k].indent;
23806          for (h = f[k].indent; f[k] && f[k].indent >= h; ) (f[k].indent += g), k++;
23807          k--;
23808        }
23809      var d = CKEDITOR.plugins.list.arrayToList(
23810          f,
23811          e,
23812          null,
23813          b.config.enterMode,
23814          m.root.getAttribute("dir"),
23815        ).listNode,
23816        a,
23817        p;
23818      c(!0);
23819      c();
23820      d.replace(m.root);
23821      b.fire("contentDomInvalidated");
23822    }
23823    function B(b, m) {
23824      this.name = b;
23825      this.context = this.type = m;
23826      this.allowedContent = m + " li";
23827      this.requiredContent = m;
23828    }
23829    function E(b, m, e, c) {
23830      for (var f, g; (f = b[c ? "getLast" : "getFirst"](J)); )
23831        (g = f.getDirection(1)) !== m.getDirection(1) && f.setAttribute("dir", g),
23832          f.remove(),
23833          e ? f[c ? "insertBefore" : "insertAfter"](e) : m.append(f, c);
23834    }
23835    function F(b) {
23836      function m(e) {
23837        var c = b[e ? "getPrevious" : "getNext"](u);
23838        c &&
23839          c.type == CKEDITOR.NODE_ELEMENT &&
23840          c.is(b.getName()) &&
23841          (E(b, c, null, !e), b.remove(), (b = c));
23842      }
23843      m();
23844      m(1);
23845    }
23846    function G(b) {
23847      return (
23848        b.type == CKEDITOR.NODE_ELEMENT &&
23849        (b.getName() in CKEDITOR.dtd.$block || b.getName() in CKEDITOR.dtd.$listItem) &&
23850        CKEDITOR.dtd[b.getName()]["#"]
23851      );
23852    }
23853    function C(b, m, e) {
23854      b.fire("saveSnapshot");
23855      e.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);
23856      var c = e.extractContents();
23857      m.trim(!1, !0);
23858      var f = m.createBookmark(),
23859        g = new CKEDITOR.dom.elementPath(m.startContainer),
23860        k = g.block,
23861        g = g.lastElement.getAscendant("li", 1) || k,
23862        h = new CKEDITOR.dom.elementPath(e.startContainer),
23863        d = h.contains(CKEDITOR.dtd.$listItem),
23864        h = h.contains(CKEDITOR.dtd.$list);
23865      k ? (k = k.getBogus()) && k.remove() : h && (k = h.getPrevious(u)) && z(k) && k.remove();
23866      (k = c.getLast()) && k.type == CKEDITOR.NODE_ELEMENT && k.is("br") && k.remove();
23867      (k = m.startContainer.getChild(m.startOffset))
23868        ? c.insertBefore(k)
23869        : m.startContainer.append(c);
23870      d && (c = A(d)) && (g.contains(d) ? (E(c, d.getParent(), d), c.remove()) : g.append(c));
23871      for (; e.checkStartOfBlock() && e.checkEndOfBlock(); ) {
23872        h = e.startPath();
23873        c = h.block;
23874        if (!c) break;
23875        c.is("li") &&
23876          ((g = c.getParent()), c.equals(g.getLast(u)) && c.equals(g.getFirst(u)) && (c = g));
23877        e.moveToPosition(c, CKEDITOR.POSITION_BEFORE_START);
23878        c.remove();
23879      }
23880      e = e.clone();
23881      c = b.editable();
23882      e.setEndAt(c, CKEDITOR.POSITION_BEFORE_END);
23883      e = new CKEDITOR.dom.walker(e);
23884      e.evaluator = function(a) {
23885        return u(a) && !z(a);
23886      };
23887      (e = e.next()) &&
23888        e.type == CKEDITOR.NODE_ELEMENT &&
23889        e.getName() in CKEDITOR.dtd.$list &&
23890        F(e);
23891      m.moveToBookmark(f);
23892      m.select();
23893      b.fire("saveSnapshot");
23894    }
23895    function A(b) {
23896      return (b = b.getLast(u)) && b.type == CKEDITOR.NODE_ELEMENT && b.getName() in v ? b : null;
23897    }
23898    var v = { ol: 1, ul: 1 },
23899      K = CKEDITOR.dom.walker.whitespaces(),
23900      H = CKEDITOR.dom.walker.bookmark(),
23901      u = function(b) {
23902        return !(K(b) || H(b));
23903      },
23904      z = CKEDITOR.dom.walker.bogus();
23905    CKEDITOR.plugins.list = {
23906      listToArray: function(b, m, e, c, f) {
23907        if (!v[b.getName()]) return [];
23908        c || (c = 0);
23909        e || (e = []);
23910        for (var g = 0, k = b.getChildCount(); g < k; g++) {
23911          var h = b.getChild(g);
23912          h.type == CKEDITOR.NODE_ELEMENT &&
23913            h.getName() in CKEDITOR.dtd.$list &&
23914            CKEDITOR.plugins.list.listToArray(h, m, e, c + 1);
23915          if ("li" == h.$.nodeName.toLowerCase()) {
23916            var d = { parent: b, indent: c, element: h, contents: [] };
23917            f
23918              ? (d.grandparent = f)
23919              : ((d.grandparent = b.getParent()),
23920                d.grandparent &&
23921                  "li" == d.grandparent.$.nodeName.toLowerCase() &&
23922                  (d.grandparent = d.grandparent.getParent()));
23923            m && CKEDITOR.dom.element.setMarker(m, h, "listarray_index", e.length);
23924            e.push(d);
23925            for (var a = 0, p = h.getChildCount(), l; a < p; a++)
23926              (l = h.getChild(a)),
23927                l.type == CKEDITOR.NODE_ELEMENT && v[l.getName()]
23928                  ? CKEDITOR.plugins.list.listToArray(l, m, e, c + 1, d.grandparent)
23929                  : d.contents.push(l);
23930          }
23931        }
23932        return e;
23933      },
23934      arrayToList: function(b, m, e, c, f) {
23935        e || (e = 0);
23936        if (!b || b.length < e + 1) return null;
23937        for (
23938          var g,
23939            k = b[e].parent.getDocument(),
23940            h = new CKEDITOR.dom.documentFragment(k),
23941            d = null,
23942            a = e,
23943            p = Math.max(b[e].indent, 0),
23944            l = null,
23945            q,
23946            n,
23947            t = c == CKEDITOR.ENTER_P ? "p" : "div";
23948          ;
23949
23950        ) {
23951          var r = b[a];
23952          g = r.grandparent;
23953          q = r.element.getDirection(1);
23954          if (r.indent == p) {
23955            (d && b[a].parent.getName() == d.getName()) ||
23956              ((d = b[a].parent.clone(!1, 1)), f && d.setAttribute("dir", f), h.append(d));
23957            l = d.append(r.element.clone(0, 1));
23958            q != d.getDirection(1) && l.setAttribute("dir", q);
23959            for (g = 0; g < r.contents.length; g++) l.append(r.contents[g].clone(1, 1));
23960            a++;
23961          } else if (r.indent == Math.max(p, 0) + 1)
23962            (r = b[a - 1].element.getDirection(1)),
23963              (a = CKEDITOR.plugins.list.arrayToList(b, null, a, c, r != q ? q : null)),
23964              !l.getChildCount() &&
23965                CKEDITOR.env.needsNbspFiller &&
23966                7 >= k.$.documentMode &&
23967                l.append(k.createText(" ")),
23968              l.append(a.listNode),
23969              (a = a.nextIndex);
23970          else if (-1 == r.indent && !e && g) {
23971            v[g.getName()]
23972              ? ((l = r.element.clone(!1, !0)), q != g.getDirection(1) && l.setAttribute("dir", q))
23973              : (l = new CKEDITOR.dom.documentFragment(k));
23974            var d = g.getDirection(1) != q,
23975              y = r.element,
23976              D = y.getAttribute("class"),
23977              z = y.getAttribute("style"),
23978              A =
23979                l.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT &&
23980                (c != CKEDITOR.ENTER_BR || d || z || D),
23981              w,
23982              B = r.contents.length,
23983              x;
23984            for (g = 0; g < B; g++)
23985              if (((w = r.contents[g]), H(w) && 1 < B))
23986                A ? (x = w.clone(1, 1)) : l.append(w.clone(1, 1));
23987              else if (w.type == CKEDITOR.NODE_ELEMENT && w.isBlockBoundary()) {
23988                d && !w.getDirection() && w.setAttribute("dir", q);
23989                n = w;
23990                var C = y.getAttribute("style");
23991                C &&
23992                  n.setAttribute(
23993                    "style",
23994                    C.replace(/([^;])$/, "$1;") + (n.getAttribute("style") || ""),
23995                  );
23996                D && w.addClass(D);
23997                n = null;
23998                x && (l.append(x), (x = null));
23999                l.append(w.clone(1, 1));
24000              } else
24001                A
24002                  ? (n || ((n = k.createElement(t)), l.append(n), d && n.setAttribute("dir", q)),
24003                    z && n.setAttribute("style", z),
24004                    D && n.setAttribute("class", D),
24005                    x && (n.append(x), (x = null)),
24006                    n.append(w.clone(1, 1)))
24007                  : l.append(w.clone(1, 1));
24008            x && ((n || l).append(x), (x = null));
24009            l.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT &&
24010              a != b.length - 1 &&
24011              (CKEDITOR.env.needsBrFiller &&
24012                (q = l.getLast()) &&
24013                q.type == CKEDITOR.NODE_ELEMENT &&
24014                q.is("br") &&
24015                q.remove(),
24016              ((q = l.getLast(u)) &&
24017                q.type == CKEDITOR.NODE_ELEMENT &&
24018                q.is(CKEDITOR.dtd.$block)) ||
24019                l.append(k.createElement("br")));
24020            q = l.$.nodeName.toLowerCase();
24021            ("div" != q && "p" != q) || l.appendBogus();
24022            h.append(l);
24023            d = null;
24024            a++;
24025          } else return null;
24026          n = null;
24027          if (b.length <= a || Math.max(b[a].indent, 0) < p) break;
24028        }
24029        if (m)
24030          for (b = h.getFirst(); b; ) {
24031            if (
24032              b.type == CKEDITOR.NODE_ELEMENT &&
24033              (CKEDITOR.dom.element.clearMarkers(m, b),
24034              b.getName() in CKEDITOR.dtd.$listItem &&
24035                ((e = b), (k = f = c = void 0), (c = e.getDirection())))
24036            ) {
24037              for (f = e.getParent(); f && !(k = f.getDirection()); ) f = f.getParent();
24038              c == k && e.removeAttribute("dir");
24039            }
24040            b = b.getNextSourceNode();
24041          }
24042        return { listNode: h, nextIndex: a };
24043      },
24044    };
24045    var L = /^h[1-6]$/,
24046      J = CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);
24047    B.prototype = {
24048      exec: function(b) {
24049        this.refresh(b, b.elementPath());
24050        var m = b.config,
24051          e = b.getSelection(),
24052          c = e && e.getRanges();
24053        if (this.state == CKEDITOR.TRISTATE_OFF) {
24054          var f = b.editable();
24055          if (f.getFirst(u)) {
24056            var g = 1 == c.length && c[0];
24057            (m = g && g.getEnclosedNode()) &&
24058              m.is &&
24059              this.type == m.getName() &&
24060              this.setState(CKEDITOR.TRISTATE_ON);
24061          } else
24062            m.enterMode == CKEDITOR.ENTER_BR
24063              ? f.appendBogus()
24064              : c[0].fixBlock(1, m.enterMode == CKEDITOR.ENTER_P ? "p" : "div"),
24065              e.selectRanges(c);
24066        }
24067        for (
24068          var m = e.createBookmarks(!0), f = [], k = {}, c = c.createIterator(), h = 0;
24069          (g = c.getNextRange()) && ++h;
24070
24071        ) {
24072          var d = g.getBoundaryNodes(),
24073            a = d.startNode,
24074            p = d.endNode;
24075          a.type == CKEDITOR.NODE_ELEMENT &&
24076            "td" == a.getName() &&
24077            g.setStartAt(d.startNode, CKEDITOR.POSITION_AFTER_START);
24078          p.type == CKEDITOR.NODE_ELEMENT &&
24079            "td" == p.getName() &&
24080            g.setEndAt(d.endNode, CKEDITOR.POSITION_BEFORE_END);
24081          g = g.createIterator();
24082          for (g.forceBrBreak = this.state == CKEDITOR.TRISTATE_OFF; (d = g.getNextParagraph()); )
24083            if (!d.getCustomData("list_block")) {
24084              CKEDITOR.dom.element.setMarker(k, d, "list_block", 1);
24085              for (
24086                var l = b.elementPath(d),
24087                  a = l.elements,
24088                  p = 0,
24089                  l = l.blockLimit,
24090                  q,
24091                  n = a.length - 1;
24092                0 <= n && (q = a[n]);
24093                n--
24094              )
24095                if (v[q.getName()] && l.contains(q)) {
24096                  l.removeCustomData("list_group_object_" + h);
24097                  (a = q.getCustomData("list_group_object"))
24098                    ? a.contents.push(d)
24099                    : ((a = { root: q, contents: [d] }),
24100                      f.push(a),
24101                      CKEDITOR.dom.element.setMarker(k, q, "list_group_object", a));
24102                  p = 1;
24103                  break;
24104                }
24105              p ||
24106                ((p = l),
24107                p.getCustomData("list_group_object_" + h)
24108                  ? p.getCustomData("list_group_object_" + h).contents.push(d)
24109                  : ((a = { root: p, contents: [d] }),
24110                    CKEDITOR.dom.element.setMarker(k, p, "list_group_object_" + h, a),
24111                    f.push(a)));
24112            }
24113        }
24114        for (q = []; 0 < f.length; )
24115          if (((a = f.shift()), this.state == CKEDITOR.TRISTATE_OFF))
24116            if (v[a.root.getName()]) {
24117              c = b;
24118              h = a;
24119              a = k;
24120              g = q;
24121              p = CKEDITOR.plugins.list.listToArray(h.root, a);
24122              l = [];
24123              for (d = 0; d < h.contents.length; d++)
24124                (n = h.contents[d]),
24125                  (n = n.getAscendant("li", !0)) &&
24126                    !n.getCustomData("list_item_processed") &&
24127                    (l.push(n), CKEDITOR.dom.element.setMarker(a, n, "list_item_processed", !0));
24128              for (var n = h.root.getDocument(), t = void 0, r = void 0, d = 0; d < l.length; d++) {
24129                var y = l[d].getCustomData("listarray_index"),
24130                  t = p[y].parent;
24131                t.is(this.type) ||
24132                  ((r = n.createElement(this.type)),
24133                  t.copyAttributes(r, { start: 1, type: 1 }),
24134                  r.removeStyle("list-style-type"),
24135                  (p[y].parent = r));
24136              }
24137              a = CKEDITOR.plugins.list.arrayToList(p, a, null, c.config.enterMode);
24138              p = void 0;
24139              l = a.listNode.getChildCount();
24140              for (d = 0; d < l && (p = a.listNode.getChild(d)); d++)
24141                p.getName() == this.type && g.push(p);
24142              a.listNode.replace(h.root);
24143              c.fire("contentDomInvalidated");
24144            } else {
24145              p = b;
24146              g = a;
24147              d = q;
24148              l = g.contents;
24149              c = g.root.getDocument();
24150              h = [];
24151              1 == l.length &&
24152                l[0].equals(g.root) &&
24153                ((a = c.createElement("div")),
24154                l[0].moveChildren && l[0].moveChildren(a),
24155                l[0].append(a),
24156                (l[0] = a));
24157              g = g.contents[0].getParent();
24158              for (n = 0; n < l.length; n++) g = g.getCommonAncestor(l[n].getParent());
24159              t = p.config.useComputedState;
24160              p = a = void 0;
24161              t = void 0 === t || t;
24162              for (n = 0; n < l.length; n++)
24163                for (r = l[n]; (y = r.getParent()); ) {
24164                  if (y.equals(g)) {
24165                    h.push(r);
24166                    !p && r.getDirection() && (p = 1);
24167                    r = r.getDirection(t);
24168                    null !== a && (a = a && a != r ? null : r);
24169                    break;
24170                  }
24171                  r = y;
24172                }
24173              if (!(1 > h.length)) {
24174                l = h[h.length - 1].getNext();
24175                n = c.createElement(this.type);
24176                d.push(n);
24177                for (t = d = void 0; h.length; )
24178                  (d = h.shift()),
24179                    (t = c.createElement("li")),
24180                    (r = d),
24181                    r.is("pre") ||
24182                    L.test(r.getName()) ||
24183                    "false" == r.getAttribute("contenteditable")
24184                      ? d.appendTo(t)
24185                      : (d.copyAttributes(t),
24186                        a &&
24187                          d.getDirection() &&
24188                          (t.removeStyle("direction"), t.removeAttribute("dir")),
24189                        d.moveChildren(t),
24190                        d.remove()),
24191                    t.appendTo(n);
24192                a && p && n.setAttribute("dir", a);
24193                l ? n.insertBefore(l) : n.appendTo(g);
24194              }
24195            }
24196          else this.state == CKEDITOR.TRISTATE_ON && v[a.root.getName()] && I.call(this, b, a, k);
24197        for (n = 0; n < q.length; n++) F(q[n]);
24198        CKEDITOR.dom.element.clearAllMarkers(k);
24199        e.selectBookmarks(m);
24200        b.focus();
24201      },
24202      refresh: function(b, m) {
24203        var e = m.contains(v, 1),
24204          c = m.blockLimit || m.root;
24205        e && c.contains(e)
24206          ? this.setState(e.is(this.type) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF)
24207          : this.setState(CKEDITOR.TRISTATE_OFF);
24208      },
24209    };
24210    CKEDITOR.plugins.add("list", {
24211      requires: "indentlist",
24212      init: function(b) {
24213        b.blockless ||
24214          (b.addCommand("numberedlist", new B("numberedlist", "ol")),
24215          b.addCommand("bulletedlist", new B("bulletedlist", "ul")),
24216          b.ui.addButton &&
24217            (b.ui.addButton("NumberedList", {
24218              label: b.lang.list.numberedlist,
24219              command: "numberedlist",
24220              directional: !0,
24221              toolbar: "list,10",
24222            }),
24223            b.ui.addButton("BulletedList", {
24224              label: b.lang.list.bulletedlist,
24225              command: "bulletedlist",
24226              directional: !0,
24227              toolbar: "list,20",
24228            })),
24229          b.on("key", function(m) {
24230            var e = m.data.domEvent.getKey(),
24231              c;
24232            if ("wysiwyg" == b.mode && e in { 8: 1, 46: 1 }) {
24233              var f = b.getSelection().getRanges()[0],
24234                g = f && f.startPath();
24235              if (f && f.collapsed) {
24236                var k = 8 == e,
24237                  h = b.editable(),
24238                  d = new CKEDITOR.dom.walker(f.clone());
24239                d.evaluator = function(a) {
24240                  return u(a) && !z(a);
24241                };
24242                d.guard = function(a, b) {
24243                  return !(b && a.type == CKEDITOR.NODE_ELEMENT && a.is("table"));
24244                };
24245                e = f.clone();
24246                if (k) {
24247                  var a;
24248                  (a = g.contains(v)) &&
24249                  f.checkBoundaryOfElement(a, CKEDITOR.START) &&
24250                  (a = a.getParent()) &&
24251                  a.is("li") &&
24252                  (a = A(a))
24253                    ? ((c = a),
24254                      (a = a.getPrevious(u)),
24255                      e.moveToPosition(a && z(a) ? a : c, CKEDITOR.POSITION_BEFORE_START))
24256                    : (d.range.setStartAt(h, CKEDITOR.POSITION_AFTER_START),
24257                      d.range.setEnd(f.startContainer, f.startOffset),
24258                      (a = d.previous()) &&
24259                        a.type == CKEDITOR.NODE_ELEMENT &&
24260                        (a.getName() in v || a.is("li")) &&
24261                        (a.is("li") ||
24262                          (d.range.selectNodeContents(a),
24263                          d.reset(),
24264                          (d.evaluator = G),
24265                          (a = d.previous())),
24266                        (c = a),
24267                        e.moveToElementEditEnd(c),
24268                        e.moveToPosition(e.endPath().block, CKEDITOR.POSITION_BEFORE_END)));
24269                  if (c) C(b, e, f), m.cancel();
24270                  else {
24271                    var p = g.contains(v);
24272                    p &&
24273                      f.checkBoundaryOfElement(p, CKEDITOR.START) &&
24274                      ((c = p.getFirst(u)),
24275                      f.checkBoundaryOfElement(c, CKEDITOR.START) &&
24276                        ((a = p.getPrevious(u)),
24277                        A(c)
24278                          ? a && (f.moveToElementEditEnd(a), f.select())
24279                          : b.execCommand("outdent"),
24280                        m.cancel()));
24281                  }
24282                } else if ((c = g.contains("li"))) {
24283                  if (
24284                    (d.range.setEndAt(h, CKEDITOR.POSITION_BEFORE_END),
24285                    (k = (h = c.getLast(u)) && G(h) ? h : c),
24286                    (g = 0),
24287                    (a = d.next()) &&
24288                    a.type == CKEDITOR.NODE_ELEMENT &&
24289                    a.getName() in v &&
24290                    a.equals(h)
24291                      ? ((g = 1), (a = d.next()))
24292                      : f.checkBoundaryOfElement(k, CKEDITOR.END) && (g = 2),
24293                    g && a)
24294                  ) {
24295                    f = f.clone();
24296                    f.moveToElementEditStart(a);
24297                    if (1 == g && (e.optimize(), !e.startContainer.equals(c))) {
24298                      for (c = e.startContainer; c.is(CKEDITOR.dtd.$inline); )
24299                        (p = c), (c = c.getParent());
24300                      p && e.moveToPosition(p, CKEDITOR.POSITION_AFTER_END);
24301                    }
24302                    2 == g &&
24303                      (e.moveToPosition(e.endPath().block, CKEDITOR.POSITION_BEFORE_END),
24304                      f.endPath().block &&
24305                        f.moveToPosition(f.endPath().block, CKEDITOR.POSITION_AFTER_START));
24306                    C(b, e, f);
24307                    m.cancel();
24308                  }
24309                } else
24310                  d.range.setEndAt(h, CKEDITOR.POSITION_BEFORE_END),
24311                    (a = d.next()) &&
24312                      a.type == CKEDITOR.NODE_ELEMENT &&
24313                      a.is(v) &&
24314                      ((a = a.getFirst(u)),
24315                      g.block && f.checkStartOfBlock() && f.checkEndOfBlock()
24316                        ? (g.block.remove(), f.moveToElementEditStart(a), f.select())
24317                        : A(a)
24318                          ? (f.moveToElementEditStart(a), f.select())
24319                          : ((f = f.clone()), f.moveToElementEditStart(a), C(b, e, f)),
24320                      m.cancel());
24321                setTimeout(function() {
24322                  b.selectionChange(1);
24323                });
24324              }
24325            }
24326          }));
24327      },
24328    });
24329  })();
24330  (function() {
24331    CKEDITOR.plugins.liststyle = {
24332      requires: "dialog,contextmenu",
24333      init: function(a) {
24334        if (!a.blockless) {
24335          var b;
24336          b = new CKEDITOR.dialogCommand("numberedListStyle", {
24337            requiredContent: "ol",
24338            allowedContent: "ol{list-style-type}[start]; li{list-style-type}[value]",
24339            contentTransformations: [["ol: listTypeToStyle"]],
24340          });
24341          b = a.addCommand("numberedListStyle", b);
24342          a.addFeature(b);
24343          CKEDITOR.dialog.add("numberedListStyle", this.path + "dialogs/liststyle.js");
24344          b = new CKEDITOR.dialogCommand("bulletedListStyle", {
24345            requiredContent: "ul",
24346            allowedContent: "ul{list-style-type}",
24347            contentTransformations: [["ul: listTypeToStyle"]],
24348          });
24349          b = a.addCommand("bulletedListStyle", b);
24350          a.addFeature(b);
24351          CKEDITOR.dialog.add("bulletedListStyle", this.path + "dialogs/liststyle.js");
24352          a.addMenuGroup("list", 108);
24353          a.addMenuItems({
24354            numberedlist: {
24355              label: a.lang.liststyle.numberedTitle,
24356              group: "list",
24357              command: "numberedListStyle",
24358            },
24359            bulletedlist: {
24360              label: a.lang.liststyle.bulletedTitle,
24361              group: "list",
24362              command: "bulletedListStyle",
24363            },
24364          });
24365          a.contextMenu.addListener(function(a) {
24366            if (!a || a.isReadOnly()) return null;
24367            for (; a; ) {
24368              var b = a.getName();
24369              if ("ol" == b) return { numberedlist: CKEDITOR.TRISTATE_OFF };
24370              if ("ul" == b) return { bulletedlist: CKEDITOR.TRISTATE_OFF };
24371              a = a.getParent();
24372            }
24373            return null;
24374          });
24375        }
24376      },
24377    };
24378    CKEDITOR.plugins.add("liststyle", CKEDITOR.plugins.liststyle);
24379  })();
24380  (function() {
24381    function V(a, c, d) {
24382      return (
24383        n(c) &&
24384        n(d) &&
24385        d.equals(
24386          c.getNext(function(a) {
24387            return !(E(a) || F(a) || u(a));
24388          }),
24389        )
24390      );
24391    }
24392    function z(a) {
24393      this.upper = a[0];
24394      this.lower = a[1];
24395      this.set.apply(this, a.slice(2));
24396    }
24397    function O(a) {
24398      var c = a.element;
24399      if (c && n(c) && (c = c.getAscendant(a.triggers, !0)) && a.editable.contains(c)) {
24400        var d = P(c);
24401        if ("true" == d.getAttribute("contenteditable")) return c;
24402        if (d.is(a.triggers)) return d;
24403      }
24404      return null;
24405    }
24406    function ka(a, c, d) {
24407      r(a, c);
24408      r(a, d);
24409      a = c.size.bottom;
24410      d = d.size.top;
24411      return a && d ? 0 | ((a + d) / 2) : a || d;
24412    }
24413    function w(a, c, d) {
24414      return (c = c[d ? "getPrevious" : "getNext"](function(b) {
24415        return (b && b.type == CKEDITOR.NODE_TEXT && !E(b)) || (n(b) && !u(b) && !A(a, b));
24416      }));
24417    }
24418    function q(a, c, d) {
24419      return a > c && a < d;
24420    }
24421    function P(a, c) {
24422      if (a.data("cke-editable")) return null;
24423      for (c || (a = a.getParent()); a && !a.data("cke-editable"); ) {
24424        if (a.hasAttribute("contenteditable")) return a;
24425        a = a.getParent();
24426      }
24427      return null;
24428    }
24429    function la(a) {
24430      var c = a.doc,
24431        d = G(
24432          '\x3cspan contenteditable\x3d"false" data-cke-magic-line\x3d"1" style\x3d"' +
24433            Q +
24434            "position:absolute;border-top:1px dashed " +
24435            a.boxColor +
24436            '"\x3e\x3c/span\x3e',
24437          c,
24438        ),
24439        b = CKEDITOR.getUrl(
24440          this.path +
24441            "images/" +
24442            (t.hidpi ? "hidpi/" : "") +
24443            "icon" +
24444            (a.rtl ? "-rtl" : "") +
24445            ".png",
24446        );
24447      v(d, {
24448        attach: function() {
24449          this.wrap.getParent() || this.wrap.appendTo(a.editable, !0);
24450          return this;
24451        },
24452        lineChildren: [
24453          v(
24454            G(
24455              '\x3cspan title\x3d"' +
24456                a.editor.lang.magicline.title +
24457                '" contenteditable\x3d"false"\x3e\x26#8629;\x3c/span\x3e',
24458              c,
24459            ),
24460            {
24461              base:
24462                Q +
24463                "height:17px;width:17px;" +
24464                (a.rtl ? "left" : "right") +
24465                ":17px;background:url(" +
24466                b +
24467                ") center no-repeat " +
24468                a.boxColor +
24469                ";cursor:pointer;" +
24470                (t.hc
24471                  ? "font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;"
24472                  : "") +
24473                (t.hidpi ? "background-size: 9px 10px;" : ""),
24474              looks: [
24475                "top:-8px; border-radius: 2px;",
24476                "top:-17px; border-radius: 2px 2px 0px 0px;",
24477                "top:-1px; border-radius: 0px 0px 2px 2px;",
24478              ],
24479            },
24480          ),
24481          v(G(W, c), {
24482            base: X + "left:0px;border-left-color:" + a.boxColor + ";",
24483            looks: [
24484              "border-width:8px 0 8px 8px;top:-8px",
24485              "border-width:8px 0 0 8px;top:-8px",
24486              "border-width:0 0 8px 8px;top:0px",
24487            ],
24488          }),
24489          v(G(W, c), {
24490            base: X + "right:0px;border-right-color:" + a.boxColor + ";",
24491            looks: [
24492              "border-width:8px 8px 8px 0;top:-8px",
24493              "border-width:8px 8px 0 0;top:-8px",
24494              "border-width:0 8px 8px 0;top:0px",
24495            ],
24496          }),
24497        ],
24498        detach: function() {
24499          this.wrap.getParent() && this.wrap.remove();
24500          return this;
24501        },
24502        mouseNear: function() {
24503          r(a, this);
24504          var b = a.holdDistance,
24505            c = this.size;
24506          return c && q(a.mouse.y, c.top - b, c.bottom + b) && q(a.mouse.x, c.left - b, c.right + b)
24507            ? !0
24508            : !1;
24509        },
24510        place: function() {
24511          var b = a.view,
24512            c = a.editable,
24513            d = a.trigger,
24514            h = d.upper,
24515            g = d.lower,
24516            l = h || g,
24517            p = l.getParent(),
24518            m = {};
24519          this.trigger = d;
24520          h && r(a, h, !0);
24521          g && r(a, g, !0);
24522          r(a, p, !0);
24523          a.inInlineMode && H(a, !0);
24524          p.equals(c)
24525            ? ((m.left = b.scroll.x), (m.right = -b.scroll.x), (m.width = ""))
24526            : ((m.left =
24527                l.size.left -
24528                l.size.margin.left +
24529                b.scroll.x -
24530                (a.inInlineMode ? b.editable.left + b.editable.border.left : 0)),
24531              (m.width = l.size.outerWidth + l.size.margin.left + l.size.margin.right + b.scroll.x),
24532              (m.right = ""));
24533          h && g
24534            ? (m.top =
24535                h.size.margin.bottom === g.size.margin.top
24536                  ? 0 | (h.size.bottom + h.size.margin.bottom / 2)
24537                  : h.size.margin.bottom < g.size.margin.top
24538                    ? h.size.bottom + h.size.margin.bottom
24539                    : h.size.bottom + h.size.margin.bottom - g.size.margin.top)
24540            : h
24541              ? g || (m.top = h.size.bottom + h.size.margin.bottom)
24542              : (m.top = g.size.top - g.size.margin.top);
24543          d.is(C) || q(m.top, b.scroll.y - 15, b.scroll.y + 5)
24544            ? ((m.top = a.inInlineMode ? 0 : b.scroll.y), this.look(C))
24545            : d.is(D) || q(m.top, b.pane.bottom - 5, b.pane.bottom + 15)
24546              ? ((m.top = a.inInlineMode
24547                  ? b.editable.height + b.editable.padding.top + b.editable.padding.bottom
24548                  : b.pane.bottom - 1),
24549                this.look(D))
24550              : (a.inInlineMode && (m.top -= b.editable.top + b.editable.border.top), this.look(x));
24551          a.inInlineMode &&
24552            (m.top--, (m.top += b.editable.scroll.top), (m.left += b.editable.scroll.left));
24553          for (var n in m) m[n] = CKEDITOR.tools.cssLength(m[n]);
24554          this.setStyles(m);
24555        },
24556        look: function(a) {
24557          if (this.oldLook != a) {
24558            for (var b = this.lineChildren.length, c; b--; )
24559              (c = this.lineChildren[b]).setAttribute("style", c.base + c.looks[0 | (a / 2)]);
24560            this.oldLook = a;
24561          }
24562        },
24563        wrap: new R("span", a.doc),
24564      });
24565      for (c = d.lineChildren.length; c--; ) d.lineChildren[c].appendTo(d);
24566      d.look(x);
24567      d.appendTo(d.wrap);
24568      d.unselectable();
24569      d.lineChildren[0].on("mouseup", function(b) {
24570        d.detach();
24571        S(
24572          a,
24573          function(b) {
24574            var c = a.line.trigger;
24575            b[c.is(I) ? "insertBefore" : "insertAfter"](c.is(I) ? c.lower : c.upper);
24576          },
24577          !0,
24578        );
24579        a.editor.focus();
24580        t.ie || a.enterMode == CKEDITOR.ENTER_BR || a.hotNode.scrollIntoView();
24581        b.data.preventDefault(!0);
24582      });
24583      d.on("mousedown", function(a) {
24584        a.data.preventDefault(!0);
24585      });
24586      a.line = d;
24587    }
24588    function S(a, c, d) {
24589      var b = new CKEDITOR.dom.range(a.doc),
24590        e = a.editor,
24591        f;
24592      t.ie && a.enterMode == CKEDITOR.ENTER_BR
24593        ? (f = a.doc.createText(J))
24594        : ((f = ((f = P(a.element, !0)) && f.data("cke-enter-mode")) || a.enterMode),
24595          (f = new R(K[f], a.doc)),
24596          f.is("br") || a.doc.createText(J).appendTo(f));
24597      d && e.fire("saveSnapshot");
24598      c(f);
24599      b.moveToPosition(f, CKEDITOR.POSITION_AFTER_START);
24600      e.getSelection().selectRanges([b]);
24601      a.hotNode = f;
24602      d && e.fire("saveSnapshot");
24603    }
24604    function Y(a, c) {
24605      return {
24606        canUndo: !0,
24607        modes: { wysiwyg: 1 },
24608        exec: (function() {
24609          function d(b) {
24610            var d = t.ie && 9 > t.version ? " " : J,
24611              f =
24612                a.hotNode &&
24613                a.hotNode.getText() == d &&
24614                a.element.equals(a.hotNode) &&
24615                a.lastCmdDirection === !!c;
24616            S(a, function(d) {
24617              f && a.hotNode && a.hotNode.remove();
24618              d[c ? "insertAfter" : "insertBefore"](b);
24619              d.setAttributes({ "data-cke-magicline-hot": 1, "data-cke-magicline-dir": !!c });
24620              a.lastCmdDirection = !!c;
24621     
24621       });
24622            t.ie || a.enterMode == CKEDITOR.ENTER_BR || a.hotNode.scrollIntoView();
24623            a.line.detach();
24624          }
24625          return function(b) {
24626            b = b.getSelection().getStartElement();
24627            var e;
24628            b = b.getAscendant(Z, 1);
24629            if (!aa(a, b) && b && !b.equals(a.editable) && !b.contains(a.editable)) {
24630              (e = P(b)) && "false" == e.getAttribute("contenteditable") && (b = e);
24631              a.element = b;
24632              e = w(a, b, !c);
24633              var f;
24634              n(e) &&
24635              e.is(a.triggers) &&
24636              e.is(ma) &&
24637              (!w(a, e, !c) || ((f = w(a, e, !c)) && n(f) && f.is(a.triggers)))
24638                ? d(e)
24639                : ((f = O(a, b)),
24640                  n(f) &&
24641                    (w(a, f, !c) ? (b = w(a, f, !c)) && n(b) && b.is(a.triggers) && d(f) : d(f)));
24642            }
24643          };
24644        })(),
24645      };
24646    }
24647    function A(a, c) {
24648      if (!c || c.type != CKEDITOR.NODE_ELEMENT || !c.$) return !1;
24649      var d = a.line;
24650      return d.wrap.equals(c) || d.wrap.contains(c);
24651    }
24652    function n(a) {
24653      return a && a.type == CKEDITOR.NODE_ELEMENT && a.$;
24654    }
24655    function u(a) {
24656      if (!n(a)) return !1;
24657      var c;
24658      (c = ba(a)) ||
24659        (n(a)
24660          ? ((c = { left: 1, right: 1, center: 1 }),
24661            (c = !(!c[a.getComputedStyle("float")] && !c[a.getAttribute("align")])))
24662          : (c = !1));
24663      return c;
24664    }
24665    function ba(a) {
24666      return !!{ absolute: 1, fixed: 1 }[a.getComputedStyle("position")];
24667    }
24668    function L(a, c) {
24669      return n(c) ? c.is(a.triggers) : null;
24670    }
24671    function aa(a, c) {
24672      if (!c) return !1;
24673      for (var d = c.getParents(1), b = d.length; b--; )
24674        for (var e = a.tabuList.length; e--; ) if (d[b].hasAttribute(a.tabuList[e])) return !0;
24675      return !1;
24676    }
24677    function na(a, c, d) {
24678      c = c[d ? "getLast" : "getFirst"](function(b) {
24679        return a.isRelevant(b) && !b.is(oa);
24680      });
24681      if (!c) return !1;
24682      r(a, c);
24683      return d ? c.size.top > a.mouse.y : c.size.bottom < a.mouse.y;
24684    }
24685    function ca(a) {
24686      var c = a.editable,
24687        d = a.mouse,
24688        b = a.view,
24689        e = a.triggerOffset;
24690      H(a);
24691      var f =
24692          d.y >
24693          (a.inInlineMode
24694            ? b.editable.top + b.editable.height / 2
24695            : Math.min(b.editable.height, b.pane.height) / 2),
24696        c = c[f ? "getLast" : "getFirst"](function(a) {
24697          return !(E(a) || F(a));
24698        });
24699      if (!c) return null;
24700      A(a, c) &&
24701        (c = a.line.wrap[f ? "getPrevious" : "getNext"](function(a) {
24702          return !(E(a) || F(a));
24703        }));
24704      if (!n(c) || u(c) || !L(a, c)) return null;
24705      r(a, c);
24706      return !f && 0 <= c.size.top && q(d.y, 0, c.size.top + e)
24707        ? ((a = a.inInlineMode || 0 === b.scroll.y ? C : x), new z([null, c, I, M, a]))
24708        : f && c.size.bottom <= b.pane.height && q(d.y, c.size.bottom - e, b.pane.height)
24709          ? ((a = a.inInlineMode || q(c.size.bottom, b.pane.height - e, b.pane.height) ? D : x),
24710            new z([c, null, da, M, a]))
24711          : null;
24712    }
24713    function ea(a) {
24714      var c = a.mouse,
24715        d = a.view,
24716        b = a.triggerOffset,
24717        e = O(a);
24718      if (!e) return null;
24719      r(a, e);
24720      var b = Math.min(b, 0 | (e.size.outerHeight / 2)),
24721        f = [],
24722        k,
24723        h;
24724      if (q(c.y, e.size.top - 1, e.size.top + b)) h = !1;
24725      else if (q(c.y, e.size.bottom - b, e.size.bottom + 1)) h = !0;
24726      else return null;
24727      if (u(e) || na(a, e, h) || e.getParent().is(fa)) return null;
24728      var g = w(a, e, !h);
24729      if (g) {
24730        if (g && g.type == CKEDITOR.NODE_TEXT) return null;
24731        if (n(g)) {
24732          if (u(g) || !L(a, g) || g.getParent().is(fa)) return null;
24733          f = [g, e][h ? "reverse" : "concat"]().concat([T, M]);
24734        }
24735      } else
24736        e.equals(a.editable[h ? "getLast" : "getFirst"](a.isRelevant))
24737          ? (H(a),
24738            h &&
24739            q(c.y, e.size.bottom - b, d.pane.height) &&
24740            q(e.size.bottom, d.pane.height - b, d.pane.height)
24741              ? (k = D)
24742              : q(c.y, 0, e.size.top + b) && (k = C))
24743          : (k = x),
24744          (f = [null, e]
24745            [h ? "reverse" : "concat"]()
24746            .concat([
24747              h ? da : I,
24748              M,
24749              k,
24750              e.equals(a.editable[h ? "getLast" : "getFirst"](a.isRelevant)) ? (h ? D : C) : x,
24751            ]));
24752      return 0 in f ? new z(f) : null;
24753    }
24754    function U(a, c, d, b) {
24755      for (var e = c.getDocumentPosition(), f = {}, k = {}, h = {}, g = {}, l = y.length; l--; )
24756        (f[y[l]] = parseInt(c.getComputedStyle.call(c, "border-" + y[l] + "-width"), 10) || 0),
24757          (h[y[l]] = parseInt(c.getComputedStyle.call(c, "padding-" + y[l]), 10) || 0),
24758          (k[y[l]] = parseInt(c.getComputedStyle.call(c, "margin-" + y[l]), 10) || 0);
24759      (d && !b) || N(a, b);
24760      g.top = e.y - (d ? 0 : a.view.scroll.y);
24761      g.left = e.x - (d ? 0 : a.view.scroll.x);
24762      g.outerWidth = c.$.offsetWidth;
24763      g.outerHeight = c.$.offsetHeight;
24764      g.height = g.outerHeight - (h.top + h.bottom + f.top + f.bottom);
24765      g.width = g.outerWidth - (h.left + h.right + f.left + f.right);
24766      g.bottom = g.top + g.outerHeight;
24767      g.right = g.left + g.outerWidth;
24768      a.inInlineMode && (g.scroll = { top: c.$.scrollTop, left: c.$.scrollLeft });
24769      return v({ border: f, padding: h, margin: k, ignoreScroll: d }, g, !0);
24770    }
24771    function r(a, c, d) {
24772      if (!n(c)) return (c.size = null);
24773      if (!c.size) c.size = {};
24774      else if (c.size.ignoreScroll == d && c.size.date > new Date() - ga) return null;
24775      return v(c.size, U(a, c, d), { date: +new Date() }, !0);
24776    }
24777    function H(a, c) {
24778      a.view.editable = U(a, a.editable, c, !0);
24779    }
24780    function N(a, c) {
24781      a.view || (a.view = {});
24782      var d = a.view;
24783      if (!(!c && d && d.date > new Date() - ga)) {
24784        var b = a.win,
24785          d = b.getScrollPosition(),
24786          b = b.getViewPaneSize();
24787        v(
24788          a.view,
24789          {
24790            scroll: {
24791              x: d.x,
24792              y: d.y,
24793              width: a.doc.$.documentElement.scrollWidth - b.width,
24794              height: a.doc.$.documentElement.scrollHeight - b.height,
24795            },
24796            pane: { width: b.width, height: b.height, bottom: b.height + d.y },
24797            date: +new Date(),
24798          },
24799          !0,
24800        );
24801      }
24802    }
24803    function pa(a, c, d, b) {
24804      for (
24805        var e = b, f = b, k = 0, h = !1, g = !1, l = a.view.pane.height, p = a.mouse;
24806        p.y + k < l && 0 < p.y - k;
24807
24808      ) {
24809        h || (h = c(e, b));
24810        g || (g = c(f, b));
24811        !h && 0 < p.y - k && (e = d(a, { x: p.x, y: p.y - k }));
24812        !g && p.y + k < l && (f = d(a, { x: p.x, y: p.y + k }));
24813        if (h && g) break;
24814        k += 2;
24815      }
24816      return new z([e, f, null, null]);
24817    }
24818    CKEDITOR.plugins.add("magicline", {
24819      init: function(a) {
24820        var c = a.config,
24821          d = c.magicline_triggerOffset || 30,
24822          b = {
24823            editor: a,
24824            enterMode: c.enterMode,
24825            triggerOffset: d,
24826            holdDistance: 0 | (d * (c.magicline_holdDistance || 0.5)),
24827            boxColor: c.magicline_color || "#ff0000",
24828            rtl: "rtl" == c.contentsLangDirection,
24829            tabuList: ["data-cke-hidden-sel"].concat(c.magicline_tabuList || []),
24830            triggers: c.magicline_everywhere
24831              ? Z
24832              : { table: 1, hr: 1, div: 1, ul: 1, ol: 1, dl: 1, form: 1, blockquote: 1 },
24833          },
24834          e,
24835          f,
24836          k;
24837        b.isRelevant = function(a) {
24838          return n(a) && !A(b, a) && !u(a);
24839        };
24840        a.on(
24841          "contentDom",
24842          function() {
24843            var d = a.editable(),
24844              g = a.document,
24845              l = a.window;
24846            v(b, { editable: d, inInlineMode: d.isInline(), doc: g, win: l, hotNode: null }, !0);
24847            b.boundary = b.inInlineMode ? b.editable : b.doc.getDocumentElement();
24848            d.is(B.$inline) ||
24849              (b.inInlineMode &&
24850                !ba(d) &&
24851                d.setStyles({ position: "relative", top: null, left: null }),
24852              la.call(this, b),
24853              N(b),
24854              d.attachListener(a, "beforeUndoImage", function() {
24855                b.line.detach();
24856              }),
24857              d.attachListener(
24858                a,
24859                "beforeGetData",
24860                function() {
24861                  b.line.wrap.getParent() &&
24862                    (b.line.detach(),
24863                    a.once(
24864                      "getData",
24865                      function() {
24866                        b.line.attach();
24867                      },
24868                      null,
24869                      null,
24870                      1e3,
24871                    ));
24872                },
24873                null,
24874                null,
24875                0,
24876              ),
24877              d.attachListener(b.inInlineMode ? g : g.getWindow().getFrame(), "mouseout", function(
24878                c,
24879              ) {
24880                if ("wysiwyg" == a.mode)
24881                  if (b.inInlineMode) {
24882                    var d = c.data.$.clientX;
24883                    c = c.data.$.clientY;
24884                    N(b);
24885                    H(b, !0);
24886                    var e = b.view.editable,
24887                      f = b.view.scroll;
24888                    (d > e.left - f.x &&
24889                      d < e.right - f.x &&
24890                      c > e.top - f.y &&
24891                      c < e.bottom - f.y) ||
24892                      (clearTimeout(k), (k = null), b.line.detach());
24893                  } else clearTimeout(k), (k = null), b.line.detach();
24894              }),
24895              d.attachListener(d, "keyup", function() {
24896                b.hiddenMode = 0;
24897              }),
24898              d.attachListener(d, "keydown", function(c) {
24899                if ("wysiwyg" == a.mode)
24900                  switch (c.data.getKeystroke()) {
24901                    case 2228240:
24902                    case 16:
24903                      (b.hiddenMode = 1), b.line.detach();
24904                  }
24905              }),
24906              d.attachListener(b.inInlineMode ? d : g, "mousemove", function(c) {
24907                f = !0;
24908                if ("wysiwyg" == a.mode && !a.readOnly && !k) {
24909                  var d = { x: c.data.$.clientX, y: c.data.$.clientY };
24910                  k = setTimeout(function() {
24911                    b.mouse = d;
24912                    k = b.trigger = null;
24913                    N(b);
24914                    f &&
24915                      !b.hiddenMode &&
24916                      a.focusManager.hasFocus &&
24917                      !b.line.mouseNear() &&
24918                      (b.element = ha(b, !0)) &&
24919                      ((b.trigger = ca(b) || ea(b) || ia(b)) &&
24920                      !aa(b, b.trigger.upper || b.trigger.lower)
24921                        ? b.line.attach().place()
24922                        : ((b.trigger = null), b.line.detach()),
24923                      (f = !1));
24924                  }, 30);
24925                }
24926              }),
24927              d.attachListener(l, "scroll", function() {
24928                "wysiwyg" == a.mode &&
24929                  (b.line.detach(),
24930                  t.webkit &&
24931                    ((b.hiddenMode = 1),
24932                    clearTimeout(e),
24933                    (e = setTimeout(function() {
24934                      b.mouseDown || (b.hiddenMode = 0);
24935                    }, 50))));
24936              }),
24937              d.attachListener(ja ? g : l, "mousedown", function() {
24938                "wysiwyg" == a.mode && (b.line.detach(), (b.hiddenMode = 1), (b.mouseDown = 1));
24939              }),
24940              d.attachListener(ja ? g : l, "mouseup", function() {
24941                b.hiddenMode = 0;
24942                b.mouseDown = 0;
24943              }),
24944              a.addCommand("accessPreviousSpace", Y(b)),
24945              a.addCommand("accessNextSpace", Y(b, !0)),
24946              a.setKeystroke([
24947                [c.magicline_keystrokePrevious, "accessPreviousSpace"],
24948                [c.magicline_keystrokeNext, "accessNextSpace"],
24949              ]),
24950              a.on("loadSnapshot", function() {
24951                var c, d, e, f;
24952                for (f in { p: 1, br: 1, div: 1 })
24953                  for (c = a.document.getElementsByTag(f), e = c.count(); e--; )
24954                    if ((d = c.getItem(e)).data("cke-magicline-hot")) {
24955                      b.hotNode = d;
24956                      b.lastCmdDirection = "true" === d.data("cke-magicline-dir") ? !0 : !1;
24957                      return;
24958                    }
24959              }),
24960              (this.backdoor = {
24961                accessFocusSpace: S,
24962                boxTrigger: z,
24963                isLine: A,
24964                getAscendantTrigger: O,
24965                getNonEmptyNeighbour: w,
24966                getSize: U,
24967                that: b,
24968                triggerEdge: ea,
24969                triggerEditable: ca,
24970                triggerExpand: ia,
24971              }));
24972          },
24973          this,
24974        );
24975      },
24976    });
24977    var v = CKEDITOR.tools.extend,
24978      R = CKEDITOR.dom.element,
24979      G = R.createFromHtml,
24980      t = CKEDITOR.env,
24981      ja = CKEDITOR.env.ie && 9 > CKEDITOR.env.version,
24982      B = CKEDITOR.dtd,
24983      K = {},
24984      I = 128,
24985      da = 64,
24986      T = 32,
24987      M = 16,
24988      C = 4,
24989      D = 2,
24990      x = 1,
24991      J = " ",
24992      fa = B.$listItem,
24993      oa = B.$tableContent,
24994      ma = v({}, B.$nonEditable, B.$empty),
24995      Z = B.$block,
24996      ga = 100,
24997      Q =
24998        "width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",
24999      X = Q + "border-color:transparent;display:block;border-style:solid;",
25000      W = "\x3cspan\x3e" + J + "\x3c/span\x3e";
25001    K[CKEDITOR.ENTER_BR] = "br";
25002    K[CKEDITOR.ENTER_P] = "p";
25003    K[CKEDITOR.ENTER_DIV] = "div";
25004    z.prototype = {
25005      set: function(a, c, d) {
25006        this.properties = a + c + (d || x);
25007        return this;
25008      },
25009      is: function(a) {
25010        return (this.properties & a) == a;
25011      },
25012    };
25013    var ha = (function() {
25014        function a(a, d) {
25015          var b = a.$.elementFromPoint(d.x, d.y);
25016          return b && b.nodeType ? new CKEDITOR.dom.element(b) : null;
25017        }
25018        return function(c, d, b) {
25019          if (!c.mouse) return null;
25020          var e = c.doc,
25021            f = c.line.wrap;
25022          b = b || c.mouse;
25023          var k = a(e, b);
25024          d && A(c, k) && (f.hide(), (k = a(e, b)), f.show());
25025          return !k ||
25026            k.type != CKEDITOR.NODE_ELEMENT ||
25027            !k.$ ||
25028            (t.ie && 9 > t.version && !c.boundary.equals(k) && !c.boundary.contains(k))
25029            ? null
25030            : k;
25031        };
25032      })(),
25033      E = CKEDITOR.dom.walker.whitespaces(),
25034      F = CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),
25035      ia = (function() {
25036        function a(a) {
25037          var b = a.element,
25038            e,
25039            f,
25040            k;
25041          if (!n(b) || b.contains(a.editable) || b.isReadOnly()) return null;
25042          k = pa(
25043            a,
25044            function(a, b) {
25045              return !b.equals(a);
25046            },
25047            function(a, b) {
25048              return ha(a, !0, b);
25049            },
25050            b,
25051          );
25052          e = k.upper;
25053          f = k.lower;
25054          if (V(a, e, f)) return k.set(T, 8);
25055          if (e && b.contains(e)) for (; !e.getParent().equals(b); ) e = e.getParent();
25056          else
25057            e = b.getFirst(function(b) {
25058              return c(a, b);
25059            });
25060          if (f && b.contains(f)) for (; !f.getParent().equals(b); ) f = f.getParent();
25061          else
25062            f = b.getLast(function(b) {
25063              return c(a, b);
25064            });
25065          if (!e || !f) return null;
25066          r(a, e);
25067          r(a, f);
25068          if (!q(a.mouse.y, e.size.top, f.size.bottom)) return null;
25069          for (
25070            var b = Number.MAX_VALUE, h, g, l, p;
25071            f && !f.equals(e) && (g = e.getNext(a.isRelevant));
25072
25073          )
25074            (h = Math.abs(ka(a, e, g) - a.mouse.y)),
25075              h < b && ((b = h), (l = e), (p = g)),
25076              (e = g),
25077              r(a, e);
25078          if (!l || !p || !q(a.mouse.y, l.size.top, p.size.bottom)) return null;
25079          k.upper = l;
25080          k.lower = p;
25081          return k.set(T, 8);
25082        }
25083        function c(a, b) {
25084          return !(
25085            (b && b.type == CKEDITOR.NODE_TEXT) ||
25086            F(b) ||
25087            u(b) ||
25088            A(a, b) ||
25089            (b.type == CKEDITOR.NODE_ELEMENT && b.$ && b.is("br"))
25090          );
25091        }
25092        return function(c) {
25093          var b = a(c),
25094            e;
25095          if ((e = b)) {
25096            e = b.upper;
25097            var f = b.lower;
25098            e =
25099              !e ||
25100              !f ||
25101              u(f) ||
25102              u(e) ||
25103              f.equals(e) ||
25104              e.equals(f) ||
25105              f.contains(e) ||
25106              e.contains(f)
25107                ? !1
25108                : L(c, e) && L(c, f) && V(c, e, f) ? !0 : !1;
25109          }
25110          return e ? b : null;
25111        };
25112      })(),
25113      y = ["top", "left", "right", "bottom"];
25114  })();
25115  CKEDITOR.config.magicline_keystrokePrevious = CKEDITOR.CTRL + CKEDITOR.SH
25115IFT + 51;
25116  CKEDITOR.config.magicline_keystrokeNext = CKEDITOR.CTRL + CKEDITOR.SHIFT + 52;
25117  (function() {
25118    function n(a) {
25119      if (!a || a.type != CKEDITOR.NODE_ELEMENT || "form" != a.getName()) return [];
25120      for (var e = [], f = ["style", "className"], b = 0; b < f.length; b++) {
25121        var c = a.$.elements.namedItem(f[b]);
25122        c && ((c = new CKEDITOR.dom.element(c)), e.push([c, c.nextSibling]), c.remove());
25123      }
25124      return e;
25125    }
25126    function t(a, e) {
25127      if (a && a.type == CKEDITOR.NODE_ELEMENT && "form" == a.getName() && 0 < e.length)
25128        for (var f = e.length - 1; 0 <= f; f--) {
25129          var b = e[f][0],
25130            c = e[f][1];
25131          c ? b.insertBefore(c) : b.appendTo(a);
25132        }
25133    }
25134    function r(a, e) {
25135      var f = n(a),
25136        b = {},
25137        c = a.$;
25138      e || ((b["class"] = c.className || ""), (c.className = ""));
25139      b.inline = c.style.cssText || "";
25140      e || (c.style.cssText = "position: static; overflow: visible");
25141      t(f);
25142      return b;
25143    }
25144    function u(a, e) {
25145      var f = n(a),
25146        b = a.$;
25147      "class" in e && (b.className = e["class"]);
25148      "inline" in e && (b.style.cssText = e.inline);
25149      t(f);
25150    }
25151    function v(a) {
25152      if (!a.editable().isInline()) {
25153        var e = CKEDITOR.instances,
25154          f;
25155        for (f in e) {
25156          var b = e[f];
25157          "wysiwyg" != b.mode ||
25158            b.readOnly ||
25159            ((b = b.document.getBody()),
25160            b.setAttribute("contentEditable", !1),
25161            b.setAttribute("contentEditable", !0));
25162        }
25163        a.editable().hasFocus && (a.toolbox.focus(), a.focus());
25164      }
25165    }
25166    CKEDITOR.plugins.add("maximize", {
25167      init: function(a) {
25168        function e() {
25169          var b = c.getViewPaneSize();
25170          a.resize(b.width, b.height, null, !0);
25171        }
25172        if (a.elementMode != CKEDITOR.ELEMENT_MODE_INLINE) {
25173          var f = a.lang,
25174            b = CKEDITOR.document,
25175            c = b.getWindow(),
25176            l,
25177            m,
25178            p,
25179            n = CKEDITOR.TRISTATE_OFF;
25180          a.addCommand("maximize", {
25181            modes: { wysiwyg: !CKEDITOR.env.iOS, source: !CKEDITOR.env.iOS },
25182            readOnly: 1,
25183            editorFocus: !1,
25184            exec: function() {
25185              var h = a.container.getFirst(function(a) {
25186                  return a.type == CKEDITOR.NODE_ELEMENT && a.hasClass("cke_inner");
25187                }),
25188                g = a.ui.space("contents");
25189              if ("wysiwyg" == a.mode) {
25190                var d = a.getSelection();
25191                l = d && d.getRanges();
25192                m = c.getScrollPosition();
25193              } else {
25194                var k = a.editable().$;
25195                l = !CKEDITOR.env.ie && [k.selectionStart, k.selectionEnd];
25196                m = [k.scrollLeft, k.scrollTop];
25197              }
25198              if (this.state == CKEDITOR.TRISTATE_OFF) {
25199                c.on("resize", e);
25200                p = c.getScrollPosition();
25201                for (d = a.container; (d = d.getParent()); )
25202                  d.setCustomData("maximize_saved_styles", r(d)),
25203                    d.setStyle("z-index", a.config.baseFloatZIndex - 5);
25204                g.setCustomData("maximize_saved_styles", r(g, !0));
25205                h.setCustomData("maximize_saved_styles", r(h, !0));
25206                g = { overflow: CKEDITOR.env.webkit ? "" : "hidden", width: 0, height: 0 };
25207                b.getDocumentElement().setStyles(g);
25208                !CKEDITOR.env.gecko && b.getDocumentElement().setStyle("position", "fixed");
25209                (CKEDITOR.env.gecko && CKEDITOR.env.quirks) || b.getBody().setStyles(g);
25210                CKEDITOR.env.ie
25211                  ? setTimeout(function() {
25212                      c.$.scrollTo(0, 0);
25213                    }, 0)
25214                  : c.$.scrollTo(0, 0);
25215                h.setStyle(
25216                  "position",
25217                  CKEDITOR.env.gecko && CKEDITOR.env.quirks ? "fixed" : "absolute",
25218                );
25219                h.$.offsetLeft;
25220                h.setStyles({ "z-index": a.config.baseFloatZIndex - 5, left
25220: "0px", top: "0px" });
25221                h.addClass("cke_maximized");
25222                e();
25223                g = h.getDocumentPosition();
25224                h.setStyles({ left: -1 * g.x + "px", top: -1 * g.y + "px" });
25225                CKEDITOR.env.gecko && v(a);
25226              } else if (this.state == CKEDITOR.TRISTATE_ON) {
25227                c.removeListener("resize", e);
25228                for (var d = [g, h], q = 0; q < d.length; q++)
25229                  u(d[q], d[q].getCustomData("maximize_saved_styles")),
25230                    d[q].removeCustomData("maximize_saved_styles");
25231                for (d = a.container; (d = d.getParent()); )
25232                  u(d, d.getCustomData("maximize_saved_styles")),
25233                    d.removeCustomData("maximize_saved_styles");
25234                CKEDITOR.env.ie
25235                  ? setTimeout(function() {
25236                      c.$.scrollTo(p.x, p.y);
25237                    }, 0)
25238                  : c.$.scrollTo(p.x, p.y);
25239                h.removeClass("cke_maximized");
25240                CKEDITOR.env.webkit &&
25241                  (h.setStyle("display", "inline"),
25242                  setTimeout(function() {
25243                    h.setStyle("display", "block");
25244                  }, 0));
25245                a.fire("resize", {
25246                  outerHeight: a.container.$.offsetHeight,
25247                  contentsHeight: g.$.offsetHeight,
25248                  outerWidth: a.container.$.offsetWidth,
25249                });
25250              }
25251              this.toggleState();
25252              if ((d = this.uiItems[0]))
25253                (g =
25254                  this.state == CKEDITOR.TRISTATE_OFF ? f.maximize.maximize : f.maximize.minimize),
25255                  (d = CKEDITOR.document.getById(d._.id)),
25256                  d.getChild(1).setHtml(g),
25257                  d.setAttribute("title", g),
25258                  d.setAttribute("href", 'javascript:void("' + g + '");');
25259              "wysiwyg" == a.mode
25260                ? l
25261                  ? (CKEDITOR.env.gecko && v(a),
25262                    a.getSelection().selectRanges(l),
25263                    (k = a.getSelection().getStartElement()) && k.scrollIntoView(!0))
25264                  : c.$.scrollTo(m.x, m.y)
25265                : (l && ((k.selectionStart = l[0]), (k.selectionEnd = l[1])),
25266                  (k.scrollLeft = m[0]),
25267                  (k.scrollTop = m[1]));
25268              l = m = null;
25269              n = this.state;
25270              a.fire("maximize", this.state);
25271            },
25272            canUndo: !1,
25273          });
25274          a.ui.addButton &&
25275            a.ui.addButton("Maximize", {
25276              label: f.maximize.maximize,
25277              command: "maximize",
25278              toolbar: "tools,10",
25279            });
25280          a.on(
25281            "mode",
25282            function() {
25283              var b = a.getCommand("maximize");
25284              b.setState(b.state == CKEDITOR.TRISTATE_DISABLED ? CKEDITOR.TRISTATE_DISABLED : n);
25285            },
25286            null,
25287            null,
25288            100,
25289          );
25290        }
25291      },
25292    });
25293  })();
25294  CKEDITOR.plugins.add("newpage", {
25295    init: function(a) {
25296      a.addCommand("newpage", {
25297        modes: { wysiwyg: 1, source: 1 },
25298        exec: function(b) {
25299          var a = this;
25300          b.setData(b.config.newpage_html || "", function() {
25301            b.focus();
25302            setTimeout(function() {
25303              b.fire("afterCommandExec", { name: "newpage", command: a });
25304              b.selectionChange();
25305            }, 200);
25306          });
25307        },
25308        async: !0,
25309      });
25310      a.ui.addButton &&
25311        a.ui.addButton("NewPage", {
25312          label: a.lang.newpage.toolbar,
25313          command: "newpage",
25314          toolbar: "document,20",
25315        });
25316    },
25317  });
25318  (function() {
25319    function e(a) {
25320      return {
25321        "aria-label": a,
25322        class: "cke_pagebreak",
25323        contenteditable: "false",
25324        "data-cke-display-name": "pagebreak",
25325        "data-cke-pagebreak": 1,
25326        style: "page-break-after: always",
25327        title: a,
25328      };
25329    }
25330    CKEDITOR.plugins.add("pagebreak", {
25331      requires: "fakeobjects",
25332      onLoad: function() {
25333        var a = (
25334          "background:url(" +
25335          CKEDITOR.getUrl(this.path + "images/pagebreak.gif") +
25336          ") no-repeat center center;clear:both;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;padding:0;height:7px;cursor:default;"
25337        ).replace(/;/g, " !important;");
25338        CKEDITOR.addCss("div.cke_pagebreak{" + a + "}");
25339      },
25340      init: function(a) {
25341        a.blockless ||
25342          (a.addCommand("pagebreak", CKEDITOR.plugins.pagebreakCmd),
25343          a.ui.addButton &&
25344            a.ui.addButton("PageBreak", {
25345              label: a.lang.pagebreak.toolbar,
25346              command: "pagebreak",
25347              toolbar: "insert,70",
25348            }),
25349          CKEDITOR.env.webkit &&
25350            a.on("contentDom", function() {
25351              a.document.on("click", function(b) {
25352                b = b.data.getTarget();
25353                b.is("div") && b.hasClass("cke_pagebreak") && a.getSelection().selectElement(b);
25354              });
25355            }));
25356      },
25357      afterInit: function(a) {
25358        function b(f) {
25359          CKEDITOR.tools.extend(f.attributes, e(a.lang.pagebreak.alt), !0);
25360          f.children.length = 0;
25361        }
25362        var c = a.dataProcessor,
25363          g = c && c.dataFilter,
25364          c = c && c.htmlFilter,
25365          h = /page-break-after\s*:\s*always/i,
25366          k = /display\s*:\s*none/i;
25367        c &&
25368          c.addRules(
25369            {
25370              attributes: {
25371                class: function(a, b) {
25372                  var c = a.replace("cke_pagebreak", "");
25373                  if (c != a) {
25374                    var d = CKEDITOR.htmlParser.fragment.fromHtml(
25375                      '\x3cspan style\x3d"display: none;"\x3e\x26nbsp;\x3c/span\x3e',
25376                    ).children[0];
25377                    b.children.length = 0;
25378                    b.add(d);
25379                    d = b.attributes;
25380                    delete d["aria-label"];
25381                    delete d.contenteditable;
25382                    delete d.title;
25383                  }
25384                  return c;
25385                },
25386              },
25387            },
25388            {
25389              applyToAll: !0,
25390              priority: 5,
25391            },
25392          );
25393        g &&
25394          g.addRules({
25395            elements: {
25396              div: function(a) {
25397                if (a.attributes["data-cke-pagebreak"]) b(a);
25398                else if (h.test(a.attributes.style)) {
25399                  var c = a.children[0];
25400                  c && "span" == c.name && k.test(c.attributes.style) && b(a);
25401                }
25402              },
25403            },
25404          });
25405      },
25406    });
25407    CKEDITOR.plugins.pagebreakCmd = {
25408      exec: function(a) {
25409        var b = a.document.createElement("div", { attributes: e(a.lang.pagebreak.alt) });
25410        a.insertElement(b);
25411      },
25412      context: "div",
25413      allowedContent: {
25414        div: { styles: "!page-break-after" },
25415        span: {
25416          match: function(a) {
25417            return (a = a.parent) && "div" == a.name && a.styles && a.styles["page-break-after"];
25418          },
25419          styles: "display",
25420        },
25421      },
25422      requiredContent: "div{page-break-after}",
25423    };
25424  })();
25425  (function() {
25426    var f = {
25427      canUndo: !1,
25428      async: !0,
25429      exec: function(a, b) {
25430        var c = a.lang,
25431          e = CKEDITOR.tools.keystrokeToString(
25432            c.common.keyboard,
25433            a.getCommandKeystroke(CKEDITOR.env.ie ? a.commands.paste : this),
25434          ),
25435          d =
25436            b && "undefined" !== typeof b.notification
25437              ? b.notification
25438              : !b || !b.from || ("keystrokeHandler" === b.from && CKEDITOR.env.ie),
25439          c =
25440            d && "string" === typeof d
25441              ? d
25442              : c.pastetext.pasteNotification.replace(
25443                  /%1/,
25444                  '\x3ckbd aria-label\x3d"' + e.aria + '"\x3e' + e.display + "\x3c/kbd\x3e",
25445                );
25446        a.execCommand("paste", { type: "text", notification: d ? c : !1 });
25447      },
25448    };
25449    CKEDITOR.plugins.add("pastetext", {
25450      requires: "clipboard",
25451      init: function(a) {
25452        var b = CKEDITOR.env.safari
25453          ? CKEDITOR.CTRL + CKEDITOR.ALT + CKEDITOR.SHIFT + 86
25454          : CKEDITOR.CTRL + CKEDITOR.SHIFT + 86;
25455        a.addCommand("pastetext", f);
25456        a.setKeystroke(b, "pastetext");
25457        CKEDITOR.plugins.clipboard.addPasteButton(a, "PasteText", {
25458          label: a.lang.pastetext.button,
25459          command: "pastetext",
25460          toolbar: "clipboard,40",
25461        });
25462        if (a.config.forcePasteAsPlainText)
25463          a.on("beforePaste", function(a) {
25464            "html" != a.data.type && (a.data.type = "text");
25465          });
25466        a.on("pasteState", function(b) {
25467          a.getCommand("pastetext").setState(b.data);
25468        });
25469      },
25470    });
25471  })();
25472  (function() {
25473    function l(a, f, e) {
25474      var h = CKEDITOR.cleanWord;
25475      h
25476        ? e()
25477        : ((a = CKEDITOR.getUrl(a.config.pasteFromWordCleanupFile || f + "filter/default.js")),
25478          CKEDITOR.scriptLoader.load(a, e, null, !0));
25479      return !h;
25480    }
25481    CKEDITOR.plugins.add("pastefromword", {
25482      requires: "clipboard",
25483      init: function(a) {
25484        function f(a) {
25485          var b = CKEDITOR.plugins.pastefromword && CKEDITOR.plugins.pastefromword.images,
25486            c,
25487            d = [];
25488          if (
25489            b &&
25490            a.editor.filter.check("img[src]") &&
25491            ((c = b.extractTagsFromHtml(a.data.dataValue)),
25492            0 !== c.length &&
25493              ((b = b.extractFromRtf(a.data.dataTransfer["text/rtf"])),
25494              0 !== b.length &&
25495                (CKEDITOR.tools.array.forEach(
25496                  b,
25497                  function(a) {
25498                    d.push(
25499                      a.type
25500                        ? "data:" +
25501                          a.type +
25502                          ";base64," +
25503                          CKEDITOR.tools.convertBytesToBase64(
25504                            CKEDITOR.tools.convertHexStringToBytes(a.hex),
25505                          )
25506                        : null,
25507                    );
25508                  },
25509                  this,
25510                ),
25511                c.length === d.length)))
25512          )
25513            for (b = 0; b < c.length; b++)
25514              0 === c[b].indexOf("file://") &&
25515                d[b] &&
25516                (a.data.dataValue = a.data.dataValue.replace(c[b], d[b]));
25517        }
25518        var e = 0,
25519          h = this.path,
25520          m =
25521            void 0 === a.config.pasteFromWord_inlineImages
25522              ? !0
25523              : a.config.pasteFromWord_inlineImages;
25524        a.addCommand("pastefromword", {
25525          canUndo: !1,
25526          async: !0,
25527          exec: function(a, b) {
25528            e = 1;
25529            a.execCommand("paste", {
25530              type: "html",
25531              notification: b && "undefined" !== typeof b.notification ? b.notification : !0,
25532            });
25533          },
25534        });
25535        CKEDITOR.plugins.clipboard.addPasteButton(a, "PasteFromWord", {
25536          label: a.lang.pastefromword.toolbar,
25537          command: "pastefromword",
25538          toolbar: "clipboard,50",
25539        });
25540        a.on(
25541          "paste",
25542          function(f) {
25543            var b = f.data,
25544              c = CKEDITOR.plugins.clipboard.isCustomDataTypesSupported
25545                ? b.dataTransfer.getData("text/html", !0)
25546                : null,
25547              d = CKEDITOR.plugins.clipboard.isCustomDataTypesSupported
25548                ? b.dataTransfer.getData("text/rtf")
25549                : null,
25550              c = c || b.dataValue,
25551              g = { dataValue: c, dataTransfer: { "text/rtf": d } },
25552              d = /(class=\"?Mso|style=(?:\"|\')[^\"]*?\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/,
25553              d =
25554                /<meta\s*name=(?:\"|\')?generator(?:\"|\')?\s*content=(?:\"|\')?microsoft/gi.test(
25555                  c,
25556                ) || d.test(c);
25557            if (c && (e || d) && (!1 !== a.fire("pasteFromWord", g) || e)) {
25558              b.dontFilter = !0;
25559              var k = l(a, h, function() {
25560                if (k) a.fire("paste", b);
25561                else if (
25562                  !a.config.pasteFromWordPromptCleanup ||
25563                  e ||
25564                  confirm(a.lang.pastefromword.confirmCleanup)
25565                )
25566                  (g.dataValue = CKEDITOR.cleanWord(g.dataValue, a)),
25567                    a.fire("afterPasteFromWord", g),
25568                    (b.dataValue = g.dataValue),
25569                    !0 === a.config.forcePasteAsPlainText
25570                      ? (b.type = "text")
25571                      : CKEDITOR.env.ie &&
25572                        "allow-word" === a.config.forcePasteAsPlainText &&
25573                        (b.type = "html");
25574                e = 0;
25575              });
25576              k && f.cancel();
25577            }
25578          },
25579          null,
25580          null,
25581          3,
25582        );
25583        if (CKEDITOR.plugins.clipboard.isCustomDataTypesSupported && m)
25584          a.on("afterPasteFromWord", f);
25585      },
25586    });
25587  })();
25588  (function() {
25589    var h,
25590      k = {
25591        modes: { wysiwyg: 1, source: 1 },
25592        canUndo: !1,
25593        readOnly: 1,
25594        exec: function(a) {
25595          var g,
25596            b = a.config,
25597            f = b.baseHref ? '\x3cbase href\x3d"' + b.baseHref + '"/\x3e' : "";
25598          if (b.fullPage)
25599            g = a
25600              .getData()
25601              .replace(/<head>/, "$\x26" + f)
25602              .replace(/[^>]*(?=<\/title>)/, "$\x26 \x26mdash; " + a.lang.preview.preview);
25603          else {
25604            var b = "\x3cbody ",
25605              d = a.document && a.document.getBody();
25606            d &&
25607              (d.getAttribute("id") && (b += 'id\x3d"' + d.getAttribute("id") + '" '),
25608              d.getAttribute("class") && (b += 'class\x3d"' + d.getAttribute("class") + '" '));
25609            b += "\x3e";
25610            g =
25611              a.config.docType +
25612              '\x3chtml dir\x3d"' +
25613              a.config.contentsLangDirection +
25614              '"\x3e\x3chead\x3e' +
25615              f +
25616              "\x3ctitle\x3e" +
25617              a.lang.preview.preview +
25618              "\x3c/title\x3e" +
25619              CKEDITOR.tools.buildStyleHtml(a.config.contentsCss) +
25620              "\x3c/head\x3e" +
25621              b +
25622              a.getData() +
25623              "\x3c/body\x3e\x3c/html\x3e";
25624          }
25625          f = 640;
25626          b = 420;
25627          d = 80;
25628          try {
25629            var c = window.screen,
25630              f = Math.round(0.8 * c.width),
25631              b = Math.round(0.7 * c.height),
25632              d = Math.round(0.1 * c.width);
25633          } catch (k) {}
25634          if (!1 === a.fire("contentPreview", (a = { dataValue: g }))) return !1;
25635          var c = "",
25636            e;
25637          CKEDITOR.env.ie &&
25638            ((window._cke_htmlToLoad = a.dataValue),
25639            (e =
25640              "javascript:void( (function(){document.open();" +
25641              ("(" + CKEDITOR.tools.fixDomain + ")();")
25642                .replace(/\/\/.*?\n/g, "")
25643                .replace(/parent\./g, "window.opener.") +
25644              "document.write( window.opener._cke_htmlToLoad );document.close();window.opener._cke_htmlToLoad \x3d null;})() )"),
25645            (c = ""));
25646          CKEDITOR.env.gecko &&
25647            ((window._cke_htmlToLoad = a.dataValue), (c = CKEDITOR.getUrl(h + "preview.html")));
25648          c = window.open(
25649            c,
25650            null,
25651            "toolbar\x3dyes,location\x3dno,status\x3dyes,menubar\x3dyes,scrollbars\x3dyes,resizable\x3dyes,width\x3d" +
25652              f +
25653              ",height\x3d" +
25654              b +
25655              ",left\x3d" +
25656              d,
25657          );
25658          CKEDITOR.env.ie && c && (c.location = e);
25659          CKEDITOR.env.ie ||
25660            CKEDITOR.env.gecko ||
25661            ((e = c.document), e.open(), e.write(a.dataValue), e.close());
25662          return !0;
25663        },
25664      };
25665    CKEDITOR.plugins.add("preview", {
25666      init: function(a) {
25667        a.elementMode != CKEDITOR.ELEMENT_MODE_INLINE &&
25668          ((h = this.path),
25669          a.addCommand("preview", k),
25670          a.ui.addButton &&
25671            a.ui.addButton("Preview", {
25672              label: a.lang.preview.preview,
25673              command: "preview",
25674              toolbar: "document,40",
25675            }));
25676      },
25677    });
25678  })();
25679  CKEDITOR.plugins.add("print", {
25680    init: function(a) {
25681      a.elementMode != CKEDITOR.ELEMENT_MODE_INLINE &&
25682        (a.addCommand("print", CKEDITOR.plugins.print),
25683        a.ui.addButton &&
25684          a.ui.addButton("Print", {
25685            label: a.lang.print.toolbar,
25686            command: "print",
25687            toolbar: "document,50",
25688          }));
25689    },
25690  });
25691  CKEDITOR.plugins.print = {
25692    exec: function(a) {
25693      CKEDITOR.env.gecko ? a.window.$.print() : a.document.$.execCommand("Print");
25694    },
25695    canUndo: !1,
25696    readOnly: 1,
25697    modes: { wysiwyg: 1 },
25698  };
25699  CKEDITOR.plugins.add("removeformat", {
25700    init: function(a) {
25701      a.addCommand("removeFormat", CKEDITOR.plugins.removeformat.commands.removeformat);
25702      a.ui.addButton &&
25703        a.ui.addButton("RemoveFormat", {
25704          label: a.lang.removeformat.toolbar,
25705          command: "removeFormat",
25706          toolbar: "cleanup,10",
25707        });
25708    },
25709  });
25710  CKEDITOR.plugins.removeformat = {
25711    commands: {
25712      removeformat: {
25713        exec: function(a) {
25714          for (
25715            var h =
25716                a._.removeFormatRegex ||
25717                (a._.removeFormatRegex = new RegExp(
25718                  "^(?:" + a.config.removeFormatTags.replace(/,/g, "|") + ")$",
25719                  "i",
25720                )),
25721              e =
25722                a._.removeAttributes ||
25723                (a._.removeAttributes = a.config.removeFormatAttributes.split(",")),
25724              f = CKEDITOR.plugins.removeformat.filter,
25725              m = a.getSelection().getRanges(),
25726              n = m.createIterator(),
25727              p = function(a) {
25728                return a.type == CKEDITOR.NODE_ELEMENT;
25729              },
25730              c;
25731            (c = n.getNextRange());
25732
25733          ) {
25734            c.collapsed || c.enlarge(CKEDITOR.ENLARGE_ELEMENT);
25735            var l = c.createBookmark(),
25736              b = l.startNode,
25737              d = l.endNode,
25738              k = function(b) {
25739                for (
25740                  var c = a.elementPath(b), e = c.elements, d = 1, g;
25741                  (g = e[d]) && !g.equals(c.block) && !g.equals(c.blockLimit);
25742                  d++
25743                )
25744                  h.test(g.getName()) && f(a, g) && b.breakParent(g);
25745              };
25746            k(b);
25747            if (d)
25748              for (k(d), b = b.getNextSourceNode(!0, CKEDITOR.NODE_ELEMENT); b && !b.equals(d); )
25749                if (b.isReadOnly()) {
25750                  if (b.getPosition(d) & CKEDITOR.POSITION_CONTAINS) break;
25751                  b = b.getNext(p);
25752                } else
25753                  (k = b.getNextSourceNode(!1, CKEDITOR.NODE_ELEMENT)),
25754                    ("img" == b.getName() && b.data("cke-realelement")) ||
25755                      !f(a, b) ||
25756                      (h.test(b.getName())
25757                        ? b.remove(1)
25758                        : (b.removeAttributes(e), a.fire("removeFormatCleanup", b))),
25759                    (b = k);
25760            c.moveToBookmark(l);
25761          }
25762          a.forceNextSelectionCheck();
25763          a.getSelection().selectRanges(m);
25764        },
25765      },
25766    },
25767    filter: function(a, h) {
25768      for (var e = a._.removeFormatFilters || [], f = 0; f < e.length; f++)
25769        if (!1 === e[f](h)) return !1;
25770      return !0;
25771    },
25772  };
25773  CKEDITOR.editor.prototype.addRemoveFormatFilter = function(a) {
25774    this._.removeFormatFilters || (this._.removeFormatFilters = []);
25775    this._.removeFormatFilters.push(a);
25776  };
25777  CKEDITOR.config.removeFormatTags =
25778    "b,big,cite,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var";
25779  CKEDITOR.config.removeFormatAttributes = "class,style,lang,width,height,align,hspace,valign";
25780  (function() {
25781    var b = {
25782      readOnly: 1,
25783      modes: { wysiwyg: 1, source: 1 },
25784      exec: function(a) {
25785        if (a.fire("save") && (a = a.element.$.form))
25786          try {
25787            a.submit();
25788          } catch (b) {
25789            a.submit.click && a.submit.click();
25790          }
25791      },
25792    };
25793    CKEDITOR.plugins.add("save", {
25794      init: function(a) {
25795        a.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE &&
25796          ((a.addCommand("save", b).startDisabled = !a.element.$.form),
25797          a.ui.addButton &&
25798            a.ui.addButton("Save", {
25799              label: a.lang.save.toolbar,
25800              command: "save",
25801              toolbar: "document,10",
25802            }));
25803      },
25804    });
25805  })();
25806  (function() {
25807    CKEDITOR.plugins.add("selectall", {
25808      init: function(b) {
25809        b.addCommand("selectAll", {
25810          modes: { wysiwyg: 1, source: 1 },
25811          exec: function(a) {
25812            var b = a.editable();
25813            if (b.is("textarea"))
25814              (a = b.$),
25815                CKEDITOR.env.ie && a.createTextRange
25816                  ? a.createTextRange().execCommand("SelectAll")
25817                  : ((a.selectionStart = 0), (a.selectionEnd = a.value.length)),
25818                a.focus();
25819            else {
25820              if (b.is("body")) a.document.$.execCommand("SelectAll", !1, null);
25821              else {
25822                var c = a.createRange();
25823                c.selectNodeContents(b);
25824                c.select();
25825              }
25826              a.forceNextSelectionCheck();
25827              a.selectionChange();
25828            }
25829          },
25830          canUndo: !1,
25831        });
25832        b.ui.addButton &&
25833          b.ui.addButton("SelectAll", {
25834            label: b.lang.selectall.toolbar,
25835            command: "selectAll",
25836            toolbar: "selection,10",
25837          });
25838      },
25839    });
25840  })();
25841  (function() {
25842    var k = {
25843      readOnly: 1,
25844      preserveState: !0,
25845      editorFocus: !1,
25846      exec: function(a) {
25847        this.toggleState();
25848        this.refresh(a);
25849      },
25850      refresh: function(a) {
25851        if (a.document) {
25852          var c =
25853            this.state != CKEDITOR.TRISTATE_ON ||
25854            (a.elementMode == CKEDITOR.ELEMENT_MODE_INLINE && !a.focusManager.hasFocus)
25855              ? "removeClass"
25856              : "attachClass";
25857          a.editable()[c]("cke_show_blocks");
25858        }
25859      },
25860    };
25861    CKEDITOR.plugins.add("showblocks", {
25862      onLoad: function() {
25863        var a = "p div pre address blockquote h1 h2 h3 h4 h5 h6".split(" "),
25864          c,
25865          b,
25866          e,
25867          f,
25868          k = CKEDITOR.getUrl(this.path),
25869          l = !(CKEDITOR.env.ie && 9 > CKEDITOR.env.version),
25870          g = l ? ":not([contenteditable\x3dfalse]):not(.cke_show_blocks_off)" : "",
25871          d,
25872          h;
25873        for (c = b = e = f = ""; (d = a.pop()); )
25874          (h = a.length ? "," : ""),
25875            (c += ".cke_show_blocks " + d + g + h),
25876            (e += ".cke_show_blocks.cke_contents_ltr " + d + g + h),
25877            (f += ".cke_show_blocks.cke_contents_rtl " + d + g + h),
25878            (b +=
25879              ".cke_show_blocks " +
25880              d +
25881              g +
25882              "{background-image:url(" +
25883              CKEDITOR.getUrl(k + "images/block_" + d + ".png") +
25884              ")}");
25885        CKEDITOR.addCss(
25886          (c + "{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}").concat(
25887            b,
25888            e + "{background-position:top left;padding-left:8px}",
25889            f + "{background-position:top right;padding-right:8px}",
25890          ),
25891        );
25892        l ||
25893          CKEDITOR.addCss(
25894            ".cke_show_blocks [contenteditable\x3dfalse],.cke_show_blocks .cke_show_blocks_off{border:none;padding-top:0;background-image:none}.cke_show_blocks.cke_contents_rtl [contenteditable\x3dfalse],.cke_show_blocks.cke_contents_rtl .cke_show_blocks_off{padding-right:0}.cke_show_blocks.cke_contents_ltr [contenteditable\x3dfalse],.cke_show_blocks.cke_contents_ltr .cke_show_blocks_off{padding-left:0}",
25895          );
25896      },
25897      init: function(a) {
25898        function c() {
25899          b.refresh(a);
25900        }
25901        if (!a.blockless) {
25902          var b = a.addCommand("showblocks", k);
25903          b.canUndo = !1;
25904          a.config.startupOutlineBlocks && b.setState(CKEDITOR.TRISTATE_ON);
25905          a.ui.addButton &&
25906            a.ui.addButton("ShowBlocks", {
25907              label: a.lang.showblocks.toolbar,
25908              command: "showblocks",
25909              toolbar: "tools,20",
25910            });
25911          a.on("mode", function() {
25912            b.state != CKEDITOR.TRISTATE_DISABLED && b.refresh(a);
25913          });
25914          a.elementMode == CKEDITOR.ELEMENT_MODE_INLINE && (a.on("focus", c), a.on("blur", c));
25915          a.on("contentDom", function() {
25916            b.state != CKEDITOR.TRISTATE_DISABLED && b.refresh(a);
25917          });
25918        }
25919      },
25920    });
25921  })();
25922  (function() {
25923    var f = {
25924      preserveState: !0,
25925      editorFocus: !1,
25926      readOnly: 1,
25927      exec: function(a) {
25928        this.toggleState();
25929        this.refresh(a);
25930      },
25931      refresh: function(a) {
25932        if (a.document) {
25933          var b = this.state == CKEDITOR.TRISTATE_ON ? "attachClass" : "removeClass";
25934          a.editable()[b]("cke_show_borders");
25935        }
25936      },
25937    };
25938    CKEDITOR.plugins.add("showborders", {
25939      modes: { wysiwyg: 1 },
25940      onLoad: function() {
25941        var a;
25942        a = (CKEDITOR.env.ie6Compat
25943          ? [
25944              ".%1 table.%2,",
25945              ".%1 table.%2 td, .%1 table.%2 th",
25946              "{",
25947              "border : #d3d3d3 1px dotted",
25948              "}",
25949            ]
25950          : ".%1 table.%2,;.%1 table.%2 \x3e tr \x3e td, .%1 table.%2 \x3e tr \x3e th,;.%1 table.%2 \x3e tbody \x3e tr \x3e td, .%1 table.%2 \x3e tbody \x3e tr \x3e th,;.%1 table.%2 \x3e thead \x3e tr \x3e td, .%1 table.%2 \x3e thead \x3e tr \x3e th,;.%1 table.%2 \x3e tfoot \x3e tr \x3e td, .%1 table.%2 \x3e tfoot \x3e tr \x3e th;{;border : #d3d3d3 1px dotted;}".split(
25951              ";",
25952            )
25953        )
25954          .join("")
25955          .replace(/%2/g, "cke_show_border")
25956          .replace(/%1/g, "cke_show_borders ");
25957        CKEDITOR.addCss(a);
25958      },
25959      init: function(a) {
25960        var b = a.addCommand("showborders", f);
25961        b.canUndo = !1;
25962        !1 !== a.config.startupShowBorders && b.setState(CKEDITOR.TRISTATE_ON);
25963        a.on(
25964          "mode",
25965          function() {
25966            b.state != CKEDITOR.TRISTATE_DISABLED && b.refresh(a);
25967          },
25968          null,
25969          null,
25970          100,
25971        );
25972        a.on("contentDom", function() {
25973          b.state != CKEDITOR.TRISTATE_DISABLED && b.refresh(a);
25974        });
25975        a.on("removeFormatCleanup", function(d) {
25976          d = d.data;
25977          a.getCommand("showborders").state == CKEDITOR.TRISTATE_ON &&
25978            d.is("table") &&
25979            (!d.hasAttribute("border") || 0 >= parseInt(d.getAttribute("border"), 10)) &&
25980            d.addClass("cke_show_border");
25981        });
25982      },
25983      afterInit: function(a) {
25984        var b = a.dataProcessor;
25985        a = b && b.dataFilter;
25986        b = b && b.htmlFilter;
25987        a &&
25988          a.addRules({
25989            elements: {
25990              table: function(a) {
25991                a = a.attributes;
25992                var b = a["class"],
25993                  c = parseInt(a.border, 10);
25994                (c && !(0 >= c)) ||
25995                  (b && -1 != b.indexOf("cke_show_border")) ||
25996                  (a["class"] = (b || "") + " cke_show_border");
25997              },
25998            },
25999          });
26000        b &&
26001          b.addRules({
26002            elements: {
26003              table: function(a) {
26004                a = a.attributes;
26005                var b = a["class"];
26006                b &&
26007                  (a["class"] = b
26008                    .replace("cke_show_border", "")
26009                    .replace(/\s{2}/, " ")
26010                    .replace(/^\s+|\s+$/, ""));
26011              },
26012            },
26013          });
26014      },
26015    });
26016    CKEDITOR.on("dialogDefinition", function(a) {
26017      var b = a.data.name;
26018      if ("table" == b || "tableProperties" == b)
26019        if (
26020          ((a = a.data.definition),
26021          (b = a.getContents("info").get("txtBorder")),
26022          (b.commit = CKEDITOR.tools.override(b.commit, function(a) {
26023            return function(b, c) {
26024              a.apply(this, arguments);
26025              var e = parseInt(this.getValue(), 10);
26026              c[!e || 0 >= e ? "addClass" : "removeClass"]("cke_show_border");
26027            };
26028          })),
26029          (a = (a = a.getContents("advanced")) && a.get("advCSSClasse
26029s")))
26030        )
26031          (a.setup = CKEDITOR.tools.override(a.setup, function(a) {
26032            return function() {
26033              a.apply(this, arguments);
26034              this.setValue(this.getValue().replace(/cke_show_border/, ""));
26035            };
26036          })),
26037            (a.commit = CKEDITOR.tools.override(a.commit, function(a) {
26038              return function(b, c) {
26039                a.apply(this, arguments);
26040                parseInt(c.getAttribute("border"), 10) || c.addClass("cke_show_border");
26041              };
26042            }));
26043    });
26044  })();
26045  (function() {
26046    CKEDITOR.plugins.add("sourcearea", {
26047      init: function(a) {
26048        function d() {
26049          var a = e && this.equals(CKEDITOR.document.getActive());
26050          this.hide();
26051          this.setStyle("height", this.getParent().$.clientHeight + "px");
26052          this.setStyle("width", this.getParent().$.clientWidth + "px");
26053          this.show();
26054          a && this.focus();
26055        }
26056        if (a.elementMode != CKEDITOR.ELEMENT_MODE_INLINE) {
26057          var f = CKEDITOR.plugins.sourcearea;
26058          a.addMode("source", function(e) {
26059            var b = a.ui
26060              .space("contents")
26061              .getDocument()
26062              .createElement("textarea");
26063            b.setStyles(
26064              CKEDITOR.tools.extend(
26065                {
26066                  width: CKEDITOR.env.ie7Compat ? "99%" : "100%",
26067                  height: "100%",
26068                  resize: "none",
26069                  outline: "none",
26070                  "text-align": "left",
26071                },
26072                CKEDITOR.tools.cssVendorPrefix("tab-size", a.config.sourceAreaTabSize || 4),
26073              ),
26074            );
26075            b.setAttribute("dir", "ltr");
26076            b
26077              .addClass("cke_source")
26078              .addClass("cke_reset")
26079              .addClass("cke_enable_context_menu");
26080            a.ui.space("contents").append(b);
26081            b = a.editable(new c(a, b));
26082            b.setData(a.getData(1));
26083            CKEDITOR.env.ie &&
26084              (b.attachListener(a, "resize", d, b),
26085              b.attachListener(CKEDITOR.document.getWindow(), "resize", d, b),
26086              CKEDITOR.tools.setTimeout(d, 0, b));
26087            a.fire("ariaWidget", this);
26088            e();
26089          });
26090          a.addCommand("source", f.commands.source);
26091          a.ui.addButton &&
26092            a.ui.addButton("Source", {
26093              label: a.lang.sourcearea.toolbar,
26094              command: "source",
26095              toolbar: "mode,10",
26096            });
26097          a.on("mode", function() {
26098            a
26099              .getCommand("source")
26100              .setState("source" == a.mode ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF);
26101          });
26102          var e = CKEDITOR.env.ie && 9 == CKEDITOR.env.version;
26103        }
26104      },
26105    });
26106    var c = CKEDITOR.tools.createClass({
26107      base: CKEDITOR.editable,
26108      proto: {
26109        setData: function(a) {
26110          this.setValue(a);
26111          this.status = "ready";
26112          this.editor.fire("dataReady");
26113        },
26114        getData: function() {
26115          return this.getValue();
26116        },
26117        insertHtml: function() {},
26118        insertElement: function() {},
26119        insertText: function() {},
26120        setReadOnly: function(a) {
26121          this[(a ? "set" : "remove") + "Attribute"]("readOnly", "readonly");
26122        },
26123        detach: function() {
26124          c.baseProto.detach.call(this);
26125          this.clearCustomData();
26126          this.remove();
26127        },
26128      },
26129    });
26130  })();
26131  CKEDITOR.plugins.sourcearea = {
26132    commands: {
26133      source: {
26134        modes: { wysiwyg: 1, source: 1 },
26135        editorFocus: !1,
26136        readOnly: 1,
26137        exec: function(c) {
26138          "wysiwyg" == c.mode && c.fire("saveSnapshot");
26139          c.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);
26140          c.setMode("source" == c.mode ? "wysiwyg" : "source");
26141        },
26142        canUndo: !1,
26143      },
26144    },
26145  };
26146  CKEDITOR.plugins.add("specialchar", {
26147    availableLangs: {
26148      af: 1,
26149      ar: 1,
26150      az: 1,
26151      bg: 1,
26152      ca: 1,
26153      cs: 1,
26154      cy: 1,
26155      da: 1,
26156      de: 1,
26157      "de-ch": 1,
26158      el: 1,
26159      en: 1,
26160      "en-au": 1,
26161      "en-ca": 1,
26162      "en-gb": 1,
26163      eo: 1,
26164      es: 1,
26165      "es-mx": 1,
26166      et: 1,
26167      eu: 1,
26168      fa: 1,
26169      fi: 1,
26170      fr: 1,
26171      "fr-ca": 1,
26172      gl: 1,
26173      he: 1,
26174      hr: 1,
26175      hu: 1,
26176      id: 1,
26177      it: 1,
26178      ja: 1,
26179      km: 1,
26180      ko: 1,
26181      ku: 1,
26182      lt: 1,
26183      lv: 1,
26184      nb: 1,
26185      nl: 1,
26186      no: 1,
26187      oc: 1,
26188      pl: 1,
26189      pt: 1,
26190      "pt-br": 1,
26191      ro: 1,
26192      ru: 1,
26193      si: 1,
26194      sk: 1,
26195      sl: 1,
26196      sq: 1,
26197      sv: 1,
26198      th: 1,
26199      tr: 1,
26200      tt: 1,
26201      ug: 1,
26202      uk: 1,
26203      vi: 1,
26204      zh: 1,
26205      "zh-cn": 1,
26206    },
26207    requires: "dialog",
26208    init: function(a) {
26209      var c = this;
26210      CKEDITOR.dialog.add("specialchar", this.path + "dialogs/specialchar.js");
26211      a.addCommand("specialchar", {
26212        exec: function() {
26213          var b = a.langCode,
26214            b = c.availableLangs[b]
26215              ? b
26216              : c.availableLangs[b.replace(/-.*/, "")] ? b.replace(/-.*/, "") : "en";
26217          CKEDITOR.scriptLoader.load(
26218            CKEDITOR.getUrl(c.path + "dialogs/lang/" + b + ".js"),
26219            function() {
26220              CKEDITOR.tools.extend(a.lang.specialchar, c.langEntries[b]);
26221              a.openDialog("specialchar");
26222            },
26223          );
26224        },
26225        modes: { wysiwyg: 1 },
26226        canUndo: !1,
26227      });
26228      a.ui.addButton &&
26229        a.ui.addButton("SpecialChar", {
26230          label: a.lang.specialchar.toolbar,
26231          command: "specialchar",
26232          toolbar: "insert,50",
26233        });
26234    },
26235  });
26236  CKEDITOR.config.specialChars = "! \x26quot; # $ % \x26amp; ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; \x26lt; \x3d \x26gt; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x26euro; \x26lsquo; \x26rsquo; \x26ldquo; \x26rdquo; \x26ndash; \x26mdash; \x26iexcl; \x26cent; \x26pound; \x26curren; \x26yen; \x26brvbar; \x26sect; \x26uml; \x26copy; \x26ordf; \x26laquo; \x26not; \x26reg; \x26macr; \x26deg; \x26sup2; \x26sup3;
26236 \x26acute; \x26micro; \x26para; \x26middot; \x26cedil; \x26sup1; \x26ordm; \x26raquo; \x26frac14; \x26frac12; \x26frac34; \x26iquest; \x26Agrave; \x26Aacute; \x26Acirc; \x26Atilde; \x26Auml; \x26Aring; \x26AElig; \x26Ccedil; \x26Egrave; \x26Eacute; \x26Ecirc; \x26Euml; \x26Igrave; \x26Iacute; \x26Icirc; \x26Iuml; \x26ETH; \x26Ntilde; \x26Ograve; \x26Oacute; \x26Ocirc; \x26Otilde; \x26Ouml; \x26times; \x26Oslash; \x26Ugrave; \x26Uacute; \x26Ucirc; \x26Uuml; \x26Yacute; \x26THORN; \x26szlig; \x26agrave; \x26aacute; \x26acirc; \x26atilde; \x26auml; \x26aring; \x26aelig; \x26ccedil; \x26egrave; \x26eacute; \x26ecirc; \x26euml; \x26igrave; \x26iacute; \x26icirc; \x26iuml; \x26eth; \x26ntilde; \x26ograve; \x26oacute; \x26ocirc; \x26otilde; \x26ouml; \x26divide; \x26oslash; \x26ugrave; \x26uacute; \x26ucirc; \x26uuml; \x26yacute; \x26thorn; \x26yuml; \x26OElig; \x26oelig; \x26#372; \x26#374 \x26#373 \x26#375; \x26sbquo; \x26#8219; \x26bdquo; \x26hellip; \x26trade; \x26#9658; \x26bull; \x26rarr; \x26rArr; \x26hArr; \x26diams; \x26asymp;".split(
26237    " ",
26238  );
26239  CKEDITOR.plugins.add("scayt", {
26240    requires: "menubutton,dialog",
26241    tabToOpen: null,
26242    dialogName: "scaytDialog",
26243    onLoad: function(a) {
26244      CKEDITOR.plugins.scayt.onLoadTimestamp = new Date().getTime();
26245      "moono-lisa" == (CKEDITOR.skinName || a.config.skin) &&
26246        CKEDITOR.document.appendStyleSheet(
26247          this.path + "skins/" + CKEDITOR.skin.name + "/scayt.css",
26248        );
26249      CKEDITOR.document.appendStyleSheet(this.path + "dialogs/dialog.css");
26250    },
26251    init: function(a) {
26252      var c = this,
26253        d = CKEDITOR.plugins.scayt;
26254      this.bindEvents(a);
26255      this.parseConfig(a);
26256      this.addRule(a);
26257      CKEDITOR.dialog.add(this.dialogName, CKEDITOR.getUrl(this.path + "dialogs/options.js"));
26258      this.addMenuItems(a);
26259      var b = a.lang.scayt,
26260        e = CKEDITOR.env;
26261      a.ui.add("Scayt", CKEDITOR.UI_MENUBUTTON, {
26262        label: b.text_title,
26263        title: a.plugins.wsc ? a.lang.wsc.title : b.text_title,
26264        modes: { wysiwyg: !(e.ie && (8 > e.version || e.quirks)) },
26265        toolbar: "spellchecker,20",
26266        refresh: function() {
26267          var b = a.ui.instances.Scayt.getState();
26268          a.scayt && (b = d.state.scayt[a.name] ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF);
26269          a.fire("scaytButtonState", b);
26270        },
26271        onRender: function() {
26272          var d = this;
26273          a.on("scaytButtonState", function(a) {
26274            void 0 !== typeof a.data && d.setState(a.data);
26275          });
26276        },
26277        onMenu: function() {
26278          var b = a.scayt;
26279          a.getMenuItem("scaytToggle").label =
26280            a.lang.scayt[b && d.state.scayt[a.name] ? "btn_disable" : "btn_enable"];
26281          var c = {
26282            scaytToggle: CKEDITOR.TRISTATE_OFF,
26283            scaytOptions: b ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,
26284            scaytLangs: b ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,
26285            scaytDict: b ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,
26286            scaytAbout: b ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,
26287            WSC: a.plugins.wsc ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,
26288          };
26289          a.config.scayt_uiTabs[0] || delete c.scaytOptions;
26290          a.config.scayt_uiTabs[1] || delete c.scaytLangs;
26291          a.config.scayt_uiTabs[2] || delete c.scaytDict;
26292          b &&
26293            !CKEDITOR.plugins.scayt.isNewUdSupported(b) &&
26294            (delete c.scaytDict,
26295            (a.config.scayt_uiTabs[2] = 0),
26296            CKEDITOR.plugins.scayt.alarmCompatibilityMessage());
26297          return c;
26298        },
26299      });
26300      a.contextMenu &&
26301        a.addMenuItems &&
26302        (a.contextMenu.addListener(function(b, d) {
26303          var e = a.scayt,
26304            k,
26305            m;
26306          e &&
26307            (m = e.getSelectionNode()) &&
26308            ((k = c.menuGenerator(a, m)),
26309            e.showBanner("." + a.contextMenu._.definition.panel.className.split(" ").join(" .")));
26310          return k;
26311        }),
26312        (a.contextMenu._.onHide = CKEDITOR.tools.override(a.contextMenu._.onHide, function(b) {
26313          return function() {
26314            var d = a.scayt;
26315            d && d.hideBanner();
26316            return b.apply(this);
26317          };
26318        })));
26319    },
26320    addMenuItems: function(a) {
26321      var c = this,
26322        d = CKEDITOR.plugins.scayt;
26323      a.addMenuGroup("scaytButton");
26324      for (var b = a.config.scayt_contextMenuItemsOrder.split("|"), e = 0; e < b.length; e++)
26325        b[e] = "scayt_" + b[e];
26326      if ((b = ["grayt_description", "grayt_suggest", "grayt_control"].concat(b)) && b.length)
26327        for (e = 0; e < b.length; e++) a.addMenuGroup(b[e], e - 10);
26328      a.addCommand("scaytToggle", {
26329        exec: function(a) {
26330          var b = a.scayt;
26331          d.state.scayt[a.name] = !d.state.scayt[a.name];
26332          !0 === d.state.scayt[a.name] ? b || d.createScayt(a) : b && d.destroy(a);
26333        },
26334      });
26335      a.addCommand("scaytAbout", {
26336        exec: function(a) {
26337          a.scayt.tabToOpen = "about";
26338          a.lockSelection();
26339          a.openDialog(c.dialogName);
26340        },
26341      });
26342      a.addCommand("scaytOptions", {
26343        exec: function(a) {
26344          a.scayt.tabToOpen = "options";
26345          a.lockSelection();
26346          a.openDialog(c.dialogName);
26347        },
26348      });
26349      a.addCommand("scaytLangs", {
26350        exec: function(a) {
26351          a.scayt.tabToOpen = "langs";
26352          a.lockSelection();
26353          a.openDialog(c.dialogName);
26354        },
26355      });
26356      a.addCommand("scaytDict", {
26357        exec: function(a) {
26358          a.scayt.tabToOpen = "dictionaries";
26359          a.lockSelection();
26360          a.openDialog(c.dialogName);
26361        },
26362      });
26363      b = {
26364        scaytToggle: {
26365          label: a.lang.scayt.btn_enable,
26366          group: "scaytButton",
26367          command: "scaytToggle",
26368        },
26369        scaytAbout: { label: a.lang.scayt.btn_about, group: "scaytButton", command: "scaytAbout" },
26370        scaytOptions: {
26371          label: a.lang.scayt.btn_options,
26372          group: "scaytButton",
26373          command: "scaytOptions",
26374        },
26375        scaytLangs: { label: a.lang.scayt.btn_langs, group: "scaytButton", command: "scaytLangs" },
26376        scaytDict: {
26377          label: a.lang.scayt.btn_dictionaries,
26378          group: "scaytButton",
26379          command: "scaytDict",
26380        },
26381      };
26382      a.plugins.wsc &&
26383        (b.WSC = {
26384          label: a.lang.wsc.toolbar,
26385          group: "scaytButton",
26386          onClick: function() {
26387            var b = CKEDITOR.plugins.scayt,
26388              d = a.scayt,
26389              c =
26390                a.elementMode == CKEDITOR.ELEMENT_MODE_INLINE
26391                  ? a.container.getText()
26392                  : a.document.getBody().getText();
26393            (c = c.replace(/\s/g, ""))
26394              ? (d && b.state.scayt[a.name] && d.setMarkupPaused && d.setMarkupPaused(!0),
26395                a.lockSelection(),
26396                a.execCommand("checkspell"))
26397              : alert("Nothing to check!");
26398          },
26399        });
26400      a.addMenuItems(b);
26401    },
26402    bindEvents: function(a) {
26403      var c = CKEDITOR.plugins.scayt,
26404        d = a.elementMode == CKEDITOR.ELEMENT_MODE_INLINE,
26405        b = function() {
26406          c.destroy(a);
26407        },
26408        e = function() {
26409          !c.state.scayt[a.name] || a.readOnly || a.scayt || c.createScayt(a);
26410        },
26411        f = function() {
26412          var b = a.editable();
26413          b.attachListener(
26414            b,
26415            "focus",
26416            function(b) {
26417              CKEDITOR.plugins.scayt && !a.scayt && setTimeout(e, 0);
26418              b = CKEDITOR.plugins.scayt && CKEDITOR.plugins.scayt.state.scayt[a.name] && a.scayt;
26419              var c, h;
26420              if ((d || b) && a._.savedSelection) {
26421                b = a._.savedSelection.getSelectedElement();
26422                b = !b && a._.savedSelection.getRanges();
26423                for (var f = 0; f < b.length; f++)
26424                  (h = b[f]),
26425                    "string" === typeof h.startContainer.$.nodeValue &&
26426                      ((c = h.startContainer.getText().length),
26427                      (c < h.startOffset || c < h.endOffset) && a.unlockSelection(!1));
26428              }
26429            },
26430            this,
26431            null,
26432            -10,
26433          );
26434        },
26435        g = function() {
26436          d
26437            ? a.config.scayt_inlineModeImmediateMarkup
26438              ? e()
26439              : (a.on("blur", function() {
26440                  setTimeout(b, 0);
26441                }),
26442                a.on("focus", e),
26443                a.focusManager.hasFocus && e())
26444            : e();
26445          f();
26446          var c = a.editable();
26447          c.attachListener(
26448            c,
26449            "mousedown",
26450            function(b) {
26451              b = b.data.getTarget();
26452              var d = a.widgets && a.widgets.getByElement(b);
26453              d &&
26454                (d.wrapper = b.getAscendant(function(a) {
26455                  return a.hasAttribute("data-cke-widget-wrapper");
26456                }, !0));
26457            },
26458            this,
26459            null,
26460            -10,
26461          );
26462        };
26463      a.on("contentDom", g);
26464      a.on("beforeCommandExec", function(b) {
26465        var d = a.scayt,
26466          e = !1,
26467          f = !1,
26468          g = !0;
26469        b.data.name in c.options.disablingCommandExec && "wysiwyg" == a.mode
26470          ? d && (c.destroy(a), a.fire("scaytButtonState", CKEDITOR.TRISTATE_DISABLED))
26471          : ("bold" !== b.data.name &&
26472              "italic" !== b.data.name &&
26473              "underline" !== b.data.name &&
26474              "strike" !== b.data.name &&
26475              "subscript" !== b.data.name &&
26476              "superscript" !== b.data.name &&
26477              "enter" !== b.data.name &&
26478              "cut" !== b.data.name &&
26479              "language" !== b.data.name) ||
26480            !d ||
26481            ("cut" === b.data.name && ((g = !1), (f = !0)),
26482            "language" === b.data.name && (f = e = !0),
26483            a.fire("reloadMarkupScayt", {
26484              removeOptions: { removeInside: g, forceBookmark: f, language: e },
26485              timeout: 0,
26486            }));
26487      });
26488      a.on("beforeSetMode", function(b) {
26489        if ("source" == b.data) {
26490          if ((b = a.scayt)) c.destroy(a), a.fire("scaytButtonState", CKEDITOR.TRISTATE_DISABLED);
26491          a.document && a.document.getBody().removeAttribute("_jquid");
26492        }
26493      });
26494      a.on("afterCommandExec", function(b) {
26495        "wysiwyg" != a.mode ||
26496          ("undo" != b.data.name && "redo" != b.data.name) ||
26497          setTimeout(function() {
26498            c.reloadMarkup(a.scayt);
26499          }, 250);
26500      });
26501      a.on("readOnly", function(b) {
26502        var d;
26503        b &&
26504          ((d = a.scayt),
26505          !0 === b.editor.readOnly
26506            ? d && d.fire("removeMarkupInDocument", {})
26507            : d
26508              ? c.reloadMarkup(d)
26509              : "wysiwyg" == b.editor.mode &&
26510                !0 === c.state.scayt[b.editor.name] &&
26511                (c.createScayt(a), b.editor.fire("scaytButtonState", CKEDITOR.TRISTATE_ON)));
26512      });
26513      a.on("beforeDestroy", b);
26514      a.on(
26515        "setData",
26516        function() {
26517          b();
26518          (a.elementMode == CKEDITOR.ELEMENT_MODE_INLINE || a.plugins.divarea) && g();
26519        },
26520        this,
26521        null,
26522        50,
26523      );
26524      a.on("reloadMarkupScayt", function(b) {
26525        var d = b.data && b.data.removeOptions,
26526          e = b.data && b.data.timeout,
26527          f = b.data && b.data.language,
26528          g = a.scayt;
26529        g &&
26530          setTimeout(function() {
26531            f &&
26532              ((d.selectionNode = a.plugins.language.getCurrentLangElement(a)),
26533              (d.selectionNode = (d.selectionNode && d.selectionNode.$) || null));
26534            g.removeMarkupInSelectionNode(d);
26535            c.reloadMarkup(g);
26536          }, e || 0);
26537      });
26538      a.on(
26539        "insertElement",
26540        function() {
26541          a.fire("reloadMarkupScayt", { removeOptions: { forceBookmark: !0 } });
26542        },
26543        this,
26544        null,
26545        50,
26546      );
26547      a.on(
26548        "insertHtml",
26549        function() {
26550          a.scayt && a.scayt.setFocused && a.scayt.setFocused(!0);
26551          a.fire("reloadMarkupScayt");
26552        },
26553        this,
26554        null,
26555        50,
26556      );
26557      a.on(
26558        "insertText",
26559        function() {
26560          a.scayt && a.scayt.setFocused && a.scayt.setFocused(!0);
26561          a.fire("reloadMarkupScayt");
26562        },
26563        this,
26564        null,
26565        50,
26566      );
26567      a.on("scaytDialogShown", function(b) {
26568        b.data.selectPage(a.scayt.tabToOpen);
26569      });
26570    },
26571    parseConfig: function(a) {
26572      var c = CKEDITOR.plugins.scayt;
26573      c.replaceOldOptionsNames(a.config);
26574      "boolean" !== typeof a.config.scayt_autoStartup && (a.config.scayt_autoStartup = !1);
26575      c.state.scayt[a.name] = a.config.scayt_autoStartup;
26576      "boolean" !== typeof a.config.grayt_autoStartup && (a.config.grayt_autoStartup = !1);
26577      "boolean" !== typeof a.config.scayt_inlineModeImmediateMarkup &&
26578        (a.config.scayt_inlineModeImmediateMarkup = !1);
26579      c.state.grayt[a.name] = a.config.grayt_autoStartup;
26580      a.config.scayt_contextCommands || (a.config.scayt_contextCommands = "ignoreall|add");
26581      a.config.scayt_contextMenuItemsOrder ||
26582        (a.config.scayt_contextMenuItemsOrder = "suggest|moresuggest|control");
26583      a.config.scayt_sLang || (a.config.scayt_sLang = "en_US");
26584      if (
26585        void 0 === a.config.scayt_maxSuggestions ||
26586        "number" != typeof a.config.scayt_maxSuggestions ||
26587        0 > a.config.scayt_maxSuggestions
26588      )
26589        a.config.scayt_maxSuggestions = 3;
26590      if (
26591        void 0 === a.config.scayt_minWordLength ||
26592        "number" != typeof a.config.scayt_minWordLength ||
26593        1 > a.config.scayt_minWordLength
26594      )
26595        a.config.scayt_minWordLength = 3;
26596      if (
26597        void 0 === a.config.scayt_customDictionaryIds ||
26598        "string" !== typeof a.config.scayt_customDictionaryIds
26599      )
26600        a.config.scayt_customDictionaryIds = "";
26601      if (
26602        void 0 === a.config.scayt_userDictionaryName ||
26603        "string" !== typeof a.config.scayt_userDictionaryName
26604      )
26605        a.config.scayt_userDictionaryName = null;
26606      if (
26607        "string" === typeof a.config.scayt_uiTabs &&
26608        3 === a.config.scayt_uiTabs.split(",").length
26609      ) {
26610        var d = [],
26611          b = [];
26612        a.config.scayt_uiTabs = a.config.scayt_uiTabs.split(",");
26613        CKEDITOR.tools.search(a.config.scayt_uiTabs, function(a) {
26614          1 === Number(a) || 0 === Number(a) ? (b.push(!0), d.push(Number(a))) : b.push(!1);
26615        });
26616        null === CKEDITOR.tools.search(b, !1)
26617          ? (a.config.scayt_uiTabs = d)
26618          : (a.config.scayt_uiTabs = [1, 1, 1]);
26619      } else a.config.scayt_uiTabs = [1, 1, 1];
26620      "string" != typeof a.config.scayt_serviceProtocol && (a.config.scayt_serviceProtocol = null);
26621      "string" != typeof a.config.scayt_serviceHost && (a.config.scayt_serviceHost = null);
26622      "string" != typeof a.config.scayt_servicePort && (a.config.scayt_servicePort = null);
26623      "string" != typeof a.config.scayt_servicePath && (a.config.scayt_servicePath = null);
26624      a.config.scayt_moreSuggestions || (a.config.scayt_moreSuggestions = "on");
26625      "string" !== typeof a.config.scayt_customerId &&
26626        (a.config.scayt_customerId =
26627          "1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2");
26628      "string" !== typeof a.config.scayt_customPunctuation &&
26629        (a.config.scayt_customPunctuation = "-");
26630      "string" !== typeof a.config.scayt_srcUrl &&
26631        ((c = document.location.protocol),
26632        (c = -1 != c.search(/https?:/) ? c : "http:"),
26633        (a.config.scayt_srcUrl =
26634          c + "//svc.webspellchecker.net/spellcheck31/lf/scayt3/ckscayt/ckscayt.js"));
26635      "boolean" !== typeof CKEDITOR.config.scayt_handleCheckDirty &&
26636        (CKEDITOR.config.scayt_handleCheckDirty = !0);
26637      "boolean" !== typeof CKEDITOR.config.scayt_handleUndoRedo &&
26638        (CKEDITOR.config.scayt_handleUndoRedo = !0);
26639      CKEDITOR.config.scayt_handleUndoRedo = CKEDITOR.plugins.undo
26640        ? CKEDITOR.config.scayt_handleUndoRedo
26641        : !1;
26642      "boolean" !== typeof a.config.scayt_multiLanguageMode &&
26643        (a.config.scayt_multiLanguageMode = !1);
26644      "object" !== typeof a.config.scayt_multiLanguageStyles &&
26645        (a.config.scayt_multiLanguageStyles = {});
26646      a.config.scayt_ignoreAllCapsWords &&
26647        "boolean" !== typeof a.config.scayt_ignoreAllCapsWords &&
26648        (a.config.scayt_ignoreAllCapsWords = !1);
26649      a.config.scayt_ignoreDomainNames &&
26650        "boolean" !== typeof a.config.scayt_ignoreDomainNames &&
26651        (a.config.scayt_ignoreDomainNames = !1);
26652      a.config.scayt_ignoreWordsWithMixedCases &&
26653        "boolean" !== typeof a.config.scayt_ignoreWordsWithMixedCases &&
26654        (a.config.scayt_ignoreWordsWithMixedCases = !1);
26655      a.config.scayt_ignoreWordsWithNumbers &&
26656        "boolean" !== typeof a.config.scayt_ignoreWordsWithNumbers &&
26657        (a.config.scayt_ignoreWordsWithNumbers = !1);
26658      if (a.config.scayt_disableOptionsStorage) {
26659        var c = CKEDITOR.tools.isArray(a.config.scayt_disableOptionsStorage)
26660            ? a.config.scayt_disableOptionsStorage
26661            : "string" === typeof a.config.scayt_disableOptionsStorage
26662              ? [a.config.scayt_disableOptionsStorage]
26663              : void 0,
26664          e = "all options lang ignore-all-caps-words ignore-domain-names ignore-words-with-mixed-cases ignore-words-with-numbers".split(
26665            " ",
26666          ),
26667          f = [
26668            "lang",
26669            "ignore-all-caps-words",
26670            "ignore-domain-names",
26671            "ignore-words-with-mixed-cases",
26672            "ignore-words-with-numbers",
26673          ],
26674          g = CKEDITOR.tools.search,
26675          h = CKEDITOR.tools.indexOf;
26676        a.config.scayt_disableOptionsStorage = (function(a) {
26677          for (var b = [], d = 0; d < a.length; d++) {
26678            var c = a[d],
26679              n = !!g(a, "options");
26680            if (
26681              !g(e, c) ||
26682              (n &&
26683                g(f, function(a) {
26684                  if ("lang" === a) return !1;
26685                }))
26686            )
26687              return;
26688            g(f, c) && f.splice(h(f, c), 1);
26689            if ("all" === c || (n && g(a, "lang"))) return [];
26690            "options" === c && (f = ["lang"]);
26691          }
26692          return (b = b.concat(f));
26693        })(c);
26694      }
26695    },
26696    addRule: function(a) {
26697      var c = CKEDITOR.plugins.scayt,
26698        d = a.dataProcessor,
26699        b = d && d.htmlFilter,
26700        e = a._.elementsPath && a._.elementsPath.filters,
26701        d = d && d.dataFilter,
26702        f = a.addRemoveFormatFilter,
26703        g = function(b) {
26704          if (
26705            a.scayt &&
26706            (b.hasAttribute(c.options.data_attribute_name) ||
26707              b.hasAttribute(c.options.problem_grammar_data_attribute))
26708          )
26709            return !1;
26710        },
26711        h = function(b) {
26712          var d = !0;
26713          a.scayt &&
26714            (b.hasAttribute(c.options.data_attribute_name) ||
26715              b.hasAttribute(c.options.problem_grammar_data_attribute)) &&
26716            (d = !1);
26717          return d;
26718        };
26719      e && e.push(g);
26720      d &&
26721        d.addRules({
26722          elements: {
26723            span: function(a) {
26724              var b =
26725                  a.hasClass(c.options.misspelled_word_class) &&
26726                  a.attributes[c.options.data_attribute_name],
26727                d =
26728                  a.hasClass(c.options.problem_grammar_class) &&
26729                  a.attributes[c.options.problem_grammar_data_attribute];
26730              c && (b || d) && delete a.name;
26731              return a;
26732            },
26733          },
26734        });
26735      b &&
26736        b.addRules({
26737          elements: {
26738            span: function(a) {
26739              var b =
26740                  a.hasClass(c.options.misspelled_word_class) &&
26741                  a.attributes[c.options.data_attribute_name],
26742                d =
26743                  a.hasClass(c.options.problem_grammar_class) &&
26744                  a.attributes[c.options.problem_grammar_data_attribute];
26745              c && (b || d) && delete a.name;
26746              return a;
26747            },
26748          },
26749        });
26750      f && f.call(a, h);
26751    },
26752    scaytMenuDefinition: function(a) {
26753      var c = this;
26754      a = a.scayt;
26755      return {
26756        scayt: {
26757          scayt_ignore: {
26758            label: a.getLocal("btn_ignore"),
26759            group: "scayt_control",
26760            order: 1,
26761            exec: function(a) {
26762              a.scayt.ignoreWord();
26763            },
26764          },
26765          scayt_ignoreall: {
26766            label: a.getLocal("btn_ignoreAll"),
26767            group: "scayt_control",
26768            order: 2,
26769            exec: function(a) {
26770              a.scayt.ignoreAllWords();
26771            },
26772          },
26773          scayt_add: {
26774            label: a.getLocal("btn_addWord"),
26775            group: "scayt_control",
26776            order: 3,
26777            exec: function(a) {
26778              var b = a.scayt;
26779              setTimeout(function() {
26780                b.addWordToUserDictionary();
26781              }, 10);
26782            },
26783          },
26784          scayt_option: {
26785            label: a.getLocal("btn_options"),
26786            group: "scayt_control",
26787            order: 4,
26788            exec: function(a) {
26789              a.scayt.tabToOpen = "options";
26790              a.lockSelection();
26791              a.openDialog(c.dialogName);
26792            },
26793            verification: function(a) {
26794              return 1 == a.config.scayt_uiTabs[0] ? !0 : !1;
26795            },
26796          },
26797          scayt_language: {
26798            label: a.getLocal("btn_langs"),
26799            group: "scayt_control",
26800            order: 5,
26801            exec: function(a) {
26802              a.scayt.tabToOpen = "langs";
26803              a.lockSelection();
26804              a.openDialog(c.dialogName);
26805            },
26806            verification: function(a) {
26807              return 1 == a.config.scayt_uiTabs[1] ? !0 : !1;
26808            },
26809          },
26810          scayt_dictionary: {
26811            label: a.getLocal("btn_dictionaries"),
26812            group: "scayt_control",
26813            order: 6,
26814            exec: function(a) {
26815              a.scayt.tabToOpen = "dictionaries";
26816              a.lockSelection();
26817              a.openDialog(c.dialogName);
26818            },
26819            verification: function(a) {
26820              return 1 == a.config.scayt_uiTabs[2] ? !0 : !1;
26821            },
26822          },
26823          scayt_about: {
26824            label: a.getLocal("btn_about"),
26825            group: "scayt_control",
26826            order: 7,
26827            exec: function(a) {
26828              a.scayt.tabToOpen = "about";
26829              a.lockSelection();
26830              a.openDialog(c.dialogName);
26831            },
26832          },
26833        },
26834        grayt: {
26835          grayt_problemdescription: {
26836            label: "Grammar problem description",
26837            group: "grayt_description",
26838            order: 1,
26839            state: CKEDITOR.TRISTATE_DISABLED,
26840            exec: function(a) {},
26841          },
26842          grayt_ignore: {
26843            label: a.getLocal("btn_ignore"),
26844            group: "grayt_control",
26845            order: 2,
26846            exec: function(a) {
26847              a.scayt.ignorePhrase();
26848            },
26849          },
26850          grayt_ignoreall: {
26851            label: a.getLocal("btn_ignoreAll"),
26852            group: "grayt_control",
26853            order: 3,
26854            exec: function(a) {
26855              a.scayt.ignoreAllPhrases();
26856            },
26857          },
26858        },
26859      };
26860    },
26861    buildSuggestionMenuItems: function(a, c, d) {
26862      var b = {},
26863        e = {},
26864        f = d ? "word" : "phrase",
26865        g = d ? "startGrammarCheck" : "startSpellCheck",
26866        h = a.scayt;
26867      if (0 < c.length && "no_any_suggestions" !== c[0])
26868        if (d)
26869          for (d = 0; d < c.length; d++) {
26870            var k = "scayt_suggest_" + CKEDITOR.plugins.scayt.suggestions[d].replace(" ", "_");
26871            a.addCommand(k, this.createCommand(CKEDITOR.plugins.scayt.suggestions[d], f, g));
26872            d < a.config.scayt_maxSuggestions
26873              ? (a.addMenuItem(k, {
26874                  label: c[d],
26875                  command: k,
26876                  group: "scayt_suggest",
26877                  order: d + 1,
26878                }),
26879                (b[k] = CKEDITOR.TRISTATE_OFF))
26880              : (a.addMenuItem(k, {
26881                  label: c[d],
26882                  command: k,
26883                  group: "scayt_moresuggest",
26884                  order: d + 1,
26885                }),
26886                (e[k] = CKEDITOR.TRISTATE_OFF),
26887                "on" === a.config.scayt_moreSuggestions &&
26888                  (a.addMenuItem("scayt_moresuggest", {
26889                    label: h.getLocal("btn_moreSuggestions"),
26890                    group: "scayt_moresuggest",
26891                    order: 10,
26892                    getItems: function() {
26893                      return e;
26894                    },
26895                  }),
26896                  (b.scayt_moresuggest = CKEDITOR.TRISTATE_OFF)));
26897          }
26898        else
26899          for (d = 0; d < c.length; d++)
26900            (k = "grayt_suggest_" + CKEDITOR.plugins.scayt.suggestions[d].replace(" ", "_")),
26901              a.addCommand(k, this.createCommand(CKEDITOR.plugins.scayt.suggestions[d], f, g)),
26902              a.addMenuItem(k, { label: c[d], command: k, group: "grayt_suggest", order: d + 1 }),
26903              (b[k] = CKEDITOR.TRISTATE_OFF);
26904      else
26905        (b.no_scayt_suggest = CKEDITOR.TRISTATE_DISABLED),
26906          a.addCommand("no_scayt_suggest", { exec: function() {} }),
26907          a.addMenuItem("no_scayt_suggest", {
26908            label: h.getLocal("btn_noSuggestions") || "no_scayt_suggest",
26909            command: "no_scayt_suggest",
26910            group: "scayt_suggest",
26911            order: 0,
26912          });
26913      return b;
26914    },
26915    menuGenerator: function(a, c) {
26916      var d = a.scayt,
26917        b = this.scaytMenuDefinition(a),
26918        e = {},
26919        f = a.config.scayt_contextCommands.split("|"),
26920        g = c.getAttribute(d.getLangAttribute()) || d.getLang(),
26921        h,
26922        k,
26923        m;
26924      h = d.isScaytNode(c);
26925      k = d.isGraytNode(c);
26926      h
26927        ? ((b = b.scayt),
26928          (e = c.getAttribute(d.getScaytNodeAttributeName())),
26929          d.fire("getSuggestionsList", { lang: g, word: e }),
26930          (e = this.buildSuggestionMenuItems(a, CKEDITOR.plugins.scayt.suggestions, h)))
26931        : k &&
26932          ((b = b.grayt),
26933          (e = c.getAttribute(d.getGraytNodeAttributeName())),
26934          (m = d.getProblemDescriptionText(e, g)),
26935          b.grayt_problemdescription && m && (b.grayt_problemdescription.label = m),
26936          d.fire("getGrammarSuggestionsList", { lang: g, phrase: e }),
26937          (e = this.buildSuggestionMenuItems(a, CKEDITOR.plugins.scayt.suggestions, h)));
26938      if (h && "off" == a.config.scayt_contextCommands) return e;
26939      for (var l in b)
26940        (h &&
26941          -1 == CKEDITOR.tools.indexOf(f, l.replace("scayt_", "")) &&
26942          "all" != a.config.scayt_contextCommands) ||
26943          (k &&
26944            "grayt_problemdescription" !== l &&
26945            -1 == CKEDITOR.tools.indexOf(f, l.replace("grayt_", "")) &&
26946            "all" != a.config.scayt_contextCommands) ||
26947          ((e[l] = "undefined" != typeof b[l].state ? b[l].state : CKEDITOR.TRISTATE_OFF),
26948          "function" !== typeof b[l].verification || b[l].verification(a) || delete e[l],
26949          a.addCommand(l, { exec: b[l].exec }),
26950          a.addMenuItem(l, {
26951            label: a.lang.scayt[b[l].label] || b[l].label,
26952            command: l,
26953            group: b[l].group,
26954            order: b[l].order,
26955          }));
26956      return e;
26957    },
26958    createCommand: function(a, c, d) {
26959      return {
26960        exec: function(b) {
26961          b = b.scayt;
26962          var e = {};
26963          e[c] = a;
26964          b.replaceSelectionNode(e);
26965          "startGrammarCheck" === d && b.removeMarkupInSelectionNode({ grammarOnly: !0 });
26966          b.fire(d);
26967        },
26968      };
26969    },
26970  });
26971  CKEDITOR.plugins.scayt = {
26972    charsToObserve: [
26973      {
26974        charName: "cke-fillingChar",
26975        charCode: (function() {
26976          var a = CKEDITOR.version.match(/^\d(\.\d*)*/),
26977            a = a && a[0],
26978            c;
26979          if (a) {
26980            c = "4.5.7";
26981            var d,
26982              a = a.replace(/\./g, "");
26983            c = c.replace(/\./g, "");
26984            d = a.length - c.length;
26985            d = 0 <= d ? d : 0;
26986            c = parseInt(a) >= parseInt(c) * Math.pow(10, d);
26987          }
26988          return c ? Array(7).join(String.fromCharCode(8203)) : String.fromCharCode(8203);
26989        })(),
26990      },
26991    ],
26992    onLoadTimestamp: "",
26993    state: { scayt: {}, grayt: {} },
26994    warningCounter: 0,
26995    suggestions: [],
26996    options: {
26997      disablingCommandExec: { source: !0, newpage: !0, templates: !0 },
26998      data_attribute_name: "data-scayt-word",
26999      misspelled_word_class: "scayt-misspell-word",
27000      problem_grammar_data_attribute: "data-grayt-phrase",
27001      problem_grammar_class: "gramm-problem",
27002    },
27003    backCompatibilityMap: {
27004      scayt_service_protocol: "scayt_serviceProtocol",
27005      scayt_service_host: "scayt_serviceHost",
27006      scayt_service_port: "scayt_servicePort",
27007      scayt_service_path: "scayt_servicePath",
27008      scayt_customerid: "scayt_customerId",
27009    },
27010    alarmCompatibilityMessage: function() {
27011      5 > this.warningCounter &&
27012        (console.warn(
27013          "You are using the latest version of SCAYT plugin for CKEditor with the old application version. In order to have access to the newest features, it is recommended to upgrade the application version to latest one as well. Contact us for more details at [email protected].",
27014        ),
27015        (this.warningCounter += 1));
27016    },
27017    isNewUdSupported: function(a) {
27018      return a.getUserDictionary ? !0 : !1;
27019    },
27020    reloadMarkup: function(a) {
27021      var c;
27022      a &&
27023        ((c = a.getScaytLangList()),
27024        a.reloadMarkup
27025          ? a.reloadMarkup()
27026          : (this.alarmCompatibilityMessage(),
27027            c && c.ltr && c.rtl && a.fire("startSpellCheck, startGrammarCheck")));
27028    },
27029    replaceOldOptionsNames: function(a) {
27030      for (var c in a)
27031        c in this.backCompatibilityMap && ((a[this.backCompatibilityMap[c]] = a[c]), delete a[c]);
27032    },
27033    createScayt: function(a) {
27034      var c = this,
27035        d = CKEDITOR.plugins.scayt;
27036      this.loadScaytLibrary(a, function(a) {
27037        function e(a) {
27038          return new SCAYT.CKSCAYT(a, function() {}, function() {});
27039        }
27040        var f = (a.window && a.window.getFrame()) || a.editable();
27041        if (f) {
27042          f = {
27043            lang: a.config.scayt_sLang,
27044            container: f.$,
27045            customDictionary: a.config.scayt_customDictionaryIds,
27046            userDictionaryName: a.config.scayt_userDictionaryName,
27047            localization: a.langCode,
27048            customer_id: a.config.scayt_customerId,
27049            customPunctuation: a.config.scayt_customPunctuation,
27050            debug: a.config.scayt_debug,
27051            data_attribute_name: c.options.data_attribute_name,
27052            misspelled_word_class: c.options.misspelled_word_class,
27053            problem_grammar_data_attribute: c.options.problem_grammar_data_attribute,
27054            problem_grammar_class: c.options.problem_grammar_class,
27055            "options-to-restore": a.config.scayt_disableOptionsStorage,
27056            focused: a.editable().hasFocus,
27057            ignoreElementsRegex: a.config.scayt_elementsToIgnore,
27058            ignoreGraytElementsRegex: a.config.grayt_elementsToIgnore,
27059            minWordLength: a.config.scayt_minWordLength,
27060            multiLanguageMode: a.config.scayt_multiLanguageMode,
27061            multiLanguageStyles: a.config.scayt_multiLanguageStyles,
27062            graytAutoStartup: a.config.grayt_autoStartup,
27063            charsToObserve: d.charsToObserve,
27064          };
27065          a.config.scayt_serviceProtocol && (f.service_protocol = a.config.scayt_serviceProtocol);
27066          a.config.scayt_serviceHost && (f.service_host = a.config.scayt_serviceHost);
27067          a.config.scayt_servicePort && (f.service_port = a.config.scayt_servicePort);
27068          a.config.scayt_servicePath && (f.service_path = a.config.scayt_servicePath);
27069          "boolean" === typeof a.config.scayt_ignoreAllCapsWords &&
27070            (f["ignore-all-caps-words"] = a.config.scayt_ignoreAllCapsWords);
27071          "boolean" === typeof a.config.scayt_ignoreDomainNames &&
27072            (f["ignore-domain-names"] = a.config.scayt_ignoreDomainNames);
27073          "boolean" === typeof a.config.scayt_ignoreWordsWithMixedCases &&
27074            (f["ignore-words-with-mixed-cases"] = a.config.scayt_ignoreWordsWithMixedCases);
27075          "boolean" === typeof a.config.scayt_ignoreWordsWithNumbers &&
27076            (f["ignore-words-with-numbers"] = a.config.scayt_ignoreWordsWithNumbers);
27077          var g;
27078          try {
27079            g = e(f);
27080          } catch (h) {
27081            c.alarmCompatibilityMessage(), delete f.charsToObserve, (g = e(f));
27082          }
27083          g.subscribe("suggestionListSend", function(a) {
27084            for (var b = {}, d = [], c = 0; c < a.suggestionList.length; c++)
27085              b["word_" + a.suggestionList[c]] ||
27086                ((b["word_" + a.suggestionList[c]] = a.suggestionList[c]),
27087                d.push(a.suggestionList[c]));
27088            CKEDITOR.plugins.scayt.suggestions = d;
27089          });
27090          g.subscribe("selectionIsChanged", function(d) {
27091            a.getSelection().isLocked && "restoreSelection" !== d.action && a.lockSelection();
27092            "restoreSelection" === d.action && a.selectionChange(!0);
27093          });
27094          g.subscribe("graytStateChanged", function(c) {
27095            d.state.grayt[a.name] = c.state;
27096          });
27097          g.addMarkupHandler &&
27098            g.addMarkupHandler(function(d) {
27099              var c = a.editable(),
27100                e = c.getCustomData(d.charName);
27101              e && ((e.$ = d.node), c.setCustomData(d.charName, e));
27102            });
27103          a.scayt = g;
27104          a.fire(
27105            "scaytButtonState",
27106            a.readOnly ? CKEDITOR.TRISTATE_DISABLED : CKEDITOR.TRISTATE_ON,
27107          );
27108        } else d.state.scayt[a.name] = !1;
27109      });
27110    },
27111    destroy: function(a) {
27112      a.scayt && a.scayt.destroy();
27113      delete a.scayt;
27114      a.fire("scaytButtonState", CKEDITOR.TRISTATE_OFF);
27115    },
27116    loadScaytLibrary: function(a, c) {
27117      var d,
27118        b = function() {
27119          CKEDITOR.fireOnce("scaytReady");
27120          a.scayt || ("function" === typeof c && c(a));
27121        };
27122      "undefined" === typeof window.SCAYT || "function" !== typeof window.SCAYT.CKSCAYT
27123        ? ((d = a.config.scayt_srcUrl + "?" + this.onLoadTimestamp),
27124          CKEDITOR.scriptLoader.load(d, function(a) {
27125            a && b();
27126          }))
27127        : window.SCAYT && "function" === typeof window.SCAYT.CKSCAYT && b();
27128    },
27129  };
27130  CKEDITOR.on("dialogDefinition", function(a) {
27131    var c = a.data.name;
27132    a = a.data.definition.dialog;
27133    "scaytDialog" !== c &&
27134      "checkspell" !== c &&
27135      (a.on("show", function(a) {
27136        a = a.sender && a.sender.getParentEditor();
27137        var b = CKEDITOR.plugins.scayt,
27138          c = a.scayt;
27139        c && b.state.scayt[a.name] && c.setMarkupPaused && c.setMarkupPaused(!0);
27140      }),
27141      a.on("hide", function(a) {
27142        a = a.sender && a.sender.getParentEditor();
27143        var b = CKEDITOR.plugins.scayt,
27144          c = a.scayt;
27145        c && b.state.scayt[a.name] && c.setMarkupPaused && c.setMarkupPaused(!1);
27146      }));
27147    if ("scaytDialog" === c)
27148      a.on(
27149        "cancel",
27150        function(a) {
27151          return !1;
27152        },
27153        this,
27154        null,
27155        -1,
27156      );
27157    if ("checkspell" === c)
27158      a.on(
27159        "cancel",
27160        function(a) {
27161          a = a.sender && a.sender.getParentEditor();
27162          var b = CKEDITOR.plugins.scayt,
27163            c = a.scayt;
27164          c && b.state.scayt[a.name] && c.setMarkupPaused && c.setMarkupPaused(!1);
27165          a.unlockSelection();
27166        },
27167        this,
27168        null,
27169        -2,
27170      );
27171    if ("link" === c)
27172      a.on("ok", function(a) {
27173        var b = a.sender && a.sender.getParentEditor();
27174        b &&
27175          setTimeout(function() {
27176            b.fire("reloadMarkupScayt", {
27177              removeOptions: { removeInside: !0, forceBookmark: !0 },
27178              timeout: 0,
27179            });
27180          }, 0);
27181      });
27182    if ("replace" === c)
27183      a.on("hide", function(a) {
27184        a = a.sender && a.sender.getParentEditor();
27185        var b = CKEDITOR.plugins.scayt,
27186          c = a.scayt;
27187        a &&
27188          setTimeout(function() {
27189            c && (c.fire("removeMarkupInDocument", {}), b.reloadMarkup(c));
27190          }, 0);
27191      });
27192  });
27193  CKEDITOR.on("scaytReady", function() {
27194    if (!0 === CKEDITOR.config.scayt_handleCheckDirty) {
27195      var a = CKEDITOR.editor.prototype;
27196      a.checkDirty = CKEDITOR.tools.override(a.checkDirty, function(a) {
27197        return function() {
27198          var b = null,
27199            c = this.scayt;
27200          if (
27201            CKEDITOR.plugins.scayt &&
27202            CKEDITOR.plugins.scayt.state.scayt[this.name] &&
27203            this.scayt
27204          ) {
27205            if ((b = "ready" == this.status))
27206              var f = c.removeMarkupFromString(this.getSnapshot()),
27207                c = c.removeMarkupFromString(this._.previousValue),
27208                b = b && c !== f;
27209          } else b = a.call(this);
27210          return b;
27211        };
27212      });
27213      a.resetDirty = CKEDITOR.tools.override(a.resetDirty, function(a) {
27214        return function() {
27215          var b = this.scayt;
27216          CKEDITOR.plugins.scayt && CKEDITOR.plugins.scayt.state.scayt[this.name] && this.scayt
27217            ? (this._.previousValue = b.removeMarkupFromString(this.getSnapshot()))
27218            : a.call(this);
27219        };
27220      });
27221    }
27222    if (!0 === CKEDITOR.config.scayt_handleUndoRedo) {
27223      var a = CKEDITOR.plugins.undo.Image.prototype,
27224        c = "function" == typeof a.equalsContent ? "equalsContent" : "equals";
27225      a[c] = CKEDITOR.tools.override(a[c], function(a) {
27226        return function(b) {
27227          var c = b.editor.scayt,
27228            f = this.contents,
27229            g = b.contents,
27230            h = null;
27231          CKEDITOR.plugins.scayt &&
27232            CKEDITOR.plugins.scayt.state.scayt[b.editor.name] &&
27233            b.editor.scayt &&
27234            ((this.contents = c.removeMarkupFromString(f) || ""),
27235            (b.contents = c.removeMarkupFromString(g) || ""));
27236          h = a.apply(this, arguments);
27237          this.contents = f;
27238          b.contents = g;
27239          return h;
27240        };
27241      });
27242    }
27243  });
27244  (function() {
27245    CKEDITOR.plugins.add("stylescombo", {
27246      requires: "richcombo",
27247      init: function(c) {
27248        var l = c.config,
27249          g = c.lang.stylescombo,
27250          f = {},
27251          k = [],
27252          m = [];
27253        c.on("stylesSet", function(a) {
27254          if ((a = a.data.styles)) {
27255            for (var b, h, d, e = 0, n = a.length; e < n; e++)
27256              ((b = a[e]),
27257              (c.blockless && b.element in CKEDITOR.dtd.$block) ||
27258                ("string" == typeof b.type && !CKEDITOR.style.customHandlers[b.type]) ||
27259                ((h = b.name),
27260                (b = new CKEDITOR.style(b)),
27261                c.filter.customConfig && !c.filter.check(b))) ||
27262                ((b._name = h),
27263                (b._.enterMode = l.enterMode),
27264                (b._.type = d = b.assignedTo || b.type),
27265                (b._.weight =
27266                  e + 1e3 * (d == CKEDITOR.STYLE_OBJECT ? 1 : d == CKEDITOR.STYLE_BLOCK ? 2 : 3)),
27267                (f[h] = b),
27268                k.push(b),
27269                m.push(b));
27270            k.sort(function(a, b) {
27271              return a._.weight - b._.weight;
27272            });
27273          }
27274        });
27275        c.ui.addRichCombo("Styles", {
27276          label: g.label,
27277          title: g.panelTitle,
27278          toolbar: "styles,10",
27279          allowedContent: m,
27280          panel: {
27281            css: [CKEDITOR.skin.getPath("editor")].concat(l.contentsCss),
27282            multiSelect: !0,
27283            attributes: { "aria-label": g.panelTitle },
27284          },
27285          init: function() {
27286            var a, b, c, d, e, f;
27287            e = 0;
27288            for (f = k.length; e < f; e++)
27289              (a = k[e]),
27290                (b = a._name),
27291                (d = a._.type),
27292                d != c && (this.startGroup(g["panelTitle" + String(d)]), (c = d)),
27293                this.add(b, a.type == CKEDITOR.STYLE_OBJECT ? b : a.buildPreview(), b);
27294            this.commit();
27295          },
27296          onClick: function(a) {
27297            c.focus();
27298            c.fire("saveSnapshot");
27299            a = f[a];
27300            var b = c.elementPath();
27301            if (a.group && a.removeStylesFromSameGroup(c)) c.applyStyle(a);
27302            else c[a.checkActive(b, c) ? "removeStyle" : "applyStyle"](a);
27303            c.fire("saveSnapshot");
27304          },
27305          onRender: function() {
27306            c.on(
27307              "selectionChange",
27308              function(a) {
27309                var b = this.getValue();
27310                a = a.data.path.elements;
27311                for (var h = 0, d = a.length, e; h < d; h++) {
27312                  e = a[h];
27313                  for (var g in f)
27314                    if (f[g].checkElementRemovable(e, !0, c)) {
27315                      g != b && this.setValue(g);
27316                      return;
27317                    }
27318                }
27319                this.setValue("");
27320              },
27321              this,
27322            );
27323          },
27324          onOpen: function() {
27325            var a = c.getSelection(),
27326              a = a.getSelectedElement() || a.getStartElement() || c.editable(),
27327              a = c.elementPath(a),
27328              b = [0, 0, 0, 0];
27329            this.showAll();
27330            this.unmarkAll();
27331            for (var h in f) {
27332              var d = f[h],
27333                e = d._.type;
27334              d.checkApplicable(a, c, c.activeFilter) ? b[e]++ : this.hideItem(h);
27335              d.checkActive(a, c) && this.mark(h);
27336            }
27337            b[CKEDITOR.STYLE_BLOCK] ||
27338              this.hideGroup(g["panelTitle" + String(CKEDITOR.STYLE_BLOCK)]);
27339            b[CKEDITOR.STYLE_INLINE] ||
27340              this.hideGroup(g["panelTitle" + String(CKEDITOR.STYLE_INLINE)]);
27341            b[CKEDITOR.STYLE_OBJECT] ||
27342              this.hideGroup(g["panelTitle" + String(CKEDITOR.STYLE_OBJECT)]);
27343          },
27344          refresh: function() {
27345            var a = c.elementPath();
27346            if (a) {
27347              for (var b in f) if (f[b].checkApplicable(a, c, c.activeFilter)) return;
27348              this.setState(CKEDITOR.TRISTATE_DISABLED);
27349            }
27350          },
27351          reset: function() {
27352            f = {};
27353            k = [];
27354          },
27355        });
27356      },
27357    });
27358  })();
27359  (function() {
27360    function k(c) {
27361      return {
27362        editorFocus: !1,
27363        canUndo: !1,
27364        modes: { wysiwyg: 1 },
27365        exec: function(d) {
27366          if (d.editable().hasFocus) {
27367            var e = d.getSelection(),
27368              b;
27369            if (
27370              (b = new CKEDITOR.dom.elementPath(e.getCommonAncestor(), e.root).contains(
27371                { td: 1, th: 1 },
27372                1,
27373              ))
27374            ) {
27375              var e = d.createRange(),
27376                a = CKEDITOR.tools.tryThese(
27377                  function() {
27378                    var a = b.getParent().$.cells[b.$.cellIndex + (c ? -1 : 1)];
27379                    a.parentNode.parentNode;
27380                    return a;
27381                  },
27382                  function() {
27383                    var a = b.getParent(),
27384                      a = a.getAscendant("table").$.rows[a.$.rowIndex + (c ? -1 : 1)];
27385                    return a.cells[c ? a.cells.length - 1 : 0];
27386                  },
27387                );
27388              if (a || c)
27389                if (a)
27390                  (a = new CKEDITOR.dom.element(a)),
27391                    e.moveToElementEditStart(a),
27392                    (e.checkStartOfBlock() && e.checkEndOfBlock()) || e.selectNodeContents(a);
27393                else return !0;
27394              else {
27395                for (
27396                  var f = b.getAscendant("table").$,
27397                    a = b.getParent().$.cells,
27398                    f = new CKEDITOR.dom.element(f.insertRow(-1), d.document),
27399                    g = 0,
27400                    h = a.length;
27401                  g < h;
27402                  g++
27403                )
27404                  f.append(new CKEDITOR.dom.element(a[g], d.document).
27404clone(!1, !1)).appendBogus();
27405                e.moveToElementEditStart(f);
27406              }
27407              e.select(!0);
27408              return !0;
27409            }
27410          }
27411          return !1;
27412        },
27413      };
27414    }
27415    var h = { editorFocus: !1, modes: { wysiwyg: 1, source: 1 } },
27416      g = {
27417        exec: function(c) {
27418          c.container.focusNext(!0, c.tabIndex);
27419        },
27420      },
27421      f = {
27422        exec: function(c) {
27423          c.container.focusPrevious(!0, c.tabIndex);
27424        },
27425      };
27426    CKEDITOR.plugins.add("tab", {
27427      init: function(c) {
27428        for (var d = !1 !== c.config.enableTabKeyTools, e = c.config.tabSpaces || 0, b = ""; e--; )
27429          b += " ";
27430        if (b)
27431          c.on("key", function(a) {
27432            9 == a.data.keyCode && (c.insertText(b), a.cancel());
27433          });
27434        if (d)
27435          c.on("key", function(a) {
27436            ((9 == a.data.keyCode && c.execCommand("selectNextCell")) ||
27437              (a.data.keyCode == CKEDITOR.SHIFT + 9 && c.execCommand("selectPreviousCell"))) &&
27438              a.cancel();
27439          });
27440        c.addCommand("blur", CKEDITOR.tools.extend(g, h));
27441        c.addCommand("blurBack", CKEDITOR.tools.extend(f, h));
27442        c.addCommand("selectNextCell", k());
27443        c.addCommand("selectPreviousCell", k(!0));
27444      },
27445    });
27446  })();
27447  CKEDITOR.dom.element.prototype.focusNext = function(k, h) {
27448    var g = void 0 === h ? this.getTabIndex() : h,
27449      f,
27450      c,
27451      d,
27452      e,
27453      b,
27454      a;
27455    if (0 >= g)
27456      for (b = this.getNextSourceNode(k, CKEDITOR.NODE_ELEMENT); b; ) {
27457        if (b.isVisible() && 0 === b.getTabIndex()) {
27458          d = b;
27459          break;
27460        }
27461        b = b.getNextSourceNode(!1, CKEDITOR.NODE_ELEMENT);
27462      }
27463    else
27464      for (
27465        b = this.getDocument()
27466          .getBody()
27467          .getFirst();
27468        (b = b.getNextSourceNode(!1, CKEDITOR.NODE_ELEMENT));
27469
27470      ) {
27471        if (!f)
27472          if (!c && b.equals(this)) {
27473            if (((c = !0), k)) {
27474              if (!(b = b.getNextSourceNode(!0, CKEDITOR.NODE_ELEMENT))) break;
27475              f = 1;
27476            }
27477          } else c && !this.contains(b) && (f = 1);
27478        if (b.isVisible() && !(0 > (a = b.getTabIndex()))) {
27479          if (f && a == g) {
27480            d = b;
27481            break;
27482          }
27483          a > g && (!d || !e || a < e) ? ((d = b), (e = a)) : d || 0 !== a || ((d = b), (e = a));
27484        }
27485      }
27486    d && d.focus();
27487  };
27488  CKEDITOR.dom.element.prototype.focusPrevious = function(k, h) {
27489    for (
27490      var g = void 0 === h ? this.getTabIndex() : h,
27491        f,
27492        c,
27493        d,
27494        e = 0,
27495        b,
27496        a = this.getDocument()
27497          .getBody()
27498          .getLast();
27499      (a = a.getPreviousSourceNode(!1, CKEDITOR.NODE_ELEMENT));
27500
27501    ) {
27502      if (!f)
27503        if (!c && a.equals(this)) {
27504          if (((c = !0), k)) {
27505            if (!(a = a.getPreviousSourceNode(!0, CKEDITOR.NODE_ELEMENT))) break;
27506            f = 1;
27507          }
27508        } else c && !this.contains(a) && (f = 1);
27509      if (a.isVisible() && !(0 > (b = a.getTabIndex())))
27510        if (0 >= g) {
27511          if (f && 0 === b) {
27512            d = a;
27513            break;
27514          }
27515          b > e && ((d = a), (e = b));
27516        } else {
27517          if (f && b == g) {
27518            d = a;
27519            break;
27520          }
27521          b < g && (!d || b > e) && ((d = a), (e = b));
27522        }
27523    }
27524    d && d.focus();
27525  };
27526  CKEDITOR.plugins.add("table", {
27527    requires: "dialog",
27528    init: function(a) {
27529      function f(c) {
27530        return CKEDITOR.tools.extend(c || {}, {
27531          contextSensitive: 1,
27532          refresh: function(c, b) {
27533            this.setState(
27534              b.contains("table", 1) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,
27535            );
27536          },
27537        });
27538      }
27539      if (!a.blockless) {
27540        var e = a.lang.table;
27541        a.addCommand(
27542          "table",
27543          new CKEDITOR.dialogCommand("table", {
27544            context: "table",
27545            allowedContent:
27546              "table{width,height}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];" +
27547              (a.plugins.dialogadvtab ? "table" + a.plugins.dialogadvtab.allowedContent() : ""),
27548            requiredContent: "table",
27549            contentTransformations: [
27550              ["table{width}: sizeToStyle", "table[width]: sizeToAttribute"],
27551              ["td: splitBorderShorthand"],
27552              [
27553                {
27554                  element: "table",
27555                  right: function(c) {
27556                    if (c.styles) {
27557                      var a;
27558                      if (c.styles.border) a = CKEDITOR.tools.style.parse.border(c.styles.border);
27559                      else if (CKEDITOR.env.ie && 8 === CKEDITOR.env.version) {
27560                        var b = c.styles;
27561                        b["border-left"] &&
27562                          b["border-left"] === b["border-right"] &&
27563                          b["border-right"] === b["border-top"] &&
27564                          b["border-top"] === b["border-bottom"] &&
27565                          (a = CKEDITOR.tools.style.parse.border(b["border-top"]));
27566                      }
27567                      a &&
27568                        a.style &&
27569                        "solid" === a.style &&
27570                        a.width &&
27571                        0 !== parseFloat(a.width) &&
27572                        (c.attributes.border = 1);
27573                      "collapse" == c.styles["border-collapse"] && (c.attributes.cellspacing = 0);
27574                    }
27575                  },
27576                },
27577              ],
27578            ],
27579          }),
27580        );
27581        a.addCommand("tableProperties", new CKEDITOR.dialogCommand("tableProperties", f()));
27582        a.addCommand(
27583          "tableDelete",
27584          f({
27585            exec: function(a) {
27586              var d = a.elementPath().contains("table", 1);
27587              if (d) {
27588                var b = d.getParent(),
27589                  e = a.editable();
27590                1 != b.getChildCount() || b.is("td", "th") || b.equals(e) || (d = b);
27591                a = a.createRange();
27592                a.moveToPosition(d, CKEDITOR.POSITION_BEFORE_START);
27593                d.remove();
27594                a.select();
27595              }
27596            },
27597          }),
27598        );
27599        a.ui.addButton &&
27600          a.ui.addButton("Table", { label: e.toolbar, command: "table", toolbar: "insert,30" });
27601        CKEDITOR.dialog.add("table", this.path + "dialogs/table.js");
27602        CKEDITOR.dialog.add("tableProperties", this.path + "dialogs/table.js");
27603        a.addMenuItems &&
27604          a.addMenuItems({
27605            table: { label: e.menu, command: "tableProperties", group: "table", order: 5 },
27606            tabledelete: { label: e.deleteTable, command: "tableDelete", group: "table", order: 1 },
27607          });
27608        a.on("doubleclick", function(a) {
27609          a.data.element.is("table") && (a.data.dialog = "tableProperties");
27610        });
27611        a.contextMenu &&
27612          a.contextMenu.addListener(function() {
27613            return { tabledelete: CKEDITOR.TRISTATE_OFF, table: CKEDITOR.TRISTATE_OFF };
27614          });
27615      }
27616    },
27617  });
27618  (function() {
27619    function q(d, f) {
27620      function b(a) {
27621        return f ? f.contains(a) && a.getAscendant("table", !0).equals(f) : !0;
27622      }
27623      function c(b) {
27624        0 < e.length ||
27625          b.type != CKEDITOR.NODE_ELEMENT ||
27626          !F.test(b.getName()) ||
27627          b.getCustomData("selected_cell") ||
27628          (CKEDITOR.dom.element.setMarker(a, b, "selected_cell", !0), e.push(b));
27629      }
27630      var e = [],
27631        a = {};
27632      if (!d) return e;
27633      for (var g = d.getRanges(), k = 0; k < g.length; k++) {
27634        var h = g[k];
27635        if (h.collapsed)
27636          (h = h.getCommonAncestor().getAscendant({ td: 1, th: 1 }, !0)) && b(h) && e.push(h);
27637        else {
27638          var h = new CKEDITOR.dom.walker(h),
27639            l;
27640          for (h.guard = c; (l = h.next()); )
27641            (l.type == CKEDITOR.NODE_ELEMENT && l.is(CKEDITOR.dtd.table)) ||
27642              ((l = l.getAscendant({ td: 1, th: 1 }, !0)) &&
27643                !l.getCustomData("selected_cell") &&
27644                b(l) &&
27645                (CKEDITOR.dom.element.setMarker(a, l, "selected_cell", !0), e.push(l)));
27646        }
27647      }
27648      CKEDITOR.dom.element.clearAllMarkers(a);
27649      return e;
27650    }
27651    function r(d, f) {
27652      for (
27653        var b = D(d) ? d : q(d),
27654          c = b[0],
27655          e = c.getAscendant("table"),
27656          c = c.getDocument(),
27657          a = b[0].getParent(),
27658          g = a.$.rowIndex,
27659          b = b[b.length - 1],
27660          k = b.getParent().$.rowIndex + b.$.rowSpan - 1,
27661          b = new CKEDITOR.dom.element(e.$.rows[k]),
27662          g = f ? g : k,
27663          a = f ? a : b,
27664          b = CKEDITOR.tools.buildTableMap(e),
27665          e = b[g],
27666          g = f ? b[g - 1] : b[g + 1],
27667          b = b[0].length,
27668          c = c.createElement("tr"),
27669          k = 0;
27670        e[k] && k < b;
27671        k++
27672      ) {
27673        var h;
27674        1 < e[k].rowSpan && g && e[k] == g[k]
27675          ? ((h = e[k]), (h.rowSpan += 1))
27676          : ((h = new CKEDITOR.dom.element(e[k]).clone()),
27677            h.removeAttribute("rowSpan"),
27678            h.appendBogus(),
27679            c.append(h),
27680            (h = h.$));
27681        k += h.colSpan - 1;
27682      }
27683      f ? c.insertBefore(a) : c.insertAfter(a);
27684      return c;
27685    }
27686    function B(d) {
27687      if (d instanceof CKEDITOR.dom.selection) {
27688        var f = d.getRanges(),
27689          b = q(d),
27690          c = b[0].getAscendant("table"),
27691          e = CKEDITOR.tools.buildTableMap(c),
27692          a = b[0].getParent().$.rowIndex,
27693          b = b[b.length - 1],
27694          g = b.getParent().$.rowIndex + b.$.rowSpan - 1,
27695          b = [];
27696        d.reset();
27697        for (d = a; d <= g; d++) {
27698          for (var k = e[d], h = new CKEDITOR.dom.element(c.$.rows[d]), l = 0; l < k.length; l++) {
27699            var m = new CKEDITOR.dom.element(k[l]),
27700              n = m.getParent().$.rowIndex;
27701            1 == m.$.rowSpan
27702              ? m.remove()
27703              : (--m.$.rowSpan,
27704                n == d &&
27705                  ((n = e[d + 1]),
27706                  n[l - 1]
27707                    ? m.insertAfter(new CKEDITOR.dom.element(n[l - 1]))
27708                    : new CKEDITOR.dom.element(c.$.rows[d + 1]).append(m, 1)));
27709            l += m.$.colSpan - 1;
27710          }
27711          b.push(h);
27712        }
27713        e = c.$.rows;
27714        f[0].moveToPosition(c, CKEDITOR.POSITION_BEFORE_START);
27715        a = new CKEDITOR.dom.element(e[g + 1] || (0 < a ? e[a - 1] : null) || c.$.parentNode);
27716        for (d = b.length; 0 <= d; d--) B(b[d]);
27717        return c.$.parentNode ? a : (f[0].select(), null);
27718      }
27719      d instanceof CKEDITOR.dom.element &&
27720        ((c = d.getAscendant("table")), 1 == c.$.rows.length ? c.remove() : d.remove());
27721      return null;
27722    }
27723    function v(d) {
27724      for (var f = d.getParent().$.cells, b = 0, c = 0; c < f.length; c++) {
27725        var e = f[c],
27726          b = b + e.colSpan;
27727        if (e == d.$) break;
27728      }
27729      return b - 1;
27730    }
27731    function w(d, f) {
27732      for (var b = f ? Infinity : 0, c = 0; c < d.length; c++) {
27733        var e = v(d[c]);
27734        if (f ? e < b : e > b) b = e;
27735      }
27736      return b;
27737    }
27738    function u(d, f) {
27739      for (
27740        var b = D(d) ? d : q(d),
27741          c = b[0].getAscendant("table"),
27742          e = w(b, 1),
27743          b = w(b),
27744          a = f ? e : b,
27745          g = CKEDITOR.tools.buildTableMap(c),
27746          c = [],
27747          e = [],
27748          b = [],
27749          k = g.length,
27750          h = 0;
27751        h < k;
27752        h++
27753      )
27754        c.push(g[h][a]), e.push(f ? g[h][a - 1] : g[h][a + 1]);
27755      for (h = 0; h < k; h++)
27756        c[h] &&
27757          (1 < c[h].colSpan && e[h] == c[h]
27758            ? ((g = c[h]), (g.colSpan += 1))
27759            : ((a = new CKEDITOR.dom.element(c[h])),
27760              (g = a.clone()),
27761              g.removeAttribute("colSpan"),
27762              g.appendBogus(),
27763              g[f ? "insertBefore" : "insertAfter"].call(g, a),
27764              b.push(g),
27765              (g = g.$)),
27766          (h += g.rowSpan - 1));
27767      return b;
27768    }
27769    function y(d) {
27770      function f(a) {
27771        var b, c, d;
27772        b = a.getRanges();
27773        if (1 !== b.length) return a;
27774        b = b[0];
27775        if (b.collapsed || 0 !== b.endOffset) return a;
27776        c = b.endContainer;
27777        d = c.getName().toLowerCase();
27778        if ("td" !== d && "th" !== d) return a;
27779        for (
27780          (d = c.getPrevious()) ||
27781          (d = c
27782            .getParent()
27783            .getPrevious()
27784            .getLast());
27785          d.type !== CKEDITOR.NODE_TEXT && "br" !== d.getName().toLowerCase();
27786
27787        )
27788          if (((d = d.getLast()), !d)) return a;
27789        b.setEndAt(d, CKEDITOR.POSITION_BEFORE_END);
27790        return b.select();
27791      }
27792      CKEDITOR.env.webkit && !d.isFake && (d = f(d));
27793      var b = d.getRanges(),
27794        c = q(d),
27795        e = c[0],
27796        a = c[c.length - 1],
27797        c = e.getAscendant("table"),
27798        g = CKEDITOR.tools.buildTableMap(c),
27799        k,
27800        h,
27801        l = [];
27802      d.reset();
27803      var m = 0;
27804      for (d = g.length; m < d; m++)
27805        for (var n = 0, p = g[m].length; n < p; n++)
27806          void 0 === k && g[m][n] == e.$ && (k = n), g[m][n] == a.$ && (h = n
27806);
27807      for (m = k; m <= h; m++)
27808        for (n = 0; n < g.length; n++)
27809          (a = g[n]),
27810            (e = new CKEDITOR.dom.element(c.$.rows[n])),
27811            (a = new CKEDITOR.dom.element(a[m])),
27812            a.$ &&
27813              (1 == a.$.colSpan ? a.remove() : --a.$.colSpan,
27814              (n += a.$.rowSpan - 1),
27815              e.$.cells.length || l.push(e));
27816      k =
27817        g[0].length - 1 > h
27818          ? new CKEDITOR.dom.element(g[0][h + 1])
27819          : k && -1 !== g[0][k - 1].cellIndex
27820            ? new CKEDITOR.dom.element(g[0][k - 1])
27821            : new CKEDITOR.dom.element(c.$.parentNode);
27822      l.length == d &&
27823        (b[0].moveToPosition(c, CKEDITOR.POSITION_AFTER_END), b[0].select(), c.remove());
27824      return k;
27825    }
27826    function t(d, f) {
27827      var b = d.getStartElement().getAscendant({ td: 1, th: 1 }, !0);
27828      if (b) {
27829        var c = b.clone();
27830        c.appendBogus();
27831        f ? c.insertBefore(b) : c.insertAfter(b);
27832      }
27833    }
27834    function z(d) {
27835      if (d instanceof CKEDITOR.dom.selection) {
27836        var f = d.getRanges(),
27837          b = q(d),
27838          c = b[0] && b[0].getAscendant("table"),
27839          e;
27840        a: {
27841          var a = 0;
27842          e = b.length - 1;
27843          for (var g = {}, k, h; (k = b[a++]); )
27844            CKEDITOR.dom.element.setMarker(g, k, "delete_cell", !0);
27845          for (a = 0; (k = b[a++]); )
27846            if (
27847              ((h = k.getPrevious()) && !h.getCustomData("delete_cell")) ||
27848              ((h = k.getNext()) && !h.getCustomData("delete_cell"))
27849            ) {
27850              CKEDITOR.dom.element.clearAllMarkers(g);
27851              e = h;
27852              break a;
27853            }
27854          CKEDITOR.dom.element.clearAllMarkers(g);
27855          a = b[0].getParent();
27856          (a = a.getPrevious())
27857            ? (e = a.getLast())
27858            : ((a = b[e].getParent()), (e = (a = a.getNext()) ? a.getChild(0) : null));
27859        }
27860        d.reset();
27861        for (d = b.length - 1; 0 <= d; d--) z(b[d]);
27862        e
27863          ? p(e, !0)
27864          : c &&
27865            (f[0].moveToPosition(c, CKEDITOR.POSITION_BEFORE_START), f[0].select(), c.remove());
27866      } else
27867        d instanceof CKEDITOR.dom.element &&
27868          ((f = d.getParent()), 1 == f.getChildCount() ? f.remove() : d.remove());
27869    }
27870    function p(d, f) {
27871      var b = d.getDocument(),
27872        c = CKEDITOR.document;
27873      CKEDITOR.env.ie && 10 == CKEDITOR.env.version && (c.focus(), b.focus());
27874      b = new CKEDITOR.dom.range(b);
27875      b["moveToElementEdit" + (f ? "End" : "Start")](d) ||
27876        (b.selectNodeContents(d), b.collapse(f ? !1 : !0));
27877      b.select(!0);
27878    }
27879    function A(d, f, b) {
27880      d = d[f];
27881      if ("undefined" == typeof b) return d;
27882      for (f = 0; d && f < d.length; f++) {
27883        if (b.is && d[f] == b.$) return f;
27884        if (f == b) return new CKEDITOR.dom.element(d[f]);
27885      }
27886      return b.is ? -1 : null;
27887    }
27888    function x(d, f, b) {
27889      var c = q(d),
27890        e;
27891      if (
27892        (f ? 1 != c.length : 2 > c.length) ||
27893        ((e = d.getCommonAncestor()) && e.type == CKEDITOR.NODE_ELEMENT && e.is("table"))
27894      )
27895        return !1;
27896      var a;
27897      d = c[0];
27898      e = d.getAscendant("table");
27899      var g = CKEDITOR.tools.buildTableMap(e),
27900        k = g.length,
27901        h = g[0].length,
27902        l = d.getParent().$.rowIndex,
27903        m = A(g, l, d);
27904      if (f) {
27905        var n;
27906        try {
27907          var p = parseInt(d.getAttribute("rowspan"), 10) || 1;
27908          a = parseInt(d.getAttribute("colspan"), 10) || 1;
27909          n =
27910            g["up" == f ? l - p : "down" == f ? l + p : l][
27911              "left" == f ? m - a : "right" == f ? m + a : m
27912            ];
27913        } catch (x) {
27914          return !1;
27915        }
27916        if (!n || d.$ == n) return !1;
27917        c["up" == f || "left" == f ? "unshift" : "push"](new CKEDITOR.dom.element(n));
27918      }
27919      f = d.getDocument();
27920      var r = l,
27921        p = (n = 0),
27922        u = !b && new CKEDITOR.dom.documentFragment(f),
27923        w = 0;
27924      for (f = 0; f < c.length; f++) {
27925        a = c[f];
27926        var t = a.getParent(),
27927          y = a.getFirst(),
27928          v = a.$.colSpan,
27929          z = a.$.rowSpan,
27930          t = t.$.rowIndex,
27931          B = A(g, t, a),
27932          w = w + v * z,
27933          p = Math.max(p, B - m + v);
27934        n = Math.max(n, t - l + z);
27935        b ||
27936          ((v = a),
27937          (z = v.getBogus()) && z.remove(),
27938          v.trim(),
27939          a.getChildren().count() &&
27940            (t == r ||
27941              !y ||
27942              (y.isBlockBoundary && y.isBlockBoundary({ br: 1 })) ||
27943              ((r = u.getLast(CKEDITOR.dom.walker.whitespaces(!0))),
27944              !r || (r.is && r.is("br")) || u.append("br")),
27945            a.moveChildren(u)),
27946          f ? a.remove() : a.setHtml(""));
27947        r = t;
27948      }
27949      if (b) return n * p == w;
27950      u.moveChildren(d);
27951      d.appendBogus();
27952      p >= h ? d.removeAttribute("rowSpan") : (d.$.rowSpan = n);
27953      n >= k ? d.removeAttribute("colSpan") : (d.$.colSpan = p);
27954      b = new CKEDITOR.dom.nodeList(e.$.rows);
27955      c = b.count();
27956      for (f = c - 1; 0 <= f; f--) (e = b.getItem(f)), e.$.cells.length || (e.remove(), c++);
27957      return d;
27958    }
27959    function C(d, f) {
27960      var b = q(d);
27961      if (1 < b.length) return !1;
27962      if (f) return !0;
27963      var b = b[0],
27964        c = b.getParent(),
27965        e = c.getAscendant("table"),
27966        a = CKEDITOR.tools.buildTableMap(e),
27967        g = c.$.rowIndex,
27968        k = A(a, g, b),
27969        h = b.$.rowSpan,
27970        l;
27971      if (1 < h) {
27972        l = Math.ceil(h / 2);
27973        for (
27974          var h = Math.floor(h / 2),
27975            c = g + l,
27976            e = new CKEDITOR.dom.element(e.$.rows[c]),
27977            a = A(a, c),
27978            m,
27979            c = b.clone(),
27980            g = 0;
27981          g < a.length;
27982          g++
27983        )
27984          if (((m = a[g]), m.parentNode == e.$ && g > k)) {
27985            c.insertBefore(new CKEDITOR.dom.element(m));
27986            break;
27987          } else m = null;
27988        m || e.append(c);
27989      } else
27990        for (
27991          h = l = 1, e = c.clone(), e.insertAfter(c), e.append((c = b.clone())), m = A(a, g), k = 0;
27992          k < m.length;
27993          k++
27994        )
27995          m[k].rowSpan++;
27996      c.appendBogus();
27997      b.$.rowSpan = l;
27998      c.$.rowSpan = h;
27999      1 == l && b.removeAttribute("rowSpan");
28000      1 == h && c.removeAttribute("rowSpan");
28001      return c;
28002    }
28003    function E(d, f) {
28004      var b = q(d);
28005      if (1 < b.length) return !1;
28006      if (f) return !0;
28007      var b = b[0],
28008        c = b.getParent(),
28009        e = c.getAscendant("table"),
28010        e = CKEDITOR.tools.buildTableMap(e),
28011        a = A(e, c.$.rowIndex, b),
28012        g = b.$.colSpan;
28013      if (1 < g) (c = Math.ceil(g / 2)), (g = Math.floor(g / 2));
28014      else {
28015        for (var g = (c = 1), k = [], h = 0; h < e.length; h++) {
28016          var l = e[h];
28017          k.push(l[a]);
28018          1 < l[a].rowSpan && (h += l[a].rowSpan - 1);
28019        }
28020        for (e = 0; e < k.length; e++) k[e].colSpan++;
28021      }
28022      e = b.clone();
28023      e.insertAfter(b);
28024      e.appendBogus();
28025      b.$.colSpan = c;
28026      e.$.colSpan = g;
28027      1 == c && b.removeAttribute("colSpan");
28028      1 == g && e.removeAttribute("colSpan");
28029      return e;
28030    }
28031    var F = /^(?:td|th)$/,
28032      D = CKEDITOR.tools.isArray;
28033    CKEDITOR.plugins.tabletools = {
28034      requires: "table,dialog,contextmenu",
28035      init: function(d) {
28036        function f(a) {
28037          return CKEDITOR.tools.extend(a || {}, {
28038            contextSensitive: 1,
28039            refresh: function(a, b) {
28040              this.setState(
28041                b.contains({ td: 1, th: 1 }, 1)
28042                  ? CKEDITOR.TRISTATE_OFF
28043                  : CKEDITOR.TRISTATE_DISABLED,
28044              );
28045            },
28046          });
28047        }
28048        function b(a, b) {
28049          var c = d.addCommand(a, b);
28050          d.addFeature(c);
28051        }
28052        var c = d.lang.table,
28053          e = CKEDITOR.tools.style.parse;
28054        b(
28055          "cellProperties",
28056          new CKEDITOR.dialogCommand(
28057            "cellProperties",
28058            f({
28059              allowedContent:
28060                "td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",
28061              requiredContent: "table",
28062              contentTransformations: [
28063                [
28064                  {
28065                    element: "td",
28066                    left: function(a) {
28067                      return a.styles.background && e.background(a.styles.background).color;
28068                    },
28069                    right: function(a) {
28070                      a.styles["background-color"] = e.background(a.styles.background).color;
28071                    },
28072                  },
28073                  {
28074                    element: "td",
28075                    check: "td{vertical-align}",
28076                    left: function(a) {
28077                      return a.attributes && a.attributes.valign;
28078                    },
28079                    right: function(a) {
28080                      a.styles["vertical-align"] = a.attributes.valign;
28081                      delete a.attributes.valign;
28082                    },
28083                  },
28084                ],
28085                [
28086                  {
28087                    element: "tr",
28088                    check: "td{height}",
28089                    left: function(a) {
28090                      return a.styles && a.styles.height;
28091                    },
28092                    right: function(a) {
28093                      CKEDITOR.tools.array.forEach(a.children, function(b) {
28094                        b.name in { td: 1, th: 1 } &&
28095                          (b.attributes["cke-row-height"] = a.styles.height);
28096                      });
28097                      delete a.styles.height;
28098                    },
28099                  },
28100                ],
28101                [
28102                  {
28103                    element: "td",
28104                    check: "td{height}",
28105                    left: function(a) {
28106                      return (a = a.attributes) && a["cke-row-height"];
28107                    },
28108                    right: function(a) {
28109                      a.styles.height = a.attributes["cke-row-height"];
28110                      delete a.attributes["cke-row-height"];
28111                    },
28112                  },
28113                ],
28114              ],
28115            }),
28116          ),
28117        );
28118        CKEDITOR.dialog.add("cellProperties", this.path + "dialogs/tableCell.js");
28119        b(
28120          "rowDelete",
28121          f({
28122            requiredContent: "table",
28123            exec: function(a) {
28124              a = a.getSelection();
28125              (a = B(a)) && p(a);
28126            },
28127          }),
28128        );
28129        b(
28130          "rowInsertBefore",
28131          f({
28132            requiredContent: "table",
28133            exec: function(a) {
28134              a = a.getSelection();
28135              a = q(a);
28136              r(a, !0);
28137            },
28138          }),
28139        );
28140        b(
28141          "rowInsertAfter",
28142          f({
28143            requiredContent: "table",
28144            exec: function(a) {
28145              a = a.getSelection();
28146              a = q(a);
28147              r(a);
28148            },
28149          }),
28150        );
28151        b(
28152          "columnDelete",
28153          f({
28154            requiredContent: "table",
28155            exec: function(a) {
28156              a = a.getSelection();
28157              (a = y(a)) && p(a, !0);
28158            },
28159          }),
28160        );
28161        b(
28162          "columnInsertBefore",
28163          f({
28164            requiredContent: "table",
28165            exec: function(a) {
28166              a = a.getSelection();
28167              a = q(a);
28168              u(a, !0);
28169            },
28170          }),
28171        );
28172        b(
28173          "columnInsertAfter",
28174          f({
28175            requiredContent: "table",
28176            exec: function(a) {
28177              a = a.getSelection();
28178              a = q(a);
28179              u(a);
28180            },
28181          }),
28182        );
28183        b(
28184          "cellDelete",
28185          f({
28186            requiredContent: "table",
28187            exec: function(a) {
28188              a = a.getSelection();
28189              z(a);
28190            },
28191          }),
28192        );
28193        b(
28194          "cellMerge",
28195          f({
28196            allowedContent: "td[colspan,rowspan]",
28197            requiredContent: "td[colspan,rowspan]",
28198            exec: function(a, b) {
28199              b.cell = x(a.getSelection());
28200              p(b.cell, !0);
28201            },
28202          }),
28203        );
28204        b(
28205          "cellMergeRight",
28206          f({
28207            allowedContent: "td[colspan]",
28208            requiredContent: "td[colspan]",
28209            exec: function(a, b) {
28210              b.cell = x(a.getSelection(), "right");
28211              p(b.cell, !0);
28212            },
28213          }),
28214        );
28215        b(
28216          "cellMergeDown",
28217          f({
28218            allowedContent: "td[rowspan]",
28219            requiredContent: "td[rowspan]",
28220            exec: function(a, b) {
28221              b.cell = x(a.getSelection(), "down");
28222              p(b.cell, !0);
28223            },
28224          }),
28225        );
28226        b(
28227          "cellVerticalSplit",
28228          f({
28229            allowedContent: "td[rowspan]",
28230            requiredContent: "td[rowspan]",
28231            exec: function(a) {
28232              p(E(a.getSelection()));
28233            },
28234          }),
28235        );
28236        b(
28237          "cellHorizontalSplit",
28238          f({
28239            allowedContent: "td[colspan]",
28240            requiredContent: "td[colspan]",
28241            exec: function(a) {
28242              p(C(a.getSelection()));
28243            },
28244          }),
28245        );
28246        b(
28247          "cellInsertBefore",
28248          f({
28249            requiredContent: "table",
28250            exec: function(a) {
28251              a = a.getSelection();
28252              t(a, !0);
28253            },
28254          }),
28255        );
28256        b(
28257          "cellInsertAfter",
28258          f({
28259            requiredContent: "table",
28260            exec: function(a) {
28261              a = a.getSelection();
28262              t(a);
28263            },
28264          }),
28265        );
28266        d.addMenuItems &&
28267          d.addMenuItems({
28268            tablecell: {
28269              label: c.cell.menu,
28270              group: "tablecell",
28271              order: 1,
28272              getItems: function() {
28273                var a = d.getSelection(),
28274                  b = q(a);
28275                return {
28276                  tablecell_insertBefore: CKEDITOR.TRISTATE_OFF,
28277                  tablecell_insertAfter: CKEDITOR.TRISTATE_OFF,
28278                  tablecell_delete: CKEDITOR.TRISTATE_OFF,
28279                  tablecell_merge: x(a, null, !0)
28280                    ? CKEDITOR.TRISTATE_OFF
28281                    : CKEDITOR.TRISTATE_DISABLED,
28282                  tablecell_merge_right: x(a, "right", !0)
28283                    ? CKEDITOR.TRISTATE_OFF
28284                    : CKEDITOR.TRISTATE_DISABLED,
28285                  tablecell_merge_down: x(a, "down", !0)
28286                    ? CKEDITOR.TRISTATE_OFF
28287                    : CKEDITOR.TRISTATE_DISABLED,
28288                  tablecell_split_vertical: E(a, !0)
28289                    ? CKEDITOR.TRISTATE_OFF
28290                    : CKEDITOR.TRISTATE_DISABLED,
28291                  tablecell_split_horizontal: C(a, !0)
28292                    ? CKEDITOR.TRISTATE_OFF
28293                    : CKEDITOR.TRISTATE_DISABLED,
28294                  tablecell_properties:
28295                    0 < b.length ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,
28296                };
28297              },
28298            },
28299            tablecell_insertBefore: {
28300              label: c.cell.insertBefore,
28301              group: "tablecell",
28302              command: "cellInsertBefore",
28303              order: 5,
28304            },
28305            tablecell_insertAfter: {
28306              label: c.cell.insertAfter,
28307              group: "tablecell",
28308              command: "cellInsertAfter",
28309              order: 10,
28310            },
28311            tablecell_delete: {
28312              label: c.cell.deleteCell,
28313              group: "tablecell",
28314              command: "cellDelete",
28315              order: 15,
28316            },
28317            tablecell_merge: {
28318              label: c.cell.merge,
28319              group: "tablecell",
28320              command: "cellMerge",
28321              order: 16,
28322            },
28323            tablecell_merge_right: {
28324              label: c.cell.mergeRight,
28325              group: "tablecell",
28326              command: "cellMergeRight",
28327              order: 17,
28328            },
28329            tablecell_merge_down: {
28330              label: c.cell.mergeDown,
28331              group: "tablecell",
28332              command: "cellMergeDown",
28333              order: 18,
28334            },
28335            tablecell_split_horizontal: {
28336              label: c.cell.splitHorizontal,
28337              group: "tablecell",
28338              command: "cellHorizontalSplit",
28339              order: 19,
28340            },
28341            tablecell_split_vertical: {
28342              label: c.cell.splitVertical,
28343              group: "tablecell",
28344              command: "cellVerticalSplit",
28345              order: 20,
28346            },
28347            tablecell_properties: {
28348              label: c.cell.title,
28349              group: "tablecellproperties",
28350              command: "cellProperties",
28351              order: 21,
28352            },
28353            tablerow: {
28354              label: c.row.menu,
28355              group: "tablerow",
28356              order: 1,
28357              getItems: function() {
28358                return {
28359                  tablerow_insertBefore: CKEDITOR.TRISTATE_OFF,
28360                  tablerow_insertAfter: CKEDITOR.TRISTATE_OFF,
28361                  tablerow_delete: CKEDITOR.TRISTATE_OFF,
28362                };
28363              },
28364            },
28365            tablerow_insertBefore: {
28366              label: c.row.insertBefore,
28367              group: "tablerow",
28368              command: "rowInsertBefore",
28369              order: 5,
28370            },
28371            tablerow_insertAfter: {
28372              label: c.row.insertAfter,
28373              group: "tablerow",
28374              command: "rowInsertAfter",
28375              order: 10,
28376            },
28377            tablerow_delete: {
28378              label: c.row.deleteRow,
28379              group: "tablerow",
28380              command: "rowDelete",
28381              order: 15,
28382            },
28383            tablecolumn: {
28384              label: c.column.menu,
28385              group: "tablecolumn",
28386              order: 1,
28387              getItems: function() {
28388                return {
28389                  tablecolumn_insertBefore: CKEDITOR.TRISTATE_OFF,
28390                  tablecolumn_insertAfter: CKEDITOR.TRISTATE_OFF,
28391                  tablecolumn_delete: CKEDITOR.TRISTATE_OFF,
28392                };
28393              },
28394            },
28395            tablecolumn_insertBefore: {
28396              label: c.column.insertBefore,
28397              group: "tablecolumn",
28398              command: "columnInsertBefore",
28399              order: 5,
28400            },
28401            tablecolumn_insertAfter: {
28402              label: c.column.insertAfter,
28403              group: "tablecolumn",
28404              command: "columnInsertAfter",
28405              order: 10,
28406            },
28407            tablecolumn_delete: {
28408              label: c.column.deleteColumn,
28409              group: "tablecolumn",
28410              command: "columnDelete",
28411              order: 15,
28412            },
28413          });
28414        d.contextMenu &&
28415          d.contextMenu.addListener(function(a, b, c) {
28416            return (a = c.contains({ td: 1, th: 1 }, 1)) && !a.isReadOnly()
28417              ? {
28418                  tablecell: CKEDITOR.TRISTATE_OFF,
28419                  tablerow: CKEDITOR.TRISTATE_OFF,
28420                  tablecolumn: CKEDITOR.TRISTATE_OFF,
28421                }
28422              : null;
28423          });
28424      },
28425      getCellColIndex: v,
28426      insertRow: r,
28427      insertColumn: u,
28428      getSelectedCells: q,
28429    };
28430    CKEDITOR.plugins.add("tabletools", CKEDITOR.plugins.tabletools);
28431  })();
28432  CKEDITOR.tools.buildTableMap = function(q, r, B, v, w) {
28433    q = q.$.rows;
28434    B = B || 0;
28435    v = "number" === typeof v ? v : q.length - 1;
28436    w = "number" === typeof w ? w : -1;
28437    var u = -1,
28438      y = [];
28439    for (r = r || 0; r <= v; r++) {
28440      u++;
28441      !y[u] && (y[u] = []);
28442      for (var t = -1, z = B; z <= (-1 === w ? q[r].cells.length - 1 : w); z++) {
28443        var p = q[r].cells[z];
28444        if (!p) break;
28445        for (t++; y[u][t]; ) t++;
28446        for (
28447          var A = isNaN(p.colSpan) ? 1 : p.colSpan, p = isNaN(p.rowSpan) ? 1 : p.rowSpan, x = 0;
28448          x < p && !(r + x > v);
28449          x++
28450        ) {
28451          y[u + x] || (y[u + x] = []);
28452          for (var C = 0; C < A; C++) y[u + x][t + C] = q[r].cells[z];
28453        }
28454        t += A - 1;
28455        if (-1 !== w && t >= w) break;
28456      }
28457    }
28458    return y;
28459  };
28460  (function() {
28461    function B(a) {
28462      return CKEDITOR.plugins.widget && CKEDITOR.plugins.widget.isDomWidget(a);
28463    }
28464    function x(a, b) {
28465      var c = a.getAscendant("table"),
28466        d = b.getAscendant("table"),
28467        e = CKEDITOR.tools.buildTableMap(c),
28468        h = n(a),
28469        m = n(b),
28470        l = [],
28471        k = {},
28472        f,
28473        p;
28474      c.contains(d) && ((b = b.getAscendant({ td: 1, th: 1 })), (m = n(b)));
28475      h > m && ((c = h), (h = m), (m = c), (c = a), (a = b), (b = c));
28476      for (c = 0; c < e[h].length; c++)
28477        if (a.$ === e[h][c]) {
28478          f = c;
28479          break;
28480        }
28481      for (c = 0; c < e[m].length; c++)
28482        if (b.$ === e[m][c]) {
28483          p = c;
28484          break;
28485        }
28486      f > p && ((c = f), (f = p), (p = c));
28487      for (c = h; c <= m; c++)
28488        for (h = f; h <= p; h++)
28489          (d = new CKEDITOR.dom.element(e[c][h])),
28490            d.$ &&
28491              !d.getCustomData("selected_cell") &&
28492              (l.push(d), CKEDITOR.dom.element.setMarker(k, d, "selected_cell", !0));
28493      CKEDITOR.dom.element.clearAllMarkers(k);
28494      return l;
28495    }
28496    function H(a) {
28497      if (a)
28498        return (
28499          (a = a.clone()),
28500          a.enlarge(CKEDITOR.ENLARGE_ELEMENT),
28501          (a = a.getEnclosedNode()) && a.is && a.is(CKEDITOR.dtd.$tableContent)
28502        );
28503    }
28504    function I(a) {
28505      return (a = a.editable().findOne(".cke_table-faked-selection")) && a.getAscendant("table");
28506    }
28507    function y(a, b) {
28508      var c = a.editable().find(".cke_table-faked-selection"),
28509        d;
28510      a.fire("lockSnapshot");
28511      a.editable().removeClass("cke_table-faked-selection-editor");
28512      for (d = 0; d < c.count(); d++) c.getItem(d).removeClass("cke_table-faked-selection");
28513      0 < c.count() &&
28514        c
28515          .getItem(0)
28516          .getAscendant("table")
28517          .data("cke-table-faked-selection-table", !1);
28518      a.fire("unlockSnapshot");
28519      b && ((g = { active: !1 }), a.getSelection().isInTable() && a.getSelection().reset());
28520    }
28521    function t(a, b) {
28522      var c = [],
28523        d,
28524        e;
28525      for (e = 0; e < b.length; e++)
28526        (d = a.createRange()), d.setStartBefore(b[e]), d.setEndAfter(b[e]), c.push(d);
28527      a.getSelection().selectRanges(c);
28528    }
28529    function J(a) {
28530      var b = a.editable().find(".cke_table-faked-selection");
28531      1 > b.count() || ((b = x(b.getItem(0), b.getItem(b.count() - 1))), t(a, b));
28532    }
28533    function K(a, b, c) {
28534      var d = u(a.getSelection(!0));
28535      b = b.is("table") ? null : b;
28536      var e;
28537      (e = g.active && !g.first) &&
28538        !(e = b) &&
28539        ((e = a.getSelection().getRanges()),
28540        (e = 1 < d.length || (e[0] && !e[0].collapsed) ? !0 : !1));
28541      if (e) (g.first = b || d[0]), (g.dirty = b ? !1 : 1 !== d.length);
28542      else if (g.active && b && g.first.getAscendant("table").equals(b.getAscendant("table"))) {
28543        d = x(g.first, b);
28544        if (!g.dirty && 1 === d.length && !B(c.data.getTarget())) return y(a, "mouseup" === c.name);
28545        g.dirty = !0;
28546        g.last = b;
28547        t(a, d);
28548      }
28549    }
28550    function L(a) {
28551      var b = (a = a.editor || a.sender.editor) && a.getSelection(),
28552        c = (b && b.getRanges()) || [],
28553        d;
28554      if (b && (y(a), b.isInTable() && b.isFake)) {
28555        1 === c.length &&
28556          c[0]._getTableElement() &&
28557          c[0]._getTableElement().is("table") &&
28558          (d = c[0]._getTableElement());
28559        d = u(b, d);
28560        a.fire("lockSnapshot");
28561        for (b = 0; b < d.length; b++) d[b].addClass("cke_table-faked-selection");
28562        0 < d.length &&
28563          (a.editable().addClass("cke_table-faked-selection-editor"),
28564          d[0].getAscendant("table").data("cke-table-faked-selection-table", ""));
28565        a.fire("unlockSnapshot");
28566      }
28567    }
28568    function n(a) {
28569      return a.getAscendant("tr", !0).$.rowIndex;
28570    }
28571    function v(a) {
28572      function b(a, b) {
28573        return a && b
28574          ? a.equals(b) || a.contains(b) || b.contains(a) || a.getCommonAncestor(b).is(f)
28575          : !1;
28576      }
28577      function c(a) {
28578        return !a.getAscendant("table", !0) && a.getDocument().equals(e.document);
28579      }
28580      function d(a, d, e, k) {
28581        return ("mousedown" !== a.name ||
28582          (CKEDITOR.tools.getMouseButton(a) !== CKEDITOR.MOUSE_BUTTON_LEFT && k)) &&
28583          ("mouseup" !== a.name || c(a.data.getTarget()) || b(e, k))
28584          ? !1
28585          : !0;
28586      }
28587      if (a.data.getTarget().getName && ("mouseup" === a.name || !B(a.data.getTarget()))) {
28588        var e = a.editor || a.listenerData.editor,
28589          h = e.getSelection(1),
28590          m = I(e),
28591          l = a.data.getTarget(),
28592          k = l && l.getAscendant({ td: 1, th: 1 }, !0),
28593          l = l && l.getAscendant("table", !0),
28594          f = { table: 1, thead: 1, tbody: 1, tfoot: 1, tr: 1, td: 1, th: 1 };
28595        d(a, h, m, l) && y(e, !0);
28596        !g.active &&
28597          "mousedown" === a.name &&
28598          CKEDITOR.tools.getMouseButton(a) === CKEDITOR.MOUSE_BUTTON_LEFT &&
28599          l &&
28600          ((g = { active: !0 }), CKEDITOR.document.on("mouseup", v, null, { editor: e }));
28601        (k || l) && K(e, k || l, a);
28602        "mouseup" === a.name &&
28603          (CKEDITOR.tools.getMouseButton(a) === CKEDITOR.MOUSE_BUTTON_LEFT &&
28604            (c(a.data.getTarget()) || b(m, l)) &&
28605            J(e),
28606          (g = { active: !1 }),
28607          CKEDITOR.document.removeListener("mouseup", v));
28608      }
28609    }
28610    function M(a) {
28611      var b = a.data.getTarget().getAscendant({ td: 1, th: 1 }, !0);
28612      b && !b.hasClass("cke_table-faked-selection") && (a.cancel(), a.data.preventDefault());
28613    }
28614    function N(a, b) {
28615      function c(a) {
28616        a.cancel();
28617      }
28618      var d = a.getSelection(),
28619        e = d.createBookmarks(),
28620        h = a.document,
28621        m = a.createRange(),
28622        l = h.getDocumentElement().$,
28623        k = CKEDITOR.env.ie && 9 > CKEDITOR.env.version,
28624        f = a.blockless || CKEDITOR.env.ie ? "span" : "div",
28625        p,
28626        r,
28627        C,
28628        g;
28629      h.getById("cke_table_copybin") ||
28630        ((p = h.createElement(f)),
28631        (r = h.createElement(f)),
28632        r.setAttributes({ id: "cke_table_copybin", "data-cke-temp": "1" }),
28633        p.setStyles({ position: "absolute", width: "1px", height: "1px", overflow: "hidden" }),
28634        p.setStyle("ltr" == a.config.contentsLangDirection ? "left" : "right", "-5000px"),
28635        p.setHtml(a.getSelectedHtml(!0)),
28636        a.fire("lockSnapshot"),
28637        r.append(p),
28638        a.editable().append(r),
28639        (g = a.on("selectionChange", c, null, null, 0)),
28640        k && (C = l.scrollTop),
28641        m.selectNodeContents(p),
28642        m.select(),
28643        k && (l.scrollTop = C),
28644        setTimeout(function() {
28645          r.remove();
28646          d.selectBookmarks(e);
28647          g.removeListener();
28648          a.fire("unlockSnapshot");
28649          b && (a.extractSelectedHtml(), a.fire("saveSnapshot"));
28650        }, 100));
28651    }
28652    function D(a) {
28653      var b = a.editor || a.sender.editor;
28654      b.getSelection().isInTable() && N(b, "cut" === a.name);
28655    }
28656    function q(a) {
28657      this._reset();
28658      a && this.setSelectedCells(a);
28659    }
28660    function z(a, b, c) {
28661      a.on("beforeCommandExec", function(d) {
28662        -1 !== CKEDITOR.tools.array.indexOf(b, d.data.name) &&
28663          (d.data.selectedCells = u(a.getSelection()));
28664      });
28665      a.on("afterCommandExec", function(d) {
28666        -1 !== CKEDITOR.tools.array.indexOf(b, d.data.name) && c(a, d.data);
28667      });
28668    }
28669    var g = { active: !1 },
28670      w,
28671      u,
28672      A,
28673      E,
28674      F;
28675    q.prototype = {};
28676    q.prototype._reset = function() {
28677      this.cells = { first: null, last: null, all: [] };
28678      this.rows = { first: null, last: null };
28679    };
28680    q.prototype.setSelectedCells = function(a) {
28681      this._reset();
28682      a = a.slice(0);
28683      this._arraySortByDOMOrder(a);
28684      this.cells.all = a;
28685      this.cells.first = a[0];
28686      this.cells.last = a[a.length - 1];
28687      this.rows.first = a[0].getAscendant("tr");
28688      this.rows.last = this.cells.last.getAscendant("tr");
28689    };
28690    q.prototype.getTableMap = function() {
28691      var a = A(this.cells.first),
28692        b;
28693      a: {
28694        b = this.cells.last;
28695        var c = b.getAscendant("table"),
28696          d = n(b),
28697          c = CKEDITOR.tools.buildTableMap(c),
28698          e;
28699        for (e = 0; e < c[d].length; e++)
28700          if (new CKEDITOR.dom.element(c[d][e]).equals(b)) {
28701            b = e;
28702            break a;
28703          }
28704        b = void 0;
28705      }
28706      return CKEDITOR.tools.buildTableMap(
28707        this._getTable(),
28708        n(this.rows.first),
28709        a,
28710        n(this.rows.last),
28711        b,
28712      );
28713    };
28714    q.prototype._getTable = function() {
28715      return this.rows.first.getAscendant("table");
28716    };
28717    q.prototype.insertRow = function(a, b, c) {
28718      if ("undefined" === typeof a) a = 1;
28719      else if (0 >= a) return;
28720      for (
28721        var d = this.cells.first.$.cellIndex,
28722          e = this.cells.last.$.cellIndex,
28723          h = c ? [] : this.cells.all,
28724          m,
28725          l = 0;
28726        l < a;
28727        l++
28728      )
28729        (m = E(c ? this.cells.all : h, b)),
28730          (m = CKEDITOR.tools.array.filter(m.find("td, th").toArray(), function(a) {
28731            return c ? !0 : a.$.cellIndex >= d && a.$.cellIndex <= e;
28732          })),
28733          (h = b ? m.concat(h) : h.concat(m));
28734      this.setSelectedCells(h);
28735    };
28736    q.prototype.insertColumn = function(a) {
28737      function b(a) {
28738        a = n(a);
28739        return a >= e && a <= h;
28740      }
28741      if ("undefined" === typeof a) a = 1;
28742      else if (0 >= a) return;
28743      for (var c = this.cells, d = c.all, e = n(c.first), h = n(c.last), c = 0; c < a; c++)
28744        d = d.concat(CKEDITOR.tools.array.filter(F(d), b));
28745      this.setSelectedCells(d);
28746    };
28747    q.prototype.emptyCells = function(a) {
28748      a = a || this.cells.all;
28749      for (var b = 0; b < a.length; b++) a[b].setHtml("");
28750    };
28751    q.prototype._arraySortByDOMOrder = function(a) {
28752      a.sort(function(a, c) {
28753        return a.getPosition(c) & CKEDITOR.POSITION_PRECEDING ? -1 : 1;
28754      });
28755    };
28756    var G = {
28757      onPaste: function(a) {
28758        function b(a) {
28759          return Math.max.apply(
28760            null,
28761            CKEDITOR.tools.array.map(
28762              a,
28763              function(a) {
28764                return a.length;
28765              },
28766              0,
28767            ),
28768          );
28769        }
28770        function c(a) {
28771          var b = d.createRange();
28772          b.selectNodeContents(a);
28773          b.select();
28774        }
28775        var d = a.editor,
28776          e = d.getSelection(),
28777          h = u(e),
28778          m = this.findTableInPastedContent(d, a.data.dataValue),
28779          l = e.isInTable(!0) && this.isBoundarySelection(e),
28780          k,
28781          f;
28782        !h.length ||
28783          (1 === h.length && !H(e.getRanges()[0]) && !l) ||
28784          (l && !m) ||
28785          ((h = h[0].getAscendant("table")),
28786          (k = new q(u(e, h))),
28787          d.once("afterPaste", function() {
28788            var a;
28789            if (f) {
28790              a = new CKEDITOR.dom.element(f[0][0]);
28791              var b = f[f.length - 1];
28792              a = x(a, new CKEDITOR.dom.element(b[b.length - 1]));
28793            } else a = k.cells.all;
28794            t(d, a);
28795          }),
28796          m
28797            ? (a.stop(),
28798              l
28799                ? (k.insertRow(1, 1 === l, !0), e.selectElement(k.rows.first))
28800                : (k.emptyCells(), t(d, k.cells.all)),
28801              (a = k.getTableMap()),
28802              (f = CKEDITOR.tools.buildTableMap(m)),
28803              k.insertRow(f.length - a.length),
28804              k.insertColumn(b(f) - b(a)),
28805              (a = k.getTableMap()),
28806              this.pasteTable(k, a, f),
28807              d.fire("saveSnapshot"),
28808              setTimeout(function() {
28809                d.fire("afterPaste");
28810              }, 0))
28811            : (c(k.cells.first),
28812              d.once("afterPaste", function() {
28813                d.fire("lockSnapshot");
28814                k.emptyCells(k.cells.all.slice(1));
28815                t(d, k.cells.all);
28816                d.fire("unlockSnapshot");
28817              })));
28818      },
28819      isBoundarySelection: function(a) {
28820        a = a.getRanges()[0];
28821        var b = a.endContainer.getAscendant("tr", !0);
28822        if (b && a.collapsed) {
28823          if (a.checkBoundaryOfElement(b, CKEDITOR.START)) return 1;
28824          if (a.checkBoundaryOfElement(b, CKEDITOR.END)) return 2;
28825        }
28826        return 0;
28827      },
28828      findTableInPastedContent: function(a, b) {
28829        var c = a.dataProcessor,
28830          d = new CKEDITOR.dom.element("body");
28831        c || (c = new CKEDITOR.htmlDataProcessor(a));
28832        d.setHtml(c.toHtml(b), { fixForBody: !1 });
28833        return 1 < d.getChildCount() ? null : d.findOne("table");
28834      },
28835      pasteTable: function(a, b, c) {
28836        var d,
28837          e = A(a.cells.first),
28838          h = a._getTable(),
28839          m = {},
28840          l,
28841          k,
28842          f,
28843          p;
28844        for (f = 0; f < c.length; f++)
28845          for (
28846            l = new CKEDITOR.dom.element(h.$.rows[a.rows.first.$.rowIndex + f]), p = 0;
28847            p < c[f].length;
28848            p++
28849          )
28850            if (
28851              ((k = new CKEDITOR.dom.element(c[f][p])),
28852              (d = b[f] && b[f][p] ? new CKEDITOR.dom.element(b[f][p]) : null),
28853              k && !k.getCustomData("processed"))
28854            ) {
28855              if (d && d.getParent()) k.replace(d);
28856              else if (0 === p || c[f][p - 1])
28857                (d = 0 !== p ? new CKEDITOR.dom.element(c[f][p - 1]) : null) &&
28858                l.equals(d.getParent())
28859                  ? k.insertAfter(d)
28860                  : 0 < e
28861                    ? l.$.cells[e]
28862                      ? k.insertAfter(new CKEDITOR.dom.element(l.$.cells[e]))
28863                      : l.append(k)
28864                    : l.append(k, !0);
28865              CKEDITOR.dom.element.setMarker(m, k, "processed", !0);
28866            } else k.getCustomData("processed") && d && d.remove();
28867        CKEDITOR.dom.element.clearAllMarkers(m);
28868      },
28869    };
28870    CKEDITOR.plugins.tableselection = {
28871      getCellsBetween: x,
28872      keyboardIntegration: function(a) {
28873        function b(a) {
28874          var b = a.getEnclosedNode();
28875          b && b.is({ td: 1, th: 1 }) ? a.getEnclosedNode().setText("") : a.deleteContents();
28876          CKEDITOR.tools.array.forEach(a._find("td"), function(a) {
28877            a.appendBogus();
28878          });
28879        }
28880        var c = a.editable();
28881        c.attachListener(
28882          c,
28883          "keydown",
28884          (function(a) {
28885            function c(b, e) {
28886              if (!e.length) return null;
28887              var f = a.createRange(),
28888                h = CKEDITOR.dom.range.mergeRanges(e);
28889              CKEDITOR.tools.array.forEach(h, function(a) {
28890                a.enlarge(CKEDITOR.ENLARGE_ELEMENT);
28891              });
28892              var r = h[0].getBoundaryNodes(),
28893                g = r.startNode,
28894                r = r.endNode;
28895              if (g && g.is && g.is(m)) {
28896                for (
28897                  var q = g.getAscendant("table", !0),
28898                    n = g.getPreviousSourceNode(!1, CKEDITOR.NODE_ELEMENT, q),
28899                    t = !1,
28900                    u = function(a) {
28901                      return !g.contains(a) && a.is && a.is("td", "th");
28902                    };
28903                  n && !u(n);
28904
28905                )
28906                  n = n.getPreviousSourceNode(!1, CKEDITOR.NODE_ELEMENT, q);
28907                !n &&
28908                  r &&
28909                  r.is &&
28910                  !r.is("table") &&
28911                  r.getNext() &&
28912                  ((n = r.getNext().findOne("td, th")), (t = !0));
28913                if (n) f["moveToElementEdit" + (t ? "Start" : "End")](n);
28914                else f.setStartBefore(g.getAscendant("table", !0)), f.collapse(!0);
28915                h[0].deleteContents();
28916                return [f];
28917              }
28918              if (g) return f.moveToElementEditablePosition(g), [f];
28919            }
28920            var h = { 37: 1, 38: 1, 39: 1, 40: 1, 8: 1, 46: 1 },
28921              m = CKEDITOR.tools.extend({ table: 1 }, CKEDITOR.dtd.$tableContent);
28922            delete m.td;
28923            delete m.th;
28924            return function(l) {
28925              var k = l.data.getKey(),
28926                f,
28927                m = 37 === k || 38 == k,
28928                g,
28929                n,
28930                q;
28931              if (h[k] && (f = a.getSelection()) && f.isInTable() && f.isFake)
28932                if (
28933                  ((g = f.getRanges()),
28934                  (n = g[0]._getTableElement()),
28935                  (q = g[g.length - 1]._getTableElement()),
28936                  l.data.preventDefault(),
28937                  l.cancel(),
28938                  8 < k && 46 > k)
28939                )
28940                  g[0].moveToElementEditablePosition(m ? n : q, !m), f.selectRanges([g[0]]);
28941                else {
28942                  for (l = 0; l < g.length; l++) b(g[l]);
28943                  (l = c(n, g)) ? (g = l) : g[0].moveToElementEditablePosition(n);
28944                  f.selectRanges(g);
28945                  a.fire("saveSnapshot");
28946                }
28947            };
28948          })(a),
28949          null,
28950          null,
28951          -1,
28952        );
28953        c.attachListener(
28954          c,
28955          "keypress",
28956          function(d) {
28957            var c = a.getSelection(),
28958              h = d.data.$.charCode || 13 === d.data.getKey(),
28959              g;
28960            if (c && c.isInTable() && c.isFake && h && !(d.data.getKeystroke() & CKEDITOR.CTRL)) {
28961              d = c.getRanges();
28962              h = d[0].getEnclosedNode().getAscendant({ td: 1, th: 1 }, !0);
28963              for (g = 0; g < d.length; g++) b(d[g]);
28964              h && (d[0].moveToElementEditablePosition(h), c.selectRanges([d[0]]));
28965            }
28966          },
28967          null,
28968          null,
28969          -1,
28970        );
28971      },
28972      isSupportedEnvironment: !(CKEDITOR.env.ie && 11 > CKEDITOR.env.version),
28973    };
28974    CKEDITOR.plugins.add("tableselection", {
28975      requires: "clipboard,tabletools",
28976      onLoad: function() {
28977        w = CKEDITOR.plugins.tabletools;
28978        u = w.getSelectedCells;
28979        A = w.getCellColIndex;
28980        E = w.insertRow;
28981        F = w.insertColumn;
28982        CKEDITOR.document.appendStyleSheet(this.path + "styles/tableselection.css");
28983      },
28984      init: function(a) {
28985        CKEDITOR.plugins.tableselection.isSupportedEnvironment &&
28986          (a.addContentsCss && a.addContentsCss(this.path + "styles/tableselection.css"),
28987          a.on("contentDom", function() {
28988            var b = a.editable(),
28989              c = b.isInline() ? b : a.document,
28990              d = { editor: a };
28991            b.attachListener(c, "mousedown", v, null, d);
28992            b.attachListener(c, "mousemove", v, null, d);
28993            b.attachListener(c, "mouseup", v, null, d);
28994            b.attachListener(b, "dragstart", M);
28995            b.attachListener(a, "selectionCheck", L);
28996            CKEDITOR.plugins.tableselection.keyboardIntegration(a);
28997            CKEDITOR.plugins.clipboard &&
28998              !CKEDITOR.plugins.clipboard.isCustomCopyCutSupported &&
28999              (b.attachListener(b, "cut", D), b.attachListener(b, "copy", D));
29000          }),
29001          a.on("paste", G.onPaste, G),
29002          z(
29003            a,
29004            "rowInsertBefore rowInsertAfter columnInsertBefore columnInsertAfter cellInsertBefore cellInsertAfter".split(
29005              " ",
29006            ),
29007            function(a, c) {
29008              t(a, c.selectedCells);
29009            },
29010          ),
29011          z(a, ["cellMerge", "cellMergeRight", "cellMergeDown"], function(a, c) {
29012            t(a, [c.commandData.cell]);
29013          }),
29014          z(a, ["cellDelete"], function(a) {
29015            y(a, !0);
29016          }));
29017      },
29018    });
29019  })();
29020  (function() {
29021    var g = [CKEDITOR.CTRL + 90, CKEDITOR.CTRL + 89, CKEDITOR.CTRL + CKEDITOR.SHIFT + 90],
29022      n = { 8: 1, 46: 1 };
29023    CKEDITOR.plugins.add("undo", {
29024      init: function(a) {
29025        function b(a) {
29026          d.enabled && !1 !== a.data.command.canUndo && d.save();
29027        }
29028        function c() {
29029          d.enabled = a.readOnly ? !1 : "wysiwyg" == a.mode;
29030          d.onChange();
29031        }
29032        var d = (a.undoManager = new e(a)),
29033          l = (d.editingHandler = new k(d)),
29034          f = a.addCommand("undo", {
29035            exec: function() {
29036              d.undo() && (a.selectionChange(), this.fire("afterUndo"));
29037            },
29038            startDisabled: !0,
29039            canUndo: !1,
29040          }),
29041          h = a.addCommand("redo", {
29042            exec: function() {
29043              d.redo() && (a.selectionChange(), this.fire("afterRedo"));
29044            },
29045            startDisabled: !0,
29046            canUndo: !1,
29047          });
29048        a.setKeystroke([[g[0], "undo"], [g[1], "redo"], [g[2], "redo"]]);
29049        d.onChange = function() {
29050          f.setState(d.undoable() ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED);
29051          h.setState(d.redoable() ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED);
29052        };
29053        a.on("beforeCommandExec", b);
29054        a.on("afterCommandExec", b);
29055        a.on("saveSnapshot", function(a) {
29056          d.save(a.data && a.data.contentOnly);
29057        });
29058        a.on("contentDom", l.attachListeners, l);
29059        a.on("instanceReady", function() {
29060          a.fire("saveSnapshot");
29061        });
29062        a.on("beforeModeUnload", function() {
29063          "wysiwyg" == a.mode && d.save(!0);
29064        });
29065        a.on("mode", c);
29066        a.on("readOnly", c);
29067        a.ui.addButton &&
29068          (a.ui.addButton("Undo", { label: a.lang.undo.undo, command: "undo", toolbar: "undo,10" }),
29069          a.ui.addButton("Redo", { label: a.lang.undo.redo, command: "redo", toolbar: "undo,20" }));
29070        a.resetUndo = function() {
29071          d.reset();
29072          a.fire("saveSnapshot");
29073        };
29074        a.on("updateSnapshot", function() {
29075          d.currentImage && d.update();
29076        });
29077        a.on("lockSnapshot", function(a) {
29078          a = a.data;
29079          d.lock(a && a.dontUpdate, a && a.forceUpdate);
29080        });
29081        a.on("unlockSnapshot", d.unlock, d);
29082      },
29083    });
29084    CKEDITOR.plugins.undo = {};
29085    var e = (CKEDITOR.plugins.undo.UndoManager = function(a) {
29086      this.strokesRecorded = [0, 0];
29087      this.locked = null;
29088      this.previousKeyGroup = -1;
29089      this.limit = a.config.undoStackSize || 20;
29090      this.strokesLimit = 25;
29091      this.editor = a;
29092      this.reset();
29093    });
29094    e.prototype = {
29095      type: function(a, b) {
29096        var c = e.getKeyGroup(a),
29097          d = this.strokesRecorded[c] + 1;
29098        b = b || d >= this.strokesLimit;
29099        this.typing || ((this.hasUndo = this.typing = !0), (this.hasRedo = !1), this.onChange());
29100        b ? ((d = 0), this.editor.fire("saveSnapshot")) : this.editor.fire("change");
29101        this.strokesRecorded[c] = d;
29102        this.previousKeyGroup = c;
29103      },
29104      keyGroupChanged: function(a) {
29105        return e.getKeyGroup(a) != this.previousKeyGroup;
29106      },
29107      reset: function() {
29108        this.snapshots = [];
29109        this.index = -1;
29110        this.currentImage = null;
29111        this.hasRedo = this.hasUndo = !1;
29112        this.locked = null;
29113        this.resetType();
29114      },
29115      resetType: function() {
29116        this.strokesRecorded = [0, 0];
29117        this.typing = !1;
29118        this.previousKeyGroup = -1;
29119      },
29120      refreshState: function() {
29121        this.hasUndo = !!this.getNextImage(!0);
29122        this.hasRedo = !!this.getNextImage(!1);
29123        this.resetType();
29124        this.onChange();
29125      },
29126      save: function(a, b, c) {
29127        var d = this.editor;
29128        if (this.locked || "ready" != d.status || "wysiwyg" != d.mode) return !1;
29129        var e = d.editable();
29130        if (!e || "ready" != e.status) return !1;
29131        e = this.snapshots;
29132        b || (b = new f(d));
29133        if (!1 === b.contents) return !1;
29134        if (this.currentImage)
29135          if (b.equalsContent(this.currentImage)) {
29136            if (a || b.equalsSelection(this.currentImage)) return !1;
29137          } else !1 !== c && d.fire("change");
29138        e.splice(this.index + 1, e.length - this.index - 1);
29139        e.length == this.limit && e.shift();
29140        this.index = e.push(b) - 1;
29141        this.currentImage = b;
29142        !1 !== c && this.refreshState();
29143        return !0;
29144      },
29145      restoreImage: function(a) {
29146        var b = this.editor,
29147          c;
29148        a.bookmarks && (b.focus(), (c = b.getSelection()));
29149        this.locked = { level: 999 };
29150        this.editor.loadSnapshot(a.contents);
29151        a.bookmarks
29152          ? c.selectBookmarks(a.bookmarks)
29153          : CKEDITOR.env.ie &&
29154            ((c = this.editor.document.getBody().$.createTextRange()), c.collapse(!0), c.select());
29155        this.locked = null;
29156        this.index = a.index;
29157        this.currentImage = this.snapshots[this.index];
29158        this.update();
29159        this.refreshState();
29160        b.fire("change");
29161      },
29162      getNextImage: function(a) {
29163        var b = this.snapshots,
29164          c = this.currentImage,
29165          d;
29166        if (c)
29167          if (a)
29168            for (d = this.index - 1; 0 <= d; d--) {
29169              if (((a = b[d]), !c.equalsContent(a))) return (a.index = d), a;
29170            }
29171          else
29172            for (d = this.index + 1; d < b.length; d++)
29173              if (((a = b[d]), !c.equalsContent(a))) return (a.index = d), a;
29174        return null;
29175      },
29176      redoable: function() {
29177        return this.enabled && this.hasRedo;
29178      },
29179      undoable: function() {
29180        return this.enabled && this.hasUndo;
29181      },
29182      undo: function() {
29183        if (this.undoable()) {
29184          this.save(!0);
29185          var a = this.getNextImage(!0);
29186          if (a) return this.restoreImage(a), !0;
29187        }
29188        return !1;
29189      },
29190      redo: function() {
29191        if (this.redoable() && (this.save(!0), this.redoable())) {
29192          var a = this.getNextImage(!1);
29193          if (a) return this.restoreImage(a), !0;
29194        }
29195        return !1;
29196      },
29197      update: function(a) {
29198        if (!this.locked) {
29199          a || (a = new f(this.editor));
29200          for (
29201            var b = this.index, c = this.snapshots;
29202            0 < b && this.currentImage.equalsContent(c[b - 1]);
29203
29204          )
29205            --b;
29206          c.splice(b, this.index - b + 1, a);
29207          this.index = b;
29208          this.currentImage = a;
29209        }
29210      },
29211      updateSelection: function(a) {
29212        if (!this.snapshots.length) return !1;
29213        var b = this.snapshots,
29214          c = b[b.length - 1];
29215        return c.equalsContent(a) && !c.equalsSelection(a)
29216          ? ((this.currentImage = b[b.length - 1] = a), !0)
29217          : !1;
29218      },
29219      lock: function(a, b) {
29220        if (this.locked) this.locked.level++;
29221        else if (a) this.locked = { level: 1 };
29222        else {
29223          var c = null;
29224          if (b) c = !0;
29225          else {
29226            var d = new f(this.editor, !0);
29227            this.currentImage && this.currentImage.equalsContent(d) && (c = d);
29228          }
29229          this.locked = { update: c, level: 1 };
29230        }
29231      },
29232      unlock: function() {
29233        if (this.locked && !--this.locked.level) {
29234          var a = this.locked.update;
29235          this.locked = null;
29236          if (!0 === a) this.update();
29237          else if (a) {
29238            var b = new f(this.editor, !0);
29239            a.equalsContent(b) || this.update();
29240          }
29241        }
29242      },
29243    };
29244    e.navigationKeyCodes = { 37: 1, 38: 1, 39: 1, 40: 1, 36: 1, 35: 1, 33: 1, 34: 1 };
29245    e.keyGroups = { PRINTABLE: 0, FUNCTIONAL: 1 };
29246    e.isNavigationKey = function(a) {
29247      return !!e.navigationKeyCodes[a];
29248    };
29249    e.getKeyGroup = function(a) {
29250      var b = e.keyGroups;
29251      return n[a] ? b.FUNCTIONAL : b.PRINTABLE;
29252    };
29253    e.getOppositeKeyGroup = function(a) {
29254      var b = e.keyGroups;
29255      return a == b.FUNCTIONAL ? b.PRINTABLE : b.FUNCTIONAL;
29256    };
29257    e.ieFunctionalKeysBug = function(a) {
29258      return CKEDITOR.env.ie && e.getKeyGroup(a) == e.keyGroups.FUNCTIONAL;
29259    };
29260    var f = (CKEDITOR.plugins.undo.Image = function(a, b) {
29261        this.editor = a;
29262        a.fire("beforeUndoImage");
29263        var c = a.getSnapshot();
29264        CKEDITOR.env.ie && c && (c = c.replace(/\s+data-cke-expando=".*?"/g, ""));
29265        this.contents = c;
29266        b || (this.bookmarks = (c = c && a.getSelection()) && c.createBookmarks2(!0));
29267        a.fire("afterUndoImage");
29268      }),
29269      h = /\b(?:href|src|name)="[^"]*?"/gi;
29270    f.prototype = {
29271      equalsContent: function(a) {
29272        var b = this.contents;
29273        a = a.contents;
29274        CKEDITOR.env.ie &&
29275          (CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks) &&
29276          ((b = b.replace(h, "")), (a = a.replace(h, "")));
29277        return b != a ? !1 : !0;
29278      },
29279      equalsSelection: function(a) {
29280        var b = this.bookmarks;
29281        a = a.bookmarks;
29282        if (b || a) {
29283          if (!b || !a || b.length != a.length) return !1;
29284          for (var c = 0; c < b.length; c++) {
29285            var d = b[c],
29286              e = a[c];
29287            if (
29288              d.startOffset != e.startOffset ||
29289              d.endOffset != e.endOffset ||
29290              !CKEDITOR.tools.arrayCompare(d.start, e.start) ||
29291              !CKEDITOR.tools.arrayCompare(d.end, e.end)
29292            )
29293              return !1;
29294          }
29295        }
29296        return !0;
29297      },
29298    };
29299    var k = (CKEDITOR.plugins.undo.NativeEditingHandler = function(a) {
29300      this.undoManager = a;
29301      this.ignoreInputEvent = !1;
29302      this.keyEventsStack = new m();
29303      this.lastKeydownImage = null;
29304    });
29305    k.prototype = {
29306      onKeydown: function(a) {
29307        var b = a.data.getKey();
29308        if (229 !== b)
29309          if (-1 < CKEDITOR.tools.indexOf(g, a.data.getKeystroke())) a.data.preventDefault();
29310          else if (
29311            (this.keyEventsStack.cleanUp(a),
29312            (a = this.undoManager),
29313            this.keyEventsStack.getLast(b) || this.keyEventsStack.push(b),
29314            (this.lastKeydownImage = new f(a.editor)),
29315            e.isNavigationKey(b) || this.undoManager.keyGroupChanged(b))
29316          )
29317            if (a.strokesRecorded[0] || a.strokesRecorded[1])
29318              a.save(!1, this.lastKeydownImage, !1), a.resetType();
29319      },
29320      onInput: function() {
29321        if (this.ignoreInputEvent) this.ignoreInputEvent = !1;
29322        else {
29323          var a = this.keyEventsStack.getLast();
29324          a || (a = this.keyEventsStack.push(0));
29325          this.keyEventsStack.increment(a.keyCode);
29326          this.keyEventsStack.getTotalInputs() >= this.undoManager.strokesLimit &&
29327            (this.undoManager.type(a.keyCode, !0), this.keyEventsStack.resetInputs());
29328        }
29329      },
29330      onKeyup: function(a) {
29331        var b = this.undoManager;
29332        a = a.data.getKey();
29333        var c = this.keyEventsStack.getTotalInputs();
29334        this.keyEventsStack.remove(a);
29335        if (
29336          !(
29337            e.ieFunctionalKeysBug(a) &&
29338            this.lastKeydownImage &&
29339            this.lastKeydownImage.equalsContent(new f(b.editor, !0))
29340          )
29341        )
29342          if (0 < c) b.type(a);
29343          else if (e.isNavigationKey(a)) this.onNavigationKey(!0);
29344      },
29345      onNavigationKey: function(a) {
29346        var b = this.undoManager;
29347        (!a && b.save(!0, null, !1)) || b.updateSelection(new f(b.editor));
29348        b.resetType();
29349      },
29350      ignoreInputEventListener: function() {
29351        this.ignoreInputEvent = !0;
29352      },
29353      activateInputEventListener: function() {
29354        this.ignoreInputEvent = !1;
29355      },
29356      attachListeners: function() {
29357        var a = this.undoManager.editor,
29358          b = a.editable(),
29359          c = this;
29360        b.attachListener(
29361          b,
29362          "keydown",
29363          function(a) {
29364            c.onKeydown(a);
29365            if (e.ieFunctionalKeysBug(a.data.getKey())) c.onInput();
29366          },
29367          null,
29368          null,
29369          999,
29370        );
29371        b.attachListener(b, CKEDITOR.env.ie ? "keypress" : "input", c.onInput, c, null, 999);
29372        b.attachListener(b, "keyup", c.onKeyup, c, null, 999);
29373        b.attachListener(b, "paste", c.ignoreInputEventListener, c, null, 999);
29374        b.attachListener(b, "drop", c.ignoreInputEventListener, c, null, 999);
29375        a.on("afterPaste", c.activateInputEventListener, c, null, 999);
29376        b.attachListener(
29377          b.isInline() ? b : a.document.getDocumentElement(),
29378          "click",
29379          function() {
29380            c.onNavigationKey();
29381          },
29382          null,
29383          null,
29384          999,
29385        );
29386        b.attachListener(
29387          this.undoManager.editor,
29388          "blur",
29389          function() {
29390            c.keyEventsStack.remove(9);
29391          },
29392          null,
29393          null,
29394          999,
29395        );
29396      },
29397    };
29398    var m = (CKEDITOR.plugins.undo.KeyEventsStack = function() {
29399      this.stack = [];
29400    });
29401    m.prototype = {
29402      push: function(a) {
29403        a = this.stack.push({ keyCode: a, inputs: 0 });
29404        return this.stack[a - 1];
29405      },
29406      getLastIndex: function(a) {
29407        if ("number" != typeof a) return this.stack.length - 1;
29408        for (var b = this.stack.length; b--; ) if (this.stack[b].keyCode == a) return b;
29409        return -1;
29410      },
29411      getLast: function(a) {
29412        a = this.getLastIndex(a);
29413        return -1 != a ? this.stack[a] : null;
29414      },
29415      increment: function(a) {
29416        this.getLast(a).inputs++;
29417      },
29418      remove: function(a) {
29419        a = this.getLastIndex(a);
29420        -1 != a && this.stack.splice(a, 1);
29421      },
29422      resetInputs: function(a) {
29423        if ("number" == typeof a) this.getLast(a).inputs = 0;
29424        else for (a = this.stack.length; a--; ) this.stack[a].inputs = 0;
29425      },
29426      getTotalInputs: function() {
29427        for (var a = this.stack.length, b = 0; a--; ) b += this.stack[a].inputs;
29428        return b;
29429      },
29430      cleanUp: function(a) {
29431        a = a.data.$;
29432        a.ctrlKey || a.metaKey || this.remove(17);
29433        a.shiftKey || this.remove(16);
29434        a.altKey || this.remove(18);
29435      },
29436    };
29437  })();
29438  (function() {
29439    function m(a, d) {
29440      CKEDITOR.tools.extend(
29441        this,
29442        { editor: a, editable: a.editable(), doc: a.document, win: a.window },
29443        d,
29444        !0,
29445      );
29446      this.inline = this.editable.isInline();
29447      this.inline || (this.frame = this.win.getFrame());
29448      this.target = this[this.inline ? "editable" : "doc"];
29449    }
29450    function n(a, d) {
29451      CKEDITOR.tools.extend(this, d, { editor: a }, !0);
29452    }
29453    function p(a, d) {
29454      var b = a.editable();
29455      CKEDITOR.tools.extend(
29456        this,
29457        {
29458          editor: a,
29459          editable: b,
29460          inline: b.isInline(),
29461          doc: a.document,
29462          win: a.window,
29463          container: CKEDITOR.document.getBody(),
29464          winTop: CKEDITOR.document.getWindow(),
29465        },
29466        d,
29467        !0,
29468      );
29469      this.hidden = {};
29470      this.visible = {};
29471      this.inline || (this.frame = this.win.getFrame());
29472      this.queryViewport();
29473      var c = CKEDITOR.tools.bind(this.queryViewport, this),
29474        e = CKEDITOR.tools.bind(this.hideVisible, this),
29475        g = CKEDITOR.tools.bind(this.removeAll, this);
29476      b.attachListener(this.winTop, "resize", c);
29477      b.attachListener(this.winTop, "scroll", c);
29478      b.attachListener(this.winTop, "resize", e);
29479      b.attachListener(this.win, "scroll", e);
29480      b.attachListener(
29481        this.inline ? b : this.frame,
29482        "mouseout",
29483        function(a) {
29484          var b = a.data.$.clientX;
29485          a = a.data.$.clientY;
29486          this.queryViewport();
29487          (b <= this.rect.left ||
29488            b >= this.rect.right ||
29489            a <= this.rect.top ||
29490            a >= this.rect.bottom) &&
29491            this.hideVisible();
29492          (0 >= b || b >= this.winTopPane.width || 0 >= a || a >= this.winTopPane.height) &&
29493            this.hideVisible();
29494        },
29495        this,
29496      );
29497      b.attachListener(a, "resize", c);
29498      b.attachListener(a, "mode", g);
29499      a.on("destroy", g);
29500      this.lineTpl = new CKEDITOR.template(
29501        '\x3cdiv data-cke-lineutils-line\x3d"1" class\x3d"cke_reset_all" style\x3d"{lineStyle}"\x3e\x3cspan style\x3d"{tipLeftStyle}"\x3e\x26nbsp;\x3c/span\x3e\x3cspan style\x3d"{tipRightStyle}"\x3e\x26nbsp;\x3c/span\x3e\x3c/div\x3e',
29502      ).output({
29503        lineStyle: CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({}, t, this.lineStyle, !0)),
29504        tipLeftStyle: CKEDITOR.tools.writeCssText(
29505          CKEDITOR.tools.extend(
29506            {},
29507            q,
29508            { left: "0px", "border-left-color": "red", "border-width": "6px 0 6px 6px" },
29509            this.tipCss,
29510            this.tipLeftStyle,
29511            !0,
29512          ),
29513        ),
29514        tipRightStyle: CKEDITOR.tools.writeCssText(
29515          CKEDITOR.tools.extend(
29516            {},
29517            q,
29518            { right: "0px", "border-right-color": "red", "border-width": "6px 6px 6px 0" },
29519            this.tipCss,
29520            this.tipRightStyle,
29521            !0,
29522          ),
29523        ),
29524      });
29525    }
29526    function l(a) {
29527      var d;
29528      if ((d = a && a.type == CKEDITOR.NODE_ELEMENT))
29529        d = !(r[a.getComputedStyle("float")] || r[a.getAttribute("align")]);
29530      return d && !u[a.getComputedStyle("position")];
29531    }
29532    CKEDITOR.plugins.add("lineutils");
29533    CKEDITOR.LINEUTILS_BEFORE = 1;
29534    CKEDITOR.LINEUTILS_AFTER = 2;
29535    CKEDITOR.LINEUTILS_INSIDE = 4;
29536    m.prototype = {
29537      start: function(a) {
29538        var d = this,
29539          b = this.editor,
29540          c = this.doc,
29541          e,
29542          g,
29543          f,
29544          h,
29545          k = CKEDITOR.tools.eventsBuffer(50, function() {
29546            b.readOnly ||
29547              "wysiwyg" != b.mode ||
29548              ((d.relations = {}),
29549              (g = c.$.elementFromPoint(f, h)) &&
29550                g.nodeType &&
29551                ((e = new CKEDITOR.dom.element(g)),
29552                d.traverseSearch(e),
29553                isNaN(f + h) || d.pixelSearch(e, f, h),
29554                a && a(d.relations, f, h)));
29555          });
29556        this.listener = this.editable.attachListener(this.target, "mousemove", function(a) {
29557          f = a.data.$.clientX;
29558          h = a.data.$.clientY;
29559          k.input();
29560        });
29561        this.editable.attachListener(
29562          this.inline ? this.editable : this.frame,
29563          "mouseout",
29564          function() {
29565            k.reset();
29566          },
29567        );
29568      },
29569      stop: function() {
29570        this.listener && this.listener.removeListener();
29571      },
29572      getRange: (function() {
29573        var a = {};
29574        a[CKEDITOR.LINEUTILS_BEFORE] = CKEDITOR.POSITION_BEFORE_START;
29575        a[CKEDITOR.LINEUTILS_AFTER] = CKEDITOR.POSITION_AFTER_END;
29576        a[CKEDITOR.LINEUTILS_INSIDE] = CKEDITOR.POSITION_AFTER_START;
29577        return function(d) {
29578          var b = this.editor.createRange();
29579          b.moveToPosition(this.relations[d.uid].element, a[d.type]);
29580          return b;
29581        };
29582      })(),
29583      store: (function() {
29584        function a(a, b, c) {
29585          var e = a.getUniqueId();
29586          e in c ? (c[e].type |= b) : (c[e] = { element: a, type: b });
29587        }
29588        return function(d, b) {
29589          var c;
29590          b & CKEDITOR.LINEUTILS_AFTER &&
29591            l((c = d.getNext())) &&
29592            c.isVisible() &&
29593            (a(c, CKEDITOR.LINEUTILS_BEFORE, this.relations), (b ^= CKEDITOR.LINEUTILS_AFTER));
29594          b & CKEDITOR.LINEUTILS_INSIDE &&
29595            l((c = d.getFirst())) &&
29596            c.isVisible() &&
29597            (a(c, CKEDITOR.LINEUTILS_BEFORE, this.relations), (b ^= CKEDITOR.LINEUTILS_INSIDE));
29598          a(d, b, this.relations);
29599        };
29600      })(),
29601      traverseSearch: function(a) {
29602        var d, b, c;
29603        do
29604          if (((c = a.$["data-cke-expando"]), !(c && c in this.relations))) {
29605            if (a.equals(this.editable)) break;
29606            if (l(a)) for (d in this.lookups) (b = this.lookups[d](a)) && this.store(a, b);
29607          }
29608        while (
29609          (!a || a.type != CKEDITOR.NODE_ELEMENT || "true" != a.getAttribute("contenteditable")) &&
29610          (a = a.getParent())
29611        );
29612      },
29613      pixelSearch: (function() {
29614        function a(a, c, e, g, f) {
29615          for (var h = 0, k; f(e); ) {
29616            e += g;
29617            if (25 == ++h) break;
29618            if ((k = this.doc.$.elementFromPoint(c, e)))
29619              if (k == a) h = 0;
29620              else if (d(a, k) && ((h = 0), l((k = new CKEDITOR.dom.element(k))))) return k;
29621          }
29622        }
29623        var d =
29624          CKEDITOR.env.ie || CKEDITOR.env.webkit
29625            ? function(a, c) {
29626                return a.contains(c);
29627              }
29628            : function(a, c) {
29629                return !!(a.compareDocumentPosition(c) & 16);
29630              };
29631        return function(b, c, d) {
29632          var g = this.win.getViewPaneSize().height,
29633            f = a.call(this, b.$, c, d, -1, function(a) {
29634              return 0 < a;
29635            });
29636          c = a.call(this, b.$, c, d, 1, function(a) {
29637            return a < g;
29638          });
29639          if (f) for (this.traverseSearch(f); !f.getParent().equals(b); ) f = f.getParent();
29640          if (c) for (this.traverseSearch(c); !c.getParent().equals(b); ) c = c.getParent();
29641          for (; f || c; ) {
29642            f && (f = f.getNext(l));
29643            if (!f || f.equals(c)) break;
29644            this.traverseSearch(f);
29645            c && (c = c.getPrevious(l));
29646            if (!c || c.equals(f)) break;
29647            this.traverseSearch(c);
29648          }
29649        };
29650      })(),
29651      greedySearch: function() {
29652        this.relations = {};
29653        for (var a = this.editable.getElementsByTag("*"), d = 0, b, c, e; (b = a.getItem(d++)); )
29654          if (
29655            !b.equals(this.editable) &&
29656            b.type == CKEDITOR.NODE_ELEMENT &&
29657            (b.hasAttribute("contenteditable") || !b.isReadOnly()) &&
29658            l(b) &&
29659            b.isVisible()
29660          )
29661            for (e in this.lookups) (c = this.lookups[e](b)) && this.store(b, c);
29662        return this.relations;
29663      },
29664    };
29665    n.prototype = {
29666      locate: (function() {
29667        function a(a, b) {
29668          var c = a.element[b === CKEDITOR.LINEUTILS_BEFORE ? "getPrevious" : "getNext"]();
29669          return c && l(c)
29670            ? ((a.siblingRect = c.getClientRect()),
29671              b == CKEDITOR.LINEUTILS_BEFORE
29672                ? (a.siblingRect.bottom + a.elementRect.top) / 2
29673                : (a.elementRect.bottom + a.siblingRect.top) / 2)
29674            : b == CKEDITOR.LINEUTILS_BEFORE ? a.elementRect.top : a.elementRect.bottom;
29675        }
29676        return function(d) {
29677          var b;
29678          this.locations = {};
29679          for (var c in d)
29680            (b = d[c]),
29681              (b.elementRect = b.element.getClientRect()),
29682              b.type & CKEDITOR.LINEUTILS_BEFORE &&
29683                this.store(c, CKEDITOR.LINEUTILS_BEFORE, a(b, CKEDITOR.LINEUTILS_BEFORE)),
29684              b.type & CKEDITOR.LINEUTILS_AFTER &&
29685                this.store(c, CKEDITOR.LINEUTILS_AFTER, a(b, CKEDITOR.LINEUTILS_AFTER)),
29686              b.type & CKEDITOR.LINEUTILS_INSIDE &&
29687                this.store(
29688                  c,
29689                  CKEDITOR.LINEUTILS_INSIDE,
29690                  (b.elementRect.top + b.elementRect.bottom) / 2,
29691                );
29692          return this.locations;
29693        };
29694      })(),
29695      sort: (function() {
29696        var a, d, b, c;
29697        return function(e, g) {
29698          a = this.locations;
29699          d = [];
29700          for (var f in a)
29701            for (var h in a[f])
29702              if (((b = Math.abs(e - a[f][h])), d.length)) {
29703                for (c = 0; c < d.length; c++)
29704                  if (b < d[c].dist) {
29705                    d.splice(c, 0, { uid: +f, type: h, dist: b });
29706                    break;
29707                  }
29708                c == d.length && d.push({ uid: +f, type: h, dist: b });
29709              } else d.push({ uid: +f, type: h, dist: b });
29710          return "undefined" != typeof g ? d.slice(0, g) : d;
29711        };
29712      })(),
29713      store: function(a, d, b) {
29714        this.locations[a] || (this.locations[a] = {});
29715        this.locations[a][d] = b;
29716      },
29717    };
29718    var q = {
29719        display: "block",
29720        width: "0px",
29721        height: "0px",
29722        "border-color": "transparent",
29723        "border-style": "solid",
29724        position: "absolute",
29725        top: "-6px",
29726      },
29727      t = { height: "0px", "border-top": "1px dashed red", position: "absolute", "z-index": 9999 };
29728    p.prototype = {
29729      removeAll: function() {
29730        for (var a in this.hidden) this.hidden[a].remove(), delete this.hidden[a];
29731        for (a in this.visible) this.visible[a].remove(), delete this.visible[a];
29732      },
29733      hideLine: function(a) {
29734        var d = a.getUniqueId();
29735        a.hide();
29736        this.hidden[d] = a;
29737        delete this.visible[d];
29738      },
29739      showLine: function(a) {
29740        var d = a.getUniqueId();
29741        a.show();
29742        this.visible[d] = a;
29743        delete this.hidden[d];
29744      },
29745      hideVisible: function() {
29746        for (var a in this.visible) this.hideLine(this.visible[a]);
29747      },
29748      placeLine: function(a, d) {
29749        var b, c, e;
29750        if ((b = this.getStyle(a.uid, a.type))) {
29751          for (e in this.visible)
29752            if (this.visible[e].getCustomData("hash") !== this.hash) {
29753              c = this.visible[e];
29754              break;
29755            }
29756          if (!c)
29757            for (e in this.hidden)
29758              if (this.hidden[e].getCustomData("hash") !== this.hash) {
29759                this.showLine((c = this.hidden[e]));
29760                break;
29761              }
29762          c || this.showLine((c = this.addLine()));
29763          c.setCustomData("hash", this.hash);
29764          this.visible[c.getUniqueId()] = c;
29765          c.setStyles(b);
29766          d && d(c);
29767        }
29768      },
29769      getStyle: function(a, d) {
29770        var b = this.relations[a],
29771          c = this.locations[a][d],
29772          e = {};
29773        e.width = b.siblingRect
29774          ? Math.max(b.siblingRect.width, b.elementRect.width)
29775          : b.elementRect.width;
29776        e.top = this.inline
29777          ? c + this.winTopScroll.y - this.rect.relativeY
29778          : this.rect.top + this.winTopScroll.y + c;
29779        if (
29780          e.top - this.winTopScroll.y < this.rect.top ||
29781          e.top - this.winTopScroll.y > this.rect.bottom
29782        )
29783          return !1;
29784        this.inline
29785          ? (e.left = b.elementRect.left - this.rect.relativeX)
29786          : (0 < b.elementRect.left
29787              ? (e.left = this.rect.left + b.elementRect.left)
29788              : ((e.width += b.elementRect.left), (e.left = this.rect.left)),
29789            0 < (b = e.left + e.width - (this.rect.left + this.winPane.width)) && (e.width -= b));
29790        e.left += this.winTopScroll.x;
29791        for (var g in e) e[g] = CKEDITOR.tools.cssLength(e[g]);
29792        return e;
29793      },
29794      addLine: function() {
29795        var a = CKEDITOR.dom.element.createFromHtml(this.lineTpl);
29796        a.appendTo(this.container);
29797        return a;
29798      },
29799      prepare: function(a, d) {
29800        this.relations = a;
29801        this.locations = d;
29802        this.hash = Math.random();
29803      },
29804      cleanup: function() {
29805        var a, d;
29806        for (d in this.visible)
29807          (a = this.visible[d]), a.getCustomData("hash") !== this.hash && this.hideLine(a);
29808      },
29809      queryViewport: function() {
29810        this.winPane = this.win.getViewPaneSize();
29811        this.winTopScroll = this.winTop.getScrollPosition();
29812        this.winTopPane = this.winTop.getViewPaneSize();
29813        this.rect = this.getClientRect(this.inline ? this.editable : this.frame);
29814      },
29815      getClientRect: function(a) {
29816        a = a.getClientRect();
29817        var d = this.container.getDocumentPosition(),
29818          b = this.container.getComputedStyle("position");
29819        a.relativeX = a.relativeY = 0;
29820        "static" != b &&
29821          ((a.relativeY = d.y),
29822          (a.relativeX = d.x),
29823          (a.top -= a.relativeY),
29824          (a.bottom -= a.relativeY),
29825          (a.left -= a.relativeX),
29826          (a.right -= a.relativeX));
29827        return a;
29828      },
29829    };
29830    var r = { left: 1, right: 1, center: 1 },
29831      u = { absolute: 1, fixed: 1 };
29832    CKEDITOR.plugins.lineutils = { finder: m, locator: n, liner: p };
29833  })();
29834  (function() {
29835    function f(a) {
29836      return a.getName && !a.hasAttribute("data-cke-temp");
29837    }
29838    CKEDITOR.plugins.add("widgetselection", {
29839      init: function(a) {
29840        if (CKEDITOR.env.webkit) {
29841          var b = CKEDITOR.plugins.widgetselection;
29842          a.on("contentDom", function(a) {
29843            a = a.editor;
29844            var d = a.document,
29845              e = a.editable();
29846            e.attachListener(
29847              d,
29848              "keydown",
29849              function(a) {
29850                a.data.getKeystroke() == CKEDITOR.CTRL + 65 &&
29851                  CKEDITOR.tools.setTimeout(function() {
29852                    b.addFillers(e) || b.removeFillers(e);
29853                  }, 0);
29854              },
29855              null,
29856              null,
29857              -1,
29858            );
29859            a.on("selectionCheck", function(a) {
29860              b.removeFillers(a.editor.editable());
29861            });
29862            a.on("paste", function(a) {
29863              a.data.dataValue = b.cleanPasteData(a.data.dataValue);
29864            });
29865            "selectall" in a.plugins && b.addSelectAllIntegration(a);
29866          });
29867        }
29868      },
29869    });
29870    CKEDITOR.plugins.widgetselection = {
29871      startFiller: null,
29872      endFiller: null,
29873      fillerAttribute: "data-cke-filler-webkit",
29874      fillerContent: "\x26nbsp;",
29875      fillerTagName: "div",
29876      addFillers: function(a) {
29877        var b = a.editor;
29878        if (!this.isWholeContentSelected(a) && 0 < a.getChildCount()) {
29879          var c = a.getFirst(f),
29880            d = a.getLast(f);
29881          c &&
29882            c.type == CKEDITOR.NODE_ELEMENT &&
29883            !c.isEditable() &&
29884            ((this.startFiller = this.createFiller()), a.append(this.startFiller, 1));
29885          d &&
29886            d.type == CKEDITOR.NODE_ELEMENT &&
29887            !d.isEditable() &&
29888            ((this.endFiller = this.createFiller(!0)), a.append(this.endFiller, 0));
29889          if (this.hasFiller(a))
29890            return (b = b.createRange()), b.selectNodeContents(a), b.select(), !0;
29891        }
29892        return !1;
29893      },
29894      removeFillers: function(a) {
29895        if (this.hasFiller(a) && !this.isWholeContentSelected(a)) {
29896          var b = a.findOne(this.fillerTagName + "[" + this.fillerAttribute + "\x3dstart]"),
29897            c = a.findOne(this.fillerTagName + "[" + this.fillerAttribute + "\x3dend]");
29898          this.startFiller && b && this.startFiller.equals(b)
29899            ? this.removeFiller(this.startFiller, a)
29900            : (this.startFiller = b);
29901          this.endFiller && c && this.endFiller.equals(c)
29902            ? this.removeFiller(this.endFiller, a)
29903            : (this.endFiller = c);
29904        }
29905      },
29906      cleanPasteData: function(a) {
29907        a &&
29908          a.length &&
29909          (a = a.replace(this.createFillerRegex(), "").replace(this.createFillerRegex(!0), ""));
29910        return a;
29911      },
29912      isWholeContentSelected: function(a) {
29913        var b = a.editor.getSelection().getRanges()[0];
29914        return !b || (b && b.collapsed)
29915          ? !1
29916          : ((b = b.clone()),
29917            b.enlarge(CKEDITOR.ENLARGE_ELEMENT),
29918            !!(
29919              b &&
29920              a &&
29921              b.startContainer &&
29922              b.endContainer &&
29923              0 === b.startOffset &&
29924              b.endOffset === a.getChildCount() &&
29925              b.startContainer.equals(a) &&
29926              b.endContainer.equals(a)
29927            ));
29928      },
29929      hasFiller: function(a) {
29930        return 0 < a.find(this.fillerTagName + "[" + this.fillerAttribute + "]").count();
29931      },
29932      createFiller: function(a) {
29933        var b = new CKEDITOR.dom.element(this.fillerTagName);
29934        b.setHtml(this.fillerContent);
29935        b.setAttribute(this.fillerAttribute, a ? "end" : "start");
29936        b.setAttribute("data-cke-temp", 1);
29937        b.setStyles({
29938          display: "block",
29939          width: 0,
29940          height: 0,
29941          padding: 0,
29942          border: 0,
29943          margin: 0,
29944          position: "absolute",
29945          top: 0,
29946          left: "-9999px",
29947          opacity: 0,
29948          overflow: "hidden",
29949        });
29950        return b;
29951      },
29952      removeFiller: function(a, b) {
29953        if (a) {
29954          var c = b.editor,
29955            d = b.editor
29956              .getSelection()
29957              .getRanges()[0]
29958              .startPath(),
29959            e = c.createRange(),
29960            g,
29961            f;
29962          d.contains(a) && ((g = a.getHtml()), (f = !0));
29963          d = "start" == a.getAttribute(this.fillerAttribute);
29964          a.remove();
29965          g && 0 < g.length && g != this.fillerContent
29966            ? (b.insertHtmlIntoRange(g, c.getSelection().getRanges()[0]),
29967              e.setStartAt(b.getChild(b.getChildCount() - 1), CKEDITOR.POSITION_BEFORE_END),
29968              c.getSelection().selectRanges([e]))
29969            : f &&
29970              (d
29971                ? e.setStartAt(b.getFirst().getNext(), CKEDITOR.POSITION_AFTER_START)
29972                : e.setEndAt(b.getLast().getPrevious(), CKEDITOR.POSITION_BEFORE_END),
29973              b.editor.getSelection().selectRanges([e]));
29974        }
29975      },
29976      createFillerRegex: function(a) {
29977        var b = this.createFiller(a)
29978          .getOuterHtml()
29979          .replace(/style="[^"]*"/gi, 'style\x3d"[^"]*"')
29980          .replace(/>[^<]*</gi, "\x3e[^\x3c]*\x3c");
29981        return new RegExp((a ? "" : "^") + b + (a ? "$" : ""));
29982      },
29983      addSelectAllIntegration: function(a) {
29984        var b = this;
29985        a.editable().attachListener(
29986          a,
29987          "beforeCommandExec",
29988          function(c) {
29989            var d = a.editable();
29990            "selectAll" == c.data.name && d && b.addFillers(d);
29991          },
29992          null,
29993          null,
29994          9999,
29995        );
29996      },
29997    };
29998  })();
29999  (function() {
30000    function p(a) {
30001      this.editor = a;
30002      this.registered = {};
30003      this.instances = {};
30004      this.selected = [];
30005      this.widgetHoldingFocusedEditable = this.focused = null;
30006      this._ = { nextId: 0, upcasts: [], upcastCallbacks: [], filters: {} };
30007      I(this);
30008      J(this);
30009      this.on("checkWidgets", K);
30010      this.editor.on("contentDomInvalidated", this.checkWidgets, this);
30011      L(this);
30012      M(this);
30013      N(this);
30014      O(this);
30015      P(this);
30016    }
30017    function g(a, b, c, d, e) {
30018      var f = a.editor;
30019      CKEDITOR.tools.extend(
30020        this,
30021        d,
30022        {
30023          editor: f,
30024          id: b,
30025          inline: "span" == c.getParent().getName(),
30026          element: c,
30027          data: CKEDITOR.tools.extend(
30028            {},
30029            "function" == typeof d.defaults ? d.defaults() : d.defaults,
30030          ),
30031          dataReady: !1,
30032          inited: !1,
30033          ready: !1,
30034          edit: g.prototype.edit,
30035          focusedEditable: null,
30036          definition: d,
30037          repository: a,
30038          draggable: !1 !== d.draggable,
30039          _: {
30040            downcastFn:
30041              d.downcast && "string" == typeof d.downcast ? d.downcasts[d.downcast] : d.downcast,
30042          },
30043        },
30044        !0,
30045      );
30046      a.fire("instanceCreated", this);
30047      Q(this, d);
30048      this.init && this.init();
30049      this.inited = !0;
30050      (a = this.element.data("cke-widget-data")) && this.setData(JSON.parse(decodeURIComponent(a)));
30051      e && this.setData(e);
30052      this.data.classes || this.setData("classes", this.getClasses());
30053      this.dataReady = !0;
30054      r(this);
30055      this.fire("data", this.data);
30056      this.isInited() &&
30057        f.editable().contains(this.wrapper) &&
30058        ((this.ready = !0), this.fire("ready"));
30059    }
30060    function q(a, b, c) {
30061      CKEDITOR.dom.element.call(this, b.$);
30062      this.editor = a;
30063      this._ = {};
30064      b = this.filter = c.filter;
30065      CKEDITOR.dtd[this.getName()].p
30066        ? ((this.enterMode = b ? b.getAllowedEnterMode(a.enterMode) : a.enterMode),
30067          (this.shiftEnterMode = b
30068            ? b.getAllowedEnterMode(a.shiftEnterMode, !0)
30069            : a.shiftEnterMode))
30070        : (this.enterMode = this.shiftEnterMode = CKEDITOR.ENTER_BR);
30071    }
30072    function R(a, b) {
30073      a.addCommand(b.name, {
30074        exec: function(a, d) {
30075          function e() {
30076            a.widgets.finalizeCreation(k);
30077          }
30078          var f = a.widgets.focused;
30079          if (f && f.name == b.name) f.edit();
30080          else if (b.insert) b.insert();
30081          else if (b.template) {
30082            var f = "function" == typeof b.defaults ? b.defaults() : b.defaults,
30083              f = CKEDITOR.dom.element.createFromHtml(b.template.output(f)),
30084              h,
30085              l = a.widgets.wrapElement(f, b.name),
30086              k = new CKEDITOR.dom.documentFragment(l.getDocument());
30087            k.append(l);
30088            (h = a.widgets.initOn(f, b, d && d.startupData))
30089              ? ((f = h.once(
30090                  "edit",
30091                  function(b) {
30092                    if (b.data.dialog)
30093                      h.once("dialog", function(b) {
30094                        b = b.data;
30095                        var d, f;
30096                        d = b.once("ok", e, null, null, 20);
30097                        f = b.once("cancel", function(b) {
30098                          (b.data && !1 === b.data.hide) || a.widgets.destroy(h, !0);
30099                        });
30100                        b.once("hide", function() {
30101                          d.removeListener();
30102                          f.removeListener();
30103                        });
30104                      });
30105                    else e();
30106                  },
30107                  null,
30108                  null,
30109                  999,
30110                )),
30111                h.edit(),
30112                f.removeListener())
30113              : e();
30114          }
30115        },
30116        allowedContent: b.allowedContent,
30117        requiredContent: b.requiredContent,
30118        contentForms: b.contentForms,
30119        contentTransformations: b.contentTransformations,
30120      });
30121    }
30122    function S(a, b) {
30123      function c(a, c) {
30124        var d = b.upcast.split(","),
30125          e,
30126          f;
30127        for (f = 0; f < d.length; f++)
30128          if (((e = d[f]), e === a.name)) return b.upcasts[e].call(this, a, c);
30129        return !1;
30130      }
30131      function d(b, c, d) {
30132        var e = CKEDITOR.tools.getIndex(a._.upcasts, function(a) {
30133          return a[2] > d;
30134        });
30135        0 > e && (e = a._.upcasts.length);
30136        a._.upcasts.splice(e, 0, [CKEDITOR.tools.bind(b, c), c.name, d]);
30137      }
30138      var e = b.upcast,
30139        f = b.upcastPriority || 10;
30140      e && ("string" == typeof e ? d(c, b, f) : d(e, b, f));
30141    }
30142    function t(a, b) {
30143      a.focused = null;
30144      if (b.isInited()) {
30145        var c = b.editor.checkDirty();
30146        a.fire("widgetBlurred", { widget: b });
30147        b.setFocused(!1);
30148        !c && b.editor.resetDirty();
30149      }
30150    }
30151    function K(a) {
30152      a = a.data;
30153      if ("wysiwyg" == this.editor.mode) {
30154        var b = this.editor.editable(),
30155          c = this.instances,
30156          d,
30157          e,
30158          f,
30159          h;
30160        if (b) {
30161          for (d in c) c[d].isReady() && !b.contains(c[d].wrapper) && this.destroy(c[d], !0);
30162          if (a && a.initOnlyNew) c = this.initOnAll();
30163          else {
30164            var l = b.find(".cke_widget_wrapper"),
30165              c = [];
30166            d = 0;
30167            for (e = l.count(); d < e; d++) {
30168              f = l.getItem(d);
30169              if ((h = !this.getByElement(f, !0))) {
30170                a: {
30171                  h = T;
30172                  for (var k = f; (k = k.getParent()); )
30173                    if (h(k)) {
30174                      h = !0;
30175                      break a;
30176                    }
30177                  h = !1;
30178                }
30179                h = !h;
30180              }
30181              h &&
30182                b.contains(f) &&
30183                (f.addClass("cke_widget_new"),
30184                c.push(this.initOn(f.getFirst(g.isDomWidgetElement))));
30185            }
30186          }
30187          a && a.focusInited && 1 == c.length && c[0].focus();
30188        }
30189      }
30190    }
30191    function u(a) {
30192      if ("undefined" != typeof a.attributes && a.attributes["data-widget"]) {
30193        var b = v(a),
30194          c = w(a),
30195          d = !1;
30196        b &&
30197          b.value &&
30198          b.value.match(/^\s/g) &&
30199          ((b.parent.attributes["data-cke-white-space-first"] = 1),
30200          (b.value = b.value.replace(/^\s/g, "\x26nbsp;")),
30201          (d = !0));
30202        c &&
30203          c.value &&
30204          c.value.match(/\s$/g) &&
30205          ((c.parent.attributes["data-cke-white-space-last"] = 1),
30206          (c.value = c.value.replace(/\s$/g, "\x26nbsp;")),
30207          (d = !0));
30208        d && (a.attributes["data-cke-widget-white-space"] = 1);
30209      }
30210    }
30211    function v(a) {
30212      return a
30213        .find(function(a) {
30214          return 3 === a.type;
30215        }, !0)
30216        .shift();
30217    }
30218    function w(a) {
30219      return a
30220        .find(function(a) {
30221          return 3 === a.type;
30222        }, !0)
30223        .pop();
30224    }
30225    function x(a, b, c) {
30226      if (!c.allowedContent && !c.disallowedContent) return null;
30227      var d = this._.filters[a];
30228      d || (this._.filters[a] = d = {});
30229      a = d[b];
30230      a ||
30231        ((a = c.allowedContent
30232          ? new CKEDITOR.filter(c.allowedContent)
30233          : this.editor.filter.clone()),
30234        (d[b] = a),
30235        c.disallowedContent && a.disallow(c.disallowedContent));
30236      return a;
30237    }
30238    function U(a) {
30239      var b = [],
30240        c = a._.upcasts,
30241        d = a._.upcastCallbacks;
30242      return {
30243        toBeWrapped: b,
30244        iterator: function(a) {
30245          var f, h, l, k, m;
30246          if ("data-cke-widget-wrapper" in a.attributes)
30247            return (a = a.getFirst(g.isParserWidgetElement)) && b.push([a]), !1;
30248          if ("data-widget" in a.attributes) return b.push([a]), !1;
30249          if ((m = c.length)) {
30250            if (a.attributes["data-cke-widget-upcasted"]) return !1;
30251            k = 0;
30252            for (f = d.length; k < f; ++k) if (!1 === d[k](a)) return;
30253            for (k = 0; k < m; ++k)
30254              if (((f = c[k]), (l = {}), (h = f[0](a, l))))
30255                return (
30256                  h instanceof CKEDITOR.htmlParser.element && (a = h),
30257                  (a.attributes["data-cke-widget-data"] = encodeURIComponent(JSON.stringify(l))),
30258                  (a.attributes["data-cke-widget-upcasted"] = 1),
30259                  b.push([a, f[1]]),
30260                  !1
30261                );
30262          }
30263        },
30264      };
30265    }
30266    function y(a, b) {
30267      return {
30268        tabindex: -1,
30269        contenteditable: "false",
30270        "data-cke-widget-wrapper": 1,
30271        "data-cke-filter": "off",
30272        class:
30273          "cke_widget_wrapper cke_widget_new cke_widget_" +
30274          (a ? "inline" : "block") +
30275          (b ? " cke_widget_" + b : ""),
30276      };
30277    }
30278    function z(a, b, c) {
30279      if (a.type == CKEDITOR.NODE_ELEMENT) {
30280        var d = CKEDITOR.dtd[a.name];
30281        if (d && !d[c.name]) {
30282          var d = a.split(b),
30283            e = a.parent;
30284          b = d.getIndex();
30285          a.children.length || (--b, a.remove());
30286          d.children.length || d.remove();
30287          return z(e, b, c);
30288        }
30289      }
30290      a.add(c, b);
30291    }
30292    function A(a, b) {
30293      return "boolean" == typeof a.inline ? a.inline : !!CKEDITOR.dtd.$inline[b];
30294    }
30295    function T(a) {
30296      return a.hasAttribute("data-cke-temp");
30297    }
30298    function n(a, b, c, d) {
30299      var e = a.editor;
30300      e.fire("lockSnapshot");
30301      c
30302        ? ((d = c.data("cke-widget-editable")),
30303          (d = b.editables[d]),
30304          (a.widgetHoldingFocusedEditable = b),
30305          (b.focusedEditable = d),
30306          c.addClass("cke_widget_editable_focused"),
30307          d.filter && e.setActiveFilter(d.filter),
30308          e.setActiveEnterMode(d.enterMode, d.shiftEnterMode))
30309        : (d || b.focusedEditable.removeClass("cke_widget_editable_focused"),
30310          (b.focusedEditable = null),
30311          (a.widgetHoldingFocusedEditable = null),
30312          e.setActiveFilter(null),
30313          e.setActiveEnterMode(null, null));
30314      e.fire("unlockSnapshot");
30315    }
30316    function V(a) {
30317      a.contextMenu &&
30318        a.contextMenu.addListener(function(b) {
30319          if ((b = a.widgets.getByElement(b, !0))) return b.fire("contextMenu", {});
30320        });
30321    }
30322    function W(a, b) {
30323      return CKEDITOR.tools.trim(b);
30324    }
30325    function O(a) {
30326      var b = a.editor,
30327        c = CKEDITOR.plugins.lineutils;
30328      b.on("dragstart", function(c) {
30329        var e = c.data.target;
30330        g.isDomDragHandler(e) &&
30331          ((e = a.getByElement(e)),
30332          c.data.dataTransfer.setData("cke/widget-id", e.id),
30333          b.focus(),
30334          e.focus());
30335      });
30336      b.on("drop", function(c) {
30337        var e = c.data.dataTransfer,
30338          f = e.getData("cke/widget-id"),
30339          h = e.getTransferType(b),
30340          e = b.createRange();
30341        "" !== f && h === CKEDITOR.DATA_TRANSFER_CROSS_EDITORS
30342          ? c.cancel()
30343          : "" !== f &&
30344            h == CKEDITOR.DATA_TRANSFER_INTERNAL &&
30345            (f = a.instances[f]) &&
30346            (e.setStartBefore(f.wrapper),
30347            e.setEndAfter(f.wrapper),
30348            (c.data.dragRange = e),
30349            delete CKEDITOR.plugins.clipboard.dragStartContainerChildCount,
30350            delete CKEDITOR.plugins.clipboard.dragEndContainerChildCount,
30351            c.data.dataTransfer.setData(
30352              "text/html",
30353              b
30354                .editable()
30355                .getHtmlFromRange(e)
30356                .getHtml(),
30357            ),
30358            b.widgets.destroy(f, !0));
30359      });
30360      b.on("contentDom", function() {
30361        var d = b.editable();
30362        CKEDITOR.tools.extend(
30363          a,
30364          {
30365            finder: new c.finder(b, {
30366              lookups: {
30367                default: function(b) {
30368                  if (
30369                    !b.is(CKEDITOR.dtd.$listItem) &&
30370                    b.is(CKEDITOR.dtd.$block) &&
30371                    !g.isDomNestedEditable(b) &&
30372                    !a._.draggedWidget.wrapper.contains(b)
30373                  ) {
30374                    var c = g.getNestedEditable(d, b);
30375                    if (c) {
30376                      b = a._.draggedWidget;
30377                      if (a.getByElement(c) == b) return;
30378                      c = CKEDITOR.filter.instances[c.data("cke-filter")];
30379                      b = b.requiredContent;
30380                      if (c && b && !c.check(b)) return;
30381                    }
30382                    return CKEDITOR.LINEUTILS_BEFORE | CKEDITOR.LINEUTILS_AFTER;
30383                  }
30384                },
30385              },
30386            }),
30387            locator: new c.locator(b),
30388            liner: new c.liner(b, {
30389              lineStyle: {
30390                cursor: "move !important",
30391                "border-top-color": "#666",
30392              },
30393              tipLeftStyle: { "border-left-color": "#666" },
30394              tipRightStyle: { "border-right-color": "#666" },
30395            }),
30396          },
30397          !0,
30398        );
30399      });
30400    }
30401    function M(a) {
30402      var b = a.editor;
30403      b.on("contentDom", function() {
30404        var c = b.editable(),
30405          d = c.isInline() ? c : b.document,
30406          e,
30407          f;
30408        c.attachListener(d, "mousedown", function(c) {
30409          var d = c.data.getTarget();
30410          e = d instanceof CKEDITOR.dom.element ? a.getByElement(d) : null;
30411          f = 0;
30412          e &&
30413            (e.inline &&
30414            d.type == CKEDITOR.NODE_ELEMENT &&
30415            d.hasAttribute("data-cke-widget-drag-handler")
30416              ? ((f = 1), a.focused != e && b.getSelection().removeAllRanges())
30417              : g.getNestedEditable(e.wrapper, d)
30418                ? (e = null)
30419                : (c.data.preventDefault(), CKEDITOR.env.ie || e.focus()));
30420        });
30421        c.attachListener(d, "mouseup", function() {
30422          f && e && e.wrapper && ((f = 0), e.focus());
30423        });
30424        CKEDITOR.env.ie &&
30425          c.attachListener(d, "mouseup", function() {
30426            setTimeout(function() {
30427              e && e.wrapper && c.contains(e.wrapper) && (e.focus(), (e = null));
30428            });
30429          });
30430      });
30431      b.on(
30432        "doubleclick",
30433        function(b) {
30434          var d = a.getByElement(b.data.element);
30435          if (d && !g.getNestedEditable(d.wrapper, b.data.element))
30436            return d.fire("doubleclick", { element: b.data.element });
30437        },
30438        null,
30439        null,
30440        1,
30441      );
30442    }
30443    function N(a) {
30444      a.editor.on(
30445        "key",
30446        function(b) {
30447          var c = a.focused,
30448            d = a.widgetHoldingFocusedEditable,
30449            e;
30450          c
30451            ? (e = c.fire("key", { keyCode: b.data.keyCode }))
30452            : d &&
30453              ((c = b.data.keyCode),
30454              (b = d.focusedEditable),
30455              c == CKEDITOR.CTRL + 65
30456                ? ((c = b.getBogus()),
30457                  (d = d.editor.createRange()),
30458                  d.selectNodeContents(b),
30459                  c && d.setEndAt(c, CKEDITOR.POSITION_BEFORE_START),
30460                  d.select(),
30461                  (e = !1))
30462                : 8 == c || 46 == c
30463                  ? ((e = d.editor.getSelection().getRanges()),
30464                    (d = e[0]),
30465                    (e = !(
30466                      1 == e.length &&
30467                      d.collapsed &&
30468                      d.checkBoundaryOfElement(b, CKEDITOR[8 == c ? "START" : "END"])
30469                    )))
30470                  : (e = void 0));
30471          return e;
30472        },
30473        null,
30474        null,
30475        1,
30476      );
30477    }
30478    function P(a) {
30479      function b(b) {
30480        a.focused && B(a.focused, "cut" == b.name);
30481      }
30482      var c = a.editor;
30483      c.on("contentDom", function() {
30484        var a = c.editable();
30485        a.attachListener(a, "copy", b);
30486        a.attachListener(a, "cut", b);
30487      });
30488    }
30489    function L(a) {
30490      var b = a.editor;
30491      b.on("selectionCheck", function() {
30492        a.fire("checkSelection");
30493      });
30494      a.on("checkSelection", a.checkSelection, a);
30495      b.on("selectionChange", function(c) {
30496        var d =
30497            (c = g.getNestedEditable(b.editable(), c.data.selection.getStartElement())) &&
30498            a.getByElement(c),
30499          e = a.widgetHoldingFocusedEditable;
30500        e
30501          ? (e === d && e.focusedEditable.equals(c)) || (n(a, e, null), d && c && n(a, d, c))
30502          : d && c && n(a, d, c);
30503      });
30504      b.on("dataReady", function() {
30505        C(a).commit();
30506      });
30507      b.on("blur", function() {
30508        var b;
30509        (b = a.focused) && t(a, b);
30510        (b = a.widgetHoldingFocusedEditable) && n(a, b, null);
30511      });
30512    }
30513    function J(a) {
30514      var b = a.editor,
30515        c = {};
30516      b.on(
30517        "toDataFormat",
30518        function(b) {
30519          var e = CKEDITOR.tools.getNextNumber(),
30520            f = [];
30521          b.data.downcastingSessionId = e;
30522          c[e] = f;
30523          b.data.dataValue.forEach(
30524            function(b) {
30525              var c = b.attributes,
30526                d;
30527              if ("data-cke-widget-white-space" in c) {
30528                d = v(b);
30529                var e = w(b);
30530                d.parent.attributes["data-cke-white-space-first"] &&
30531                  (d.value = d.value.replace(/^&nbsp;/g, " "));
30532                e.parent.attributes["data-cke-white-space-last"] &&
30533                  (e.value = e.value.replace(/&nbsp;$/g, " "));
30534              }
30535              if ("data-cke-widget-id" in c) {
30536                if ((c = a.instances[c["data-cke-widget-id"]]))
30537                  (d = b.getFirst(g.isParserWidgetElement)),
30538                    f.push({ wrapper: b, element: d, widget: c, editables: {} }),
30539                    "1" != d.attributes["data-cke-widget-keep-attr"] &&
30540                      delete d.attributes["data-widget"];
30541              } else if ("data-cke-widget-editable" in c)
30542                return (f[f.length - 1].editables[c["data-cke-widget-editable"]] = b), !1;
30543            },
30544            CKEDITOR.NODE_ELEMENT,
30545            !0,
30546          );
30547        },
30548        null,
30549        null,
30550        8,
30551      );
30552      b.on(
30553        "toDataFormat",
30554        function(a) {
30555          if (a.data.downcastingSessionId) {
30556            a = c[a.data.downcastingSessionId];
30557            for (var b, f, h, l, g, m; (b = a.shift()); ) {
30558              f = b.widget;
30559              h = b.element;
30560              l = f._.downcastFn && f._.downcastFn.call(f, h);
30561              for (m in b.editables)
30562                (g = b.editables[m]),
30563                  delete g.attributes.contenteditable,
30564                  g.setHtml(f.editables[m].getData());
30565              l || (l = h);
30566              b.wrapper.replaceWith(l);
30567            }
30568          }
30569        },
30570        null,
30571        null,
30572        13,
30573      );
30574      b.on("contentDomUnload", function() {
30575        a.destroyAll(!0);
30576      });
30577    }
30578    function I(a) {
30579      var b = a.editor,
30580        c,
30581        d;
30582      b.on(
30583        "toHtml",
30584        function(b) {
30585          var d = U(a),
30586            h;
30587          for (
30588            b.data.dataValue.forEach(d.iterator, CKEDITOR.NODE_ELEMENT, !0);
30589            (h = d.toBeWrapped.pop());
30590
30591          ) {
30592            var l = h[0],
30593              k = l.parent;
30594            k.type == CKEDITOR.NODE_ELEMENT &&
30595              k.attributes["data-cke-widget-wrapper"] &&
30596              k.replaceWith(l);
30597            a.wrapElement(h[0], h[1]);
30598          }
30599          c = b.data.protectedWhitespaces
30600            ? 3 == b.data.dataValue.children.length &&
30601              g.isParserWidgetWrapper(b.data.dataValue.children[1])
30602            : 1 == b.data.dataValue.children.length &&
30603              g.isParserWidgetWrapper(b.data.dataValue.children[0]);
30604        },
30605        null,
30606        null,
30607        8,
30608      );
30609      b.on("dataReady", function() {
30610        if (d)
30611          for (
30612            var c = b.editable().find(".cke_widget_wrapper"), f, h, l = 0, k = c.count();
30613            l < k;
30614            ++l
30615          )
30616            (f = c.getItem(l)),
30617              (h = f.getFirst(g.isDomWidgetElement)),
30618              h.type == CKEDITOR.NODE_ELEMENT && h.data("widget")
30619                ? (h.replace(f), a.wrapElement(h))
30620                : f.remove();
30621        d = 0;
30622        a.destroyAll(!0);
30623        a.initOnAll();
30624      });
30625      b.on(
30626        "loadSnapshot",
30627        function(b) {
30628          /data-cke-widget/.test(b.data) && (d = 1);
30629          a.destroyAll(!0);
30630        },
30631        null,
30632        null,
30633        9,
30634      );
30635      b.on("paste", function(a) {
30636        a = a.data;
30637        a.dataValue = a.dataValue.replace(X, W);
30638        a.range &&
30639          (a = g.getNestedEditable(b.editable(), a.range.startContainer)) &&
30640          (a = CKEDITOR.filter.instances[a.data("cke-filter")]) &&
30641          b.setActiveFilter(a);
30642      });
30643      b.on("afterInsertHtml", function(d) {
30644        d.data.intoRange
30645          ? a.checkWidgets({ initOnlyNew: !0 })
30646          : (b.fire("lockSnapshot"),
30647            a.checkWidgets({ initOnlyNew: !0, focusInited: c }),
30648            b.fire("unlockSnapshot"));
30649      });
30650    }
30651    function C(a) {
30652      var b = a.selected,
30653        c = [],
30654        d = b.slice(0),
30655        e = null;
30656      return {
30657        select: function(a) {
30658          0 > CKEDITOR.tools.indexOf(b, a) && c.push(a);
30659          a = CKEDITOR.tools.indexOf(d, a);
30660          0 <= a && d.splice(a, 1);
30661          return this;
30662        },
30663        focus: function(a) {
30664          e = a;
30665          return this;
30666        },
30667        commit: function() {
30668          var f = a.focused !== e,
30669            h,
30670            g;
30671          a.editor.fire("lockSnapshot");
30672          for (f && (h = a.focused) && t(a, h); (h = d.pop()); )
30673            b.splice(CKEDITOR.tools.indexOf(b, h), 1),
30674              h.isInited() &&
30675                ((g = h.editor.checkDirty()), h.setSelected(!1), !g && h.editor.resetDirty());
30676          f &&
30677            e &&
30678            ((g = a.editor.checkDirty()),
30679            (a.focused = e),
30680            a.fire("widgetFocused", { widget: e }),
30681            e.setFocused(!0),
30682            !g && a.editor.resetDirty());
30683          for (; (h = c.pop()); ) b.push(h), h.setSelected(!0);
30684          a.editor.fire("unlockSnapshot");
30685        },
30686      };
30687    }
30688    function D(a, b, c) {
30689      var d = 0;
30690      b = E(b);
30691      var e = a.data.classes || {},
30692        f;
30693      if (b) {
30694        for (e = CKEDITOR.tools.clone(e); (f = b.pop()); )
30695          c ? e[f] || (d = e[f] = 1) : e[f] && (delete e[f], (d = 1));
30696        d && a.setData("classes", e);
30697      }
30698    }
30699    function F(a) {
30700      a.cancel();
30701    }
30702    function B(a, b) {
30703      var c = a.editor,
30704        d = c.document,
30705        e = CKEDITOR.env.edge && 16 <= CKEDITOR.env.version;
30706      if (!d.getById("cke_copybin")) {
30707        var f = (!c.blockless && !CKEDITOR.env.ie) || e ? "div" : "span",
30708          e = d.createElement(f),
30709          h = d.createElement(f),
30710          f = CKEDITOR.env.ie && 9 > CKEDITOR.env.version;
30711        h.setAttributes({ id: "cke_copybin", "data-cke-temp": "1" });
30712        e.setStyles({ position: "absolute", width: "1px", height: "1px", overflow: "hidden" });
30713        e.setStyle("ltr" == c.config.contentsLangDirection ? "left" : "right", "-5000px");
30714        var g = c.createRange();
30715        g.setStartBefore(a.wrapper);
30716        g.setEndAfter(a.wrapper);
30717        e.setHtml(
30718          '\x3cspan data-cke-copybin-start\x3d"1"\x3e​\x3c/span\x3e' +
30719            c
30720              .editable()
30721              .getHtmlFromRange(g)
30722              .getHtml() +
30723            '\x3cspan data-cke-copybin-end\x3d"1"\x3e​\x3c/span\x3e',
30724        );
30725        c.fire("saveSnapshot");
30726        c.fire("lockSnapshot");
30727        h.append(e);
30728        c.editable().append(h);
30729        var k = c.on("selectionChange", F, null, null, 0),
30730          m = a.repository.on("checkSelection", F, null, null, 0);
30731        if (f)
30732          var n = d.getDocumentElement().$,
30733            p = n.scrollTop;
30734        g = c.createRange();
30735        g.selectNodeContents(e);
30736        g.select();
30737        f && (n.scrollTop = p);
30738        setTimeout(function() {
30739          b || a.focus();
30740          h.remove();
30741          k.removeListener();
30742          m.removeListener();
30743          c.fire("unlockSnapshot");
30744          b && !c.readOnly && (a.repository.del(a), c.fire("saveSnapshot"));
30745        }, 100);
30746      }
30747    }
30748    function E(a) {
30749      return (a = (a = a.getDefinition().attributes) && a["class"]) ? a.split(/\s+/) : null;
30750    }
30751    function G() {
30752      var a = CKEDITOR.document.getActive(),
30753        b = this.editor,
30754        c = b.editable();
30755      (c.isInline() ? c : b.document.getWindow().getFrame()).equals(a) && b.focu
30755sManager.focus(c);
30756    }
30757    function H() {
30758      CKEDITOR.env.gecko && this.editor.unlockSelection();
30759      CKEDITOR.env.webkit ||
30760        (this.editor.forceNextSelectionCheck(), this.editor.selectionChange(1));
30761    }
30762    function Y(a) {
30763      var b = null;
30764      a.on("data", function() {
30765        var a = this.data.classes,
30766          d;
30767        if (b != a) {
30768          for (d in b) (a && a[d]) || this.removeClass(d);
30769          for (d in a) this.addClass(d);
30770          b = a;
30771        }
30772      });
30773    }
30774    function Z(a) {
30775      a.on(
30776        "data",
30777        function() {
30778          if (a.wrapper) {
30779            var b = this.getLabel
30780              ? this.getLabel()
30781              : this.editor.lang.widget.label.replace(
30782                  /%1/,
30783                  this.pathName || this.element.getName(),
30784                );
30785            a.wrapper.setAttribute("role", "region");
30786            a.wrapper.setAttribute("aria-label", b);
30787          }
30788        },
30789        null,
30790        null,
30791        9999,
30792      );
30793    }
30794    function aa(a) {
30795      if (a.draggable) {
30796        var b = a.editor,
30797          c = a.wrapper.getLast(g.isDomDragHandlerContainer),
30798          d;
30799        c
30800          ? (d = c.findOne("img"))
30801          : ((c = new CKEDITOR.dom.element("span", b.document)),
30802            c.setAttributes({
30803              class: "cke_reset cke_widget_drag_handler_container",
30804              style:
30805                "background:rgba(220,220,220,0.5);background-image:url(" +
30806                b.plugins.widget.path +
30807                "images/handle.png)",
30808            }),
30809            (d = new CKEDITOR.dom.element("img", b.document)),
30810            d.setAttributes({
30811              class: "cke_reset cke_widget_drag_handler",
30812              "data-cke-widget-drag-handler": "1",
30813              src: CKEDITOR.tools.transparentImageData,
30814              width: 15,
30815              title: b.lang.widget.move,
30816              height: 15,
30817              role: "presentation",
30818            }),
30819            a.inline && d.setAttribute("draggable", "true"),
30820            c.append(d),
30821            a.wrapper.append(c));
30822        a.wrapper.on("dragover", function(a) {
30823          a.data.preventDefault();
30824        });
30825        a.wrapper.on("mouseenter", a.updateDragHandlerPosition, a);
30826        setTimeout(function() {
30827          a.on("data", a.updateDragHandlerPosition, a);
30828        }, 50);
30829        if (!a.inline && (d.on("mousedown", ba, a), CKEDITOR.env.ie && 9 > CKEDITOR.env.version))
30830          d.on("dragstart", function(a) {
30831            a.data.preventDefault(!0);
30832          });
30833        a.dragHandlerContainer = c;
30834      }
30835    }
30836    function ba(a) {
30837      function b() {
30838        var b;
30839        for (q.reset(); (b = g.pop()); ) b.removeListener();
30840        var c = k;
30841        b = a.sender;
30842        var d = this.repository.finder,
30843          e = this.repository.liner,
30844          f = this.editor,
30845          h = this.editor.editable();
30846        CKEDITOR.tools.isEmpty(e.visible) ||
30847          ((c = d.getRange(c[0])),
30848          this.focus(),
30849          f.fire("drop", { dropRange: c, target: c.startContainer }));
30850        h.removeClass("cke_widget_dragging");
30851        e.hideVisible();
30852        f.fire("dragend", { target: b });
30853      }
30854      if (CKEDITOR.tools.getMouseButton(a) === CKEDITOR.MOUSE_BUTTON_LEFT) {
30855        var c = this.repository.finder,
30856          d = this.repository.locator,
30857          e = this.repository.liner,
30858          f = this.editor,
30859          h = f.editable(),
30860          g = [],
30861          k = [],
30862          m,
30863          n;
30864        this.repository._.draggedWidget = this;
30865        var p = c.greedySearch(),
30866          q = CKEDITOR.tools.eventsBuffer(50, function() {
30867            m = d.locate(p);
30868            k = d.sort(n, 1);
30869            k.length && (e.prepare(p, m), e.placeLine(k[0]), e.cleanup());
30870          });
30871        h.addClass("cke_widget_dragging");
30872        g.push(
30873          h.on("mousemove", function(a) {
30874            n = a.data.$.clientY;
30875            q.input();
30876          }),
30877        );
30878        f.fire("dragstart", { target: a.sender });
30879        g.push(f.document.once("mouseup", b, this));
30880        h.isInline() || g.push(CKEDITOR.document.once("mouseup", b, this));
30881      }
30882    }
30883    function ca(a) {
30884      var b,
30885        c,
30886        d = a.editables;
30887      a.editables = {};
30888      if (a.editables)
30889        for (b in d) (c = d[b]), a.initEditable(b, "string" == typeof c ? { selector: c } : c);
30890    }
30891    function da(a) {
30892      if (a.mask) {
30893        var b = a.wrapper.findOne(".cke_widget_mask");
30894        b ||
30895          ((b = new CKEDITOR.dom.element("img", a.editor.document)),
30896          b.setAttributes({
30897            src: CKEDITOR.tools.transparentImageData,
30898            class: "cke_reset cke_widget_mask",
30899          }),
30900          a.wrapper.append(b));
30901        a.mask = b;
30902      }
30903    }
30904    function ea(a) {
30905      if (a.parts) {
30906        var b = {},
30907          c,
30908          d;
30909        for (d in a.parts) (c = a.wrapper.findOne(a.parts[d])), (b[d] = c);
30910        a.parts = b;
30911      }
30912    }
30913    function Q(a, b) {
30914      fa(a);
30915      ea(a);
30916      ca(a);
30917      da(a);
30918      aa(a);
30919      Y(a);
30920      Z(a);
30921      if (CKEDITOR.env.ie && 9 > CKEDITOR.env.version)
30922        a.wrapper.on("dragstart", function(b) {
30923          var d = b.data.getTarget();
30924          g.getNestedEditable(a, d) ||
30925            (a.inline && g.isDomDragHandler(d)) ||
30926            b.data.preventDefault();
30927        });
30928      a.wrapper.removeClass("cke_widget_new");
30929      a.element.addClass("cke_widget_element");
30930      a.on(
30931        "key",
30932        function(b) {
30933          b = b.data.keyCode;
30934          if (13 == b) a.edit();
30935          else {
30936            if (b == CKEDITOR.CTRL + 67 || b == CKEDITOR.CTRL + 88) {
30937              B(a, b == CKEDITOR.CTRL + 88);
30938              return;
30939            }
30940            if (b in ga || CKEDITOR.CTRL & b || CKEDITOR.ALT & b) return;
30941          }
30942          return !1;
30943        },
30944        null,
30945        null,
30946        999,
30947      );
30948      a.on("doubleclick", function(b) {
30949        a.edit() && b.cancel();
30950      });
30951      if (b.data) a.on("data", b.data);
30952      if (b.edit) a.on("edit", b.edit);
30953    }
30954    function fa(a) {
30955      (a.wrapper = a.element.getParent()).setAttribute("data-cke-widget-id", a.id);
30956    }
30957    function r(a) {
30958      a.element.data("cke-widget-data", encodeURIComponent(JSON.stringify(a.data)));
30959    }
30960    function ha() {
30961      function a() {}
30962      function b(a, b, c) {
30963        return c && this.checkElement(a)
30964          ? (a = c.widgets.getByElement(a, !0)) && a.checkStyleActive(this)
30965          : !1;
30966      }
30967      var c = {};
30968      CKEDITOR.style.addCustomHandler({
30969        type: "widget",
30970        setup: function(a) {
30971          this.widget = a.widget;
30972          if ((this.group = "string" == typeof a.group ? [a.group] : a.group)) {
30973            a = this.widget;
30974            var b;
30975            c[a] || (c[a] = {});
30976            for (var f = 0, h = this.group.length; f < h; f++)
30977              (b = this.group[f]), c[a][b] || (c[a][b] = []), c[a][b].push(this);
30978          }
30979        },
30980        apply: function(a) {
30981          var b;
30982          a instanceof CKEDITOR.editor &&
30983            this.checkApplicable(a.elementPath(), a) &&
30984            ((b = a.widgets.focused),
30985            this.group && this.removeStylesFromSameGroup(a),
30986            b.applyStyle(this));
30987        },
30988        remove: function(a) {
30989          a instanceof CKEDITOR.editor &&
30990            this.checkApplicable(a.elementPath(), a) &&
30991            a.widgets.focused.removeStyle(this);
30992        },
30993        removeStylesFromSameGroup: function(a) {
30994          var b,
30995            f,
30996            h = !1;
30997          if (!(a instanceof CKEDITOR.editor)) return !1;
30998          f = a.elementPath();
30999          if (this.checkApplicable(f, a))
31000            for (var g = 0, k = this.group.length; g < k; g++) {
31001              b = c[this.widget][this.group[g]];
31002              for (var m = 0; m < b.length; m++)
31003                b[m] !== this &&
31004                  b[m].checkActive(f, a) &&
31005                  (a.widgets.focused.removeStyle(b[m]), (h = !0));
31006            }
31007          return h;
31008        },
31009        checkActive: function(a, b) {
31010          return this.checkElementMatch(a.lastElement, 0, b);
31011        },
31012        checkApplicable: function(a, b) {
31013          return b instanceof CKEDITOR.editor ? this.checkElement(a.lastElement) : !1;
31014        },
31015        checkElementMatch: b,
31016        checkElementRemovable: b,
31017        checkElement: function(a) {
31018          return g.isDomWidgetWrapper(a)
31019            ? (a = a.getFirst(g.isDomWidgetElement)) && a.data("widget") == this.widget
31020            : !1;
31021        },
31022        buildPreview: function(a) {
31023          return a || this._.definition.name;
31024        },
31025        toAllowedContentRules: function(a) {
31026          if (!a) return null;
31027          a = a.widgets.registered[this.widget];
31028          var b,
31029            c = {};
31030          if (!a) return null;
31031          if (a.styleableElements) {
31032            b = this.getClassesArray();
31033            if (!b) return null;
31034            c[a.styleableElements] = { classes: b, propertiesOnly: !0 };
31035            return c;
31036          }
31037          return a.styleToAllowedContentRules ? a.styleToAllowedContentRules(this) : null;
31038        },
31039        getClassesArray: function() {
31040          var a = this._.definition.attributes && this._.definition.attributes["class"];
31041          return a ? CKEDITOR.tools.trim(a).split(/\s+/) : null;
31042        },
31043        applyToRange: a,
31044        removeFromRange: a,
31045        applyToObject: a,
31046      });
31047    }
31048    CKEDITOR.plugins.add("widget", {
31049      requires: "lineutils,clipboard,widgetselection",
31050      onLoad: function() {
31051        void 0 !== CKEDITOR.document.$.querySelectorAll &&
31052          (CKEDITOR.addCss(
31053            ".cke_widget_wrapper{position:relative;outline:none}.cke_widget_inline{display:inline-block}.cke_widget_wrapper:hover\x3e.cke_widget_element{outline:2px solid #ffd25c;cursor:default}.cke_widget_wrapper:hover .cke_widget_editable{outline:2px solid #ffd25c}.cke_widget_wrapper.cke_widget_focused\x3e.cke_widget_element,.cke_widget_wrapper .cke_widget_editable.cke_widget_editable_focused{outline:2px solid #47a4f5}
31053.cke_widget_editable{cursor:text}.cke_widget_drag_handler_container{position:absolute;width:15px;height:0;display:none;opacity:0.75;transition:height 0s 0.2s;line-height:0}.cke_widget_wrapper:hover\x3e.cke_widget_drag_handler_container{height:15px;transition:none}.cke_widget_drag_handler_container:hover{opacity:1}img.cke_widget_drag_handler{cursor:move;width:15px;height:15px;display:inline-block}.cke_widget_mask{position:absolute;top:0;left:0;width:100%;height:100%;display:block}.cke_editable.cke_widget_dragging, .cke_editable.cke_widget_dragging *{cursor:move !important}",
31054          ),
31055          ha());
31056      },
31057      beforeInit: function(a) {
31058        void 0 !== CKEDITOR.document.$.querySelectorAll && (a.widgets = new p(a));
31059      },
31060      afterInit: function(a) {
31061        if (void 0 !== CKEDITOR.document.$.querySelectorAll) {
31062          var b = a.widgets.registered,
31063            c,
31064            d,
31065            e;
31066          for (d in b)
31067            (c = b[d]),
31068              (e = c.button) &&
31069                a.ui.addButton &&
31070                a.ui.addButton(CKEDITOR.tools.capitalize(c.name, !0), {
31071                  label: e,
31072                  command: c.name,
31073                  toolbar: "insert,10",
31074                });
31075          V(a);
31076        }
31077      },
31078    });
31079    p.prototype = {
31080      MIN_SELECTION_CHECK_INTERVAL: 500,
31081      add: function(a, b) {
31082        b = CKEDITOR.tools.prototypedCopy(b);
31083        b.name = a;
31084        b._ = b._ || {};
31085        this.editor.fire("widgetDefinition", b);
31086        b.template && (b.template = new CKEDITOR.template(b.template));
31087        R(this.editor, b);
31088        S(this, b);
31089        return (this.registered[a] = b);
31090      },
31091      addUpcastCallback: function(a) {
31092        this._.upcastCallbacks.push(a);
31093      },
31094      checkSelection: function() {
31095        var a = this.editor.getSelection(),
31096          b = a.getSelectedElement(),
31097          c = C(this),
31098          d;
31099        if (b && (d = this.getByElement(b, !0)))
31100          return c
31101            .focus(d)
31102            .select(d)
31103            .commit();
31104        a = a.getRanges()[0];
31105        if (!a || a.collapsed) return c.commit();
31106        a = new CKEDITOR.dom.walker(a);
31107        for (a.evaluator = g.isDomWidgetWrapper; (b = a.next()); ) c.select(this.getByElement(b));
31108        c.commit();
31109      },
31110      checkWidgets: function(a) {
31111        this.fire("checkWidgets", CKEDITOR.tools.copy(a || {}));
31112      },
31113      del: function(a) {
31114        if (this.focused === a) {
31115          var b = a.editor,
31116            c = b.createRange(),
31117            d;
31118          (d = c.moveToClosestEditablePosition(a.wrapper, !0)) ||
31119            (d = c.moveToClosestEditablePosition(a.wrapper, !1));
31120          d && b.getSelection().selectRanges([c]);
31121        }
31122        a.wrapper.remove();
31123        this.destroy(a, !0);
31124      },
31125      destroy: function(a, b) {
31126        this.widgetHoldingFocusedEditable === a && n(this, a, null, b);
31127        a.destroy(b);
31128        delete this.instances[a.id];
31129        this.fire("instanceDestroyed", a);
31130      },
31131      destroyAll: function(a, b) {
31132        var c,
31133          d,
31134          e = this.instances;
31135        if (b && !a) {
31136          d = b.find(".cke_widget_wrapper");
31137          for (var e = d.count(), f = 0; f < e; ++f)
31138            (c = this.getByElement(d.getItem(f), !0)) && this.destroy(c);
31139        } else for (d in e) (c = e[d]), this.destroy(c, a);
31140      },
31141      finalizeCreation: function(a) {
31142        (a = a.getFirst()) &&
31143          g.isDomWidgetWrapper(a) &&
31144          (this.editor.insertElement(a),
31145          (a = this.getByElement(a)),
31146          (a.ready = !0),
31147          a.fire("ready"),
31148          a.focus());
31149      },
31150      getByElement: (function() {
31151        function a(a) {
31152          return a.is(b) && a.data("cke-widget-id");
31153        }
31154        var b = { div: 1, span: 1 };
31155        return function(b, d) {
31156          if (!b) return null;
31157          var e = a(b);
31158          if (!d && !e) {
31159            var f = this.editor.editable();
31160            do b = b.getParent();
31161            while (b && !b.equals(f) && !(e = a(b)));
31162          }
31163          return this.instances[e] || null;
31164        };
31165      })(),
31166      initOn: function(a, b, c) {
31167        b
31168          ? "string" == typeof b && (b = this.registered[b])
31169          : (b = this.registered[a.data("widget")]);
31170        if (!b) return null;
31171        var d = this.wrapElement(a, b.name);
31172        return d
31173          ? d.hasClass("cke_widget_new")
31174            ? ((a = new g(this, this._.nextId++, a, b, c)),
31175              a.isInited() ? (this.instances[a.id] = a) : null)
31176            : this.getByElement(a)
31177          : null;
31178      },
31179      initOnAll: function(a) {
31180        a = (a || this.editor.editable()).find(".cke_widget_new");
31181        for (var b = [], c, d = a.count(); d--; )
31182          (c = this.initOn(a.getItem(d).getFirst(g.isDomWidgetElement))) && b.push(c);
31183        return b;
31184      },
31185      onWidget: function(a) {
31186        var b = Array.prototype.slice.call(arguments);
31187        b.shift();
31188        for (var c in this.instances) {
31189          var d = this.instances[c];
31190          d.name == a && d.on.apply(d, b);
31191        }
31192        this.on("instanceCreated", function(c) {
31193          c = c.data;
31194          c.name == a && c.on.apply(c, b);
31195        });
31196      },
31197      parseElementClasses: function(a) {
31198        if (!a) return null;
31199        a = CKEDITOR.tools.trim(a).split(/\s+/);
31200        for (var b, c = {}, d = 0; (b = a.pop()); ) -1 == b.indexOf("cke_") && (c[b] = d = 1);
31201        return d ? c : null;
31202      },
31203      wrapElement: function(a, b) {
31204        var c = null,
31205          d,
31206          e;
31207        if (a instanceof CKEDITOR.dom.element) {
31208          b = b || a.data("widget");
31209          d = this.registered[b];
31210          if (!d) return null;
31211          if (
31212            (c = a.getParent()) &&
31213            c.type == CKEDITOR.NODE_ELEMENT &&
31214            c.data("cke-widget-wrapper")
31215          )
31216            return c;
31217          a.hasAttribute("data-cke-widget-keep-attr") ||
31218            a.data("cke-widget-keep-attr", a.data("widget") ? 1 : 0);
31219          a.data("widget", b);
31220          (e = A(d, a.getName())) && u(a);
31221          c = new CKEDITOR.dom.element(e ? "span" : "div");
31222          c.setAttributes(y(e, b));
31223          c.data("cke-display-name", d.pathName ? d.pathName : a.getName());
31224          a.getParent(!0) && c.replace(a);
31225          a.appendTo(c);
31226        } else if (a instanceof CKEDITOR.htmlParser.element) {
31227          b = b || a.attributes["data-widget"];
31228          d = this.registered[b];
31229          if (!d) return null;
31230          if (
31231            (c = a.parent) &&
31232            c.type == CKEDITOR.NODE_ELEMENT &&
31233            c.attributes["data-cke-widget-wrapper"]
31234          )
31235            return c;
31236          "data-cke-widget-keep-attr" in a.attributes ||
31237            (a.attributes["data-cke-widget-keep-attr"] = a.attributes["data-widget"] ? 1 : 0);
31238          b && (a.attributes["data-widget"] = b);
31239          (e = A(d, a.name)) && u(a);
31240          c = new CKEDITOR.htmlParser.element(e ? "span" : "div", y(e, b));
31241          c.attributes["data-cke-display-name"] = d.pathName ? d.pathName : a.name;
31242          d = a.parent;
31243          var f;
31244          d && ((f = a.getIndex()), a.remove());
31245          c.add(a);
31246          d && z(d, f, c);
31247        }
31248        return c;
31249      },
31250      _tests_createEditableFilter: x,
31251    };
31252    CKEDITOR.event.implementOn(p.prototype);
31253    g.prototype = {
31254      addClass: function(a) {
31255        this.element.addClass(a);
31256        this.wrapper.addClass(g.WRAPPER_CLASS_PREFIX + a);
31257      },
31258      applyStyle: function(a) {
31259        D(this, a, 1);
31260      },
31261      checkStyleActive: function(a) {
31262        a = E(a);
31263        var b;
31264        if (!a) return !1;
31265        for (; (b = a.pop()); ) if (!this.hasClass(b)) return !1;
31266        return !0;
31267      },
31268      destroy: function(a) {
31269        this.fire("destroy");
31270        if (this.editables) for (var b in this.editables) this.destroyEditable(b, a);
31271        a ||
31272          ("0" == this.element.data("cke-widget-keep-attr") &&
31273            this.element.removeAttribute("data-widget"),
31274          this.element.removeAttributes(["data-cke-widget-data", "data-cke-widget-keep-attr"]),
31275          this.element.removeClass("cke_widget_element"),
31276          this.element.replace(this.wrapper));
31277        this.wrapper = null;
31278      },
31279      destroyEditable: function(a, b) {
31280        var c = this.editables[a];
31281        c.removeListener("focus", H);
31282        c.removeListener("blur", G);
31283        this.editor.focusManager.remove(c);
31284        b ||
31285          (this.repository.destroyAll(!1, c),
31286          c.removeClass("cke_widget_editable"),
31287          c.removeClass("cke_widget_editable_focused"),
31288          c.removeAttributes([
31289            "contenteditable",
31290            "data-cke-widget-editable",
31291            "data-cke-enter-mode",
31292          ]));
31293        delete this.editables[a];
31294      },
31295      edit: function() {
31296        var a = { dialog: this.dialog },
31297          b = this;
31298        if (!1 === this.fire("edit", a) || !a.dialog) return !1;
31299        this.editor.openDialog(a.dialog, function(a) {
31300          var d, e;
31301          !1 !== b.fire("dialog", a) &&
31302            ((d = a.on("show", function() {
31303              a.setupContent(b);
31304            })),
31305            (e = a.on("ok", function() {
31306              var d,
31307                e = b.on(
31308                  "data",
31309                  function(a) {
31310                    d = 1;
31311                    a.cancel();
31312                  },
31313                  null,
31314                  null,
31315                  0,
31316                );
31317              b.editor.fire("saveSnapshot");
31318              a.commitContent(b);
31319              e.removeListener();
31320              d && (b.fire("data", b.data), b.editor.fire("saveSnapshot"));
31321            })),
31322            a.once("hide", function() {
31323              d.removeListener();
31324              e.removeListener();
31325            }));
31326        });
31327        return !0;
31328      },
31329      getClasses: function() {
31330        return this.repository.parseElementClasses(this.element.getAttribute("class"));
31331      },
31332      hasClass: function(a) {
31333        return this.element.hasClass(a);
31334      },
31335      initEditable: function(a, b) {
31336        var c = this._findOneNotNested(b.selector);
31337        return c && c.is(CKEDITOR.dtd.$editable)
31338          ? ((c = new q(this.editor, c, { filter: x.call(this.repository, this.name, a, b) })),
31339            (this.editables[a] = c),
31340            c.setAttributes({
31341              contenteditable: "true",
31342              "data-cke-widget-editable": a,
31343              "data-cke-enter-mode": c.enterMode,
31344            }),
31345            c.filter && c.data("cke-filter", c.filter.id),
31346            c.addClass("cke_widget_editable"),
31347            c.removeClass("cke_widget_editable_focused"),
31348            b.pathName && c.data("cke-display-name", b.pathName),
31349            this.editor.focusManager.add(c),
31350            c.on("focus", H, this),
31351            CKEDITOR.env.ie && c.on("blur", G, this),
31352            (c._.initialSetData = !0),
31353            c.setData(c.getHtml()),
31354            !0)
31355          : !1;
31356      },
31357      _findOneNotNested: function(a) {
31358        a = this.wrapper.find(a);
31359        for (var b, c, d = 0; d < a.count(); d++)
31360          if (
31361            ((b = a.getItem(d)), (c = b.getAscendant(g.isDomWidgetWrapper)), this.wrapper.equals(c))
31362          )
31363            return b;
31364        return null;
31365      },
31366      isInited: function() {
31367        return !(!this.wrapper || !this.inited);
31368      },
31369      isReady: function() {
31370        return this.isInited() && this.ready;
31371      },
31372      focus: function() {
31373        var a = this.editor.getSelection();
31374        if (a) {
31375          var b = this.editor.checkDirty();
31376          a.fake(this.wrapper);
31377          !b && this.editor.resetDirty();
31378        }
31379        this.editor.focus();
31380      },
31381      removeClass: function(a) {
31382        this.element.removeClass(a);
31383        this.wrapper.removeClass(g.WRAPPER_CLASS_PREFIX + a);
31384      },
31385      removeStyle: function(a) {
31386        D(this, a, 0);
31387      },
31388      setData: function(a, b) {
31389        var c = this.data,
31390          d = 0;
31391        if ("string" == typeof a) c[a] !== b && ((c[a] = b), (d = 1));
31392        else {
31393          var e = a;
31394          for (a in e) c[a] !== e[a] && ((d = 1), (c[a] = e[a]));
31395        }
31396        d && this.dataReady && (r(this), this.fire("data", c));
31397        return this;
31398      },
31399      setFocused: function(a) {
31400        this.wrapper[a ? "addClass" : "removeClass"]("cke_widget_focused");
31401        this.fire(a ? "focus" : "blur");
31402        return this;
31403      },
31404      setSelected: function(a) {
31405        this.wrapper[a ? "addClass" : "removeClass"]("cke_widget_selected");
31406        this.fire(a ? "select" : "deselect");
31407        return this;
31408      },
31409      updateDragHandlerPosition: function() {
31410        var a = this.editor,
31411          b = this.element.$,
31412          c = this._.dragHandlerOffset,
31413          b = { x: b.offsetLeft, y: b.offsetTop - 15 };
31414        (c && b.x == c.x && b.y == c.y) ||
31415          ((c = a.checkDirty()),
31416          a.fire("lockSnapshot"),
31417          this.dragHandlerContainer.setStyles({
31418            top: b.y + "px",
31419            left: b.x + "px",
31420            display: "block",
31421          }),
31422          a.fire("unlockSnapshot"),
31423          !c && a.resetDirty(),
31424          (this._.dragHandlerOffset = b));
31425      },
31426    };
31427    CKEDITOR.event.implementOn(g.prototype);
31428    g.getNestedEditable = function(a, b) {
31429      return !b || b.equals(a)
31430        ? null
31431        : g.isDomNestedEditable(b) ? b : g.getNestedEditable(a, b.getParent());
31432    };
31433    g.isDomDragHandler = function(a) {
31434      return a.type == CKEDITOR.NODE_ELEMENT && a.hasAttribute("data-cke-widget-drag-handler");
31435    };
31436    g.isDomDragHandlerContainer = function(a) {
31437      return a.type == CKEDITOR.NODE_ELEMENT && a.hasClass("cke_widget_drag_handler_container");
31438    };
31439    g.isDomNestedEditable = function(a) {
31440      return a.type == CKEDITOR.NODE_ELEMENT && a.hasAttribute("data-cke-widget-editable");
31441    };
31442    g.isDomWidgetElement = function(a) {
31443      return a.type == CKEDITOR.NODE_ELEMENT && a.hasAttribute("data-widget");
31444    };
31445    g.isDomWidgetWrapper = function(a) {
31446      return a.type == CKEDITOR.NODE_ELEMENT && a.hasAttribute("data-cke-widget-wrapper");
31447    };
31448    g.isDomWidget = function(a) {
31449      return a ? this.isDomWidgetWrapper(a) || this.isDomWidgetElement(a) : !1;
31450    };
31451    g.isParserWidgetElement = function(a) {
31452      return a.type == CKEDITOR.NODE_ELEMENT && !!a.attributes["data-widget"];
31453    };
31454    g.isParserWidgetWrapper = function(a) {
31455      return a.type == CKEDITOR.NODE_ELEMENT && !!a.attributes["data-cke-widget-wrapper"];
31456    };
31457    g.WRAPPER_CLASS_PREFIX = "cke_widget_wrapper_";
31458    q.prototype = CKEDITOR.tools.extend(
31459      CKEDITOR.tools.prototypedCopy(CKEDITOR.dom.element.prototype),
31460      {
31461        setData: function(a) {
31462          this._.initialSetData || this.editor.widgets.destroyAll(!1, this);
31463          this._.initialSetData = !1;
31464          a = this.editor.dataProcessor.toHtml(a, {
31465            context: this.getName(),
31466            filter: this.filter,
31467            enterMode: this.enterMode,
31468          });
31469          this.setHtml(a);
31470          this.editor.widgets.initOnAll(this);
31471        },
31472        getData: function() {
31473          return this.editor.dataProcessor.toDataFormat(this.getHtml(), {
31474            context: this.getName(),
31475            filter: this.filter,
31476            enterMode: this.enterMode,
31477          });
31478        },
31479      },
31480    );
31481    var X = /^(?:<(?:div|span)(?: data-cke-temp="1")?(?: id="cke_copybin")?(?: data-cke-temp="1")?>)?(?:<(?:div|span)(?: style="[^"]+")?>)?<span [^>]*data-cke-copybin-start="1"[^>]*>.?<\/span>([\s\S]+)<span [^>]*data-cke-copybin-end="1"[^>]*>.?<\/span>(?:<\/(?:div|span)>)?(?:<\/(?:div|span)>)?$/i,
31482      ga = { 37: 1, 38: 1, 39: 1, 40: 1, 8: 1, 46: 1 };
31483    CKEDITOR.plugins.widget = g;
31484    g.repository = p;
31485    g.nestedEditable = q;
31486  })();
31487  (function() {
31488    function e(a, b, c) {
31489      this.editor = a;
31490      this.notification = null;
31491      this._message = new CKEDITOR.template(b);
31492      this._singularMessage = c ? new CKEDITOR.template(c) : null;
31493      this._tasks = [];
31494      this._doneTasks = this._doneWeights = this._totalWeights = 0;
31495    }
31496    function d(a) {
31497      this._weight = a || 1;
31498      this._doneWeight = 0;
31499      this._isCanceled = !1;
31500    }
31501    CKEDITOR.plugins.add("notificationaggregator", { requires: "notification" });
31502    e.prototype = {
31503      createTask: funct
31503ion(a) {
31504        a = a || {};
31505        var b = !this.notification,
31506          c;
31507        b && (this.notification = this._createNotification());
31508        c = this._addTask(a);
31509        c.on("updated", this._onTaskUpdate, this);
31510        c.on("done", this._onTaskDone, this);
31511        c.on(
31512          "canceled",
31513          function() {
31514            this._removeTask(c);
31515          },
31516          this,
31517        );
31518        this.update();
31519        b && this.notification.show();
31520        return c;
31521      },
31522      update: function() {
31523        this._updateNotification();
31524        this.isFinished() && this.fire("finished");
31525      },
31526      getPercentage: function() {
31527        return 0 === this.getTaskCount() ? 1 : this._doneWeights / this._totalWeights;
31528      },
31529      isFinished: function() {
31530        return this.getDoneTaskCount() === this.getTaskCount();
31531      },
31532      getTaskCount: function() {
31533        return this._tasks.length;
31534      },
31535      getDoneTaskCount: function() {
31536        return this._doneTasks;
31537      },
31538      _updateNotification: function() {
31539        this.notification.update({
31540          message: this._getNotificationMessage(),
31541          progress: this.getPercentage(),
31542        });
31543      },
31544      _getNotificationMessage: function() {
31545        var a = this.getTaskCount(),
31546          b = {
31547            current: this.getDoneTaskCount(),
31548            max: a,
31549            percentage: Math.round(100 * this.getPercentage()),
31550          };
31551        return (1 == a && this._singularMessage ? this._singularMessage : this._message).output(b);
31552      },
31553      _createNotification: function() {
31554        return new CKEDITOR.plugins.notification(this.editor, { type: "progress" });
31555      },
31556      _addTask: function(a) {
31557        a = new d(a.weight);
31558        this._tasks.push(a);
31559        this._totalWeights += a._weight;
31560        return a;
31561      },
31562      _removeTask: function(a) {
31563        var b = CKEDITOR.tools.indexOf(this._tasks, a);
31564        -1 !== b &&
31565          (a._doneWeight && (this._doneWeights -= a._doneWeight),
31566          (this._totalWeights -= a._weight),
31567          this._tasks.splice(b, 1),
31568          this.update());
31569      },
31570      _onTaskUpdate: function(a) {
31571        this._doneWeights += a.data;
31572        this.update();
31573      },
31574      _onTaskDone: function() {
31575        this._doneTasks += 1;
31576        this.update();
31577      },
31578    };
31579    CKEDITOR.event.implementOn(e.prototype);
31580    d.prototype = {
31581      done: function() {
31582        this.update(this._weight);
31583      },
31584      update: function(a) {
31585        if (!this.isDone() && !this.isCanceled()) {
31586          a = Math.min(this._weight, a);
31587          var b = a - this._doneWeight;
31588          this._doneWeight = a;
31589          this.fire("updated", b);
31590          this.isDone() && this.fire("done");
31591        }
31592      },
31593      cancel: function() {
31594        this.isDone() || this.isCanceled() || ((this._isCanceled = !0), this.fire("canceled"));
31595      },
31596      isDone: function() {
31597        return this._weight === this._doneWeight;
31598      },
31599      isCanceled: function() {
31600        return this._isCanceled;
31601      },
31602    };
31603    CKEDITOR.event.implementOn(d.prototype);
31604    CKEDITOR.plugins.notificationAggregator = e;
31605    CKEDITOR.plugins.notificationAggregator.task = d;
31606  })();
31607  (function() {
31608    CKEDITOR.plugins.add("uploadwidget", {
31609      requires: "widget,clipboard,filetools,notificationaggregator",
31610      init: function(a) {
31611        a.filter.allow("*[!data-widget,!data-cke-upload-id]");
31612      },
31613    });
31614    CKEDITOR.fileTools || (CKEDITOR.fileTools = {});
31615    CKEDITOR.tools.extend(CKEDITOR.fileTools, {
31616      addUploadWidget: function(a, c, f) {
31617        var h = CKEDITOR.fileTools,
31618          b = a.uploadRepository,
31619          m = f.supportedTypes ? 10 : 20;
31620        if (f.fileToElement)
31621          a.on(
31622            "paste",
31623            function(d) {
31624              d = d.data;
31625              var l = a.widgets.registered[c],
31626                k = d.dataTransfer,
31627                f = k.getFilesCount(),
31628                g = l.loadMethod || "loadAndUpload",
31629                e,
31630                n;
31631              if (!d.dataValue && f)
31632                for (n = 0; n < f; n++)
31633                  if (
31634                    ((e = k.getFile(n)),
31635                    !l.supportedTypes || h.isTypeSupported(e, l.supportedTypes))
31636                  ) {
31637                    var m = l.fileToElement(e);
31638                    e = b.create(e, void 0, l.loaderType);
31639                    m &&
31640                      (e[g](l.uploadUrl, l.additionalRequestParameters),
31641                      CKEDITOR.fileTools.markElement(m, c, e.id),
31642                      ("loadAndUpload" != g && "upload" != g) ||
31643                        l.skipNotifications ||
31644                        CKEDITOR.fileTools.bindNotifications(a, e),
31645                      (d.dataValue += m.getOuterHtml()));
31646                  }
31647            },
31648            null,
31649            null,
31650            m,
31651          );
31652        CKEDITOR.tools.extend(f, {
31653          downcast: function() {
31654            return new CKEDITOR.htmlParser.text("");
31655          },
31656          init: function() {
31657            var d = this,
31658              c = this.wrapper.findOne("[data-cke-upload-id]").data("cke-upload-id"),
31659              k = b.loaders[c],
31660              f = CKEDITOR.tools.capitalize,
31661              g,
31662              e;
31663            k.on("update", function(b) {
31664              if (d.wrapper && d.wrapper.getParent()) {
31665                a.fire("lockSnapshot");
31666                b = "on" + f(k.status);
31667                if ("function" !== typeof d[b] || !1 !== d[b](k))
31668                  (e = "cke_upload_" + k.status),
31669                    d.wrapper &&
31670                      e != g &&
31671                      (g && d.wrapper.removeClass(g), d.wrapper.addClass(e), (g = e)),
31672                    ("error" != k.status && "abort" != k.status) || a.widgets.del(d);
31673                a.fire("unlockSnapshot");
31674              } else
31675                a
31676                  .editable()
31677                  .find('[data-cke-upload-id\x3d"' + c + '"]')
31678                  .count() || k.abort(),
31679                  b.removeListener();
31680            });
31681            k.update();
31682          },
31683          replaceWith: function(d, c) {
31684            if ("" === d.trim()) a.widgets.del(this);
31685            else {
31686              var b = this == a.widgets.focused,
31687                f = a.editable(),
31688                g = a.createRange(),
31689                e,
31690                h;
31691              b || (h = a.getSelection().createBookmarks());
31692              g.setStartBefore(this.wrapper);
31693              g.setEndAfter(this.wrapper);
31694              b && (e = g.createBookmark());
31695              f.insertHtmlIntoRange(d, g, c);
31696              a.widgets.checkWidgets({ initOnlyNew: !0 });
31697              a.widgets.destroy(this, !0);
31698              b ? (g.moveToBookmark(e), g.select()) : a.getSelection().selectBookmarks(h);
31699            }
31700          },
31701          _getLoader: function() {
31702            var a = this.wrapper.findOne("[data-cke-upload-id]");
31703            return a ? this.editor.uploadRepository.loaders[a.data("cke-upload-id")] : null;
31704          },
31705        });
31706        a.widgets.add(c, f);
31707      },
31708      markElement: function(a, c, f) {
31709        a.setAttributes({ "data-cke-upload-id": f, "data-widget": c });
31710      },
31711      bindNotifications: function(a, c) {
31712        function f() {
31713          h = a._.uploadWidgetNotificaionAggregator;
31714          if (!h || h.isFinished())
31715            (h = a._.uploadWidgetNotificaionAggregator = new CKEDITOR.plugins.notificationAggregator(
31716              a,
31717              a.lang.uploadwidget.uploadMany,
31718              a.lang.uploadwidget.uploadOne,
31719            )),
31720              h.once("finished", function() {
31721                var b = h.getTaskCount();
31722                0 === b
31723                  ? h.notification.hide()
31724                  : h.notification.update({
31725                      message:
31726                        1 == b
31727                          ? a.lang.uploadwidget.doneOne
31728                          : a.lang.uploadwidget.doneMany.replace("%1", b),
31729                      type: "success",
31730                      important: 1,
31731                    });
31732              });
31733        }
31734        var h,
31735          b = null;
31736        c.on("update", function() {
31737          !b && c.uploadTotal && (f(), (b = h.createTask({ weight: c.uploadTotal })));
31738          b && "uploading" == c.status && b.update(c.uploaded);
31739        });
31740        c.on("uploaded", function() {
31741          b && b.done();
31742        });
31743        c.on("error", function() {
31744          b && b.cancel();
31745          a.showNotification(c.message, "warning");
31746        });
31747        c.on("abort", function() {
31748          b && b.cancel();
31749          a.showNotification(a.lang.uploadwidget.abort, "info");
31750        });
31751      },
31752    });
31753  })();
31754  (function() {
31755    function l(c) {
31756      9 >= c && (c = "0" + c);
31757      return String(c);
31758    }
31759    function n(c) {
31760      var a = new Date(),
31761        a = [
31762          a.getFullYear(),
31763          a.getMonth() + 1,
31764          a.getDate(),
31765          a.getHours(),
31766          a.getMinutes(),
31767          a.getSeconds(),
31768        ];
31769      e += 1;
31770      return "image-" + CKEDITOR.tools.array.map(a, l).join("") + "-" + e + "." + c;
31771    }
31772    var e = 0;
31773    CKEDITOR.plugins.add("uploadimage", {
31774      requires: "uploadwidget",
31775      onLoad: function() {
31776        CKEDITOR.addCss(".cke_upload_uploading img{opacity: 0.3}");
31777      },
31778      init: function(c) {
31779        if (CKEDITOR.plugins.clipboard.isFileApiSupported) {
31780          var a = CKEDITOR.fileTools,
31781            e = a.getUploadUrl(c.config, "image");
31782          e &&
31783            (a.addUploadWidget(c, "uploadimage", {
31784              supportedTypes: /image\/(jpeg|png|gif|bmp)/,
31785              uploadUrl: e,
31786              fileToElement: function() {
31787                var b = new CKEDITOR.dom.element("img");
31788                b.setAttribute(
31789                  "src",
31790                  "data:image/gif;base64,R0lGODlhDgAOAIAAAAAAAP///yH5BAAAAAAALAAAAAAOAA4AAAIMhI+py+0Po5y02qsKADs\x3d",
31791                );
31792                return b;
31793              },
31794              parts: { img: "img" },
31795              onUploading: function(b) {
31796                this.parts.img.setAttribute("src", b.data);
31797              },
31798              onUploaded: function(b) {
31799                var a = this.parts.img.$;
31800                this.replaceWith(
31801                  '\x3cimg src\x3d"' +
31802                    b.url +
31803                    '" width\x3d"' +
31804                    (b.responseData.width || a.naturalWidth) +
31805                    '" height\x3d"' +
31806                    (b.responseData.height || a.naturalHeight) +
31807                    '"\x3e',
31808                );
31809              },
31810            }),
31811            c.on("paste", function(b) {
31812              if (b.data.dataValue.match(/<img[\s\S]+data:/i)) {
31813                b = b.data;
31814                var f = document.implementation.createHTMLDocument(""),
31815                  f = new CKEDITOR.dom.element(f.body),
31816                  m,
31817                  g,
31818                  k;
31819                f.data("cke-editable", 1);
31820                f.appendHtml(b.dataValue);
31821                m = f.find("img");
31822                for (k = 0; k < m.count(); k++) {
31823                  g = m.getItem(k);
31824                  var d = g.getAttribute("src"),
31825                    h = d && "data:" == d.substring(0, 5),
31826                    l = null === g.data("cke-realelement");
31827                  h &&
31828                    l &&
31829                    !g.data("cke-upload-id") &&
31830                    !g.isReadOnly(1) &&
31831                    ((h = ((h = d.match(/image\/([a-z]+?);/i)) && h[1]) || "jpg"),
31832                    (d = c.uploadRepository.create(d, n(h))),
31833                    d.upload(e),
31834                    a.markElement(g, "uploadimage", d.id),
31835                    a.bindNotifications(c, d));
31836                }
31837                b.dataValue = f.getHtml();
31838              }
31839            }));
31840        }
31841      },
31842    });
31843  })();
31844  CKEDITOR.plugins.add("wsc", {
31845    requires: "dialog",
31846    parseApi: function(a) {
31847      a.config.wsc_onFinish =
31848        "function" === typeof a.config.wsc_onFinish ? a.config.wsc_onFinish : function() {};
31849      a.config.wsc_onClose =
31850        "function" === typeof a.config.wsc_onClose ? a.config.wsc_onClose : function() {};
31851    },
31852    parseConfig: function(a) {
31853      a.config.wsc_customerId =
31854        a.config.wsc_customerId ||
31855        CKEDITOR.config.wsc_customerId ||
31856        "1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk";
31857      a.config.wsc_customDictionaryIds =
31858        a.config.wsc_customDictionaryIds || CKEDITOR.config.wsc_customDictionaryIds || "";
31859      a.config.wsc_userDictionaryName =
31860        a.config.wsc_userDictionaryName || CKEDITOR.config.wsc_userDictionaryName || "";
31861      a.config.wsc_customLoaderScript =
31862        a.config.wsc_customLoaderScript || CKEDITOR.config.wsc_customLoaderScript;
31863      a.config.wsc_interfaceLang = a.config.wsc_interfaceLang;
31864      CKEDITOR.config.wsc_cmd = a.config.wsc_cmd || CKEDITOR.config.wsc_cmd || "spell";
31865      CKEDITOR.config.wsc_version = "v4.3.0-master-d769233";
31866      CKEDITOR.config.wsc_removeGlobalVariable = !0;
31867    },
31868    onLoad: function(a) {
31869      "moono-lisa" == (CKEDITOR.skinName || a.config.skin) &&
31870        CKEDITOR.document.appendStyleSheet(this.path + "skins/" + CKEDITOR.skin.name + "/wsc.css");
31871    },
31872    init: function(a) {
31873      var b = CKEDITOR.env;
31874      this.parseConfig(a);
31875      this.parseApi(a);
31876      a.addCommand("checkspell", new CKEDITOR.dialogCommand("checkspell")).modes = {
31877        wysiwyg:
31878          !CKEDITOR.env.opera &&
31879          !CKEDITOR.env.air &&
31880          document.domain == window.location.hostname &&
31881          !(b.ie && (8 > b.version || b.quirks)),
31882      };
31883      "undefined" == typeof a.plugins.scayt &&
31884        a.ui.addButton &&
31885        a.ui.addButton("SpellChecker", {
31886          label: a.lang.wsc.toolbar,
31887          click: function(a) {
31888            var b =
31889              a.elementMode == CKEDITOR.ELEMENT_MODE_INLINE
31890                ? a.container.getText()
31891                : a.document.getBody().getText();
31892            (b = b.replace(/\s/g, "")) ? a.execCommand("checkspell") : alert("Nothing to check!");
31893          },
31894          toolbar: "spellchecker,10",
31895        });
31896      CKEDITOR.dialog.add(
31897        "checkspell",
31898        this.path +
31899          (CKEDITOR.env.ie && 7 >= CKEDITOR.env.version
31900            ? "dialogs/wsc_ie.js"
31901            : window.postMessage ? "dialogs/wsc.js" : "dialogs/wsc_ie.js"),
31902      );
31903    },
31904  });
31905  (function() {
31906    var l = {
31907      _attachScript: function(e, c) {
31908        var d = new CKEDITOR.dom.element("script");
31909        d.setAttribute("src", e);
31910        d.on("error", c);
31911        CKEDITOR.document.getBody().append(d);
31912        return d;
31913      },
31914      sendRequest: function(e, c, d, a) {
31915        function b() {
31916          g && (g.remove(), delete CKEDITOR._.jsonpCallbacks[h], (g = null));
31917        }
31918        var k = {};
31919        c = c || {};
31920        var h = CKEDITOR.tools.getNextNumber(),
31921          g;
31922        c.callback = "CKEDITOR._.jsonpCallbacks[" + h + "]";
31923        CKEDITOR._.jsonpCallbacks[h] = function(a) {
31924          setTimeout(function() {
31925            b();
31926            d(a);
31927          });
31928        };
31929        g = this._attachScript(e.output(c), function() {
31930          b();
31931          a && a();
31932        });
31933        k.cancel = b;
31934        return k;
31935      },
31936    };
31937    CKEDITOR.plugins.add("embedbase", {
31938      requires: "dialog,widget,notificationaggregator",
31939      onLoad: function() {
31940        CKEDITOR._.jsonpCallbacks = {};
31941      },
31942      init: function() {
31943        CKEDITOR.dialog.add("embedBase", this.path + "dialogs/embedbase.js");
31944      },
31945    });
31946    CKEDITOR.plugins.embedBase = {
31947      createWidgetBaseDefinition: function(e) {
31948        var c,
31949          d = e.lang.embedbase;
31950        return {
31951          mask: !0,
31952          template: "\x3cdiv\x3e\x3c/div\x3e",
31953          pathName: d.pathName,
31954          _cache: {},
31955          urlRegExp: /^((https?:)?\/\/|www\.)/i,
31956          init: function() {
31957            this.on(
31958              "sendRequest",
31959              function(a) {
31960                this._sendRequest(a.data);
31961              },
31962              this,
31963              null,
31964              999,
31965            );
31966            this.on(
31967              "dialog",
31968              function(a) {
31969                a.data.widget = this;
31970              },
31971              this,
31972            );
31973            this.on(
31974              "handleResponse",
31975              function(a) {
31976                if (!a.data.html) {
31977                  var b = this._responseToHtml(a.data.url, a.data.response);
31978                  null !== b
31979                    ? (a.data.html = b)
31980                    : ((a.data.errorMessage = "unsupportedUrl"), a.cancel());
31981                }
31982              },
31983              this,
31984              null,
31985              999,
31986            );
31987          },
31988          loadContent: function(a, b) {
31989            function c(e) {
31990              f.response = e;
31991              d.editor.widgets.instances[d.id]
31992                ? d._handleResponse(f) && (d._cacheResponse(a, e), b.callback && b.callback())
31993                : (CKEDITOR.warn("embedbase-widget-invalid"), f.task && f.task.done());
31994            }
31995            b = b || {};
31996            var d = this,
31997              e = this._getCachedResponse(a),
31998              f = {
31999                noNotifications: b.noNotifications,
32000                url: a,
32001                callback: c,
32002                errorCallback: function(a) {
32003                  d._handleError(f, a);
32004                  b.errorCallback && b.errorCallback(a);
32005                },
32006              };
32007            if (e)
32008              setTimeout(function() {
32009                c(e);
32010              });
32011            else
32012              return (
32013                b.noNotifications || (f.task = this._createTask()), this.fire("sendRequest", f), f
32014              );
32015          },
32016          isUrlValid: function(a) {
32017            return this.urlRegExp.test(a) && !1 !== this.fire("validateUrl", a);
32018          },
32019          getErrorMessage: function(a, b, c) {
32020            (c = e.lang.embedbase[a + (c || "")]) || (c = a);
32021            return new CKEDITOR.template(c).output({
32022              url: b || "",
32023            });
32024          },
32025          _sendRequest: function(a) {
32026            var b = this,
32027              c = l.sendRequest(
32028                this.providerUrl,
32029                { url: encodeURIComponent(a.url) },
32030                a.callback,
32031                function() {
32032                  a.errorCallback("fetchingFailed");
32033                },
32034              );
32035            a.cancel = function() {
32036              c.cancel();
32037              b.fire("requestCanceled", a);
32038            };
32039          },
32040          _handleResponse: function(a) {
32041            var b = { url: a.url, html: "", response: a.response };
32042            if (!1 !== this.fire("handleResponse", b))
32043              return a.task && a.task.done(), this._setContent(a.url, b.html), !0;
32044            a.errorCallback(b.errorMessage);
32045            return !1;
32046          },
32047          _handleError: function(a, b) {
32048            a.task &&
32049              (a.task.cancel(),
32050              a.noNotifications || e.showNotification(this.getErrorMessage(b, a.url), "warning"));
32051          },
32052          _responseToHtml: function(a, b) {
32053            return "photo" == b.type
32054              ? '\x3cimg src\x3d"' +
32055                  CKEDITOR.tools.htmlEncodeAttr(b.url) +
32056                  '" alt\x3d"' +
32057                  CKEDITOR.tools.htmlEncodeAttr(b.title || "") +
32058                  '" style\x3d"max-width:100%;height:auto" /\x3e'
32059              : "video" == b.type || "rich" == b.type
32060                ? ((b.html = b.html.replace(/<iframe/g, '\x3ciframe tabindex\x3d"-1"')), b.html)
32061                : null;
32062          },
32063          _setContent: function(a, b) {
32064            this.setData("url", a);
32065            this.element.setHtml(b);
32066          },
32067          _createTask: function() {
32068            if (!c || c.isFinished())
32069              (c = new CKEDITOR.plugins.notificationAggregator(e, d.fetchingMany, d.fetchingOne)),
32070                c.on("finished", function() {
32071                  c.notification.hide();
32072                });
32073            return c.createTask();
32074          },
32075          _cacheResponse: function(a, b) {
32076            this._cache[a] = b;
32077          },
32078          _getCachedResponse: function(a) {
32079            return this._cache[a];
32080          },
32081        };
32082      },
32083      _jsonp: l,
32084    };
32085  })();
32086  (function() {
32087    CKEDITOR.plugins.add("embed", {
32088      requires: "embedbase",
32089      init: function(b) {
32090        var c = CKEDITOR.plugins.embedBase.createWidgetBaseDefinition(b);
32091        b.config.embed_provider || CKEDITOR.error("embed-no-provider-url");
32092        CKEDITOR.tools.extend(
32093          c,
32094          {
32095            dialog: "embedBase",
32096            button: b.lang.embedbase.button,
32097            allowedContent: "div[!data-oembed-url]",
32098            requiredContent: "div[data-oembed-url]",
32099            providerUrl: new CKEDITOR.template(b.config.embed_provider || ""),
32100            styleToAllowedContentRules: function(a) {
32101              return {
32102                div: {
32103                  propertiesOnly: !0,
32104                  classes: a.getClassesArray(),
32105                  attributes: "!data-oembed-url",
32106                },
32107              };
32108            },
32109            upcast: function(a, b) {
32110              if ("div" == a.name && a.attributes["data-oembed-url"])
32111                return (b.url = a.attributes["data-oembed-url"]), !0;
32112            },
32113            downcast: function(a) {
32114              a.attributes["data-oembed-url"] = this.data.url;
32115            },
32116          },
32117          !0,
32118        );
32119        b.widgets.add("embed", c);
32120        b.filter.addElementCallback(function(a) {
32121          if ("data-oembed-url" in a.attributes) return CKEDITOR.FILTER_SKIP_TREE;
32122        });
32123      },
32124    });
32125  })();
32126  (function() {
32127    var d = /^(https?|ftp):\/\/(-\.)?([^\s\/?\.#]+\.?)+(\/[^\s]*)?[^\s\.,]$/gi,
32128      e = /"/g;
32129    CKEDITOR.plugins.add("autolink", {
32130      requires: "clipboard",
32131      init: function(c) {
32132        c.on("paste", function(b) {
32133          var a = b.data.dataValue;
32134          b.data.dataTransfer.getTransferType(c) == CKEDITOR.DATA_TRANSFER_INTERNAL ||
32135            -1 < a.indexOf("\x3c") ||
32136            ((a = a.replace(d, '\x3ca href\x3d"' + a.replace(e, "%22") + '"\x3e$\x26\x3c/a\x3e')),
32137            a != b.data.dataValue && (b.data.type = "html"),
32138            (b.data.dataValue = a));
32139        });
32140      },
32141    });
32142  })();
32143  (function() {
32144    function p(a, g) {
32145      var b = a.editable().findOne('a[data-cke-autoembed\x3d"' + g + '"]'),
32146        c = a.lang.autoembed,
32147        d;
32148      if (b && b.data("cke-saved-href")) {
32149        var b = b.data("cke-saved-href"),
32150          e = CKEDITOR.plugins.autoEmbed.getWidgetDefinition(a, b);
32151        if (e) {
32152          var f = "function" == typeof e.defaults ? e.defaults() : e.defaults,
32153            f = CKEDITOR.dom.element.createFromHtml(e.template.output(f)),
32154            h,
32155            m = a.widgets.wrapElement(f, e.name),
32156            n = new CKEDITOR.dom.documentFragment(m.getDocument());
32157          n.append(m);
32158          (h = a.widgets.initOn(f, e))
32159            ? ((d = a.showNotification(c.embeddingInProgress, "info")),
32160              h.loadContent(b, {
32161                noNotifications: !0,
32162                callback: function() {
32163                  var b = a.editable().findOne('a[data-cke-autoembed\x3d"' + g + '"]');
32164                  if (b) {
32165                    var c = a.getSelection(),
32166                      e = a.createRange(),
32167                      f = a.editable();
32168                    a.fire("saveSnapshot");
32169                    a.fire("lockSnapshot", { dontUpdate: !0 });
32170                    var l = c.createBookmarks(!1)[0],
32171                      k = l.startNode,
32172                      h = l.endNode || k;
32173                    CKEDITOR.env.ie &&
32174                      9 > CKEDITOR.env.version &&
32175                      !l.endNode &&
32176                      k.equals(b.getNext()) &&
32177                      b.append(k);
32178                    e.setStartBefore(b);
32179                    e.setEndAfter(b);
32180                    f.insertElement(m, e);
32181                    f.contains(k) && f.contains(h)
32182                      ? c.selectBookmarks([l])
32183                      : (k.remove(), h.remove());
32184                    a.fire("unlockSnapshot");
32185                  }
32186                  d.hide();
32187                  a.widgets.finalizeCreation(n);
32188                },
32189                errorCallback: function() {
32190                  d.hide();
32191                  a.widgets.destroy(h, !0);
32192                  a.showNotification(c.embeddingFailed, "info");
32193                },
32194              }))
32195            : a.widgets.finalizeCreation(n);
32196        } else CKEDITOR.warn("autoembed-no-widget-def");
32197      }
32198    }
32199    var q = /^<a[^>]+href="([^"]+)"[^>]*>([^<]+)<\/a>$/i;
32200    CKEDITOR.plugins.add("autoembed", {
32201      requires: "autolink,undo",
32202      init: function(a) {
32203        var g = 1,
32204          b;
32205        a.on(
32206          "paste",
32207          function(c) {
32208            if (c.data.dataTransfer.getTransferType(a) == CKEDITOR.DATA_TRANSFER_INTERNAL) b = 0;
32209            else {
32210              var d = c.data.dataValue.match(q);
32211              if ((b = null != d && decodeURI(d[1]) == decodeURI(d[2])))
32212                c.data.dataValue =
32213                  '\x3ca data-cke-autoembed\x3d"' + ++g + '"' + c.data.dataValue.substr(2);
32214            }
32215          },
32216          null,
32217          null,
32218          20,
32219        );
32220        a.on("afterPaste", function() {
32221          b && p(a, g);
32222        });
32223      },
32224    });
32225    CKEDITOR.plugins.autoEmbed = {
32226      getWidgetDefinition: function(a, g) {
32227        var b = a.config.autoEmbed_widget || "embed,embedSemantic",
32228          c,
32229          d = a.widgets.registered;
32230        if ("string" == typeof b)
32231          for (b = b.split(","); (c = b.shift()); ) {
32232            if (d[c]) return d[c];
32233          }
32234        else if ("function" == typeof b) return d[b(g)];
32235        return null;
32236      },
32237    };
32238  })();
32239  (function() {
32240    function D(a) {
32241      function b() {
32242        this.deflated ||
32243          (a.widgets.focused == this.widget && (this.focused = !0),
32244          a.widgets.destroy(this.widget),
32245          (this.deflated = !0));
32246      }
32247      function c() {
32248        var d = a.editable(),
32249          e = a.document;
32250        if (this.deflated)
32251          (this.widget = a.widgets.initOn(this.element, "image", this.widget.data)),
32252            this.widget.inline &&
32253              !new CKEDITOR.dom.elementPath(this.widget.wrapper, d).block &&
32254              ((d = e.createElement(a.activeEnterMode == CKEDITOR.ENTER_P ? "p" : "div")),
32255              d.replace(this.widget.wrapper),
32256              this.widget.wrapper.move(d)),
32257            this.focused && (this.widget.focus(), delete this.focused),
32258            delete this.deflated;
32259        else {
32260          var b = this.widget,
32261            d = g,
32262            e = b.wrapper,
32263            c = b.data.align,
32264            b = b.data.hasCaption;
32265          if (d) {
32266            for (var l = 3; l--; ) e.removeClass(d[l]);
32267            "center" == c ? b && e.addClass(d[1]) : "none" != c && e.addClass(d[q[c]]);
32268          } else
32269            "center" == c
32270              ? (b ? e.setStyle("text-align", "center") : e.removeStyle("text-align"),
32271                e.removeStyle("float"))
32272              : ("none" == c ? e.removeStyle("float") : e.setStyle("float", c),
32273                e.removeStyle("text-align"));
32274        }
32275      }
32276      var g = a.config.image2_alignClasses,
32277        f = a.config.image2_captionedClass;
32278      return {
32279        allowedContent: E(a),
32280        requiredContent: "img[src,alt]",
32281        features: F(a),
32282        styleableElements: "img figure",
32283        contentTransformations: [["img[width]: sizeToAttribute"]],
32284        editables: {
32285          caption: {
32286            selector: "figcaption",
32287            allowedContent: "br em strong sub sup u s; a[!href,target]",
32288          },
32289        },
32290        parts: { image: "img", caption: "figcaption" },
32291        dialog: "image2",
32292        template: '\x3cimg alt\x3d"" src\x3d"" /\x3e',
32293        data: function() {
32294          var d = this.features;
32295          this.data.hasCaption && !a.filter.checkFeature(d.caption) && (this.data.hasCaption = !1);
32296          "none" == this.data.align || a.filter.checkFeature(d.align) || (this.data.align = "none");
32297          this.shiftState({
32298            widget: this,
32299            element: this.element,
32300            oldData: this.oldData,
32301            newData: this.data,
32302            deflate: b,
32303            inflate: c,
32304          });
32305          this.data.link
32306            ? this.parts.link || (this.parts.link = this.parts.image.getParent())
32307            : this.parts.link && delete this.parts.link;
32308          this.parts.image.setAttributes({
32309            src: this.data.src,
32310            "data-cke-saved-src": this.data.src,
32311            alt: this.data.alt,
32312          });
32313          if (this.oldData && !this.oldData.hasCaption && this.data.hasCaption)
32314            for (var e in this.data.classes) this.parts.image.removeClass(e);
32315          if (a.filter.checkFeature(d.dimension)) {
32316            d = this.data;
32317            d = { width: d.width, height: d.height };
32318            e = this.parts.image;
32319            for (var g in d) d[g] ? e.setAttribute(g, d[g]) : e.removeAttribute(g);
32320          }
32321          this.oldData = CKEDITOR.tools.extend({}, this.data);
32322        },
32323        init: function() {
32324          var d = CKEDITOR.plugins.image2,
32325            b = this.parts.image,
32326            c = {
32327              hasCaption: !!this.parts.caption,
32328              src: b.getAttribute("src"),
32329              alt: b.getAttribute("alt") || "",
32330              width: b.getAttribute("width") || "",
32331              height: b.getAttribute("height") || "",
32332              lock: this.ready ? d.checkHasNaturalRatio(b) : !0,
32333            },
32334            f = b.getAscendant("a");
32335          f && this.wrapper.contains(f) && (this.parts.link = f);
32336          c.align ||
32337            ((b = c.hasCaption ? this.element : b),
32338            g
32339              ? (b.hasClass(g[0]) ? (c.align = "left") : b.hasClass(g[2]) && (c.align = "right"),
32340                c.align ? b.removeClass(g[q[c.align]]) : (c.align = "none"))
32341              : ((c.align = b.getStyle("float") || "none"), b.removeStyle("float")));
32342          a.plugins.link &&
32343            this.parts.link &&
32344            ((c.link = d.getLinkAttributesParser()(a, this.parts.link)),
32345            (b = c.link.advanced) &&
32346              b.advCSSClasses &&
32347              (b.advCSSClasses = CKEDITOR.tools.trim(b.advCSSClasses.replace(/cke_\S+/, ""))));
32348          this.wrapper[(c.hasCaption ? "remove" : "add") + "Class"]("cke_image_nocaption");
32349          this.setData(c);
32350          a.filter.checkFeature(this.features.dimension) &&
32351            !0 !== a.config.image2_disableResizer &&
32352            1 != a.readOnly &&
32353            G(this);
32354          this.shiftState = d.stateShifter(this.editor);
32355          this.on("contextMenu", function(a) {
32356            a.data.image = CKEDITOR.TRISTATE_OFF;
32357            if (this.parts.link || this.wrapper.getAscendant("a"))
32358              a.data.link = a.data.unlink = CKEDITOR.TRISTATE_OFF;
32359          });
32360          this.on(
32361            "dialog",
32362            function(a) {
32363              a.data.widget = this;
32364            },
32365            this,
32366          );
32367        },
32368        addClass: function(a) {
32369          m(this).addClass(a);
32370        },
32371        hasClass: function(a) {
32372          return m(this).hasClass(a);
32373        },
32374        removeClass: function(a) {
32375          m(this).removeClass(a);
32376        },
32377        getClasses: (function() {
32378          var a = new RegExp("^(" + [].concat(f, g).join("|") + ")$");
32379          return function() {
32380            var b = this.repository.parseElementClasses(m(this).getAttribute("class")),
32381              c;
32382            for (c in b) a.test(c) && delete b[c];
32383            return b;
32384          };
32385        })(),
32386        upcast: H(a),
32387        downcast: I(a),
32388        getLabel: function() {
32389          return this.editor.lang.widget.label.replace(
32390            /%1/,
32391            (this.data.alt || "") + " " + this.pathName,
32392          );
32393        },
32394      };
32395    }
32396    function H(a) {
32397      var b = n(a),
32398        c = a.config.image2_captionedClass;
32399      return function(a, f) {
32400        var d = { width: 1, height: 1 },
32401          e = a.name,
32402          h;
32403        if (
32404          !a.attributes["data-cke-realelement"] &&
32405          (b(a)
32406            ? ("div" == e && (h = a.getFirst("figure")) && (a.replaceWith(h), (a = h)),
32407              (f.align = "center"),
32408              (h = a.getFirst("img") || a.getFirst("a").getFirst("img")))
32409            : "figure" == e && a.hasClass(c)
32410              ? (h = a.getFirst("img") || a.getFirst("a").getFirst("img"))
32411              : r(a) && (h = "a" == a.name ? a.children[0] : a),
32412          h)
32413        ) {
32414          for (var C in d) (d = h.attributes[C]) && d.match(J) && delete h.attributes[C];
32415          return a;
32416        }
32417      };
32418    }
32419    function I(a) {
32420      var b = a.config.image2_alignClasses;
32421      return function(a) {
32422        var g = "a" == a.name ? a.getFirst() : a,
32423          f = g.attributes,
32424          d = this.data.align;
32425        if (!this.inline) {
32426          var e = a.getFirst("span");
32427          e && e.replaceWith(e.getFirst({ img: 1, a: 1 }));
32428        }
32429        d &&
32430          "none" != d &&
32431          ((e = CKEDITOR.tools.parseCssText(f.style || "")),
32432          "center" == d && "figure" == a.name
32433            ? (a = a.wrapWith(
32434                new CKEDITOR.htmlParser.element(
32435                  "div",
32436                  b ? { class: b[1] } : { style: "text-align:center" },
32437                ),
32438              ))
32439            : d in { left: 1, right: 1 } && (b ? g.addClass(b[q[d]]) : (e["float"] = d)),
32440          b || CKEDITOR.tools.isEmpty(e) || (f.style = CKEDITOR.tools.writeCssText(e)));
32441        return a;
32442      };
32443    }
32444    function n(a) {
32445      var b = a.config.image2_captionedClass,
32446        c = a.config.image2_alignClasses,
32447        g = { figure: 1, a: 1, img: 1 };
32448      return function(f) {
32449        if (!(f.name in { div: 1, p: 1 })) return !1;
32450        var d = f.children;
32451        if (1 !== d.length) return !1;
32452        d = d[0];
32453        if (!(d.name in g)) return !1;
32454        if ("p" == f.name) {
32455          if (!r(d)) return !1;
32456        } else if ("figure" == d.name) {
32457          if (!d.hasClass(b)) return !1;
32458        } else if (a.enterMode == CKEDITOR.ENTER_P || !r(d)) return !1;
32459        return (c
32460        ? f.hasClass(c[1])
32461        : "center" == CKEDITOR.tools.parseCssText(f.attributes.style || "", !0)["text-align"])
32462          ? !0
32463          : !1;
32464      };
32465    }
32466    function r(a) {
32467      return "img" == a.name
32468        ? !0
32469        : "a" == a.name ? 1 == a.children.length && a.getFirst("img") : !1;
32470    }
32471    function G(a) {
32472      var b = a.editor,
32473        c = b.editable(),
32474        g = b.document,
32475        f = (a.resizer = g.createElement("span"));
32476      f.addClass("cke_image_resizer");
32477      f.setAttribute("title", b.lang.image2.resizer);
32478      f.append(new CKEDITOR.dom.text("​", g));
32479      if (a.inline) a.wrapper.append(f);
32480      else {
32481        var d = a.parts.link || a.parts.image,
32482          e = d.getParent(),
32483          h = g.createElement("span");
32484        h.addClass("cke_image_resizer_wrapper");
32485        h.append(d);
32486        h.append(f);
32487        a.element.append(h, !0);
32488        e.is("span") && e.remove();
32489      }
32490      f.on("mousedown", function(d) {
32491        function l(a, b, d) {
32492          var l = CKEDITOR.document,
32493            c = [];
32494          g.equals(l) || c.push(l.on(a, b));
32495          c.push(g.on(a, b));
32496          if (d) for (a = c.length; a--; ) d.push(c.pop());
32497        }
32498        function e() {
32499          t = m + A * x;
32500          u = Math.round(t / v);
32501        }
32502        function w() {
32503          u = q - p;
32504          t = Math.round(u * v);
32505        }
32506        var h = a.parts.image,
32507          A = "right" == a.data.align ? -1 : 1,
32508          k = d.data.$.screenX,
32509          K = d.data.$.screenY,
32510          m = h.$.clientWidth,
32511          q = h.$.clientHeight,
32512          v = m / q,
32513          n = [],
32514          r = "cke_image_s" + (~A ? "e" : "w"),
32515          B,
32516          t,
32517          u,
32518          z,
32519          x,
32520          p,
32521          y;
32522        b.fire("saveSnapshot");
32523        l(
32524          "mousemove",
32525          function(a) {
32526            B = a.data.$;
32527            x = B.screenX - k;
32528            p = K - B.screenY;
32529            y = Math.abs(x / p);
32530            1 == A
32531              ? 0 >= x ? (0 >= p ? e() : y >= v ? e() : w()) : 0 >= p ? (y >= v ? w() : e()) : w()
32532              : 0 >= x ? (0 >= p ? (y >= v ? w() : e()) : w()) : 0 >= p ? e() : y >= v ? e() : w();
32533            15 <= t && 15 <= u ? (h.setAttributes({ width: t, height: u }), (z = !0)) : (z = !1);
32534          },
32535          n,
32536        );
32537        l(
32538          "mouseup",
32539          function() {
32540            for (var d; (d = n.pop()); ) d.removeListener();
32541            c.removeClass(r);
32542            f.removeClass("cke_image_resizing");
32543            z && (a.setData({ width: t, height: u }), b.fire("saveSnapshot"));
32544            z = !1;
32545          },
32546          n,
32547        );
32548        c.addClass(r);
32549        f.addClass("cke_image_resizing");
32550      });
32551      a.on("data", function() {
32552        f["right" == a.data.align ? "addClass" : "removeClass"]("cke_image_resizer_left");
32553      });
32554    }
32555    function L(a) {
32556      var b = [],
32557        c;
32558      return function(g) {
32559        var f = a.getCommand("justify" + g);
32560        if (f) {
32561          b.push(function() {
32562            f.refresh(a, a.elementPath());
32563          });
32564          if (g in { right: 1, left: 1, center: 1 })
32565            f.on("exec", function(d) {
32566              var c = k(a);
32567              if (c) {
32568                c.setData("align", g);
32569                for (c = b.length; c--; ) b[c]();
32570                d.cancel();
32571              }
32572            });
32573          f.on("refresh", function(b) {
32574            var f = k(a),
32575              h = { right: 1, left: 1, center: 1 };
32576            f &&
32577              (void 0 === c &&
32578                (c = a.filter.checkFeature(a.widgets.registered.image.features.align)),
32579              c
32580                ? this.setState(
32581                    f.data.align == g
32582                      ? CKEDITOR.TRISTATE_ON
32583                      : g in h ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,
32584                  )
32585                : this.setState(CKEDITOR.TRISTATE_DISABLED),
32586              b.cancel());
32587          });
32588        }
32589      };
32590    }
32591    function M(a) {
32592      a.plugins.link &&
32593        (CKEDITOR.on("dialogDefinition", function(b) {
32594          b = b.data;
32595          if ("link" == b.name) {
32596            b = b.definition;
32597            var c = b.onShow,
32598              g = b.onOk;
32599            b.onShow = function() {
32600              var b = k(a),
32601                d = this.getContentElement("info", "linkDisplayText")
32602                  .getElement()
32603                  .getParent()
32604                  .getParent();
32605              b && (b.inline ? !b.wrapper.getAscendant("a") : 1)
32606                ? (this.setupContent(b.data.link || {}), d.hide())
32607                : (d.show(), c.apply(this, arguments));
32608            };
32609            b.onOk = function() {
32610              var b = k(a);
32611              if (b && (b.inline ? !b.wrapper.getAscendant("a") : 1)) {
32612                var c = {};
32613                this.commitContent(c);
32614                b.setData("link", c);
32615              } else g.apply(this, arguments);
32616            };
32617          }
32618        }),
32619        a.getCommand("unlink").on("exec", function(b) {
32620          var c = k(a);
32621          c &&
32622            c.parts.link &&
32623            (c.setData("link", null), this.refresh(a, a.elementPath()), b.cancel());
32624        }),
32625        a.getCommand("unlink").on("refresh", function(b) {
32626          var c = k(a);
32627          c &&
32628            (this.setState(
32629              c.data.link || c.wrapper.getAscendant("a")
32630                ? CKEDITOR.TRISTATE_OFF
32631                : CKEDITOR.TRISTATE_DISABLED,
32632            ),
32633            b.cancel());
32634        }));
32635    }
32636    function k(a) {
32637      return (a = a.widgets.focused) && "image" == a.name ? a : null;
32638    }
32639    function E(a) {
32640      var b = a.config.image2_alignClasses;
32641      a = {
32642        div: { match: n(a) },
32643        p: { match: n(a) },
32644        img: { attributes: "!src,alt,width,height" },
32645        figure: { classes: "!" + a.config.image2_captionedClass },
32646        figcaption: !0,
32647      };
32648      b
32649        ? ((a.div.classes = b[1]),
32650          (a.p.classes = a.div.classes),
32651          (a.img.classes = b[0] + "," + b[2]),
32652          (a.figure.classes += "," + a.img.classes))
32653        : ((a.div.styles = "text-align"),
32654          (a.p.styles = "text-align"),
32655          (a.img.styles = "float"),
32656          (a.figure.styles = "float,display"));
32657      return a;
32658    }
32659    function F(a) {
32660      a = a.config.image2_alignClasses;
32661      return {
32662        dimension: { requiredContent: "img[width,height]" },
32663        align: { requiredContent: "img" + (a ? "(" + a[0] + ")" : "{float}") },
32664        caption: { requiredContent: "figcaption" },
32665      };
32666    }
32667    function m(a) {
32668      return a.data.hasCaption ? a.element : a.parts.image;
32669    }
32670    var N = new CKEDITOR.template(
32671        '\x3cfigure class\x3d"{captionedClass}"\x3e\x3cimg alt\x3d"" src\x3d"" /\x3e\x3cfigcaption\x3e{captionPlaceholder}\x3c/figcaption\x3e\x3c/figure\x3e',
32672      ),
32673      q = { left: 0, center: 1, right: 2 },
32674      J = /^\s*(\d+\%)\s*$/i;
32675    CKEDITOR.plugins.add("image2", {
32676      requires: "widget,dialog",
32677      icons: "image",
32678      hidpi: !0,
32679      onLoad: function() {
32680        CKEDITOR.addCss(
32681          ".cke_image_nocaption{line-height:0}.cke_editable.cke_image_sw, .cke_editable.cke_image_sw *{cursor:sw-resize !important}.cke_editable.cke_image_se, .cke_editable.cke_image_se *{cursor:se-resize !important}.cke_image_resizer{display:none;position:absolute;width:10px;height:10px;bottom:-5px;right:-5px;background:#000;outline:1px solid #fff;line-height:0;cursor:se-resize;}.cke_image_resizer_wrapper{position:relative;display:inline-block;line-height:0;}.cke_image_resizer.cke_image_resizer_left{right:auto;left:-5px;cursor:sw-resize;}.cke_widget_wrapper:hover .cke_image_resizer,.cke_image_resizer.cke_image_resizing{display:block}
32681.cke_widget_wrapper\x3ea{display:inline-block}",
32682        );
32683      },
32684      init: function(a) {
32685        var b = a.config,
32686          c = a.lang.image2,
32687          g = D(a);
32688        b.filebrowserImage2BrowseUrl = b.filebrowserImageBrowseUrl;
32689        b.filebrowserImage2UploadUrl = b.filebrowserImageUploadUrl;
32690        g.pathName = c.pathName;
32691        g.editables.caption.pathName = c.pathNameCaption;
32692        a.widgets.add("image", g);
32693        a.ui.addButton &&
32694          a.ui.addButton("Image", {
32695            label: a.lang.common.image,
32696            command: "image",
32697            toolbar: "insert,10",
32698          });
32699        a.contextMenu &&
32700          (a.addMenuGroup("image", 10),
32701          a.addMenuItem("image", { label: c.menu, command: "image", group: "image" }));
32702        CKEDITOR.dialog.add("image2", this.path + "dialogs/image2.js");
32703      },
32704      afterInit: function(a) {
32705        var b = { left: 1, right: 1, center: 1, block: 1 },
32706          c = L(a),
32707          g;
32708        for (g in b) c(g);
32709        M(a);
32710      },
32711    });
32712    CKEDITOR.plugins.image2 = {
32713      stateShifter: function(a) {
32714        function b(a, b) {
32715          var d = {};
32716          f ? (d.attributes = { class: f[1] }) : (d.styles = { "text-align": "center" });
32717          d = g.createElement(a.activeEnterMode == CKEDITOR.ENTER_P ? "p" : "div", d);
32718          c(d, b);
32719          b.move(d);
32720          return d;
32721        }
32722        function c(b, d) {
32723          if (d.getParent()) {
32724            var c = a.createRange();
32725            c.moveToPosition(d, CKEDITOR.POSITION_BEFORE_START);
32726            d.remove();
32727            e.insertElementIntoRange(b, c);
32728          } else b.replace(d);
32729        }
32730        var g = a.document,
32731          f = a.config.image2_alignClasses,
32732          d = a.config.image2_captionedClass,
32733          e = a.editable(),
32734          h = ["hasCaption", "align", "link"],
32735          k = {
32736            align: function(d, c, g) {
32737              var e = d.element;
32738              d.changed.align
32739                ? d.newData.hasCaption ||
32740                  ("center" == g && (d.deflate(), (d.element = b(a, e))),
32741                  d.changed.hasCaption ||
32742                    "center" != c ||
32743                    "center" == g ||
32744                    (d.deflate(), (c = e.findOne("a,img")), c.replace(e), (d.element = c)))
32745                : "center" == g &&
32746                  d.changed.hasCaption &&
32747                  !d.newData.hasCaption &&
32748                  (d.deflate(), (d.element = b(a, e)));
32749              !f &&
32750                e.is("figure") &&
32751                ("center" == g ? e.setStyle("display", "inline-block") : e.removeStyle("display"));
32752            },
32753            hasCaption: function(b, e, f) {
32754              b.changed.hasCaption &&
32755                ((e = b.element.is({ img: 1, a: 1 }) ? b.element : b.element.findOne("a,img")),
32756                b.deflate(),
32757                f
32758                  ? ((f = CKEDITOR.dom.element.createFromHtml(
32759                      N.output({
32760                        captionedClass: d,
32761                        captionPlaceholder: a.lang.image2.captionPlaceholder,
32762                      }),
32763                      g,
32764                    )),
32765                    c(f, b.element),
32766                    e.replace(f.findOne("img")),
32767                    (b.element = f))
32768                  : (e.replace(b.element), (b.element = e)));
32769            },
32770            link: function(b, d, c) {
32771              if (b.changed.link) {
32772                var e = b.element.is("img") ? b.element : b.element.findOne("img"),
32773                  f = b.element.is("a") ? b.element : b.element.findOne("a"),
32774                  h = (b.element.is("a") && !c) || (b.element.is("img") && c),
32775                  k;
32776                h && b.deflate();
32777                c
32778                  ? (d ||
32779                      ((k = g.createElement("a", { attributes: { href: b.newData.link.url } })),
32780                      k.replace(e),
32781                      e.move(k)),
32782                    (c = CKEDITOR.plugins.image2.getLinkAttributesGetter()(a, c)),
32783                    CKEDITOR.tools.isEmpty(c.set) || (k || f).setAttributes(c.set),
32784                    c.removed.length && (k || f).removeAttributes(c.removed))
32785                  : ((c = f.findOne("img")), c.replace(f), (k = c));
32786                h && (b.element = k);
32787              }
32788            },
32789          };
32790        return function(a) {
32791          var b, c;
32792          a.changed = {};
32793          for (c = 0; c < h.length; c++)
32794            (b = h[c]), (a.changed[b] = a.oldData ? a.oldData[b] !== a.newData[b] : !1);
32795          for (c = 0; c < h.length; c++)
32796            (b = h[c]), k[b](a, a.oldData ? a.oldData[b] : null, a.newD
32796ata[b]);
32797          a.inflate();
32798        };
32799      },
32800      checkHasNaturalRatio: function(a) {
32801        var b = a.$;
32802        a = this.getNatural(a);
32803        return (
32804          Math.round(b.clientWidth / a.width * a.height) == b.clientHeight ||
32805          Math.round(b.clientHeight / a.height * a.width) == b.clientWidth
32806        );
32807      },
32808      getNatural: function(a) {
32809        if (a.$.naturalWidth) a = { width: a.$.naturalWidth, height: a.$.naturalHeight };
32810        else {
32811          var b = new Image();
32812          b.src = a.getAttribute("src");
32813          a = {
32814            width: b.width,
32815            height: b.height,
32816          };
32817        }
32818        return a;
32819      },
32820      getLinkAttributesGetter: function() {
32821        return CKEDITOR.plugins.link.getLinkAttributes;
32822      },
32823      getLinkAttributesParser: function() {
32824        return CKEDITOR.plugins.link.parseLinkAttributes;
32825      },
32826    };
32827  })();
32828  CKEDITOR.config.image2_captionedClass = "image";
32829  CKEDITOR.config.plugins =
32830    "dialogui,dialog,about,a11yhelp,dialogadvtab,basicstyles,bidi,blockquote,notification,button,toolbar,clipboard,panelbutton,panel,floatpanel,colorbutton,colordialog,templates,menu,contextmenu,copyformatting,div,resize,elementspath,enterkey,entities,popup,filetools,filebrowser,find,fakeobjects,flash,floatingspace,listblock,richcombo,font,forms,format,horizontalrule,htmlwriter,iframe,wysiwygarea,image,indent,indentblock,indentlist,smiley,justify,menubutton,language,link,list,liststyle,magicline,maximize,newpage,pagebreak,pastetext,pastefromword,preview,print,removeformat,save,selectall,showblocks,showborders,sourcearea,specialchar,scayt,stylescombo,tab,table,tabletools,tableselection,undo,lineutils,widgetselection,widget,notificationaggregator,uploadwidget,uploadimage,wsc,embedbase,embed,autolink,autoembed,image2";
32831  CKEDITOR.config.skin = "moono-lisa";
32832  (function() {
32833    var setIcons = function(icons, strip) {
32834      var path = CKEDITOR.getUrl("plugins/" + strip);
32835      icons = icons.split(",");
32836      for (var i = 0; i < icons.length; i++)
32837        CKEDITOR.skin.icons[icons[i]] = { path: path, offset: -icons[++i], bgsize: icons[++i] };
32838    };
32839    if (CKEDITOR.env.hidpi)
32840      setIcons(
32841        "about,0,,bold,24,,italic,48,,strike,72,,subscript,96,,superscript,120,,underline,144,,bidiltr,168,,bidirtl,192,,blockquote,216,,copy-rtl,240,,copy,264,,cut-rtl,288,,cut,312,,paste-rtl,336,,paste,360,,bgcolor,384,,textcolor,408,,templates-rtl,432,,templates,456,,copyformatting,480,,creatediv,504,,find-rtl,528,,find,552,,replace,576,,flash,600,,button,624,,checkbox,648,,form,672,,hiddenfield,696,,imagebutton,720,,radio,744,,select-rtl,768,,select,792,,textarea-rtl,816,,textarea,840,,textfield-rtl,864,,textfield,888,,horizontalrule,912,,iframe,936,,image,960,,indent-rtl,984,,indent,1008,,outdent-rtl,1032,,outdent,1056,,smiley,1080,,justifyblock,1104,,justifycenter,1128,,justifyleft,1152,,justifyright,1176,,language,1200,,anchor-rtl,1224,,anchor,1248,,link,1272,,unlink,1296,,bulletedlist-rtl,1320,,bulletedlist,1344,,numberedlist-rtl,1368,,numberedlist,1392,,maximize,1416,,newpage-rtl,1440,,newpage,1464,,pagebreak-rtl,1488,,pagebreak,1512,,pastetext-rtl,1536,,pastetext,1560,,pastefromword-rtl,1584,,pastefromword,1608,,preview-rtl,1632,,preview,1656,,print,1680,,removeformat,1704,,save,1728,,selectall,1752,,showblocks-rtl,1776,,showblocks,1800,,source-rtl,1824,,source,1848,,specialchar,1872,,scayt,1896,,table,1920,,redo-rtl,1944,,redo,1968,,undo-rtl,1992,,undo,2016,,spellchecker,2040,,embed,2064,",
32842        "icons_hidpi.png",
32843      );
32844    else
32845      setIcons(
32846        "about,0,auto,bold,24,auto,italic,48,auto,strike,72,auto,subscript,96,auto,superscript,120,auto,underline,144,auto,bidiltr,168,auto,bidirtl,192,auto,blockquote,216,auto,copy-rtl,240,auto,copy,264,auto,cut-rtl,288,auto,cut,312,auto,paste-rtl,336,auto,paste,360,auto,bgcolor,384,auto,textcolor,408,auto,templates-rtl,432,auto,templates,456,auto,copyformatting,480,auto,creatediv,504,auto,find-rtl,528,auto,find,552,auto,replace,576,auto,flash,600,auto,button,624,auto,checkbox,648,auto,form,672,auto,hiddenfield,696,auto,imagebutton,720,auto,radio,744,auto,select-rtl,768,auto,select,792,auto,textarea-rtl,816,auto,textarea,840,auto,textfield-rtl,864,auto,textfield,888,auto,horizontalrule,912,auto,iframe,936,auto,image,960,auto,indent-rtl,984,auto,indent,1008,auto,outdent-rtl,1032,auto,outdent,1056,auto,smiley,1080,auto,justifyblock,1104,auto,justifycenter,1128,auto,justifyleft,1152,auto,justifyright,1176,auto,language,1200,auto,anch
32846or-rtl,1224,auto,anchor,1248,auto,link,1272,auto,unlink,1296,auto,bulletedlist-rtl,1320,auto,bulletedlist,1344,auto,numberedlist-rtl,1368,auto,numberedlist,1392,auto,maximize,1416,auto,newpage-rtl,1440,auto,newpage,1464,auto,pagebreak-rtl,1488,auto,pagebreak,1512,auto,pastetext-rtl,1536,auto,pastetext,1560,auto,pastefromword-rtl,1584,auto,pastefromword,1608,auto,preview-rtl,1632,auto,preview,1656,auto,print,1680,auto,removeformat,1704,auto,save,1728,auto,selectall,1752,auto,showblocks-rtl,1776,auto,showblocks,1800,auto,source-rtl,1824,auto,source,1848,auto,specialchar,1872,auto,scayt,1896,auto,table,1920,auto,redo-rtl,1944,auto,redo,1968,auto,undo-rtl,1992,auto,undo,2016,auto,spellchecker,2040,auto,embed,2064,auto",
32847        "icons.png",
32848      );
32849  })();
32850  CKEDITOR.lang.languages = { en: 1, ru: 1 };
32851})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.