From 853711dd97e3328efff79a034a5377d52068395c Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 26 Jul 2018 22:43:46 +0200 Subject: [PATCH] Bump v0.14.25 --- dist/grapes.js | 229 +++++++++++++++++++++++++++++++++-------- dist/grapes.min.js | 8 +- dist/grapes.min.js.map | 2 +- package-lock.json | 2 +- package.json | 2 +- 5 files changed, 191 insertions(+), 52 deletions(-) diff --git a/dist/grapes.js b/dist/grapes.js index 6ee6b0f52b..244dbc3a7f 100644 --- a/dist/grapes.js +++ b/dist/grapes.js @@ -22816,6 +22816,8 @@ module.exports = __webpack_require__(/*! backbone */ "./node_modules/backbone/ba "use strict"; +var _underscore = __webpack_require__(/*! underscore */ "./node_modules/underscore/underscore.js"); + module.exports = __webpack_require__(/*! ./AssetView */ "./src/asset_manager/view/AssetView.js").extend({ events: { 'click [data-toggle=asset-remove]': 'onRemove', @@ -22855,7 +22857,7 @@ module.exports = __webpack_require__(/*! ./AssetView */ "./src/asset_manager/vie this.collection.trigger('deselectAll'); this.$el.addClass(this.pfx + 'highlight'); - if (typeof onClick === 'function') { + if ((0, _underscore.isFunction)(onClick)) { onClick(model); } else { this.updateTarget(this.collection.target); @@ -22868,11 +22870,12 @@ module.exports = __webpack_require__(/*! ./AssetView */ "./src/asset_manager/vie * @private * */ onDblClick: function onDblClick() { - var em = this.em; + var em = this.em, + model = this.model; + var onDblClick = this.config.onDblClick; - var model = this.model; - if (typeof onDblClick === 'function') { + if ((0, _underscore.isFunction)(onDblClick)) { onDblClick(model); } else { this.updateTarget(this.collection.target); @@ -22880,9 +22883,7 @@ module.exports = __webpack_require__(/*! ./AssetView */ "./src/asset_manager/vie } var onSelect = this.collection.onSelect; - if (typeof onSelect == 'function') { - onSelect(this.model); - } + (0, _underscore.isFunction)(onSelect) && onSelect(model); }, @@ -25437,25 +25438,8 @@ module.exports = { "use strict"; -/** - * - [addGenerator](#addgenerator) - * - [getGenerator](#getgenerator) - * - [getGenerators](#getgenerators) - * - [addViewer](#addviewer) - * - [getViewer](#getviewer) - * - [getViewers](#getviewers) - * - [updateViewer](#updateviewer) - * - [getCode](#getcode) - * - * - * Before using methods you should get first the module from the editor instance, in this way: - * - * ```js - * var codeManager = editor.CodeManager; - * ``` - * - * @module CodeManager - */ +var _underscore = __webpack_require__(/*! underscore */ "./node_modules/underscore/underscore.js"); + module.exports = function () { var c = {}, defaults = __webpack_require__(/*! ./config/config */ "./src/code_manager/config/config.js"), @@ -25471,6 +25455,8 @@ module.exports = function () { viewers = {}, defViewers = {}; + var defaultViewer = 'CodeMirror'; + return { getConfig: function getConfig() { return c; @@ -25598,6 +25584,20 @@ module.exports = function () { getViewers: function getViewers() { return viewers; }, + createViewer: function createViewer() { + var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var type = !(0, _underscore.isUndefined)(opts.type) ? opts.type : defaultViewer; + var viewer = this.getViewer(type) && this.getViewer(type).clone(); + var cont = document.createElement('div'); + var txtarea = document.createElement('textarea'); + cont.appendChild(txtarea); + viewer.set(opts); + viewer.init(txtarea); + viewer.setElement(cont); + + return viewer; + }, /** @@ -25657,7 +25657,25 @@ module.exports = function () { }return this; } }; -}; +}; /** + * - [addGenerator](#addgenerator) + * - [getGenerator](#getgenerator) + * - [getGenerators](#getgenerators) + * - [addViewer](#addviewer) + * - [getViewer](#getviewer) + * - [getViewers](#getviewers) + * - [updateViewer](#updateviewer) + * - [getCode](#getcode) + * + * + * Before using methods you should get first the module from the editor instance, in this way: + * + * ```js + * var codeManager = editor.CodeManager; + * ``` + * + * @module CodeManager + */ /***/ }), @@ -25701,9 +25719,59 @@ module.exports = _backbone2.default.Model.extend({ lineWrapping: true, mode: this.get('codeName') }, this.attributes)); + this.element = el; + + return this; + }, + getEditor: function getEditor() { + return this.editor; + }, + + + /** + * The element where the viewer is attached + * @return {HTMLElement} + */ + getElement: function getElement() { + return this.element; + }, + + + /** + * Set the element which contains the viewer attached. + * Generally, it should be just a textarea, but some editor might require + * a container for it some in that case this method can be used + * @param {HTMLElement} el + * @return {self} + */ + setElement: function setElement(el) { + this.element = el; + return this; + }, + + + /** + * Refresh the viewer + * @return {self} + */ + refresh: function refresh() { + this.getEditor().refresh(); + return this; + }, + + /** + * Focus the viewer + * @return {self} + */ + focus: function focus() { + this.getEditor().focus(); return this; }, + getContent: function getContent() { + var ed = this.getEditor(); + return ed && ed.getValue(); + }, /** @inheritdoc */ @@ -26140,6 +26208,8 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr * * [add](#add) * * [get](#get) * * [has](#has) + * * [run](#run) + * * [stop](#stop) * * @module Commands */ @@ -26375,6 +26445,46 @@ module.exports = function () { }, + /** + * Execute the command + * @param {String} id Command ID + * @param {Object} [options={}] Options + * @return {*} The return is defined by the command + * @example + * commands.run('myCommand', { someOption: 1 }); + */ + run: function run(id) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var result = void 0; + var command = this.get(id); + var editor = em.get('Editor'); + if (command) result = command.callRun(editor, options); + + return result; + }, + + + /** + * Stop the command + * @param {String} id Command ID + * @param {Object} [options={}] Options + * @return {*} The return is defined by the command + * @example + * commands.stop('myCommand', { someOption: 1 }); + */ + stop: function stop(id) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var result = void 0; + var command = this.get(id); + var editor = em.get('Editor'); + if (command) result = command.callStop(editor, options); + + return result; + }, + + /** * Load default commands * @return {this} @@ -26712,7 +26822,7 @@ module.exports = { run: function run(ed, sender) { var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - if (!ed.Canvas.hasFocus() || ed.getModel().isEditing()) return; + if (ed.getModel().isEditing()) return; var components = opts.component || ed.getSelectedAll(); components = (0, _underscore.isArray)(components) ? [].concat(_toConsumableArray(components)) : [components]; @@ -28329,7 +28439,6 @@ module.exports = { // Adjust tools scroll top if (!this.adjScroll) { this.adjScroll = 1; - this.onFrameScroll(e); this.updateAttached(); } @@ -28724,6 +28833,8 @@ module.exports = { * @param {Object} mod */ updateToolbar: function updateToolbar(mod) { + var _this = this; + var em = this.config.em; var model = mod == em ? em.getSelected() : mod; var toolbarEl = this.canvas.getToolbarEl(); @@ -28756,7 +28867,11 @@ module.exports = { this.toolbar.reset(toolbar); var view = model.view; - view && this.updateToolbarPos(view.el); + toolbarStyle.top = '-100px'; + toolbarStyle.left = 0; + setTimeout(function () { + return view && _this.updateToolbarPos(view.el); + }, 0); } else { toolbarStyle.display = 'none'; } @@ -28772,8 +28887,7 @@ module.exports = { var unit = 'px'; var toolbarEl = this.canvas.getToolbarEl(); var toolbarStyle = toolbarEl.style; - var origDisp = toolbarStyle.display; - toolbarStyle.display = 'block'; + toolbarStyle.opacity = 0; var pos = this.canvas.getTargetToElementDim(toolbarEl, el, { elPos: elPos, event: 'toolbarPosUpdate' @@ -28782,7 +28896,7 @@ module.exports = { var leftPos = pos.left + pos.elementWidth - pos.targetWidth; toolbarStyle.top = pos.top + unit; toolbarStyle.left = (leftPos < 0 ? 0 : leftPos) + unit; - toolbarStyle.display = origDisp; + toolbarStyle.opacity = ''; } }, @@ -28835,7 +28949,6 @@ module.exports = { /** * Update attached elements, eg. component toolbar - * @return {[type]} [description] */ updateAttached: function updateAttached(updated) { var model = this.em.getSelected(); @@ -34151,6 +34264,7 @@ module.exports = _backbone2.default.View.extend({ this.listenTo(model, 'change:script', this.render); this.listenTo(model, 'change:content', this.updateContent); this.listenTo(model, 'change', this.handleChange); + this.listenTo(model, 'active', this.onActive); this.listenTo(classes, 'add remove change', this.updateClasses); $el.data('model', model); $el.data('collection', model.get('components')); @@ -34166,6 +34280,12 @@ module.exports = _backbone2.default.View.extend({ init: function init() {}, + /** + * Callback executed when the `active` event is triggered on component + */ + onActive: function onActive() {}, + + /** * Handle any property change * @private @@ -34667,8 +34787,16 @@ module.exports = Backbone.View.extend({ } }, render: function render() { - var config = this.editor.getConfig(); - this.el.className += ' ' + config.stylePrefix + 'toolbar-item'; + var editor = this.editor, + $el = this.$el, + model = this.model; + + var id = model.get('id'); + var label = model.get('label'); + var pfx = editor.getConfig('stylePrefix'); + $el.addClass(pfx + 'toolbar-item'); + id && $el.addClass(pfx + 'toolbar-item__' + id); + label && $el.append(label); return this; } }); @@ -37373,7 +37501,7 @@ module.exports = function () { plugins: plugins, // Will be replaced on build - version: '0.14.23', + version: '0.14.25', /** * Initializes an editor based on passed options @@ -37748,9 +37876,16 @@ module.exports = function () { /** * Open the modal window + * @param {Object} [opts={}] Options + * @param {String|HTMLElement} [opts.title] Title to set for the modal + * @param {String|HTMLElement} [opts.content] Content to set for the modal * @return {this} */ open: function open() { + var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + opts.title && this.setTitle(opts.title); + opts.content && this.setContent(opts.content); modal.show(); return this; }, @@ -45258,18 +45393,21 @@ module.exports = PropertyView.extend({ * */ openAssetManager: function openAssetManager(e) { var that = this; - var em = this.em; + var em = this.em, + modal = this.modal; + var editor = em ? em.get('Editor') : ''; if (editor) { - this.modal.setTitle('Select image'); - this.modal.setContent(this.am.getContainer()); - this.am.setTarget(null); editor.runCommand('open-assets', { - target: this.model, - onSelect: function onSelect(target) { - that.modal.close(); - that.spreadUrl(target.get('src')); + types: ['image'], + accept: 'image/*', + target: this.getTargetModel(), + onClick: function onClick() {}, + onDblClick: function onDblClick() {}, + onSelect: function onSelect(asset) { + modal.close(); + that.spreadUrl(asset.get('src')); } }); } @@ -47247,6 +47385,7 @@ module.exports = Backbone.View.extend({ var input = $(''); if (value) { + md.set({ value: value }, { silent: true }); input.prop('value', value); } diff --git a/dist/grapes.min.js b/dist/grapes.min.js index 222e24c207..5ae4a1923c 100644 --- a/dist/grapes.min.js +++ b/dist/grapes.min.js @@ -1,6 +1,6 @@ -/*! grapesjs - 0.14.23 */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.grapesjs=e():t.grapesjs=e()}(window,function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=235)}([function(t,e,n){(function(i){var r,o;!function(s){var a="object"==typeof self&&self.self===self&&self||"object"==typeof i&&i.global===i&&i;r=[n(1),n(20),e],void 0===(o=function(t,e,n){a.Backbone=function(t,e,n,i){var r=t.Backbone,o=Array.prototype.slice;e.VERSION="1.3.3",e.$=i,e.noConflict=function(){return t.Backbone=r,this},e.emulateHTTP=!1,e.emulateJSON=!1;var s=function(t,e,i){n.each(e,function(e,r){n[r]&&(t.prototype[r]=function(t,e,i){switch(t){case 1:return function(){return n[e](this[i])};case 2:return function(t){return n[e](this[i],t)};case 3:return function(t,r){return n[e](this[i],a(t,this),r)};case 4:return function(t,r,o){return n[e](this[i],a(t,this),r,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[i]),n[e].apply(n,t)}}}(e,r,i))})},a=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?l(t):n.isString(t)?function(e){return e.get(t)}:t},l=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}},c=e.Events={},u=/\s+/,h=function(t,e,i,r,o){var s,a=0;if(i&&"object"==typeof i){void 0!==r&&"context"in o&&void 0===o.context&&(o.context=r);for(s=n.keys(i);athis.length&&(r=this.length),r<0&&(r+=this.length+1);var o,s,a=[],l=[],c=[],u=[],h={},d=e.add,f=e.merge,p=e.remove,g=!1,v=this.comparator&&null==r&&!1!==e.sort,m=n.isString(this.comparator)?this.comparator:null;for(s=0;s7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(D,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var i=document.body,r=i.insertBefore(this.iframe,i.firstChild).contentWindow;r.document.open(),r.document.close(),r.location.hash="#"+this.fragment}var o=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),L.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),n.some(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0}))},navigate:function(t,e){if(!L.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var n=this.root;""!==t&&"?"!==t.charAt(0)||(n=n.slice(0,-1)||"/");var i=n+t;if(t=this.decodeFragment(t.replace(I,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,i);else{if(!this._wantsHashChange)return this.location.assign(i);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var r=this.iframe.contentWindow;e.replace||(r.document.open(),r.document.close()),this._updateHash(r.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var i=t.href.replace(/(javascript:|#).*$/,"");t.replace(i+"#"+e)}else t.hash="#"+e}}),e.history=new L;y.extend=b.extend=M.extend=k.extend=L.extend=function(t,e){var i,r=this;i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)};return n.extend(i,r,e),i.prototype=n.create(r.prototype,t),i.prototype.constructor=i,i.__super__=r.prototype,i};var F=function(){throw new Error('A "url" property or function must be specified')},R=function(t,e){var n=e.error;e.error=function(i){n&&n.call(e.context,t,i,e),t.trigger("error",t,i,e)}};return e}(a,n,t,e)}.apply(e,r))||(t.exports=o)}()}).call(this,n(11))},function(t,e,n){(function(t,n){var i;!function(){var r="object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t||this||{},o=r._,s=Array.prototype,a=Object.prototype,l="undefined"!=typeof Symbol?Symbol.prototype:null,c=s.push,u=s.slice,h=a.toString,d=a.hasOwnProperty,f=Array.isArray,p=Object.keys,g=Object.create,v=function(){},m=function(t){return t instanceof m?t:this instanceof m?void(this._wrapped=t):new m(t)};void 0===e||e.nodeType?r._=m:(void 0!==n&&!n.nodeType&&n.exports&&(e=n.exports=m),e._=m),m.VERSION="1.9.1";var y,b=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,i,r){return t.call(e,n,i,r)};case 4:return function(n,i,r,o){return t.call(e,n,i,r,o)}}return function(){return t.apply(e,arguments)}},x=function(t,e,n){return m.iteratee!==y?m.iteratee(t,e):null==t?m.identity:m.isFunction(t)?b(t,e,n):m.isObject(t)&&!m.isArray(t)?m.matcher(t):m.property(t)};m.iteratee=y=function(t,e){return x(t,e,1/0)};var w=function(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),i=Array(n),r=0;r=0&&e<=E};m.each=m.forEach=function(t,e,n){var i,r;if(e=b(e,n),A(t))for(i=0,r=t.length;i=3;return function(e,n,i,r){var o=!A(e)&&m.keys(e),s=(o||e).length,a=t>0?0:s-1;for(r||(i=e[o?o[a]:a],a+=t);a>=0&&a=0},m.invoke=w(function(t,e,n){var i,r;return m.isFunction(e)?r=e:m.isArray(e)&&(i=e.slice(0,-1),e=e[e.length-1]),m.map(t,function(t){var o=r;if(!o){if(i&&i.length&&(t=T(t,i)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)})}),m.pluck=function(t,e){return m.map(t,m.property(e))},m.where=function(t,e){return m.filter(t,m.matcher(e))},m.findWhere=function(t,e){return m.find(t,m.matcher(e))},m.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var a=0,l=(t=A(t)?t:m.values(t)).length;ao&&(o=i);else e=x(e,n),m.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},m.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var a=0,l=(t=A(t)?t:m.values(t)).length;ai||void 0===n)return 1;if(n0?0:r-1;o>=0&&o0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;else if(n&&o&&a)return i[o=n(i,r)]===r?o:-1;if(r!=r)return(o=e(u.call(i,s,a),m.isNaN))>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&oe?(i&&(clearTimeout(i),i=null),a=c,s=t.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(l,u)),s};return c.cancel=function(){clearTimeout(i),a=0,i=r=o=null},c},m.debounce=function(t,e,n){var i,r,o=function(e,n){i=null,n&&(r=t.apply(e,n))},s=w(function(s){if(i&&clearTimeout(i),n){var a=!i;i=setTimeout(o,e),a&&(r=t.apply(this,s))}else i=m.delay(o,e,this,s);return r});return s.cancel=function(){clearTimeout(i),i=null},s},m.wrap=function(t,e){return m.partial(e,t)},m.negate=function(t){return function(){return!t.apply(this,arguments)}},m.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,i=t[e].apply(this,arguments);n--;)i=t[n].call(this,i);return i}},m.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},m.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},m.once=m.partial(m.before,2),m.restArguments=w;var F=!{toString:null}.propertyIsEnumerable("toString"),R=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],j=function(t,e){var n=R.length,i=t.constructor,r=m.isFunction(i)&&i.prototype||a,o="constructor";for(S(t,o)&&!m.contains(e,o)&&e.push(o);n--;)(o=R[n])in t&&t[o]!==r[o]&&!m.contains(e,o)&&e.push(o)};m.keys=function(t){if(!m.isObject(t))return[];if(p)return p(t);var e=[];for(var n in t)S(t,n)&&e.push(n);return F&&j(t,e),e},m.allKeys=function(t){if(!m.isObject(t))return[];var e=[];for(var n in t)e.push(n);return F&&j(t,e),e},m.values=function(t){for(var e=m.keys(t),n=e.length,i=Array(n),r=0;r1&&(i=b(i,e[1])),e=m.allKeys(t)):(i=$,e=L(e,!1,!1),t=Object(t));for(var r=0,o=e.length;r1&&(n=e[1])):(e=m.map(L(e,!1,!1),String),i=function(t,n){return!m.contains(e,n)}),m.pick(t,i,n)}),m.defaults=z(m.allKeys,!0),m.create=function(t,e){var n=C(t);return e&&m.extendOwn(n,e),n},m.clone=function(t){return m.isObject(t)?m.isArray(t)?t.slice():m.extend({},t):t},m.tap=function(t,e){return e(t),t},m.isMatch=function(t,e){var n=m.keys(e),i=n.length;if(null==t)return!i;for(var r=Object(t),o=0;o":">",'"':""","'":"'","`":"`"},U=m.invert(W),q=function(t){var e=function(e){return t[e]},n="(?:"+m.keys(t).join("|")+")",i=RegExp(n),r=RegExp(n,"g");return function(t){return t=null==t?"":""+t,i.test(t)?t.replace(r,e):t}};m.escape=q(W),m.unescape=q(U),m.result=function(t,e,n){m.isArray(e)||(e=[e]);var i=e.length;if(!i)return m.isFunction(n)?n.call(t):n;for(var r=0;r/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Y=/(.)^/,G={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},X=/\\|'|\r|\n|\u2028|\u2029/g,J=function(t){return"\\"+G[t]};m.template=function(t,e,n){!e&&n&&(e=n),e=m.defaults({},e,m.templateSettings);var i,r=RegExp([(e.escape||Y).source,(e.interpolate||Y).source,(e.evaluate||Y).source].join("|")+"|$","g"),o=0,s="__p+='";t.replace(r,function(e,n,i,r,a){return s+=t.slice(o,a).replace(X,J),o=a+e.length,n?s+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":i?s+="'+\n((__t=("+i+"))==null?'':__t)+\n'":r&&(s+="';\n"+r+"\n__p+='"),e}),s+="';\n",e.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{i=new Function(e.variable||"obj","_",s)}catch(t){throw t.source=s,t}var a=function(t){return i.call(this,t,m)},l=e.variable||"obj";return a.source="function("+l+"){\n"+s+"}",a},m.chain=function(t){var e=m(t);return e._chain=!0,e};var Z=function(t,e){return t._chain?m(e).chain():e};m.mixin=function(t){return m.each(m.functions(t),function(e){var n=m[e]=t[e];m.prototype[e]=function(){var t=[this._wrapped];return c.apply(t,arguments),Z(this,n.apply(m,t))}}),m},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=s[t];m.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],Z(this,n)}}),m.each(["concat","join","slice"],function(t){var e=s[t];m.prototype[t]=function(){return Z(this,e.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return String(this._wrapped)},void 0===(i=function(){return m}.apply(e,[]))||(n.exports=i)}()}).call(this,n(11),n(231)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getUnitFromValue=e.normalizeFloat=e.shallowDiff=e.getElement=e.camelCase=e.getModel=e.matches=e.upFirst=e.hasDnd=e.off=e.on=void 0;var i=n(1),r=window.Element.prototype,o=r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector,s=function(t){return t[0].toUpperCase()+t.toLowerCase().slice(1)};e.on=function(t,e,n){e=e.split(/\s+/),t=t instanceof Array?t:[t];for(var i=function(i){t.forEach(function(t){return t.addEventListener(e[i],n)})},r=0;r=0?s!==a&&(n[o]=a):n[o]=null}for(var l in e)e.hasOwnProperty(l)&&(0,i.isUndefined)(t[l])&&(n[l]=e[l]);return n},e.normalizeFloat=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=0;if(isNaN(t))return n;if(t=parseFloat(t),Math.floor(t)!==t){var r=e.toString().split(".")[1];i=r?r.length:0}return i?parseFloat(t.toFixed(i)):t},e.getUnitFromValue=function(t){return t.replace(parseFloat(t),"")}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0)),r=n(1);var o=n(57);t.exports=i.default.View.extend({className:function(){return this.getClasses()},tagName:function(){return this.model.get("tagName")},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=t.config||{};this.opts=t,this.config=n,this.em=n.em||"",this.pfx=n.stylePrefix||"",this.ppfx=n.pStylePrefix||"",this.attr=e.get("attributes"),this.classe=this.attr.class||[];var i=this.$el,r=e.get("classes");this.listenTo(e,"change:style",this.updateStyle),this.listenTo(e,"change:attributes",this.updateAttributes),this.listenTo(e,"change:highlightable",this.updateHighlight),this.listenTo(e,"change:status",this.updateStatus),this.listenTo(e,"change:state",this.updateState),this.listenTo(e,"change:script",this.render),this.listenTo(e,"change:content",this.updateContent),this.listenTo(e,"change",this.handleChange),this.listenTo(r,"add remove change",this.updateClasses),i.data("model",e),i.data("collection",e.get("components")),e.view=this,r.length&&this.importClasses(),this.init()},init:function(){},handleChange:function(){var t=this.model;for(var e in t.emitUpdate(),t.changed)t.emitUpdate(e)},importClasses:function(){var t=this.config.em.get("SelectorManager");t&&this.model.get("classes").each(function(e){t.add(e.get("name"))})},updateState:function(t){var e="hc-state";this.model.get("state")?this.$el.addClass(e):this.$el.removeClass(e)},updateStatus:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(this.em,this.el),n=this.model.get("status"),i=this.pfx,r=this.ppfx,o=i+"selected",s=o+"-parent",a=r+"freezed",l=r+"hovered",c=[o,s,a,l];this.$el.removeClass(c.join(" "));var u=e.getAttribute("class")||"",h="";switch(n){case"selected":h=u+" "+o;break;case"selected-parent":h=u+" "+s;break;case"freezed":h=u+" "+a;break;case"freezed-selected":h=u+" "+a+" "+o;break;case"hovered":h=t.avoidHover?"":u+" "+l}(h=h.trim())&&e.setAttribute("class",h)},updateHighlight:function(){var t=this.model.get("highlightable");this.setAttribute("data-highlightable",t?1:"")},updateStyle:function(){var t=this.em,e=this.model;if(t&&t.get("avoidInlineStyle")){this.el.id=e.getId();var n=e.getStyle();!(0,r.isEmpty)(n)&&e.setStyle(n)}else this.setAttribute("style",e.styleToString())},updateClasses:function(){var t=this.model.get("classes").pluck("name").join(" ");this.setAttribute("class",t),this.updateStatus()},setAttribute:function(t,e){var n=this.$el;e?n.attr(t,e):n.removeAttr(t)},getClasses:function(){var t=this.model.get("attributes").class||[];return(t=(0,r.isArray)(t)?t:[t]).length?t.join(" "):null},updateAttributes:function(){var t=this.model,e={"data-gjs-type":t.get("type")||"default"},n=t.get("attributes"),i=t.get("src");for(var r in n)e[r]=n[r];i&&(e.src=i),this.$el.attr(e),this.updateHighlight(),this.updateStyle()},updateContent:function(){this.getChildrenContainer().innerHTML=this.model.get("content")},prevDef:function(t){t.preventDefault()},updateScript:function(){if(this.model.get("script")){var t=this.em;if(t)t.get("Canvas").getCanvasView().updateScript(this)}},getChildrenContainer:function(){var t=this.el;return"function"==typeof this.getChildrenSelector?t=this.el.querySelector(this.getChildrenSelector()):this.getTemplate,t},renderChildren:function(){var t=this.getChildrenContainer(),e=new o({collection:this.model.get("components"),config:this.config,componentTypes:this.opts.componentTypes});e.render(t),this.childrenView=e;for(var n=Array.prototype.slice.call(e.el.childNodes),i=0,r=n.length;i0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.em,s=this.parent(),a=s&&s.attributes;if(a&&a.propagate){var l={},c=a.propagate;c.forEach(function(t){return l[t]=s.get(t)}),l.propagate=c,l=i({},l,e),this.set(l)}var u=this.get("propagate");u&&this.set("propagate",(0,r.isArray)(u)?u:[u]),n&&n.config&&n.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),n.em=o,this.opt=n,this.em=o,this.config=n.config||{},this.ccid=g.createId(this),this.set("attributes",this.get("attributes")||{}),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:traits",this.traitsUpdated),this.listenTo(this,"change:tagName",this.tagUpdated),this.listenTo(this,"change:attributes",this.attrUpdated),this.initClasses(),this.loadTraits(),this.initComponents(),this.initToolbar(),this.set("status",""),["classes","traits"].forEach(function(e){return t.listenTo(t.get(e),"add remove change",function(){return t.emitUpdate(e)})}),this.init()},is:function(t){return!(this.get("type")!=t)},find:function(t){var e=[];return this.view.$el.find(t).each(function(t,n,i){var r=i.eq(n).data("model");r&&e.push(r)}),e},closest:function(t){var e=this.view.$el.closest(t);return e.length&&e.data("model")},tagUpdated:function(){var t=this.collection,e=t.indexOf(this);t.remove(this),t.add(this,{at:e})},replaceWith:function(t){var e=this.collection,n=e.indexOf(this);return e.remove(this),e.add(t,{at:n})},attrUpdated:function(){var t=this,e=i({},this.previous("attributes")),n=i({},this.get("attributes")),s=(0,o.shallowDiff)(e,n);(0,r.keys)(s).forEach(function(e){return t.trigger("change:attributes:"+e)})},setAttributes:function(t){var e=(t=i({},t)).class;e&&this.setClass(e),delete t.class;var n=t.style;n&&this.setStyle(n),delete t.style,this.set("attributes",t)},addAttributes:function(t){var e=i({},this.getAttributes(),t);this.setAttributes(e)},getStyle:function(){var t=this.em;if(t&&t.getConfig("avoidInlineStyle")){var e=this.get("state"),n=t.get("CssComposer").getIdRule(this.getId(),{state:e});if(this.rule=n,n)return n.getStyle()}return s.default.getStyle.call(this)},setStyle:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=this.em;if(a&&a.getConfig("avoidInlineStyle")){e=(0,r.isString)(e)?this.parseStyle(e):e,e=i({},e,this.get("style"));var l=this.get("state"),c=a.get("CssComposer"),u=this.getStyle();this.rule=c.setIdRule(this.getId(),e,i({},n,{state:l}));var h=(0,o.shallowDiff)(u,e);this.set("style",{},{silent:1}),(0,r.keys)(h).forEach(function(e){return t.trigger("change:style:"+e)})}else e=s.default.setStyle.apply(this,arguments);return e},getAttributes:function(){var t=this.em,e=[],n=i({},this.get("attributes")),o=t&&t.get("SelectorManager"),s=this.getId();if(this.get("classes").each(function(t){return e.push(t.get("name"))}),e.length&&(n.class=e.join(" ")),!(0,r.has)(n,"id")){var a=void 0;!function(t){return t&&t.getConfig("avoidInlineStyle")}(t)?(0,r.isEmpty)(this.getStyle())||(a=1):a=o&&o.get(s,o.Selector.TYPE_ID),a&&(n.id=this.getId())}return n},addClass:function(t){var e=this.em.get("SelectorManager").addClass(t);return this.get("classes").add(e)},setClass:function(t){return this.get("classes").reset(),this.addClass(t)},removeClass:function(t){var e=[];t=(0,r.isArray)(t)?t:[t];var n=this.get("classes"),i=c.TYPE_CLASS;return t.forEach(function(t){t.split(" ").forEach(function(t){var r=n.where({name:t,type:i})[0];r&&e.push(n.remove(r))})}),e},initClasses:function(){var t=this.normalizeClasses(this.get("classes")||[]);return this.set("classes",new u(t)),this},initComponents:function(){var t=new l(null,this.opt);return t.parent=this,!this.opt.avoidChildren&&t.reset(this.get("components")),this.set("components",t),this},init:function(){},append:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.components().add(t,e);return(0,r.isArray)(n)?n:[n]},components:function(t){var e=this.get("components");if((0,r.isUndefined)(t))return e;e.reset(),t&&this.append(t)},parent:function(){var t=this.collection;return t&&t.parent},scriptUpdated:function(){this.set("scriptUpdated",1)},traitsUpdated:function(){var t=0,e=i({},this.get("attributes")),n=this.get("traits");n instanceof h?(n.each(function(n){if(t=1,!n.get("changeProp")){var i=n.get("name"),r=n.getInitValue();i&&r&&(e[i]=r)}}),t&&this.set("attributes",e)):this.loadTraits()},initToolbar:function(){if(!this.get("toolbar")){var t=[];this.collection&&t.push({attributes:{class:"fa fa-arrow-up"},command:"select-parent"}),this.get("draggable")&&t.push({attributes:{class:"fa fa-arrows",draggable:!0},command:"tlb-move"}),this.get("copyable")&&t.push({attributes:{class:"fa fa-clone"},command:"tlb-clone"}),this.get("removable")&&t.push({attributes:{class:"fa fa-trash-o"},command:"tlb-delete"}),this.set("toolbar",t)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new h([],this.opt);return n.setTarget(this),(t=t||this.get("traits")).length&&n.add(t),this.set("traits",n,e),this},normalizeClasses:function(t){var e=[],n=this.em;if(n){var i=n.get("SelectorManager");if(i)return t.forEach(function(t){var n="";n="string"==typeof t?t:t.name;var r=i.add(n);e.push(r)}),e}},clone:function(){var t=this.em,e=this.getStyle(),n=i({},this.attributes),o=i({},this.opt);return n.attributes=i({},n.attributes),delete n.attributes.id,n.components=[],n.classes=[],n.traits=[],this.get("components").each(function(t,e){n.components[e]=t.clone()}),this.get("traits").each(function(t,e){n.traits[e]=t.clone()}),this.get("classes").each(function(t,e){n.classes[e]=t.get("name")}),n.status="",n.view="",o.collection=null,t&&t.getConfig("avoidInlineStyle")&&!(0,r.isEmpty)(e)&&(n.style=e),new this.constructor(n,o)},getName:function(){var t=this.get("name")||this.get("custom-name"),e=this.get("tagName");e="div"==e?"box":e;var n=this.get("type")||e;return n=n.charAt(0).toUpperCase()+n.slice(1),t||n},getIcon:function(){var t=this.get("icon");return t?t+" ":""},toHTML:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=this.get("tagName"),i=this.get("void"),o=t.attributes,s=this.getAttrToHTML();for(var a in o&&((0,r.isFunction)(o)?s=o(this,s)||{}:(0,r.isObject)(o)&&(s=o)),s){var l=s[a],c=(0,r.isString)(l)?l.replace(/"/g,"""):l;(0,r.isUndefined)(c)||((0,r.isBoolean)(c)?c&&e.push(a):e.push(a+'="'+c+'"'))}var u="<"+n+(e.length?" "+e.join(" "):"")+(i?"/":"")+">"+this.get("content");return this.get("components").each(function(e){return u+=e.toHTML(t)}),!i&&(u+=""),u},getAttrToHTML:function(){var t=this.getAttributes();return delete t.style,t},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;n0&&void 0!==arguments[0]&&arguments[0];var t=this.em,e=this.getId();if(e){var n=g.createId(this);this.setId(n);var i=t&&t.get("CssComposer").getIdRule(e),r=i&&i.get("selectors").at(0);return r&&r.set("name",n),this}}},{isComponent:function(t){return{tagName:t.tagName?t.tagName.toLowerCase():""}},createId:function(t){var e=(++f).toString().length+2,n="i"+(Math.random()+1.1).toString(36).slice(-e);return d[n]=t,n},getList:function(){return d}});t.exports=g},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0)),r=n(1),o=n(2);t.exports=i.default.View.extend({template:function(t){return'\n
\n '+this.templateLabel(t)+'\n
\n
\n '+this.templateInput(t)+"\n
\n "},templateLabel:function(t){var e=this.pfx;return'\n \n '+t.get("name")+'\n \n \n '},templateInput:function(t){return'\n
\n \n
\n '},events:function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({change:"inputValueChanged"},"click [data-clear-style]","clear"),initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.bindAll)(this,"targetUpdated"),this.config=t.config||{};var e=this.config.em;this.em=e,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange,this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{};var n=this.model;this.property=n.get("property"),this.input=null;var i=this.pfx;this.inputHolderId="#"+i+"input-holder",this.sector=n.collection&&n.collection.sector,n.view=this,n.get("value")||n.set("value",n.getDefaultValue()),e&&e.on("update:component:style:"+this.property,this.targetUpdated),this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(n,"destroy remove",this.remove),this.listenTo(n,"change:value",this.modelValueChanged),this.listenTo(n,"targetUpdated",this.targetUpdated),this.listenTo(n,"change:visible",this.updateVisibility),this.listenTo(n,"change:status",this.updateStatus);var o=this.init&&this.init.bind(this);o&&o()},updateStatus:function(){var t=this.model.get("status"),e=this.pfx,n=this.ppfx,i=this.config,r=n+"four-color",o=n+"color-warn",s=this.$el.children("."+e+"label"),a=this.getClearEl().style;switch(s.removeClass(r+" "+o),a.display="none",t){case"updated":s.addClass(r),i.clearProperties&&(a.display="inline");break;case"computed":s.addClass(o)}},clear:function(t){t&&t.stopPropagation(),this.model.clearValue(),this.targetUpdated()},getClearEl:function(){return this.clearEl||(this.clearEl=this.el.querySelector("[data-clear-style]")),this.clearEl},getTarget:function(){return this.getTargetModel()},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},inputValueChanged:function(t){t&&t.stopPropagation(),this.model.setValue(this.getInputValue(),1,{fromInput:1}),this.elementUpdated()},elementUpdated:function(){this.setStatus("updated")},setStatus:function(t){this.model.set("status",t);var e=this.model.parent;e&&e.set("status",t)},targetUpdated:function(){if(this.checkVisibility()){var t=this.config,e=t.em,n=this.model,i="",r="",o=this.getTargetValue({ignoreDefault:1}),s=n.getDefaultValue(),a=this.getComputedValue();o?(i=o,t.highlightChanged&&(r="updated")):a&&t.showComputed&&a!=s?(i=a,t.highlightComputed&&(r="computed")):(i=s,r=""),n.setValue(i,0,{fromTarget:1}),this.setStatus(r),e&&(e.trigger("styleManager:change",this),e.trigger("styleManager:change:"+n.get("property"),this))}},checkVisibility:function(){var t=1;return this.config.hideNotStylable&&(this.isTargetStylable()&&this.isComponentStylable()?this.show():(this.hide(),t=0),this.sector&&this.sector.trigger("updateVisibility")),t},getTargetValue:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.model,i=this.getTargetModel(),r=this.customValue;if(!i)return t;if((t=i.getStyle()[n.get("property")])||e.ignoreDefault||(t=n.getDefaultValue()),"function"==typeof r&&!e.ignoreCustomValue){var o=r(this,n.collection.indexOf(n));o&&(t=o)}return t},getComputedValue:function(){var t=this.propTarget,e=t.computed||{},n=t.computedDefault||{},i=this.config.avoidComputed||[],r=this.model.get("property"),s=i.indexOf(r)<0,a=e[r],l=n[(0,o.camelCase)(r)];return e&&s&&l!==a&&a},getInputValue:function(){var t=this.getInputEl();return t?t.value:""},modelValueChanged:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.config.em,r=this.model,o=r.getFullValue(),s=this.getTarget(),a=this.onChange;n.fromInput||this.setValue(o),s&&this.isTargetStylable()&&this.isComponentStylable()&&(n.fromTarget||(a&&!n.fromParent?a(s,this,n):this.updateTargetStyle(o,null,n)),i&&(i.trigger("component:update",s),i.trigger("component:styleUpdate",s),i.trigger("component:styleUpdate:"+r.get("property"),s)))},updateTargetStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e||this.model.get("property"),r=this.getTarget(),o=r.getStyle();t?o[i]=t:delete o[i],r.setStyle(o,n);var s=this.getHelperModel();s&&s.setStyle(o,n)},isTargetStylable:function(t){var e=t||this.getTarget(),n=this.model,i=n.get("property"),o=n.get("toRequire"),s=e.get("unstylable"),a=e.get("stylable-require"),l=e.get("stylable");return(0,r.isArray)(l)&&(l=l.indexOf(i)>=0),(0,r.isArray)(s)&&(l=s.indexOf(i)<0),o&&(l=a&&a.indexOf(i)>=0||!t),l},isComponentStylable:function(){var t=this.em,e=t&&t.getSelected();return!e||this.isTargetStylable(e)},setRawValue:function(t){this.setValue(this.model.parseValue(t))},setValue:function(t){var e=this.model,n=(0,r.isUndefined)(t)?e.getDefaultValue():t,i=this.getInputEl();i&&(i.value=n)},getInputEl:function(){return this.input||(this.input=this.el.querySelector("input")),this.input},updateVisibility:function(){this.el.style.display=this.model.get("visible")?"block":"none"},show:function(){this.model.set("visible",1)},hide:function(){this.model.set("visible",0)},cleanValue:function(){this.setValue("")},render:function(){var t=this.pfx,e=this.model,n=this.el;n.innerHTML=this.template(e),n.className=t+"property "+t+e.get("type"),this.updateStatus();var i=this.onRender&&this.onRender.bind(this);i&&i(),this.setValue(e.get("value"),{targetUpdate:1})}})},function(t,e,n){t.exports=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),i=/MSIE \d/.test(t),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),s=i||r||o,a=s&&(i?document.documentMode||6:+(o||r)[1]),l=!o&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!o&&/Chrome\//.test(t),h=/Opera\//.test(t),d=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),p=/PhantomJS/.test(t),g=!o&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),v=/Android/.test(t),m=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),y=g||/Mac/.test(e),b=/\bCrOS\b/.test(t),x=/win/i.test(e),w=h&&t.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(h=!1,l=!0);var C=y&&(c||h&&(null==w||w<12.11)),k=n||s&&a>=9;function S(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var T,E=function(t,e){var n=t.className,i=S(e).exec(n);if(i){var r=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(r?i[1]+r:"")}};function M(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function A(t,e){return M(t).appendChild(e)}function O(t,e,n,i){var r=document.createElement(t);if(n&&(r.className=n),i&&(r.style.cssText=i),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var o=0;o=e)return s+(e-o);s+=a-o,s+=n-s%n,o=a+1}}g?I=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:s&&(I=function(t){try{t.select()}catch(t){}});var z=function(){this.id=null};function V(t,e){for(var n=0;n=e)return i+Math.min(s,e-r);if(r+=o-i,i=o+1,(r+=n-r%n)>=e)return i}}var K=[""];function Y(t){for(;K.length<=t;)K.push(G(K)+" ");return K[t]}function G(t){return t[t.length-1]}function X(t,e){for(var n=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||Q.test(t))}function et(t,e){return e?!!(e.source.indexOf("\\w")>-1&&tt(t))||e.test(t):tt(t)}function nt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var it=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function rt(t){return t.charCodeAt(0)>=768&&it.test(t)}function ot(t,e,n){for(;(n<0?e>0:en?-1:1;;){if(e==n)return e;var r=(e+n)/2,o=i<0?Math.ceil(r):Math.floor(r);if(o==e)return t(o)?e:n;t(o)?n=o:e=o+i}}function at(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(e=t.first&&en?gt(n,at(t,n).text.length):function(t,e){var n=t.ch;return null==n||n>e?gt(t.line,e):n<0?gt(t.line,0):t}(e,at(t,e.line).text.length)}function kt(t,e){for(var n=[],i=0;i=e:o.to>e);(i||(i=[])).push(new Et(s,o.from,l?null:o.to))}}return i}(n,r,s),l=function(t,e,n){var i;if(t)for(var r=0;r=e:o.to>e);if(a||o.from==e&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(s.inclusiveLeft?o.from<=e:o.from0&&a)for(var x=0;xe)&&(!n||It(n,o.marker)<0)&&(n=o.marker)}return n}function Vt(t,e,n,i,r){var o=at(t,e),s=Tt&&o.markedSpans;if(s)for(var a=0;a=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?vt(c.to,n)>=0:vt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?vt(c.from,i)<=0:vt(c.from,i)<0)))return!0}}}function Ht(t){for(var e;e=Rt(t);)t=e.find(-1,!0).line;return t}function $t(t,e){var n=at(t,e),i=Ht(n);return n==i?e:ht(i)}function Bt(t,e){if(e>t.lastLine())return e;var n,i=at(t,e);if(!Wt(t,i))return e;for(;n=jt(i);)i=n.find(1,!0).line;return ht(i)+1}function Wt(t,e){var n=Tt&&e.markedSpans;if(n)for(var i=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}var Gt=null;function Xt(t,e,n){var i;Gt=null;for(var r=0;re)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:Gt=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:Gt=r)}return null!=i?i:Gt}var Jt=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?t.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?e.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,o=/[LRr]/,s=/[Lb1n]/,a=/[1n]/;function l(t,e,n){this.level=t,this.from=e,this.to=n}return function(t,e){var c="ltr"==e?"L":"R";if(0==t.length||"ltr"==e&&!i.test(t))return!1;for(var u=t.length,h=[],d=0;d-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function ie(t,e){var n=ee(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r0}function ae(t){t.prototype.on=function(t,e){te(this,t,e)},t.prototype.off=function(t,e){ne(this,t,e)}}function le(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function ce(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function ue(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function he(t){le(t),ce(t)}function de(t){return t.target||t.srcElement}function fe(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),y&&t.ctrlKey&&1==e&&(e=3),e}var pe,ge,ve=function(){if(s&&a<9)return!1;var t=O("div");return"draggable"in t||"dragDrop"in t}();function me(t){if(null==pe){var e=O("span","​");A(t,O("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(pe=e.offsetWidth<=1&&e.offsetHeight>2&&!(s&&a<8))}var n=pe?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function ye(t){if(null!=ge)return ge;var e=A(t,document.createTextNode("AخA")),n=T(e,0,1).getBoundingClientRect(),i=T(e,1,2).getBoundingClientRect();return M(t),!(!n||n.left==n.right)&&(ge=i.right-n.right<3)}var be=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],i=t.length;e<=i;){var r=t.indexOf("\n",e);-1==r&&(r=t.length);var o=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),s=o.indexOf("\r");-1!=s?(n.push(o.slice(0,s)),e+=s+1):(n.push(o),e=r+1)}return n}:function(t){return t.split(/\r\n?|\n/)},xe=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},we=function(){var t=O("div");return"oncopy"in t||(t.setAttribute("oncopy","return;"),"function"==typeof t.oncopy)}(),Ce=null,ke={},Se={};function Te(t){if("string"==typeof t&&Se.hasOwnProperty(t))t=Se[t];else if(t&&"string"==typeof t.name&&Se.hasOwnProperty(t.name)){var e=Se[t.name];"string"==typeof e&&(e={name:e}),(t=Z(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Te("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Te("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Ee(t,e){e=Te(e);var n=ke[e.name];if(!n)return Ee(t,"text/plain");var i=n(t,e);if(Me.hasOwnProperty(e.name)){var r=Me[e.name];for(var o in r)r.hasOwnProperty(o)&&(i.hasOwnProperty(o)&&(i["_"+o]=i[o]),i[o]=r[o])}if(i.name=e.name,e.helperType&&(i.helperType=e.helperType),e.modeProps)for(var s in e.modeProps)i[s]=e.modeProps[s];return i}var Me={};function Ae(t,e){var n=Me.hasOwnProperty(t)?Me[t]:Me[t]={};R(e,n)}function Oe(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var i in e){var r=e[i];r instanceof Array&&(r=r.concat([])),n[i]=r}return n}function Pe(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function _e(t,e,n){return!t.startState||t.startState(e,n)}var Le=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Le.prototype.eol=function(){return this.pos>=this.string.length},Le.prototype.sol=function(){return this.pos==this.lineStart},Le.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Le.prototype.next=function(){if(this.pose},Le.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Le.prototype.skipToEnd=function(){this.pos=this.string.length},Le.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Le.prototype.backUp=function(t){this.pos-=t},Le.prototype.column=function(){return this.lastColumnPos0?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}var r=function(t){return n?t.toLowerCase():t},o=this.string.substr(this.pos,t.length);if(r(o)==r(t))return!1!==e&&(this.pos+=t.length),!0},Le.prototype.current=function(){return this.string.slice(this.start,this.pos)},Le.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Le.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Le.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var Ne=function(t,e){this.state=t,this.lookAhead=e},De=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};function Ie(t,e,n,i){var r=[t.state.modeGen],o={};We(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},o,i);for(var s=n.state,a=function(i){n.baseTokens=r;var a=t.state.overlays[i],l=1,c=0;n.state=!0,We(t,e.text,a.mode,n,function(t,e){for(var n=l;ct&&r.splice(l,1,t,r[l+1],i),l+=2,c=Math.min(t,i)}if(e)if(a.opaque)r.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;nt.options.maxHighlightLength&&Oe(t.doc.mode,i.state),o=Ie(t,e,i);r&&(i.state=r),e.stateAfter=i.save(!r),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function Re(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new De(i,!0,e);var o=function(t,e,n){for(var i,r,o=t.doc,s=n?-1:e-(t.doc.mode.innerMode?1e3:100),a=e;a>s;--a){if(a<=o.first)return o.first;var l=at(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof Ne?c.lookAhead:0)<=o.modeFrontier))return a;var u=j(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=a-1,i=u)}return r}(t,e,n),s=o>i.first&&at(i,o-1).stateAfter,a=s?De.fromSaved(i,s,o):new De(i,_e(i.mode),o);return i.iter(o,e,function(n){je(t,n.text,a);var i=a.line;n.stateAfter=i==e-1||i%5==0||i>=r.viewFrom&&ie.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}De.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},De.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},De.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},De.fromSaved=function(t,e,n){return e instanceof Ne?new De(t,Oe(t.mode,e.state),n,e.lookAhead):new De(t,Oe(t.mode,e),n)},De.prototype.save=function(t){var e=!1!==t?Oe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ne(e,this.maxLookAhead):e};var He=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function $e(t,e,n,i){var r,o=t.doc,s=o.mode;e=Ct(o,e);var a,l=at(o,e.line),c=Re(t,e.line,n),u=new Le(l.text,t.options.tabSize,c);for(i&&(a=[]);(i||u.post.options.maxHighlightLength?(a=!1,s&&je(t,e,i,h.pos),h.pos=e.length,l=null):l=Be(Ve(n,h,i.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;c1&&!/ /.test(t))return t;for(var n=e,i="",r=0;rc&&h.from<=c);d++);if(h.to>=u)return t(n,i,r,o,s,a,l);t(n,i.slice(0,h.to-c),r,o,null,a,l),o=null,i=i.slice(h.to-c),c=h.to}}}function tn(t,e,n,i){var r=!i&&n.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!i&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function en(t,e,n){var i=t.markedSpans,r=t.text,o=0;if(i)for(var s,a,l,c,u,h,d,f=r.length,p=0,g=1,v="",m=0;;){if(m==p){l=c=u=h=a="",d=null,m=1/0;for(var y=[],b=void 0,x=0;xp||C.collapsed&&w.to==p&&w.from==p)?(null!=w.to&&w.to!=p&&m>w.to&&(m=w.to,c=""),C.className&&(l+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&w.from==p&&(u+=" "+C.startStyle),C.endStyle&&w.to==m&&(b||(b=[])).push(C.endStyle,w.to),C.title&&!h&&(h=C.title),C.collapsed&&(!d||It(d.marker,C)<0)&&(d=w)):w.from>p&&m>w.from&&(m=w.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,m);;){if(v){var E=p+v.length;if(!d){var M=E>T?v.slice(0,T-p):v;e.addToken(e,M,s?s+l:l,u,p+M.length==m?c:"",h,a)}if(E>=T){v=v.slice(T-p),p=T;break}p=E,u=""}v=r.slice(o,o=n[g++]),s=Ge(n[g++],e.cm.options)}}else for(var A=1;An)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function On(t,e,n,i){return Ln(t,_n(t,e),n,i)}function Pn(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&e2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(t,e.view,e.rect),e.hasHeights=!0),(o=function(t,e,n,i){var r,o=In(e.map,n,i),l=o.node,c=o.start,u=o.end,h=o.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&rt(e.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u1}(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*i,bottom:e.bottom*i}}(t.display.measure,r))}else{var f;c>0&&(h=i="right"),r=t.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==i?f.length-1:0]:l.getBoundingClientRect()}if(s&&a<9&&!c&&(!r||!r.left&&!r.right)){var p=l.parentNode.getClientRects()[0];r=p?{left:p.left,right:p.left+ei(t.display),top:p.top,bottom:p.bottom}:Dn}for(var g=r.top-e.rect.top,v=r.bottom-e.rect.top,m=(g+v)/2,y=e.view.measure.heights,b=0;be)&&(r=(o=l-a)-1,e>=l&&(s="right")),null!=r){if(i=t[c+2],a==l&&n==(i.insertLeft?"left":"right")&&(s=n),"left"==n&&0==r)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)i=t[2+(c-=3)],s="left";if("right"==n&&r==l-a)for(;c=0&&(n=t[r]).left==n.right;r--);return n}function Rn(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e=i.text.length?(l=i.text.length,c="before"):l<=0&&(l=0,c="after"),!a)return s("before"==c?l-1:l,"before"==c);function u(t,e,n){var i=a[e],r=1==i.level;return s(n?t-1:t,r!=n)}var h=Xt(a,l,c),d=Gt,f=u(l,h,"before"==c);return null!=d&&(f.other=u(l,d,"before"!=c)),f}function Kn(t,e){var n=0;e=Ct(t.doc,e),t.options.lineWrapping||(n=ei(t.display)*e.ch);var i=at(t.doc,e.line),r=qt(i)+Cn(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function Yn(t,e,n,i,r){var o=gt(t,e,n);return o.xRel=r,i&&(o.outside=!0),o}function Gn(t,e,n){var i=t.doc;if((n+=t.display.viewOffset)<0)return Yn(i.first,0,null,!0,-1);var r=dt(i,n),o=i.first+i.size-1;if(r>o)return Yn(i.first+i.size-1,at(i,o).text.length,null,!0,1);e<0&&(e=0);for(var s=at(i,r);;){var a=Qn(t,s,r,e,n),l=zt(s,a.ch+(a.xRel>0?1:0));if(!l)return a;var c=l.find(1);if(c.line==r)return c;s=at(i,r=c.line)}}function Xn(t,e,n,i){i-=$n(e);var r=e.text.length,o=st(function(e){return Ln(t,n,e-1).bottom<=i},r,0);return r=st(function(e){return Ln(t,n,e).top>i},o,r),{begin:o,end:r}}function Jn(t,e,n,i){n||(n=_n(t,e));var r=Bn(t,e,Ln(t,n,i),"line").top;return Xn(t,e,n,r)}function Zn(t,e,n,i){return!(t.bottom<=n)&&(t.top>n||(i?t.left:t.right)>e)}function Qn(t,e,n,i,r){r-=qt(e);var o=_n(t,e),s=$n(e),a=0,l=e.text.length,c=!0,u=Zt(e,t.doc.direction);if(u){var h=(t.options.lineWrapping?function(t,e,n,i,r,o,s){var a=Xn(t,e,i,s),l=a.begin,c=a.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d=c||f.to<=l)){var p=1!=f.level,g=Ln(t,i,p?Math.min(c,f.to)-1:Math.max(l,f.from)).right,v=gv)&&(u=f,h=v)}}return u||(u=r[r.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}:function(t,e,n,i,r,o,s){var a=st(function(a){var l=r[a],c=1!=l.level;return Zn(qn(t,gt(n,c?l.to:l.from,c?"before":"after"),"line",e,i),o,s,!0)},0,r.length-1),l=r[a];if(a>0){var c=1!=l.level,u=qn(t,gt(n,c?l.from:l.to,c?"after":"before"),"line",e,i);Zn(u,o,s,!0)&&u.top>s&&(l=r[a-1])}return l})(t,e,n,o,u,i,r);c=1!=h.level,a=c?h.from:h.to-1,l=c?h.to:h.from-1}var d,f,p=null,g=null,v=st(function(e){var n=Ln(t,o,e);return n.top+=s,n.bottom+=s,!!Zn(n,i,r,!1)&&(n.top<=r&&n.left<=i&&(p=e,g=n),!0)},a,l),m=!1;if(g){var y=i-g.left=x.bottom}return v=ot(e.text,v,1),Yn(n,v,f,m,i-d)}function ti(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Nn){Nn=O("pre");for(var e=0;e<49;++e)Nn.appendChild(document.createTextNode("x")),Nn.appendChild(O("br"));Nn.appendChild(document.createTextNode("x"))}A(t.measure,Nn);var n=Nn.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),M(t.measure),n||1}function ei(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=O("span","xxxxxxxxxx"),n=O("pre",[e]);A(t.measure,n);var i=e.getBoundingClientRect(),r=(i.right-i.left)/10;return r>2&&(t.cachedCharWidth=r),r||10}function ni(t){for(var e=t.display,n={},i={},r=e.gutters.clientLeft,o=e.gutters.firstChild,s=0;o;o=o.nextSibling,++s)n[t.options.gutters[s]]=o.offsetLeft+o.clientLeft+r,i[t.options.gutters[s]]=o.clientWidth;return{fixedPos:ii(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function ii(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function ri(t){var e=ti(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/ei(t.display)-3);return function(r){if(Wt(t.doc,r))return 0;var o=0;if(r.widgets)for(var s=0;s=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,i=0;i=t.display.viewTo||a.to().linee||e==n&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr",o),r=!0)}r||i(e,n,"ltr")}(g,n||0,null==i?d:i,function(t,e,r,h){var v="ltr"==r,m=f(t,v?"left":"right"),y=f(e-1,v?"right":"left"),b=null==n&&0==t,x=null==i&&e==d,w=0==h,C=!g||h==g.length-1;if(y.top-m.top<=3){var k=(c?b:x)&&w,S=(c?x:b)&&C,T=k?a:(v?m:y).left,E=S?l:(v?y:m).right;u(T,m.top,E-T,m.bottom)}else{var M,A,O,P;v?(M=c&&b&&w?a:m.left,A=c?l:p(t,r,"before"),O=c?a:p(e,r,"after"),P=c&&x&&C?l:y.right):(M=c?p(t,r,"before"):a,A=!c&&b&&w?l:m.right,O=!c&&x&&C?a:y.left,P=c?p(e,r,"after"):l),u(M,m.top,A-M,m.bottom),m.bottom0?e.blinker=setInterval(function(){return e.cursorDiv.style.visibility=(n=!n)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function pi(t){t.state.focused||(t.display.input.focus(),vi(t))}function gi(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,mi(t))},100)}function vi(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(ie(t,"focus",t,e),t.state.focused=!0,N(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),fi(t))}function mi(t,e){t.state.delayingBlurEvent||(t.state.focused&&(ie(t,"blur",t,e),t.state.focused=!1,E(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function yi(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i.005||u<-.005)&&(ut(r.line,o),bi(r.line),r.rest))for(var h=0;h=s&&(o=dt(e,qt(at(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function wi(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=ii(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",s=0;so&&(e.bottom=e.top+o);var a=t.doc.height+kn(n),l=e.topa-i;if(e.topr+o){var u=Math.min(e.top,(c?a:e.bottom)-o);u!=r&&(s.scrollTop=u)}var h=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft,d=En(t)-(t.options.fixedGutter?n.gutters.offsetWidth:0),f=e.right-e.left>d;return f&&(e.right=e.left+d),e.left<10?s.scrollLeft=0:e.leftd+h-3&&(s.scrollLeft=e.right+(f?0:10)-d),s}function Si(t,e){null!=e&&(Mi(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Ti(t){Mi(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Ei(t,e,n){null==e&&null==n||Mi(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Mi(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var n=Kn(t,e.from),i=Kn(t,e.to);Ai(t,n,i,e.margin)}}function Ai(t,e,n,i){var r=ki(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-i,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+i});Ei(t,r.scrollLeft,r.scrollTop)}function Oi(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||ar(t,{top:e}),Pi(t,e,!0),n&&ar(t),nr(t,100))}function Pi(t,e,n){e=Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function _i(t,e,n,i){e=Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!i||(t.doc.scrollLeft=e,wi(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Li(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+kn(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+Tn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var Ni=function(t,e,n){this.cm=n;var i=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=r.tabIndex=-1,t(i),t(r),te(i,"scroll",function(){i.clientHeight&&e(i.scrollTop,"vertical")}),te(r,"scroll",function(){r.clientWidth&&e(r.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,s&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ni.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,i=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?i+"px":"0";var r=t.viewHeight-(e?i:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?i:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:e?i:0}},Ni.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ni.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ni.prototype.zeroWidthHack=function(){var t=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new z,this.disableVert=new z},Ni.prototype.enableZeroWidthBar=function(t,e,n){t.style.pointerEvents="auto",e.set(1e3,function i(){var r=t.getBoundingClientRect(),o="vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1);o!=t?t.style.pointerEvents="none":e.set(1e3,i)})},Ni.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Di=function(){};function Ii(t,e){e||(e=Li(t));var n=t.display.barWidth,i=t.display.barHeight;Fi(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&yi(t),Fi(t,Li(t)),n=t.display.barWidth,i=t.display.barHeight}function Fi(t,e){var n=t.display,i=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}Di.prototype.update=function(){return{bottom:0,right:0}},Di.prototype.setScrollLeft=function(){},Di.prototype.setScrollTop=function(){},Di.prototype.clear=function(){};var Ri={native:Ni,null:Di};function ji(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&E(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Ri[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),te(e,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?_i(t,e):Oi(t,e)},t),t.display.scrollbars.addClass&&N(t.display.wrapper,t.display.scrollbars.addClass)}var zi=0;function Vi(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++zi},function(t){on?on.ops.push(t):t.ownsGroup=on={ops:[t],delayedCallbacks:[]}}(t.curOp)}function Hi(t){var e=t.curOp;!function(t,e){var n=t.ownsGroup;if(n)try{!function(t){var e=t.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new rr(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Bi(t){t.updatedDisplay=t.mustUpdate&&or(t.cm,t.update)}function Wi(t){var e=t.cm,n=e.display;t.updatedDisplay&&yi(e),t.barMeasure=Li(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=On(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Tn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-En(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Ui(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft1&&(s=!0)),null!=c.scrollLeft&&(_i(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return r}(e,Ct(i,t.scrollToPos.from),Ct(i,t.scrollToPos.to),t.scrollToPos.margin);!function(t,e){if(!re(t,"scrollCursorIntoView")){var n=t.display,i=n.sizer.getBoundingClientRect(),r=null;if(e.top+i.top<0?r=!0:e.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!p){var o=O("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-Cn(t.display))+"px;\n height: "+(e.bottom-e.top+Tn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(r),t.display.lineSpace.removeChild(o)}}}(e,r)}var o=t.maybeHiddenMarkers,s=t.maybeUnhiddenMarkers;if(o)for(var a=0;ae)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Tt&&$t(t.doc,e)r.viewFrom?Qi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)Qi(t);else if(e<=r.viewFrom){var o=tr(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):Qi(t)}else if(n>=r.viewTo){var s=tr(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):Qi(t)}else{var a=tr(t,e,e,-1),l=tr(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(rn(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):Qi(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=i.viewTo)){var o=i.view[ai(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==V(s,n)&&s.push(n)}}}function Qi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function tr(t,e,n,i){var r,o=ai(t,e),s=t.display.view;if(!Tt||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var a=t.display.viewFrom,l=0;l0){if(o==s.length-1)return null;r=a+s[o].size-e,o++}else r=a-e;e+=r,n+=r}for(;$t(t.doc,n)!=n;){if(o==(i<0?0:s.length-1))return null;n+=i*s[o-(i<0?1:0)].size,o+=i}return{index:o,lineN:n}}function er(t){for(var e=t.display.view,n=0,i=0;i=t.display.viewTo)){var n=+new Date+t.options.workTime,i=Re(t,e.highlightFrontier),r=[];e.iter(i.line,Math.min(e.first+e.size,t.display.viewTo+500),function(o){if(i.line>=t.display.viewFrom){var s=o.styles,a=o.text.length>t.options.maxHighlightLength?Oe(e.mode,i.state):null,l=Ie(t,o,i,!0);a&&(i.state=a),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var h=!s||s.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&dn)return nr(t,t.options.workDelay),!0}),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&Ki(t,function(){for(var e=0;e=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==er(t))return!1;Ci(t)&&(Qi(t),e.dims=ni(t));var r=i.first+i.size,o=Math.max(e.visible.from-t.options.viewportMargin,i.first),s=Math.min(r,e.visible.to+t.options.viewportMargin);n.viewFroms&&n.viewTo-s<20&&(s=Math.min(r,n.viewTo)),Tt&&(o=$t(t.doc,o),s=Bt(t.doc,s));var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;!function(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=rn(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=rn(t,e,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,ai(t,n)))),i.viewTo=n}(t,o,s),n.viewOffset=qt(at(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var c=er(t);if(!a&&0==c&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(t){if(t.hasFocus())return null;var e=L();if(!e||!_(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var i=window.getSelection();i.anchorNode&&i.extend&&_(t.display.lineDiv,i.anchorNode)&&(n.anchorNode=i.anchorNode,n.anchorOffset=i.anchorOffset,n.focusNode=i.focusNode,n.focusOffset=i.focusOffset)}return n}(t);return c>4&&(n.lineDiv.style.display="none"),function(t,e,n){var i=t.display,r=t.options.lineNumbers,o=i.lineDiv,s=o.firstChild;function a(e){var n=e.nextSibling;return l&&y&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=i.view,u=i.viewFrom,h=0;h-1&&(f=!1),cn(t,d,u,n)),f&&(M(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(pt(t.options,u)))),s=d.node.nextSibling}else{var p=vn(t,d,u,n);o.insertBefore(p,s)}u+=d.size}for(;s;)s=a(s)}(t,n.updateLineNumbers,e.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(t){if(t&&t.activeElt&&t.activeElt!=L()&&(t.activeElt.focus(),t.anchorNode&&_(document.body,t.anchorNode)&&_(document.body,t.focusNode))){var e=window.getSelection(),n=document.createRange();n.setEnd(t.anchorNode,t.anchorOffset),n.collapse(!1),e.removeAllRanges(),e.addRange(n),e.extend(t.focusNode,t.focusOffset)}}(u),M(n.cursorDiv),M(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,nr(t,400)),n.updateLineNumbers=null,!0}function sr(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=En(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+kn(t.display)-Mn(t),n.top)}),e.visible=xi(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&or(t,e);i=!1){yi(t);var r=Li(t);li(t),Ii(t,r),cr(t,r),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function ar(t,e){var n=new rr(t,e);if(or(t,n)){yi(t),sr(t,n);var i=Li(t);li(t),Ii(t,i),cr(t,i),n.finish()}}function lr(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function cr(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Tn(t)+"px"}function ur(t){var e=t.display.gutters,n=t.options.gutters;M(e);for(var i=0;i-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}rr.prototype.signal=function(t,e){se(t,e)&&this.events.push(arguments)},rr.prototype.finish=function(){for(var t=0;ta.clientWidth,u=a.scrollHeight>a.clientHeight;if(r&&c||o&&u){if(o&&y&&l)t:for(var d=e.target,f=s.view;d!=a;d=d.parentNode)for(var p=0;p=0&&vt(t,i.to())<=0)return n}return-1};var yr=function(t,e){this.anchor=t,this.head=e};function br(t,e){var n=t[e];t.sort(function(t,e){return vt(t.from(),e.from())}),e=V(t,n);for(var i=1;i=0){var s=xt(o.from(),r.from()),a=bt(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;i<=e&&--e,t.splice(--i,2,new yr(l?a:s,l?s:a))}}return new mr(t,e)}function xr(t,e){return new mr([new yr(t,e||t)],0)}function wr(t){return t.text?gt(t.from.line+t.text.length-1,G(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Cr(t,e){if(vt(t,e.from)<0)return t;if(vt(t,e.to)<=0)return wr(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,i=t.ch;return t.line==e.to.line&&(i+=wr(e).ch-e.to.ch),gt(n,i)}function kr(t,e){for(var n=[],i=0;i1&&t.remove(a.line+1,p-1),t.insert(a.line+1,m)}an(t,"change",t,e)}function Or(t,e,n){!function t(i,r,o){if(i.linked)for(var s=0;sa-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=function(t,e){return e?(Dr(t.done),G(t.done)):t.done.length&&!G(t.done).ranges?G(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),G(t.done)):void 0}(r,r.lastOp==i)))s=G(o.changes),0==vt(e.from,e.to)&&0==vt(e.from,s.to)?s.to=wr(e):o.changes.push(Nr(t,e));else{var l=G(r.done);for(l&&l.ranges||Rr(t.sel,r.done),o={changes:[Nr(t,e)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=a,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=e.origin,s||ie(t,"historyAdded")}function Fr(t,e,n,i){var r=t.history,o=i&&i.origin;n==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||function(t,e,n,i){var r=e.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,o,G(r.done),e))?r.done[r.done.length-1]=e:Rr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&Dr(r.undone)}function Rr(t,e){var n=G(e);n&&n.ranges&&n.equals(t)||e.push(t)}function jr(t,e,n,i){var r=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,i),function(n){n.markedSpans&&((r||(r=e["spans_"+t.id]={}))[o]=n.markedSpans),++o})}function zr(t){if(!t)return null;for(var e,n=0;n-1&&(G(a)[h]=c[h],delete c[h])}}}return i}function $r(t,e,n,i){if(i){var r=t.anchor;if(n){var o=vt(e,r)<0;o!=vt(n,r)<0?(r=e,e=n):o!=vt(e,n)<0&&(e=n)}return new yr(r,e)}return new yr(n||e,e)}function Br(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),Yr(t,new mr([$r(t.sel.primary(),e,n,r)],0),i)}function Wr(t,e,n){for(var i=[],r=t.cm&&(t.cm.display.shift||t.extend),o=0;o=e.ch:a.to>e.ch))){if(r&&(ie(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var c=l.find(i<0?1:-1),u=void 0;if((i<0?l.inclusiveRight:l.inclusiveLeft)&&(c=eo(t,c,-i,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=vt(c,n))&&(i<0?u<0:u>0))return Qr(t,c,e,i,r)}var h=l.find(i<0?-1:1);return(i<0?l.inclusiveLeft:l.inclusiveRight)&&(h=eo(t,h,i,h.line==e.line?o:null)),h?Qr(t,h,e,i,r):null}}return e}function to(t,e,n,i,r){var o=i||1,s=Qr(t,e,n,o,r)||!r&&Qr(t,e,n,o,!0)||Qr(t,e,n,-o,r)||!r&&Qr(t,e,n,-o,!0);return s||(t.cantEdit=!0,gt(t.first,0))}function eo(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?Ct(t,gt(e.line-1)):null:n>0&&e.ch==(i||at(t,e.line)).text.length?e.line0)){var u=[l,1],h=vt(c.from,a.from),d=vt(c.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(d>0||!s.inclusiveRight&&!d)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}(t,e.from,e.to);if(i)for(var r=i.length-1;r>=0;--r)oo(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else oo(t,e)}}function oo(t,e){if(1!=e.text.length||""!=e.text[0]||0!=vt(e.from,e.to)){var n=kr(t,e);Ir(t,e,n,t.cm?t.cm.curOp.id:NaN),lo(t,e,n,Ot(t,e));var i=[];Or(t,function(t,n){n||-1!=V(i,t.history)||(fo(t.history,e),i.push(t.history)),lo(t,e,null,Ot(t,e))})}}function so(t,e,n){var i=t.cm&&t.cm.state.suppressEdits;if(!i||n){for(var r,o=t.history,s=t.sel,a="undo"==e?o.done:o.undone,l="undo"==e?o.undone:o.done,c=0;c=0;--f){var p=d(f);if(p)return p.v}}}}function ao(t,e){if(0!=e&&(t.first+=e,t.sel=new mr(X(t.sel.ranges,function(t){return new yr(gt(t.anchor.line+e,t.anchor.ch),gt(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){Ji(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,i=n.viewFrom;it.lastLine())){if(e.from.lineo&&(e={from:e.from,to:gt(o,at(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=lt(t,e.from,e.to),n||(n=kr(t,e)),t.cm?function(t,e,n){var i=t.doc,r=t.display,o=e.from,s=e.to,a=!1,l=o.line;t.options.lineWrapping||(l=ht(Ht(at(i,o.line))),i.iter(l,s.line+1,function(t){if(t==r.maxLine)return a=!0,!0})),i.sel.contains(e.from,e.to)>-1&&oe(t),Ar(i,e,n,ri(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=Kt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;i--){var r=at(t,i).stateAfter;if(r&&(!(r instanceof Ne)||i+r.lookAhead1||!(this.children[0]instanceof go))){var a=[];this.collapse(a),this.children=[new go(a)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var s=r.lines.length%25+25,a=s;a10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=0;i0||0==s&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=P("span",[o.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Vt(t,e.line,e,n,o)||e.line!=n.line&&Vt(t,n.line,e,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Tt=!0}o.addToHistory&&Ir(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var a,l=e.line,c=t.cm;if(t.iter(l,n.line+1,function(t){c&&o.collapsed&&!c.options.lineWrapping&&Ht(t)==c.display.maxLine&&(a=!0),o.collapsed&&l!=e.line&&ut(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new Et(o,l==e.line?e.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&t.iter(e.line,n.line+1,function(e){Wt(t,e)&&ut(e,0)}),o.clearOnEnter&&te(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(St=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++bo,o.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),o.collapsed)Ji(c,e.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var u=e.line;u<=n.line;u++)Zi(c,u,"text");o.atomic&&Jr(c.doc),an(c,"markerAdded",c,o)}return o}xo.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Vi(t),se(this,"clear")){var n=this.find();n&&an(this,"clear",n.from,n.to)}for(var i=null,r=null,o=0;ot.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&Ji(t,i,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Jr(t.doc)),t&&an(t,"markerCleared",t,this,i,r),e&&Hi(t),this.parent&&this.parent.clear()}},xo.prototype.find=function(t,e){var n,i;null==t&&"bookmark"==this.type&&(t=1);for(var r=0;r=0;l--)ro(this,i[l]);a?Kr(this,a):this.cm&&Ti(this.cm)}),undo:Xi(function(){so(this,"undo")}),redo:Xi(function(){so(this,"redo")}),undoSelection:Xi(function(){so(this,"undo",!0)}),redoSelection:Xi(function(){so(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,i=0;i=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,n){t=Ct(this,t),e=Ct(this,e);var i=[],r=t.line;return this.iter(t.line,e.line+1,function(o){var s=o.markedSpans;if(s)for(var a=0;a=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||n&&!n(l.marker)||i.push(l.marker.parent||l.marker)}++r}),i},getAllMarks:function(){var t=[];return this.iter(function(e){var n=e.markedSpans;if(n)for(var i=0;it)return e=t,!0;t-=o,++n}),Ct(this,gt(n,e))},indexFromPos:function(t){var e=(t=Ct(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var u=t.dataTransfer.getData("Text");if(u){var h;if(e.state.draggingText&&!e.state.draggingText.copy&&(h=e.listSelections()),Gr(e.doc,xr(n,n)),h)for(var d=0;d=0;e--)co(t.doc,"",i[e].from,i[e].to,"+delete");Ti(t)})}function Ko(t,e,n){var i=ot(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Yo(t,e,n){var i=Ko(t,e.ch,n);return null==i?null:new gt(e.line,i,n<0?"after":"before")}function Go(t,e,n,i,r){if(t){var o=Zt(n,e.doc.direction);if(o){var s,a=r<0?G(o):o[0],l=r<0==(1==a.level),c=l?"after":"before";if(a.level>0||"rtl"==e.doc.direction){var u=_n(e,n);s=r<0?n.text.length-1:0;var h=Ln(e,u,s).top;s=st(function(t){return Ln(e,u,t).top==h},r<0==(1==a.level)?a.from:a.to-1,s),"before"==c&&(s=Ko(n,s,1))}else s=r<0?a.to:a.from;return new gt(i,s,c)}}return new gt(i,r<0?n.text.length:0,r<0?"before":"after")}jo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},jo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},jo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},jo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},jo.default=y?jo.macDefault:jo.pcDefault;var Xo={selectAll:no,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),B)},killLine:function(t){return qo(t,function(e){if(e.empty()){var n=at(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line0)r=new gt(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),gt(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=at(t.doc,r.line-1).text;s&&(r=new gt(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),gt(r.line-1,s.length-1),r,"+transpose"))}n.push(new yr(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return Ki(t,function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var i=0;i-1&&(vt((r=c.ranges[r]).from(),e)<0||e.xRel>0)&&(vt(r.to(),e)>0||e.xRel<0)?function(t,e,n,i){var r=t.display,o=!1,c=Yi(t,function(e){l&&(r.scroller.draggable=!1),t.state.draggingText=!1,ne(r.wrapper.ownerDocument,"mouseup",c),ne(r.wrapper.ownerDocument,"mousemove",u),ne(r.scroller,"dragstart",h),ne(r.scroller,"drop",c),o||(le(e),i.addNew||Br(t.doc,n,null,null,i.extend),l||s&&9==a?setTimeout(function(){r.wrapper.ownerDocument.body.focus(),r.input.focus()},20):r.input.focus())}),u=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},h=function(){return o=!0};l&&(r.scroller.draggable=!0),t.state.draggingText=c,c.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),te(r.wrapper.ownerDocument,"mouseup",c),te(r.wrapper.ownerDocument,"mousemove",u),te(r.scroller,"dragstart",h),te(r.scroller,"drop",c),gi(t),setTimeout(function(){return r.input.focus()},20)}(t,i,e,o):function(t,e,n,i){var r=t.display,o=t.doc;le(e);var s,a,l=o.sel,c=l.ranges;if(i.addNew&&!i.extend?(a=o.sel.contains(n),s=a>-1?c[a]:new yr(n,n)):(s=o.sel.primary(),a=o.sel.primIndex),"rectangle"==i.unit)i.addNew||(s=new yr(n,n)),n=si(t,e,!0,!0),a=-1;else{var u=ds(t,n,i.unit);s=i.extend?$r(s,u.anchor,u.head,i.extend):u}i.addNew?-1==a?(a=c.length,Yr(o,br(c.concat([s]),a),{scroll:!1,origin:"*mouse"})):c.length>1&&c[a].empty()&&"char"==i.unit&&!i.extend?(Yr(o,br(c.slice(0,a).concat(c.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):Ur(o,a,s,W):(a=0,Yr(o,new mr([s],0),W),l=o.sel);var h=n;function d(e){if(0!=vt(h,e))if(h=e,"rectangle"==i.unit){for(var r=[],c=t.options.tabSize,u=j(at(o,n.line).text,n.ch,c),d=j(at(o,e.line).text,e.ch,c),f=Math.min(u,d),p=Math.max(u,d),g=Math.min(n.line,e.line),v=Math.min(t.lastLine(),Math.max(n.line,e.line));g<=v;g++){var m=at(o,g).text,y=q(m,f,c);f==p?r.push(new yr(gt(g,y),gt(g,y))):m.length>y&&r.push(new yr(gt(g,y),gt(g,q(m,p,c))))}r.length||r.push(new yr(n,n)),Yr(o,br(l.ranges.slice(0,a).concat(r),a),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,x=s,w=ds(t,e,i.unit),C=x.anchor;vt(w.anchor,C)>0?(b=w.head,C=xt(x.from(),w.anchor)):(b=w.anchor,C=bt(x.to(),w.head));var k=l.ranges.slice(0);k[a]=function(t,e){var n=e.anchor,i=e.head,r=at(t.doc,n.line);if(0==vt(n,i)&&n.sticky==i.sticky)return e;var o=Zt(r);if(!o)return e;var s=Xt(o,n.ch,n.sticky),a=o[s];if(a.from!=n.ch&&a.to!=n.ch)return e;var l,c=s+(a.from==n.ch==(1!=a.level)?0:1);if(0==c||c==o.length)return e;if(i.line!=n.line)l=(i.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=Xt(o,i.ch,i.sticky),h=u-s||(i.ch-n.ch)*(1==a.level?-1:1);l=u==c-1||u==c?h<0:h>0}var d=o[c+(l?-1:0)],f=l==(1==d.level),p=f?d.from:d.to,g=f?"after":"before";return n.ch==p&&n.sticky==g?e:new yr(new gt(n.line,p,g),i)}(t,new yr(Ct(o,C),b)),Yr(o,br(k,a),W)}}var f=r.wrapper.getBoundingClientRect(),p=0;function g(e){t.state.selectingText=!1,p=1/0,le(e),r.input.focus(),ne(r.wrapper.ownerDocument,"mousemove",v),ne(r.wrapper.ownerDocument,"mouseup",m),o.history.lastSelOrigin=null}var v=Yi(t,function(e){0!==e.buttons&&fe(e)?function e(n){var s=++p,a=si(t,n,!0,"rectangle"==i.unit);if(a)if(0!=vt(a,h)){t.curOp.focus=L(),d(a);var l=xi(r,o);(a.line>=l.to||a.linef.bottom?20:0;c&&setTimeout(Yi(t,function(){p==s&&(r.scroller.scrollTop+=c,e(n))}),50)}}(e):g(e)}),m=Yi(t,g);t.state.selectingText=m,te(r.wrapper.ownerDocument,"mousemove",v),te(r.wrapper.ownerDocument,"mouseup",m)}(t,i,e,o)}(e,i,o,t):de(t)==n.scroller&&le(t):2==r?(i&&Br(e.doc,i),setTimeout(function(){return n.input.focus()},20)):3==r&&(k?gs(e,t):gi(e)))}}function ds(t,e,n){if("char"==n)return new yr(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new yr(gt(e.line,0),Ct(t.doc,gt(e.line+1,0)));var i=n(t,e);return new yr(i.from,i.to)}function fs(t,e,n,i){var r,o;if(e.touches)r=e.touches[0].clientX,o=e.touches[0].clientY;else try{r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&le(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!se(t,n))return ue(e);o-=a.top-s.viewOffset;for(var l=0;l=r){var u=dt(t.doc,o),h=t.options.gutters[l];return ie(t,n,t,u,h,e),ue(e)}}}function ps(t,e){return fs(t,e,"gutterClick",!0)}function gs(t,e){wn(t.display,e)||function(t,e){return!!se(t,"gutterContextMenu")&&fs(t,e,"gutterContextMenu",!1)}(t,e)||re(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function vs(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),zn(t)}us.prototype.compare=function(t,e,n){return this.time+400>t&&0==vt(e,this.pos)&&n==this.button};var ms={toString:function(){return"CodeMirror.Init"}},ys={},bs={};function xs(t){ur(t),Ji(t),wi(t)}function ws(t,e,n){var i=n&&n!=ms;if(!e!=!i){var r=t.display.dragFunctions,o=e?te:ne;o(t.display.scroller,"dragstart",r.start),o(t.display.scroller,"dragenter",r.enter),o(t.display.scroller,"dragover",r.over),o(t.display.scroller,"dragleave",r.leave),o(t.display.scroller,"drop",r.drop)}}function Cs(t){t.options.lineWrapping?(N(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(E(t.display.wrapper,"CodeMirror-wrap"),Yt(t)),oi(t),Ji(t),zn(t),setTimeout(function(){return Ii(t)},100)}function ks(t,e){var i=this;if(!(this instanceof ks))return new ks(t,e);this.options=e=e?R(e):{},R(ys,e,!1),hr(e);var r=e.value;"string"==typeof r&&(r=new Eo(r,e.mode,null,e.lineSeparator,e.direction)),this.doc=r;var o=new ks.inputStyles[e.inputStyle](this),c=this.display=new function(t,e,i){var r=this;this.input=i,r.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=P("div",null,"CodeMirror-code"),r.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=O("div",null,"CodeMirror-cursors"),r.measure=O("div",null,"CodeMirror-measure"),r.lineMeasure=O("div",null,"CodeMirror-measure"),r.lineSpace=P("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none");var o=P("div",[r.lineSpace],"CodeMirror-lines");r.mover=O("div",[o],null,"position: relative"),r.sizer=O("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=O("div",null,null,"position: absolute; height: "+H+"px; width: 1px;"),r.gutters=O("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=O("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=O("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),s&&a<8&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),l||n&&m||(r.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(r.wrapper):t(r.wrapper)),r.viewFrom=r.viewTo=e.first,r.reportedViewFrom=r.reportedViewTo=e.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,i.init(r)}(t,r,o);for(var u in c.wrapper.CodeMirror=this,ur(this),vs(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ji(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new z,keySeq:null,specialChars:null},e.autofocus&&!m&&c.input.focus(),s&&a<11&&setTimeout(function(){return i.display.input.reset(!0)},20),function(t){var e=t.display;te(e.scroller,"mousedown",Yi(t,hs)),te(e.scroller,"dblclick",s&&a<11?Yi(t,function(e){if(!re(t,e)){var n=si(t,e);if(n&&!ps(t,e)&&!wn(t.display,e)){le(e);var i=t.findWordAt(n);Br(t.doc,i.anchor,i.head)}}}):function(e){return re(t,e)||le(e)}),k||te(e.scroller,"contextmenu",function(e){return gs(t,e)});var n,i={end:0};function r(){e.activeTouch&&(n=setTimeout(function(){return e.activeTouch=null},1e3),(i=e.activeTouch).end=+new Date)}function o(t,e){if(null==e.left)return!0;var n=e.left-t.left,i=e.top-t.top;return n*n+i*i>400}te(e.scroller,"touchstart",function(r){if(!re(t,r)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(r)&&!ps(t,r)){e.input.ensurePolled(),clearTimeout(n);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-i.end<=300?i:null},1==r.touches.length&&(e.activeTouch.left=r.touches[0].pageX,e.activeTouch.top=r.touches[0].pageY)}}),te(e.scroller,"touchmove",function(){e.activeTouch&&(e.activeTouch.moved=!0)}),te(e.scroller,"touchend",function(n){var i=e.activeTouch;if(i&&!wn(e,n)&&null!=i.left&&!i.moved&&new Date-i.start<300){var s,a=t.coordsChar(e.activeTouch,"page");s=!i.prev||o(i,i.prev)?new yr(a,a):!i.prev.prev||o(i,i.prev.prev)?t.findWordAt(a):new yr(gt(a.line,0),Ct(t.doc,gt(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),le(n)}r()}),te(e.scroller,"touchcancel",r),te(e.scroller,"scroll",function(){e.scroller.clientHeight&&(Oi(t,e.scroller.scrollTop),_i(t,e.scroller.scrollLeft,!0),ie(t,"scroll",t))}),te(e.scroller,"mousewheel",function(e){return vr(t,e)}),te(e.scroller,"DOMMouseScroll",function(e){return vr(t,e)}),te(e.wrapper,"scroll",function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0}),e.dragFunctions={enter:function(e){re(t,e)||he(e)},over:function(e){re(t,e)||(function(t,e){var n=si(t,e);if(n){var i=document.createDocumentFragment();ui(t,n,i),t.display.dragCursor||(t.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),A(t.display.dragCursor,i)}}(t,e),he(e))},start:function(e){return function(t,e){if(s&&(!t.state.draggingText||+new Date-Mo<100))he(e);else if(!re(t,e)&&!wn(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!d)){var n=O("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),h&&n.parentNode.removeChild(n)}}(t,e)},drop:Yi(t,Ao),leave:function(e){re(t,e)||Oo(t)}};var l=e.input.getField();te(l,"keyup",function(e){return ss.call(t,e)}),te(l,"keydown",Yi(t,os)),te(l,"keypress",Yi(t,as)),te(l,"focus",function(e){return vi(t,e)}),te(l,"blur",function(e){return mi(t,e)})}(this),Lo(),Vi(this),this.curOp.forceUpdate=!0,Pr(this,r),e.autofocus&&!m||this.hasFocus()?setTimeout(F(vi,this),20):mi(this),bs)bs.hasOwnProperty(u)&&bs[u](i,e[u],ms);Ci(this),e.finishInit&&e.finishInit(this);for(var f=0;f150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?j(at(o,e-1).text,null,s):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var h="",d=0;if(t.options.indentWithTabs)for(var f=Math.floor(c/s);f;--f)d+=s,h+="\t";if(d1)if(Es&&Es.text.join("\n")==e){if(i.ranges.length%Es.text.length==0){c=[];for(var u=0;u=0;h--){var d=i.ranges[h],f=d.from(),p=d.to();d.empty()&&(n&&n>0?f=gt(f.line,f.ch-n):t.state.overwrite&&!a?p=gt(p.line,Math.min(at(o,p.line).text.length,p.ch+G(l).length)):Es&&Es.lineWise&&Es.text.join("\n")==e&&(f=p=gt(f.line,0))),s=t.curOp.updateInput;var g={from:f,to:p,text:c?c[h%c.length]:l,origin:r||(a?"paste":t.state.cutIncoming?"cut":"+input")};ro(t.doc,g),an(t,"inputRead",t,g)}e&&!a&&Ps(t,e),Ti(t),t.curOp.updateInput=s,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Os(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Ki(e,function(){return As(e,n,0,null,"paste")}),!0}function Ps(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,i=n.ranges.length-1;i>=0;i--){var r=n.ranges[i];if(!(r.head.ch>100||i&&n.ranges[i-1].head.line==r.head.line)){var o=t.getModeAt(r.head),s=!1;if(o.electricChars){for(var a=0;a-1){s=Ts(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(at(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Ts(t,r.head.line,"smart"));s&&an(t,"electricInput",t,r.head.line)}}}function _s(t){for(var e=[],n=[],i=0;i=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Xt(r,n.ch,n.sticky),s=r[o];if("ltr"==t.doc.direction&&s.level%2==0&&(i>0?s.to>n.ch:s.from=s.from&&d>=u.begin)){var f=h?"before":"after";return new gt(n.line,d,f)}}var p=function(t,e,i){for(var o=function(t,e){return e?new gt(n.line,l(t,1),"before"):new gt(n.line,t,"after")};t>=0&&t0==(1!=s.level),c=a?i.begin:l(i.end,-1);if(s.from<=c&&c0?u.end:l(u.begin,-1);return null==v||i>0&&v==e.text.length||!(g=p(i>0?0:r.length-1,i,c(v)))?null:g}(t.cm,a,e,n):Yo(a,e,n))){if(i||!function(){var i=e.line+n;return!(i=t.first+t.size)&&(e=new gt(i,e.ch,e.sticky),a=at(t,i))}())return!1;e=Go(r,t.cm,a,e.line,n)}else e=o;return!0}if("char"==i)l();else if("column"==i)l(!0);else if("word"==i||"group"==i)for(var c=null,u="group"==i,h=t.cm&&t.cm.getHelper(e,"wordChars"),d=!0;!(n<0)||l(!d);d=!1){var f=a.text.charAt(e.ch)||"\n",p=et(f,h)?"w":u&&"\n"==f?"n":!u||/\s/.test(f)?null:"p";if(!u||d||p||(p="s"),c&&c!=p){n<0&&(n=1,l(),e.sticky="after");break}if(p&&(c=p),n>0&&!l(!d))break}var g=to(t,e,o,s,!0);return mt(o,g)&&(g.hitSide=!0),g}function Is(t,e,n,i){var r,o,s=t.doc,a=e.left;if("page"==i){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*ti(t.display),3);r=(n>0?e.bottom:e.top)+n*c}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(;(o=Gn(t,a,r)).outside;){if(n<0?r<=0:r>=s.height){o.hitSide=!0;break}r+=5*n}return o}var Fs=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Rs(t,e){var n=Pn(t,e.line);if(!n||n.hidden)return null;var i=at(t.doc,e.line),r=An(n,i,e.line),o=Zt(i,t.doc.direction),s="left";if(o){var a=Xt(o,e.ch);s=a%2?"right":"left"}var l=In(r.map,e.ch,s);return l.offset="right"==l.collapse?l.end:l.start,l}function js(t,e){return e&&(t.bad=!0),t}function zs(t,e,n){var i;if(e==t.display.lineDiv){if(!(i=t.display.lineDiv.childNodes[n]))return js(t.clipPos(gt(t.display.viewTo-1)),!0);e=null,n=0}else for(i=e;;i=i.parentNode){if(!i||i==t.display.lineDiv)return null;if(i.parentNode&&i.parentNode==t.display.lineDiv)break}for(var r=0;r=e.display.viewTo||o.line=e.display.viewFrom&&Rs(e,r)||{node:l[0].measure.map[2],offset:0},u=o.linei.firstLine()&&(s=gt(s.line-1,at(i.doc,s.line-1).length)),a.ch==at(i.doc,a.line).text.length&&a.liner.viewTo-1)return!1;s.line==r.viewFrom||0==(t=ai(i,s.line))?(e=ht(r.view[0].line),n=r.view[0].node):(e=ht(r.view[t].line),n=r.view[t-1].node.nextSibling);var l,c,u=ai(i,a.line);if(u==r.view.length-1?(l=r.viewTo-1,c=r.lineDiv.lastChild):(l=ht(r.view[u+1].line)-1,c=r.view[u+1].node.previousSibling),!n)return!1;for(var h=i.doc.splitLines(function(t,e,n,i,r){var o="",s=!1,a=t.doc.lineSeparator(),l=!1;function c(){s&&(o+=a,l&&(o+=a),s=l=!1)}function u(t){t&&(c(),o+=t)}function h(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void u(n);var o,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(gt(i,0),gt(r+1,0),function(t){return function(e){return e.id==t}}(+d));return void(f.length&&(o=f[0].find(0))&&u(lt(t.doc,o.from,o.to).join(a)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;p&&c();for(var g=0;g1&&d.length>1;)if(G(h)==G(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),e++}for(var f=0,p=0,g=h[0],v=d[0],m=Math.min(g.length,v.length);fs.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)f--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var w=gt(e,f),C=gt(l,d.length?G(d).length-p:0);return h.length>1||h[0]||vt(w,C)?(co(i.doc,h,w,C,"+input"),!0):void 0},Fs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Fs.prototype.reset=function(){this.forceCompositionEnd()},Fs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Fs.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()},80))},Fs.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Ki(this.cm,function(){return Ji(t.cm)})},Fs.prototype.setUneditable=function(t){t.contentEditable="false"},Fs.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Yi(this.cm,As)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Fs.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Fs.prototype.onContextMenu=function(){},Fs.prototype.resetPosition=function(){},Fs.prototype.needsContentAttribute=!0;var Hs=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new z,this.hasSelection=!1,this.composing=null};Hs.prototype.init=function(t){var e=this,n=this,i=this.cm;this.createField(t);var r=this.textarea;function o(t){if(!re(i,t)){if(i.somethingSelected())Ms({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var e=_s(i);Ms({lineWise:!0,text:e.text}),"cut"==t.type?i.setSelections(e.ranges,null,B):(n.prevInput="",r.value=e.text.join("\n"),I(r))}"cut"==t.type&&(i.state.cutIncoming=!0)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),g&&(r.style.width="0px"),te(r,"input",function(){s&&a>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()}),te(r,"paste",function(t){re(i,t)||Os(t,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),te(r,"cut",o),te(r,"copy",o),te(t.scroller,"paste",function(e){wn(t,e)||re(i,e)||(i.state.pasteIncoming=!0,n.focus())}),te(t.lineSpace,"selectstart",function(e){wn(t,e)||le(e)}),te(r,"compositionstart",function(){var t=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:i.markText(t,i.getCursor("to"),{className:"CodeMirror-composing"})}}),te(r,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Hs.prototype.createField=function(t){this.wrapper=Ns(),this.textarea=this.wrapper.firstChild},Hs.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=ci(t);if(t.options.moveInputWithCursor){var r=qn(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),s=e.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+s.top-o.top)),i.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+s.left-o.left))}return i},Hs.prototype.showSelection=function(t){var e=this.cm,n=e.display;A(n.cursorDiv,t.cursors),A(n.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Hs.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&I(this.textarea),s&&a>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",s&&a>=9&&(this.hasSelection=null))}},Hs.prototype.getField=function(){return this.textarea},Hs.prototype.supportsTouch=function(){return!1},Hs.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||L()!=this.textarea))try{this.textarea.focus()}catch(t){}},Hs.prototype.blur=function(){this.textarea.blur()},Hs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Hs.prototype.receivedFocus=function(){this.slowPoll()},Hs.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Hs.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,function n(){var i=e.poll();i||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))})},Hs.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||xe(n)&&!i&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=n.value;if(r==i&&!e.somethingSelected())return!1;if(s&&a>=9&&this.hasSelection===r||y&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=r.charCodeAt(0);if(8203!=o||i||(i="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(i.length,r.length);l1e3||r.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Hs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Hs.prototype.onKeyPress=function(){s&&a>=9&&(this.hasSelection=null),this.fastPoll()},Hs.prototype.onContextMenu=function(t){var e=this,n=e.cm,i=n.display,r=e.textarea,o=si(n,t),c=i.scroller.scrollTop;if(o&&!h){var u=n.options.resetSelectionOnContextMenu;u&&-1==n.doc.sel.contains(o)&&Yi(n,Yr)(n.doc,xr(o),B);var d=r.style.cssText,f=e.wrapper.style.cssText;e.wrapper.style.cssText="position: absolute";var p,g=e.wrapper.getBoundingClientRect();if(r.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-g.top-5)+"px; left: "+(t.clientX-g.left-5)+"px;\n z-index: 1000; background: "+(s?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(p=window.scrollY),i.input.focus(),l&&window.scrollTo(null,p),i.input.reset(),n.somethingSelected()||(r.value=e.prevInput=" "),e.contextMenuPending=!0,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),s&&a>=9&&m(),k){he(t);var v=function(){ne(window,"mouseup",v),setTimeout(y,20)};te(window,"mouseup",v)}else setTimeout(y,50)}function m(){if(null!=r.selectionStart){var t=n.somethingSelected(),o="​"+(t?r.value:"");r.value="⇚",r.value=o,e.prevInput=t?"":"​",r.selectionStart=1,r.selectionEnd=o.length,i.selForContextMenu=n.doc.sel}}function y(){if(e.contextMenuPending=!1,e.wrapper.style.cssText=f,r.style.cssText=d,s&&a<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=c),null!=r.selectionStart){(!s||s&&a<9)&&m();var t=0,o=function(){i.selForContextMenu==n.doc.sel&&0==r.selectionStart&&r.selectionEnd>0&&"​"==e.prevInput?Yi(n,no)(n):t++<10?i.detectingSelectAll=setTimeout(o,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(o,200)}}},Hs.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},Hs.prototype.setUneditable=function(){},Hs.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function n(n,i,r,o){t.defaults[n]=i,r&&(e[n]=o?function(t,e,n){n!=ms&&r(t,e,n)}:r)}t.defineOption=n,t.Init=ms,n("value","",function(t,e){return t.setValue(e)},!0),n("mode",null,function(t,e){t.doc.modeOption=e,Tr(t)},!0),n("indentUnit",2,Tr,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(t){Er(t),zn(t),Ji(t)},!0),n("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var n=[],i=t.doc.first;t.doc.iter(function(t){for(var r=0;;){var o=t.text.indexOf(e,r);if(-1==o)break;r=o+e.length,n.push(gt(i,o))}i++});for(var r=n.length-1;r>=0;r--)co(t.doc,e,n[r],gt(n[r].line,n[r].ch+e.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=ms&&t.refresh()}),n("specialCharPlaceholder",Je,function(t){return t.refresh()},!0),n("electricChars",!0),n("inputStyle",m?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",function(t){vs(t),xs(t)},!0),n("keyMap","default",function(t,e,n){var i=Uo(e),r=n!=ms&&Uo(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Cs,!0),n("gutters",[],function(t){hr(t.options),xs(t)},!0),n("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?ii(t.display)+"px":"0",t.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(t){return Ii(t)},!0),n("scrollbarStyle","native",function(t){ji(t),Ii(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),n("lineNumbers",!1,function(t){hr(t.options),xs(t)},!0),n("firstLineNumber",1,xs,!0),n("lineNumberFormatter",function(t){return t},xs,!0),n("showCursorWhenSelecting",!1,li,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("readOnly",!1,function(t,e){"nocursor"==e&&(mi(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),n("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),n("dragDrop",!0,ws),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,li,!0),n("singleCursorHeightPerLine",!0,li,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Er,!0),n("addModeClass",!1,Er,!0),n("pollInterval",100),n("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),n("historyEventDelay",1250),n("viewportMargin",10,function(t){return t.refresh()},!0),n("maxHighlightLength",1e4,Er,!0),n("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),n("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),n("autofocus",null),n("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0)}(ks),function(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var i=this.options,r=i[t];i[t]==n&&"mode"!=t||(i[t]=n,e.hasOwnProperty(t)&&Yi(this,e[t])(this,n,r),ie(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Uo(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;nn&&(Ts(this,r.head.line,t,!0),n=r.head.line,i==this.doc.sel.primIndex&&Ti(this));else{var o=r.from(),s=r.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;l0&&Ur(this.doc,i,new yr(o,c[i].to()),B)}}}),getTokenAt:function(t,e){return $e(this,t,e)},getLineTokens:function(t,e){return $e(this,gt(t),e,!0)},getTokenTypeAt:function(t){t=Ct(this.doc,t);var e,n=Fe(this,at(this.doc,t.line)),i=0,r=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var s=i+r>>1;if((s?n[2*s-1]:0)>=o)r=s;else{if(!(n[2*s+1]o&&(t=o,r=!0),i=at(this.doc,t)}else i=t;return Bn(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-qt(i):0)},defaultTextHeight:function(){return ti(this.display)},defaultCharWidth:function(){return ei(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display,s=(t=qn(this,Ct(this.doc,t))).bottom,a=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),o.sizer.appendChild(e),"over"==i)s=t.top;else if("above"==i||"near"==i){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==i||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?s=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(s=t.bottom),a+e.offsetWidth>c&&(a=c-e.offsetWidth)}e.style.top=s+"px",e.style.left=e.style.right="","right"==r?(a=o.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?a=0:"middle"==r&&(a=(o.sizer.clientWidth-e.offsetWidth)/2),e.style.left=a+"px"),n&&function(t,e){var n=ki(t,e);null!=n.scrollTop&&Oi(t,n.scrollTop),null!=n.scrollLeft&&_i(t,n.scrollLeft)}(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:Gi(os),triggerOnKeyPress:Gi(as),triggerOnKeyUp:ss,triggerOnMouseDown:Gi(hs),execCommand:function(t){if(Xo.hasOwnProperty(t))return Xo[t].call(null,this)},triggerElectric:Gi(function(t){Ps(this,t)}),findPosH:function(t,e,n,i){var r=1;e<0&&(r=-1,e=-e);for(var o=Ct(this.doc,t),s=0;s0&&a(n.charAt(i-1));)--i;for(;r.5)&&oi(this),ie(this,"refresh",this)}),swapDoc:Gi(function(t){var e=this.doc;return e.cm=null,Pr(this,t),zn(this),this.display.input.reset(),Ei(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,an(this,"swapDoc",this,e),e}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ae(t),t.registerHelper=function(e,i,r){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][i]=r},t.registerGlobalHelper=function(e,i,r,o){t.registerHelper(e,i,o),n[e]._global.push({pred:r,val:o})}}(ks);var $s="iter insert remove copy getEditor constructor".split(" ");for(var Bs in Eo.prototype)Eo.prototype.hasOwnProperty(Bs)&&V($s,Bs)<0&&(ks.prototype[Bs]=function(t){return function(){return t.apply(this.doc,arguments)}}(Eo.prototype[Bs]));return ae(Eo),ks.inputStyles={textarea:Hs,contenteditable:Fs},ks.defineMode=function(t){ks.defaults.mode||"null"==t||(ks.defaults.mode=t),function(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),ke[t]=e}.apply(this,arguments)},ks.defineMIME=function(t,e){Se[t]=e},ks.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),ks.defineMIME("text/plain","null"),ks.defineExtension=function(t,e){ks.prototype[t]=e},ks.defineDocExtension=function(t,e){Eo.prototype[t]=e},ks.fromTextArea=function(t,e){if((e=e?R(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=L();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function i(){t.value=a.getValue()}var r;if(t.form&&(te(t.form,"submit",i),!e.leaveSubmitMethodAlone)){var o=t.form;r=o.submit;try{var s=o.submit=function(){i(),o.submit=r,o.submit(),o.submit=s}}catch(t){}}e.finishInit=function(e){e.save=i,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,i(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(ne(t.form,"submit",i),"function"==typeof t.form.submit&&(t.form.submit=r))}},t.style.display="none";var a=ks(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return a},function(t){t.off=ne,t.on=te,t.wheelEventPixels=gr,t.Doc=Eo,t.splitLines=be,t.countColumn=j,t.findColumn=q,t.isWordChar=tt,t.Pass=$,t.signal=ie,t.Line=Ue,t.changeEnd=wr,t.scrollbarModel=Ri,t.Pos=gt,t.cmpPos=vt,t.modes=ke,t.mimeModes=Se,t.resolveMode=Te,t.getMode=Ee,t.modeExtensions=Me,t.extendMode=Ae,t.copyState=Oe,t.startState=_e,t.innerMode=Pe,t.commands=Xo,t.keyMap=jo,t.keyName=Wo,t.isModifierKey=$o,t.lookupKey=Ho,t.normalizeKeyMap=Vo,t.StringStream=Le,t.SharedTextMarker=Co,t.TextMarker=xo,t.LineWidget=mo,t.e_preventDefault=le,t.e_stopPropagation=ce,t.e_stop=he,t.addClass=N,t.contains=_,t.rmClass=E,t.keyNames=Do}(ks),ks.version="5.39.0",ks}()},function(t,e,n){"use strict";var i=o(n(1)),r=o(n(0));function o(t){return t&&t.__esModule?t:{default:t}}var s=n(13),a=r.default.$;t.exports=i.default.extend({},s,{init:function(t){i.default.bindAll(this,"startDraw","draw","endDraw","rollback"),this.config=t||{},this.hType=this.config.newFixedH?"height":"min-height",this.allowDraw=1},enable:function(){for(var t=arguments.length,e=Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(t){var n=e.ctrlKey||e.metaKey,i=e.shiftKey,r=this.editor,s=r.getConfig("multipleSelection"),a=this.em;if(n&&s)r.selectToggle(t);else if(i&&s){a.clearSelection(r.Canvas.getWindow());var l=t.collection,c=l.indexOf(t),u=(r.getSelectedAll(),void 0),h=void 0;if(r.getSelectedAll().forEach(function(t){var e=t.collection,n=e.indexOf(t);e===l&&(nc&&(h=(0,o.isUndefined)(h)?n:Math.min(h,n)))}),!(0,o.isUndefined)(u))for(;u!==c;)r.selectAdd(l.at(u)),u++;if(!(0,o.isUndefined)(h))for(;h!==c;)r.selectAdd(l.at(h)),h--;r.selectAdd(t)}else r.select(t);this.initResize(t)}},updateBadge:function(t,e){var n=c(t),i=this.canvas,r=i.getConfig().customBadgeLabel;this.cacheEl=t;var o=n.data("model");if(o&&o.get("badgable")){var s=this.getBadge(),a=o.getIcon()+o.getName();a=r?r(o):a,s.innerHTML=a;var l=s.style;l.display="block";var u=i.getCanvasView().getPosition();if(u){var h=s?s.offsetHeight:0,d=s?s.offsetWidth:0,f=e.top-h1&&void 0!==arguments[1]?arguments[1]:{},i=n.el,r=n.config,o=n.resizer,a=r.keyHeight,l=r.keyWidth,h=r.currentUnit;g("add",0,n),p=e.get("StyleManager").getModelToStyle(c);var d=getComputedStyle(i),f=p.getStyle(),v=f[l]||d[l],m=f[a]||d[a];o.startDim.w=parseFloat(v),o.startDim.h=parseFloat(m),u=0,h&&(r.unitHeight=(0,s.getUnitFromValue)(m),r.unitWidth=(0,s.getUnitFromValue)(v))},onMove:function(){n.trigger("change:canvasOffset")},onEnd:function(t,e){g("remove",0,e),n.trigger("change:canvasOffset"),u=1},updateTarget:function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(p){var r=i.store,o=i.selectedHandler,s=i.config,a=s.keyHeight,l=s.keyWidth,c=["tc","bc"].indexOf(o)>=0,u=["cl","cr"].indexOf(o)>=0,h=p.getStyle();c||(h[l]=n.w+s.unitWidth),u||(h[a]=n.h+s.unitHeight),p.setStyle(h,{avoidStore:1});e&&e.trigger("update:component:style:"+a+" update:component:style:"+l),r&&p.trigger("change:style",p,h,{})}}},"object"==(void 0===h?"undefined":r(h))&&(f=i({},f,h)),n.runCommand("resize",{el:d,options:f})):n.stopCommand("resize")},updateToolbar:function(t){var e=this.config.em,n=t==e?e.getSelected():t,i=this.canvas.getToolbarEl(),r=i.style;if(n){var o=n.get("toolbar");this.ppfx;if(e.get("Config").showToolbar&&o&&o.length){if(r.opacity="",r.display="",!this.toolbar){i.innerHTML="",this.toolbar=new l(o);var s=new a({collection:this.toolbar,editor:this.editor});i.appendChild(s.render().el)}this.toolbar.reset(o);var c=n.view;c&&this.updateToolbarPos(c.el)}else r.display="none"}else r.opacity=0},updateToolbarPos:function(t,e){var n=this.canvas.getToolbarEl(),i=n.style,r=i.display;i.display="block";var o=this.canvas.getTargetToElementDim(n,t,{elPos:e,event:"toolbarPosUpdate"});if(o){var s=o.left+o.elementWidth-o.targetWidth;i.top=o.top+"px",i.left=(s<0?0:s)+"px",i.display=r}},getCanvasPosition:function(){return this.canvas.getCanvasView().getPosition()},clean:function(){this.selEl&&this.selEl.removeClass(this.hoverClass)},getBadge:function(){return this.canvas.getBadgeEl()},onFrameScroll:function(t){var e=this.cacheEl;if(e){var n=this.getElementPos(e);this.updateBadge(e,n);var i=this.em.getSelected();i&&this.updateToolbarPos(i.view.el)}},updateAttached:function(t){var e=this.em.getSelected();if(e){var n=e.view;this.updateToolbarPos(n.el),this.showFixedElementOffset(n.el)}},getElementPos:function(t,e){return this.canvas.getCanvasView().getElementPos(t)},hideBadge:function(){this.getBadge().style.display="none"},cleanPrevious:function(t){t&&t.set({status:"",state:""})},getContentWindow:function(){return this.frameEl.contentWindow},run:function(t){this.editor=t&&t.get("Editor"),this.enable(),this.onSelect()},stop:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.em;this.stopSelectComponent(),!n.preserveSelected&&i.setSelected(null),this.clean(),this.hideBadge(),this.hideFixedElementOffset(),this.canvas.getToolbarEl().style.display="none",i.off("component:update",this.updateAttached,this),i.off("change:canvasOffset",this.updateAttached,this)}}},function(t,e,n){"use strict";var i=n(1),r=n(0),o=r.$;t.exports=r.View.extend({events:{change:"onChange"},attributes:function(){return this.model.get("attributes")},initialize:function(t){var e=this.model,n=(e.get("name"),e.target);this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=n,this.className=this.pfx+"trait",this.labelClass=this.ppfx+"label",this.fieldClass=this.ppfx+"field "+this.ppfx+"field-"+e.get("type"),this.inputhClass=this.ppfx+"input-holder",e.off("change:value",this.onValueChange),this.listenTo(e,"change:value",this.onValueChange),e.view=this,this.tmpl='
'},onChange:function(){this.model.set("value",this.getInputEl().value)},getValueForTarget:function(){return this.model.get("value")},setInputValue:function(t){this.getInputEl().value=t},onValueChange:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.model;this.target,i.get("name");if(n.fromTarget)this.setInputValue(i.get("value"));else{var r=this.getValueForTarget();i.setTargetValue(r,n)}},renderLabel:function(){var t=this.getLabel();this.$el.html('
'+t+"
")},getLabel:function(){var t=this.model,e=t.get("label")||t.get("name");return e.charAt(0).toUpperCase()+e.slice(1).replace(/-/g," ")},getInputEl:function(){if(!this.$input){var t=this.model,e=t.get("placeholder")||t.get("default")||"",n=t.get("type")||"text",i=t.get("min"),r=t.get("max"),s=this.getModelValue(),a=o('');s&&a.prop("value",s),i&&a.prop("min",i),r&&a.prop("max",r),this.$input=a}return this.$input.get(0)},getModelValue:function(){var t=void 0,e=this.model,n=this.target,r=e.get("name");if(e.get("changeProp"))t=n.get(r);else{var o=n.get("attributes");t=e.get("value")||o[r]}return(0,i.isUndefined)(t)?"":t},renderField:function(){if(!this.$input){this.$el.append(this.tmpl);var t=this.getInputEl(),e=this.el.querySelector("."+this.inputhClass);e.insertBefore(t,e.childNodes[0])}},render:function(){return this.renderLabel(),this.renderField(),this.el.className=this.className,this}})},function(t,e,n){"use strict";var i=n(0).Model.extend({idAttribute:"name",defaults:{name:"",label:"",type:1,active:!0,private:!1,protected:!1},initialize:function(){var t=this.get("name"),e=this.get("label");t?e||this.set("label",t):this.set("name",e),this.set("name",i.escapeName(this.get("name")))},getFullName:function(){var t="";switch(this.get("type")){case 1:t=".";break;case 2:t="#"}return t+this.get("name")}},{TYPE_CLASS:1,TYPE_ID:2,escapeName:function(t){return(""+t).trim().replace(/([^a-z0-9\w-]+)/gi,"-")}});t.exports=i},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var i=r(n(1));r(n(0));function r(t){return t&&t.__esModule?t:{default:t}}var o=n(7);t.exports=i.default.extend({},o,{init:function(){for(var t=arguments.length,e=Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return this.set({value:void 0},t),this},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.parseValue(t);this.set(r,i({},n,{avoidStore:1})),e&&(this.set("value","",n),this.set(r,n))},setValueFromInput:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.setValue(t,e,i({},n,{fromInput:1}))},parseValue:function(t){var e={value:t},n="!important";if((0,r.isString)(t)&&-1!==t.indexOf(n)&&(e.value=t.replace(n,"").trim(),e.important=1),!this.get("functionName"))return e;var i=[],o=""+e.value,s=o.indexOf("(")+1,a=o.lastIndexOf(")");return i.push(s),a>=0&&i.push(a),e.value=String.prototype.substring.apply(o,i),e},getDefaultValue:function(){return this.get("defaults")},getFullValue:function(t){var e=this.get("functionName"),n=(0,r.isUndefined)(t)?this.get("value"):t;return e&&!(0,r.isUndefined)(n)&&(n=e+"("+n+")"),this.get("important")&&(n+=" !important"),n||""}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e/,f=/^\w+$/;function p(t,n){n=n||e;var i=h.test(t)?n.getElementsByClassName(t.slice(1)):f.test(t)?n.getElementsByTagName(t):n.querySelectorAll(t);return i}function g(n){if(!t){var i=(t=e.implementation.createHTMLDocument(null)).createElement("base");i.href=e.location.href,t.head.appendChild(i)}return t.body.innerHTML=n,t.body.childNodes}function v(t){"loading"!==e.readyState?setTimeout(t):e.addEventListener("DOMContentLoaded",t)}function m(t,i){if(!t)return this;if(t.cash&&t!==n)return t;var r,o=t,s=0;if(c(t))o=u.test(t)?e.getElementById(t.slice(1)):d.test(t)?g(t):p(t,i);else if(l(t))return v(t),this;if(!o)return this;if(o.nodeType||o===n)this[0]=o,this.length=1;else for(r=this.length=o.length;s=0&&o.splice(i,1)):(x(o,function(n){t.removeEventListener(e,n)}),o=[]))}function R(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(/%20/g,"+")}function j(t){var e=t.type;if(!e)return null;switch(e.toLowerCase()){case"select-one":return function(t){var e=t.selectedIndex;return e>=0?t.options[e].value:null}(t);case"select-multiple":return function(t){var e=[];return x(t.options,function(t){t.selected&&e.push(t.value)}),e.length?e:null}(t);case"radio":case"checkbox":return t.checked?t.value:null;default:return t.value?t.value:null}}function z(t,e,n){var i=c(e);i||!e.length?x(t,i?function(t){return t.insertAdjacentHTML(n?"afterbegin":"beforeend",e)}:function(t,i){return function(t,e,n){if(n){var i=t.childNodes[0];t.insertBefore(e,i)}else t.appendChild(e)}(t,0===i?e:e.cloneNode(!0),n)}):x(e,function(e){return z(t,e,n)})}y.prefixedProp=D,y.camelCase=N,b.extend({css:function(t,e){if(c(t))return t=D(t),arguments.length>1?this.each(function(n){return n.style[t]=e}):n.getComputedStyle(this[0])[t];for(var i in t)this.css(i,t[i]);return this}}),x(["Width","Height"],function(t){var e=t.toLowerCase();b[e]=function(){return this[0].getBoundingClientRect()[e]},b["inner"+t]=function(){return this[0]["client"+t]},b["outer"+t]=function(e){return this[0]["offset"+t]+(e?I(this,"margin"+("Width"===t?"Left":"Top"))+I(this,"margin"+("Width"===t?"Right":"Bottom")):0)}}),b.extend({off:function(t,e){return this.each(function(n){return F(n,t,e)})},on:function(t,e,n,i){var r;if(!c(t)){for(var o in t)this.on(o,e,t[o]);return this}return l(e)&&(n=e,e=null),"ready"===t?(v(n),this):(e&&(r=n,n=function(t){for(var n=t.target;!w(n,e);){if(n===this)return n=!1;n=n.parentNode}n&&r.call(n,t)}),this.each(function(e){var r=n;i&&(r=function(){n.apply(this,arguments),F(e,t,r)}),function(t,e,n){var i=M(t,"_cashEvents")||E(t,"_cashEvents",{});i[e]=i[e]||[],i[e].push(n),t.addEventListener(e,n)}(e,t,r)}))},one:function(t,e,n){return this.on(t,e,n,!0)},ready:v,trigger:function(t,n){var i=e.createEvent("HTMLEvents");return i.data=n,i.initEvent(t,!0,!1),this.each(function(t){return t.dispatchEvent(i)})}}),b.extend({serialize:function(){var t="";return x(this[0].elements||this,function(e){if(!e.disabled&&"FIELDSET"!==e.tagName){var n=e.name;switch(e.type.toLowerCase()){case"file":case"reset":case"submit":case"button":break;case"select-multiple":var i=j(e);null!==i&&x(i,function(e){t+=R(n,e)});break;default:var r=j(e);null!==r&&(t+=R(n,r))}}}),t.substr(1)},val:function(t){return void 0===t?j(this[0]):this.each(function(e){return e.value=t})}}),b.extend({after:function(t){return y(t).insertAfter(this),this},append:function(t){return z(this,t),this},appendTo:function(t){return z(y(t),this),this},before:function(t){return y(t).insertBefore(this),this},clone:function(){return y(this.map(function(t){return t.cloneNode(!0)}))},empty:function(){return this.html(""),this},html:function(t){if(void 0===t)return this[0].innerHTML;var e=t.nodeType?t[0].outerHTML:t;return this.each(function(t){return t.innerHTML=e})},insertAfter:function(t){var e=this;return y(t).each(function(t,n){var i=t.parentNode,r=t.nextSibling;e.each(function(t){i.insertBefore(0===n?t:t.cloneNode(!0),r)})}),this},insertBefore:function(t){var e=this;return y(t).each(function(t,n){var i=t.parentNode;e.each(function(e){i.insertBefore(0===n?e:e.cloneNode(!0),t)})}),this},prepend:function(t){return z(this,t,!0),this},prependTo:function(t){return z(y(t),this,!0),this},remove:function(){return this.each(function(t){return t.parentNode.removeChild(t)})},text:function(t){return void 0===t?this[0].textContent:this.each(function(e){return e.textContent=t})}});var V=e.documentElement;return b.extend({position:function(){var t=this[0];return{left:t.offsetLeft,top:t.offsetTop}},offset:function(){var t=this[0].getBoundingClientRect();return{top:t.top+n.pageYOffset-V.clientTop,left:t.left+n.pageXOffset-V.clientLeft}},offsetParent:function(){return y(this[0].offsetParent)}}),b.extend({children:function(t){var e=[];return this.each(function(t){s.apply(e,t.children)}),e=k(e),t?e.filter(function(e){return w(e,t)}):e},closest:function(t){return!t||this.length<1?y():this.is(t)?this.filter(t):this.parent().closest(t)},is:function(t){if(!t)return!1;var e=!1,n=C(t);return this.each(function(i){return!(e=n(i,t))}),e},find:function(t){if(!t||t.nodeType)return y(t&&this.has(t).length?t:null);var e=[];return this.each(function(n){s.apply(e,p(t,n))}),k(e)},has:function(t){var e=c(t)?function(e){return 0!==p(t,e).length}:function(e){return e.contains(t)};return this.filter(e)},next:function(){return y(this[0].nextElementSibling)},not:function(t){if(!t)return this;var e=C(t);return this.filter(function(n){return!e(n,t)})},parent:function(){var t=[];return this.each(function(e){e&&e.parentNode&&t.push(e.parentNode)}),k(t)},parents:function(t){var n,i=[];return this.each(function(r){for(n=r;n&&n.parentNode&&n!==e.body.parentNode;)n=n.parentNode,(!t||t&&w(n,t))&&i.push(n)}),k(i)},prev:function(){return y(this[0].previousElementSibling)},siblings:function(){var t=this.parent().children(),e=this[0];return t.filter(function(t){return t!==e})}}),y})?i.call(e,n,e,t):i)||(t.exports=r)},function(t,e,n){"use strict";t.exports={run:function(t,e,n){var i=n&&n.el||"",r=t.Canvas,o=this.dragger,s=n.options||{},a=r.getCanvasView();return s.prefix=t.getConfig().stylePrefix,s.mousePosFetcher=r.getMouseRelativePos,s.posFetcher=a.getElementPos.bind(a),o||(o=t.Utils.Dragger.init(s),this.dragger=o),o.setOptions(s),o.focus(i),s.event&&o.start(s.event),o},stop:function(){this.canvasResizer&&this.canvasResizer.blur()}}},function(t,e,n){"use strict";t.exports={run:function(t,e,n){var i=n||{},r=i.el||"",o=t.Canvas,s=this.canvasResizer,a=i.options||{},l=o.getCanvasView();return a.ratioDefault=1,a.appendTo=o.getResizerEl(),a.prefix=t.getConfig().stylePrefix,a.posFetcher=l.getElementPos.bind(l),a.mousePosFetcher=o.getMouseRelativePos,s&&!i.forceNew||(this.canvasResizer=t.Utils.Resizer.init(a),s=this.canvasResizer),s.setOptions(a),s.blur(),s.focus(r),s},stop:function(){var t=this.canvasResizer;t&&t.blur()}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(1));t.exports={getPanels:function(t){return this.panels||(this.panels=t.Panels.getPanelsEl()),this.panels},tglPointers:function(t,e){var n=t.Canvas.getBody().querySelectorAll("."+this.ppfx+"no-pointer");i.default.each(n,function(t){t.style.pointerEvents=e?"":"all"})},run:function(t,e){e&&e.set&&e.set("active",!1),t.stopCommand("sw-visibility"),t.getModel().stopDefault();var n=this.getPanels(t),i=t.Canvas.getElement(),r=t.getEl(),o=t.Config.stylePrefix;this.helper||(this.helper=document.createElement("span"),this.helper.className=o+"off-prv fa fa-eye-slash",r.appendChild(this.helper),this.helper.onclick=function(){t.stopCommand("preview")}),this.helper.style.display="inline-block",this.tglPointers(t),n.style.display="none";var s=i.style;s.width="100%",s.height="100%",s.top="0",s.left="0",s.padding="0",s.margin="0",t.trigger("change:canvasOffset")},stop:function(t,e){var n=this.getPanels(t);t.runCommand("sw-visibility"),t.getModel().runDefault(),n.style.display="block",t.Canvas.getElement().setAttribute("style",""),this.helper&&(this.helper.style.display="none"),t.trigger("change:canvasOffset"),this.tglPointers(t,1)}}},function(t,e,n){"use strict";t.exports={isEnabled:function(){var t=document;return t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement?1:0},enable:function(t){var e="";return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?(e="webkit",t.webkitRequestFullscreen()):t.mozRequestFullScreen?(e="moz",t.mozRequestFullScreen()):t.msRequestFullscreen?t.msRequestFullscreen():console.warn("Fullscreen not supported"),e},disable:function(){var t=document;t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen()},fsChanged:function(t,e){document;var n=(t||"")+"fullscreenchange";this.isEnabled()||(this.stop(null,this.sender),document.removeEventListener(n,this.fsChanged))},run:function(t,e){this.sender=e;var n=this.enable(t.getContainer());this.fsChanged=this.fsChanged.bind(this,n),document.addEventListener(n+"fullscreenchange",this.fsChanged),t&&t.trigger("change:canvasOffset")},stop:function(t,e){e&&e.set&&e.set("active",!1),this.disable(),t&&t.trigger("change:canvasOffset")}}},function(t,e,n){"use strict";t.exports={run:function(t){for(var e=t.getSelected(),n=e&&e.parent();n&&!n.get("selectable");)n=n.parent();n&&t.select(n)}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0)).default.$;t.exports={getOffsetMethod:function(t){return"get"+(t||"")+"OffsetViewerEl"},run:function(t,e,n){var r=n||{},o=r.state||"",s=t.getConfig();if(s.showOffsets&&(s.showOffsetsSelected||"Fixed"!=o)){var a=t.Canvas,l=r.el||"",c=r.elPos||a.getElementPos(l),u=window.getComputedStyle(l),h=this.ppfx,d=o+"State",f=a[this.getOffsetMethod(o)]();f.style.display="block";var p=this["marginT"+o],g=this["marginB"+o],v=this["marginL"+o],m=this["marginR"+o],y=this["padT"+o],b=this["padB"+o],x=this["padL"+o],w=this["padR"+o];if(!this[d]){var C=o.toLowerCase(),k=C+"margin-v",S=C+"padding-v",T=i('
').get(0),E=i('
').get(0),M=h+k+"-el"+" "+(h+k),A=h+S+"-el"+" "+(h+S);p=i('
').get(0),g=i('
').get(0),v=i('
').get(0),m=i('
').get(0),y=i('
').get(0),b=i('
').get(0),x=i('
').get(0),w=i('
').get(0),this["marginT"+o]=p,this["marginB"+o]=g,this["marginL"+o]=v,this["marginR"+o]=m,this["padT"+o]=y,this["padB"+o]=b,this["padL"+o]=x,this["padR"+o]=w,T.appendChild(p),T.appendChild(g),T.appendChild(v),T.appendChild(m),E.appendChild(y),E.appendChild(b),E.appendChild(x),E.appendChild(w),f.appendChild(T),f.appendChild(E),this[d]="1"}var O=u.marginLeft.replace("px",""),P=parseInt(u.marginTop.replace("px","")),_=parseInt(u.marginBottom.replace("px","")),L=p.style,N=g.style,D=v.style,I=m.style,F=y.style,R=b.style,j=x.style,z=w.style,V=parseInt(c.left);L.height=u.marginTop,L.width=u.width,L.top=c.top-u.marginTop.replace("px","")+"px",L.left=V+"px",N.height=u.marginBottom,N.width=u.width,N.top=c.top+c.height+"px",N.left=V+"px";var H=c.height+P+_+"px",$=c.top-P+"px";D.height=H,D.width=u.marginLeft,D.top=$,D.left=V-O+"px",I.height=H,I.width=u.marginRight,I.top=$,I.left=V+c.width+"px";var B=parseInt(u.paddingTop.replace("px",""));F.height=u.paddingTop,F.width=u.width,F.top=c.top+"px",F.left=V+"px";var W=parseInt(u.paddingBottom.replace("px",""));R.height=u.paddingBottom,R.width=u.width,R.top=c.top+c.height-W+"px",R.left=V+"px";var U=c.height-W-B+"px",q=c.top+B+"px";j.height=U,j.width=u.paddingLeft,j.top=q,j.left=c.left+"px";var K=parseInt(u.paddingRight.replace("px",""));z.height=U,z.width=u.paddingRight,z.top=q,z.left=c.left+c.width-K+"px"}},stop:function(t,e,n){var i=(n||{}).state||"",r=this.getOffsetMethod(i);t.Canvas[r]().style.display="none"}}},function(t,e,n){"use strict";t.exports={run:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.Modal,r=t.AssetManager,o=r.getConfig(),s=r.getContainer(),a=n.modalTitle||o.modalTitle||"",l=n.types,c=n.accept;if(r.setTarget(n.target),r.onClick(n.onClick),r.onDblClick(n.onDblClick),r.onSelect(n.onSelect),!this.rendered||l){var u=r.getAll();l&&(u=u.filter(function(t){return-1!==l.indexOf(t.get("type"))})),r.render(u),this.rendered=1}if(c){var h=s.querySelector("input#"+o.stylePrefix+"uploadFile");h&&h.setAttribute("accept",c)}i.setTitle(a),i.setContent(s),i.open()}}},function(t,e,n){"use strict";t.exports={run:function(t,e){var n=t.BlockManager,i=t.Panels;if(!this.blocks){n.render();var r="views-container",o=document.createElement("div"),s=i.getPanel(r)||i.addPanel({id:r});o.appendChild(n.getContainer()),s.set("appendContent",o).trigger("change:appendContent"),this.blocks=o}this.blocks.style.display="block"},stop:function(){var t=this.blocks;t&&(t.style.display="none")}}},function(t,e,n){"use strict";var i=n(0).$;t.exports={run:function(t,e){this.sender=e;var n=t.Config.stylePrefix,r=t.TraitManager;if(!this.$cn){var o=r.getTraitsViewer(),s=r.getConfig();this.$cn=i("
"),this.$cn2=i("
"),this.$cn.append(this.$cn2),this.$header=i("
").append('
'+s.textNoElement+"
"),this.$cn.append(this.$header),this.$cn2.append('
'+s.labelContainer+"
"),this.$cn2.append(o.render().el);var a=t.Panels;(a.getPanel("views-container")?a.getPanel("views-container"):a.addPanel({id:"views-container"})).set("appendContent",this.$cn.get(0)).trigger("change:appendContent"),this.target=t.getModel(),this.listenTo(this.target,"component:toggled",this.toggleTm)}this.toggleTm()},toggleTm:function(){var t=this.sender;t&&t.get&&!t.get("active")||(1===this.target.getSelectedAll().length?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show()))},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));n(77);var r=i.default.$;t.exports={run:function(t,e){if(this.sender=e,!this.$cn){var n=t.getConfig(),i=t.Panels;this.$cn=r("
"),this.$cn2=r("
"),this.$cn.append(this.$cn2);var o=t.DeviceManager;if(o&&n.showDevices)i.addPanel({id:"devices-c"}).set("appendContent",o.render()).trigger("change:appendContent");var s=t.SelectorManager;s&&this.$cn2.append(s.render([])),this.$cn2.append(t.StyleManager.render());var a=t.StyleManager.getConfig(),l=a.stylePrefix;this.$header=r('
'+a.textNoElement+"
"),this.$cn.append(this.$header),i.getPanel("views-container")?this.panel=i.getPanel("views-container"):this.panel=i.addPanel({id:"views-container"}),this.panel.set("appendContent",this.$cn).trigger("change:appendContent"),this.target=t.editor,this.listenTo(this.target,"component:toggled",this.toggleSm)}this.toggleSm()},toggleSm:function(){var t=this.target,e=this.sender;e&&e.get&&!e.get("active")||(1===t.getSelectedAll().length?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show()))},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));n(54),i.default.$;t.exports={run:function(t){var e=t.LayerManager,n=t.Panels;if(!this.layers){var i="views-container",r=document.createElement("div"),o=n.getPanel(i)||n.addPanel({id:i});r.appendChild(e.render()),o.set("appendContent",r).trigger("change:appendContent"),this.layers=r}this.layers.style.display="block"},stop:function(){var t=this.layers;t&&(t.style.display="none")}}},function(t,e,n){"use strict";t.exports={run:function(t){t.Canvas.getBody().className=this.ppfx+"dashed"},stop:function(t){t.Canvas.getBody().className=""}}},function(t,e,n){"use strict";var i=r(n(1));r(n(0));function r(t){return t&&t.__esModule?t:{default:t}}var o=n(7);t.exports=i.default.extend({},o,{beforeDraw:function(t){t.type="text",t.style||(t.style={}),t.style.padding="10px"},afterDraw:function(t){t&&t.set&&(t.trigger("focus"),this.sender&&this.sender.set("active",!1))}})},function(t,e,n){"use strict";var i=s(n(1)),r=s(n(0)),o=n(2);function s(t){return t&&t.__esModule?t:{default:t}}var a=n(8),l=n(13),c=r.default.$;t.exports=i.default.extend({},l,a,{init:function(t){a.init.apply(this,arguments),i.default.bindAll(this,"initSorter","rollback","onEndMove"),this.opt=t,this.hoverClass=this.ppfx+"highlighter-warning",this.badgeClass=this.ppfx+"badge-warning",this.noSelClass=this.ppfx+"no-select"},enable:function(){for(var t=arguments.length,e=Array(t),n=0;n2&&void 0!==arguments[2]&&arguments[2];e&&e.set&&e.set("active",0);var n=t.getConfig(),r=t.Modal,o=n.stylePrefix;if(this.cm=t.CodeManager||null,!this.$editors){var s=this.buildEditor("htmlmixed","hopscotch","HTML"),a=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=s.el,this.cssEditor=a.el;var l=i('
');l.append(s.$el).append(a.$el),this.$editors=l}r.setTitle(n.textViewCode),r.setContent(this.$editors),r.open(),this.htmlEditor.setContent(t.getHtml()),this.cssEditor.setContent(t.getCss())},stop:function(t){var e=t.Modal;e&&e.close()},buildEditor:function(t,e,n){var i=document.createElement("textarea");!this.codeMirror&&(this.codeMirror=this.cm.getViewer("CodeMirror"));var r=this.codeMirror.clone().set({label:n,codeName:t,theme:e,input:i}),o=new this.cm.EditorView({model:r,config:this.cm.getConfig()}).render().$el;return r.init(i),{el:r,$el:o}}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=i.default.$;t.exports=i.default.View.extend({initialize:function(t){this.config=t||{},this.editorModel=this.em=this.config.em||{},this.pfx=this.config.stylePrefix,this.ppfx=this.config.pStylePrefix,this.hoverClass=this.pfx+"hover",this.badgeClass=this.pfx+"badge",this.plhClass=this.pfx+"placeholder",this.freezClass=this.ppfx+"freezed",this.canvas=this.em.get&&this.em.get("Canvas"),this.em.get&&this.setElement(this.getCanvas()),this.canvas&&(this.$canvas=this.$el,this.$wrapper=r(this.getCanvasWrapper()),this.frameEl=this.canvas.getFrameEl(),this.canvasTool=this.getCanvasTools(),this.bodyEl=this.getCanvasBody()),this.init(this.config)},onFrameScroll:function(t){},getCanvas:function(){return this.canvas.getElement()},getCanvasBody:function(){return this.canvas.getBody()},getCanvasWrapper:function(){return this.canvas.getWrapperEl()},getCanvasTools:function(){return this.canvas.getToolsEl()},offset:function(t){var e=t.getBoundingClientRect();return{top:e.top+t.ownerDocument.body.scrollTop,left:e.left+t.ownerDocument.body.scrollLeft}},init:function(t){},callRun:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.id;if(t.trigger("run:"+n+":before",e),!e||!e.abort){var i=e.sender||t,r=this.run(t,i,e);return t.trigger("run:"+n,r,e),r}t.trigger("abort:"+n,e)},callStop:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.id,i=e.sender||t;t.trigger("stop:"+n+":before",e);var r=this.stop(t,i,e);return t.trigger("stop:"+n,r,e),r},run:function(t,e){},stop:function(t,e){}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e\n \n
\n
\n
\n
\n '},inputClass:function(){var t=this.ppfx;return this.opts.contClass||t+"field "+t+"field-integer"},initialize:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];o.prototype.initialize.apply(this,arguments),(0,i.bindAll)(this,"moveIncrement","upIncrement"),this.doc=document,this.listenTo(this.model,"change:unit",this.handleModelChange)},setValue:function(t,e){var n=e||{},i=this.validateInputValue(t,{deepCheck:1}),r={value:i.value};(i.unit||i.force)&&(r.unit=i.unit),this.model.set(r,n),n.silent&&this.handleModelChange()},handleChange:function(t){t.stopPropagation(),this.setValue(this.getInputEl().value),this.elementUpdated()},handleUnitChange:function(t){t.stopPropagation();var e=this.getUnitEl().value;this.model.set("unit",e),this.elementUpdated()},elementUpdated:function(){this.model.trigger("el:change")},handleModelChange:function(){var t=this.model;this.getInputEl().value=t.get("value");var e=this.getUnitEl();e&&(e.value=t.get("unit")||"")},getUnitEl:function(){if(!this.unitEl){var t=this.model,e=t.get("units")||[];if(e.length){var n=[];e.forEach(function(e){var i=e==t.get("unit")?"selected":"";n.push("")});var i=document.createElement("div");i.innerHTML='",this.unitEl=i.firstChild}}return this.unitEl},upArrowClick:function(){var t=this.model,e=t.get("step"),n=parseInt(t.get("value"),10);n=this.normalizeValue(n+e);var i=this.validateInputValue(n);t.set("value",i.value),this.elementUpdated()},downArrowClick:function(){var t=this.model,e=t.get("step"),n=parseInt(t.get("value"),10),i=this.normalizeValue(n-e),r=this.validateInputValue(i);t.set("value",r.value),this.elementUpdated()},downIncrement:function(t){t.preventDefault(),this.moved=0;var e=this.model.get("value");e=this.normalizeValue(e),this.current={y:t.pageY,val:e},(0,r.on)(this.doc,"mousemove",this.moveIncrement),(0,r.on)(this.doc,"mouseup",this.upIncrement)},moveIncrement:function(t){this.moved=1;var e=this.model,n=e.get("step"),i=this.current,r=this.normalizeValue(i.val+(i.y-t.pageY)*n);return this.prValue=this.validateInputValue(r).value,e.set("value",this.prValue,{avoidStore:1}),!1},upIncrement:function(){var t=this.model,e=t.get("step");if((0,r.off)(this.doc,"mouseup",this.upIncrement),(0,r.off)(this.doc,"mousemove",this.moveIncrement),this.prValue&&this.moved){var n=this.prValue-e;t.set("value",n,{avoidStore:1}).set("value",n+e),this.elementUpdated()}},normalizeValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.model.get("step"),i=0;if(isNaN(t))return e;if(t=parseFloat(t),Math.floor(t)!==t){var r=n.toString().split(".")[1];i=r?r.length:0}return i?parseFloat(t.toFixed(i)):t},validateInputValue:function(t,n){var r=0,o=n||{},s=this.model,a=(0,i.isUndefined)(t)?"":t,l=s.get("units")||[],c=s.get("unit")||l.length&&l[0]||"",u=s.get("max"),h=s.get("min");if(o.deepCheck){var d=s.get("fixedValues")||[];if(a){var f=new RegExp("^"+d.join("|"),"g");if(d.length&&f.test(a))a=a.match(f)[0],c="",r=1;else{var p=a+"";a+="",a=parseFloat(a.replace(",",".")),a=isNaN(a)?"":a;var g=p.replace(a,"");e.indexOf(l,g)>=0&&(c=g)}}}return(0,i.isUndefined)(u)||""===u||(a=a>u?u:a),(0,i.isUndefined)(h)||""===h||(a=a\n \n
\n '},inputValueChanged:function(){if(!this.model.get("detached")){for(var t=arguments.length,e=Array(t),n=0;n'),this.input=this.$input.get(0)),this.props||(this.props=t.get("properties")),!this.$props)){this.props.each(function(e,n){e&&"composite"==e.get("type")&&(this.props.remove(e),console.warn("Nested composite types not yet allowed.")),e.parent=t},this);var i=new(n(16))(this.getPropsConfig());this.$props=i.render().$el,this.properties=i.properties,this.$el.find("#"+this.pfx+"input-holder").append(this.$props)}},getPropsConfig:function(t){var e=this,n=this.model,i={config:this.config,collection:this.props,target:this.target,propTarget:this.propTarget,onChange:function(t,e,i){n.set("value",n.getFullValue(),i)},customValue:function(t,n){return e.valueOnIndex(n,t)}};return n.get("detached")&&delete i.onChange,i},valueOnIndex:function(t,e){var n=void 0,i=this.getTargetValue({ignoreDefault:1});i?n=i.split(" ")[t]:n=e&&e.getTargetValue({ignoreCustomValue:1,ignoreDefault:1});return e&&(n=e.model.parseValue(n).value),n}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.Model.extend({defaults:{id:"",label:"",open:!0,attributes:{}}})},function(t,e,n){"use strict";var i=n(1);t.exports={run:function(t){var e=t.getModel(),n=e.get("clipboard"),r=t.getSelected();n&&r&&!e.isEditing()&&(t.getSelectedAll().forEach(function(e){if(e){var r=e.collection,o=r.indexOf(e)+1,s=n.filter(function(t){return t.get("copyable")}),a=void 0;a=(0,i.contains)(n,e)&&e.get("copyable")?r.add(e.clone(),{at:o}):r.add(s.map(function(t){return t.clone()}),{at:o}),(a=(0,i.isArray)(a)?a:[a]).forEach(function(e){return t.trigger("component:clone",e)})}}),r.emitUpdate())}}},function(t,e,n){"use strict";t.exports={run:function(t){var e=t.getModel(),n=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e=0?r:t)}),e.length&&t.select(e)}}}},function(t,e,n){"use strict";t.exports={run:function(t){if(t.Canvas.hasFocus()&&!t.getModel().isEditing()){var e=[];t.getSelectedAll().forEach(function(t){var n=t.collection,i=n.indexOf(t),r=n.at(i+1);e.push(r||t)}),e.length&&t.select(e)}}}},function(t,e,n){"use strict";t.exports={run:function(t){if(t.Canvas.hasFocus()&&!t.getModel().isEditing()){var e=[];t.getSelectedAll().forEach(function(t){var n=t.parent();n&&e.push(n)}),e.length&&t.select(e)}}}},function(t,e,n){"use strict";t.exports={run:function(t){if(t.Canvas.hasFocus()&&!t.getModel().isEditing()){var e=[];t.getSelectedAll().forEach(function(t){var n=t.components(),i=n&&n.at(0);i&&e.push(i)}),e.length&&t.select(e)}}}},function(t,e,n){"use strict";var i=n(1);t.exports={run:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t.Canvas.hasFocus()&&!t.getModel().isEditing()){var r=n.component||t.getSelectedAll();return r=(0,i.isArray)(r)?[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e':"")+'\n
\n
\n
\n \n '+t.getIcon()+'\n '+h+'\n
\n
\n
\n
'+(r||"")+'
\n
\n \n
\n
'},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t,this.level=t.level,this.config=t.config,this.em=t.config.em,this.ppfx=this.em.get("Config").stylePrefix,this.sorter=t.sorter||"",this.pfx=this.config.stylePrefix;var e=this.pfx,n=this.ppfx,i=this.model,r=i.get("components");i.set("open",!1),this.listenTo(r,"remove add change reset",this.checkChildren),this.listenTo(i,"change:status",this.updateStatus),this.listenTo(i,"change:open",this.updateOpening),this.listenTo(i,"change:style:display",this.updateVisibility),this.className=e+"layer no-select "+n+"two-color",this.inputNameCls=n+"layer-name",this.clsTitleC=e+"layer-title-c",this.clsTitle=e+"layer-title",this.clsCaret=e+"layer-caret",this.clsCount=e+"layer-count",this.clsMove=e+"layer-move",this.clsChildren=e+"layer-children",this.clsNoChild=e+"layer-no-chld",this.$el.data("model",i),this.$el.data("collection",r),i.viewLayer=this},getVisibilityEl:function(){return this.eyeEl||(this.eyeEl=this.$el.children("."+this.pfx+"layer-vis")),this.eyeEl},updateVisibility:function(){var t=this.pfx+"layer-hidden",e="none"==this.model.getStyle().display?"addClass":"removeClass";this.$el[e](t),this.getVisibilityEl()[e]("fa-eye-slash")},toggleVisibility:function(t){t&&t.stopPropagation();var e=this.model,n=e.getStyle();"none"==n.display?delete n.display:n.display="none",e.setStyle(n)},handleEdit:function(t){t&&t.stopPropagation();var e=this.getInputName();e.contentEditable=!0,e.focus()},handleEditEnd:function(t){t&&t.stopPropagation();var e=this.getInputName(),n=e.textContent;e.contentEditable=!1,this.model.set({name:n})},getInputName:function(){return this.inputName||(this.inputName=this.el.querySelector("."+this.inputNameCls)),this.inputName},updateOpening:function(){var t=this.opt.opened||{},e=this.model;e.get("open")?(this.$el.addClass("open"),this.getCaret().addClass("fa-chevron-down"),t[e.cid]=e):(this.$el.removeClass("open"),this.getCaret().removeClass("fa-chevron-down"),delete t[e.cid])},toggleOpening:function(t){t.stopPropagation(),this.model.get("components").length&&this.model.set("open",!this.model.get("open"))},handleSelect:function(t){t.stopPropagation();var e=this.em,n=this.config;if(e){var i=this.model;e.setSelected(i,{fromLayers:1});var r=n.scrollCanvas;r&&e.get("Canvas").scrollTo(i,r)}},handleHover:function(t){t.stopPropagation();var e=this.em,n=this.config,i=this.model;e&&n.showHover&&e.setHovered(i,{fromLayers:1})},startSort:function(t){t.stopPropagation();var e=this.sorter;0===t.button&&e&&e.startSort(t.target)},freeze:function(){this.$el.addClass(this.pfx+"opac50"),this.model.set("open",0)},unfreeze:function(){this.$el.removeClass(this.pfx+"opac50")},updateStatus:function(t){s.prototype.updateStatus.apply(this,[{avoidHover:!this.config.highlightHover}])},isVisible:function(){var t=this.model.get("style").display;if(!t||"none"!=t)return 1},checkChildren:function(){var t=this.model,e=this.countChildren(t),n=(this.pfx,this.clsNoChild),i=this.$el.children("."+this.clsTitleC).children("."+this.clsTitle);this.cnt||(this.cnt=this.$el.children("."+this.clsCount)),e?(i.removeClass(n),this.cnt.html(e)):(i.addClass(n),this.cnt.empty(),t.set("open",0))},countChildren:function(t){var e=0;return t.get("components").each(function(t){var n=this.opt.isCountable,i=this.config.hideTextnode;n&&!n(t,i)||e++},this),e},getCaret:function(){if(!this.caret||!this.caret.length){this.pfx;this.caret=this.$el.children("."+this.clsTitleC).find("."+this.clsCaret)}return this.caret},setRoot:function(t){t=(0,i.isString)(t)?this.em.getWrapper().find(t)[0]:t;var e=(0,r.getModel)(t,a);e&&(this.stopListening(),this.model=e,this.initialize(this.opt),this.render())},render:function(){var t=this.model,e=this.pfx,r=this.isVisible(),o=this.$el.empty(),s=this.level+1;(0,i.isUndefined)(l)&&(l=n(113));var a=new l({collection:t.get("components"),config:this.config,sorter:this.sorter,opened:this.opt.opened,parent:t,level:s}).render().$el;return this.config.showWrapper||1!==s?(o.html(this.template(t)),o.find("."+this.clsChildren).append(a)):o.append(a),t.get("draggable")&&this.config.sortable||o.children("."+this.clsMove).remove(),!r&&(this.className+=" "+e+"hide"),o.attr("class",this.className),this.updateOpening(),this.updateStatus(),this.updateVisibility(),this}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return(n=i({},r.default,e)).stylePrefix=e.pStylePrefix,t=n.em,this},getConfig:function(){return n},onLoad:function(){e=new o.default({level:0,config:n,opened:n.opened||{},model:t.get("DomComponents").getWrapper()}),t&&t.on("component:selected",this.componentChanged),this.componentChanged()},postRender:function(){var t=n.appendTo,e=n.root;(e&&this.setRoot(e),t)&&((0,s.isElement)(t)?t:document.querySelector(t)).appendChild(this.render())},setRoot:function(t){return e.setRoot(t),this},getRoot:function(){return e.model},getAll:function(){return e},componentChanged:function(e){if(!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).fromLayers){var i=t.get("opened"),r=t.getSelected(),o=n.scrollLayers,s=r&&r.collection?r.collection.parent:null;for(var a in i)i[a].set("open",0);for(;s;)s.set("open",1),i[s.cid]=s,s=s.collection?s.collection.parent:null;if(r&&o){var l=r.viewLayer&&r.viewLayer.el;l&&l.scrollIntoView(o)}}},render:function(){return e.render().el}}}},function(t,e,n){"use strict";var i=n(2),r=n(3);t.exports=r.extend({events:{dblclick:"enableEditing",input:"onInput"},initialize:function(t){r.prototype.initialize.apply(this,arguments),this.disableEditing=this.disableEditing.bind(this);var e=this.model,n=this.em;this.listenTo(e,"focus active",this.enableEditing),this.listenTo(e,"change:content",this.updateContent),this.rte=n&&n.get("RichTextEditor")},enableEditing:function(t){t&&t.stopPropagation&&t.stopPropagation();var e=this.rte;if(!this.rteEnabled&&this.model.get("editable")){if(e)try{this.activeRte=e.enable(this,this.activeRte)}catch(t){console.error(t)}this.rteEnabled=1,this.toggleEvents(1)}},disableEditing:function(){var t=this.model,e=t.get("editable"),n=this.rte;if(n&&e){try{n.disable(this,this.activeRte)}catch(t){console.error(t)}var i=this.getChildrenContainer().innerHTML,r=t.get("components");if(r.length&&r.reset(),t.set("content",""),n.customRte)t.set("content",i);else{t.trigger("change:content",t),r.add(i),r.each(function(t){return function t(e){e.set({editable:0,highlightable:0,removable:0,draggable:0,copyable:0,toolbar:""}),e.get("components").each(function(e){return t(e)})}(t)}),r.trigger("resetNavigator")}}this.rteEnabled=0,this.toggleEvents()},onInput:function(t){var e=this.em;e&&e.trigger("change:canvasOffset")},disablePropagation:function(t){t.stopPropagation()},toggleEvents:function(t){var e=t?"on":"off",n={on:i.on,off:i.off};this.em.setEditing(t);var r=[this.el.ownerDocument,document];n.off(r,"mousedown",this.disableEditing),n[e](r,"mousedown",this.disableEditing),this.$el.off("mousedown",this.disablePropagation),this.$el[e]("mousedown",this.disablePropagation)}})},function(t,e,n){"use strict";n(0);var i=n(55);t.exports=i.extend({render:function(){for(var t=arguments.length,e=Array(t),n=0;n1&&void 0!==arguments[1]&&arguments[1];var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.config.em,i=this.collection.indexOf(t);this.addToCollection(t,null,i),n&&!e.temporary&&n.trigger("component:add",t)},addToCollection:function(t,e,i){this.compView||(this.compView=n(3));for(var o=e||null,s=this.compView,a=this.opts.componentTypes,l=t.get("type"),c=0;c1&&void 0!==arguments[1]?arguments[1]:{};this.listenTo(this,"add",this.onAdd),this.config=e.config,this.em=e.em,this.model=function(t,n){var i,r=e.componentTypes;n.em=e.em,n.config=e.config,n.componentTypes=r;for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof t){var n=this.em.get("CssComposer"),i=this.em.get("Parser").parseHtml(t);if(t=i.html,i.css&&n){var o=e.avoidUpdateStyle;n.addCollection(i.css,{extend:1,avoidUpdateStyle:o})}}return r.Collection.prototype.add.apply(this,[t,e])},onAdd:function(t,e,n){var r=this.em,o=t.getStyle(),s=r&&r.getConfig("avoidInlineStyle");if(!(0,i.isEmpty)(o)&&!s&&r&&r.get&&r.getConfig("forceClass")){var a=t.cid;r.get("CssComposer").setClassRule(a,o);t.setStyle({}),t.addClass(a)}}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.View.extend({itemView:"",itemsView:"",itemType:"type",initialize:function(t,e){this.config=e||{}},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,i=this.itemView,r=t.get(this.itemType);this.itemsView&&this.itemsView[r]&&(i=this.itemsView[r]);var o=new i({model:t,config:this.config},this.config).render().el;n?n.appendChild(o):this.$el.append(o)},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.length&&this.collection.each(function(e){this.add(e,t)},this),this.$el.append(t),this}})},function(t,e,n){"use strict";t.exports=n(0).View.extend({tagName:"style",initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{};var e=this.model;this.listenTo(e,"change:style change:state change:mediaText",this.render),this.listenTo(e,"destroy remove",this.remove),this.listenTo(e.get("selectors"),"change",this.render)},render:function(){var t=this.model.get("important");return this.el.innerHTML=this.model.toCSS({important:t}),this}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.isString)(e)&&(e=s(e));var a=this.getStyle(),l=i({},e);this.set("style",l,n);var c=(0,o.shallowDiff)(a,l);return(0,r.keys)(c).forEach(function(e){var n=t.em;t.trigger("change:style:"+e),n&&(n.trigger("styleable:change",t,e),n.trigger("styleable:change:"+e,t,e))}),l},addStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"string"==typeof t?t={prop:e}:n=e||{},t=this.extendStyle(t),this.setStyle(t,n)},removeStyle:function(t){var e=this.getStyle();delete e[t],this.setStyle(e)},styleToString:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=this.getStyle();for(var i in n){var o=t.important,s=(0,r.isArray)(o)?o.indexOf(i)>=0:o,a=n[i]+(s?" !important":"");a&&e.push(i+":"+a+";")}return e.join("")}}},function(t,e,n){"use strict";var i=n(1),r=a(i),o=a(n(0)),s=a(n(61));function a(t){return t&&t.__esModule?t:{default:t}}var l=n(19);t.exports=o.default.Model.extend(s.default).extend({defaults:{selectors:{},selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0,atRuleType:"",singleAtRule:0,important:0},initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.config=t||{};var n=e.em,i=this.config.selectors||[];if(this.em=n,n){var r=n.get("SelectorManager"),o=[];i.forEach(function(t){o.push(r.add(t))}),i=o}this.set("selectors",new l(i))},getAtRule:function(){var t=this.get("atRuleType"),e=this.get("mediaText"),n=t?"@"+t:e?"@media":"";return n+(e&&n?" "+e:"")},selectorsToString:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=this.get("state"),i=this.get("selectorsAdd"),r=this.get("selectors").getFullString(),o=n?":"+n:"";return r&&e.push(""+r+o),i&&!t.skipAdd&&e.push(i),e.join(", ")},getDeclaration:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e="",n=this.selectorsToString(),i=this.styleToString(t),r=this.get("singleAtRule");return(n||r)&&i&&(e=r?i:n+"{"+i+"}"),e},toCSS:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e="",n=this.getAtRule(),i=this.getDeclaration(t);return i&&(e=i),n&&e&&(e=n+"{"+e+"}"),e},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;n3&&void 0!==arguments[3]?arguments[3]:{},o=e||"",s=n||"",a=i.selectorsAdd||"",l=i.atRuleType||"";t instanceof Array||t.models||(t=[t]);var c=r.default.map(t.models||t,function(t){return t.get("name")}),u=r.default.map(this.get("selectors").models,function(t){return t.get("name")});if(c.length!==u.length)return!1;for(var h=0;h\n
<%= title %>
\n multiple/>\n
\n \n '),events:{},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t;var e=t.config||{};this.config=e,this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.target=this.options.globalCollection||{},this.uploadId=this.pfx+"uploadFile",this.disabled=void 0!==e.disableUpload?e.disableUpload:!e.upload&&!e.embedAsBase64,this.events["change #"+this.uploadId]="uploadFile";var n=e.uploadFile;n?this.uploadFile=n.bind(this):e.embedAsBase64&&(this.uploadFile=this.constructor.embedAsBase64),this.delegateEvents()},onUploadStart:function(){var t=this.config.em;t&&t.trigger("asset:upload:start")},onUploadEnd:function(t){var e=this.config.em;e&&e.trigger("asset:upload:end",t)},onUploadError:function(t){var e=this.config.em;console.error(t),this.onUploadEnd(t),e&&e.trigger("asset:upload:error",t)},onUploadResponse:function(t,e){var n=this.config.em,i=this.config,r=this.target,o="string"==typeof t?JSON.parse(t):t;n&&n.trigger("asset:upload:response",o),i.autoAdd&&r&&r.add(o.data,{at:0}),this.onUploadEnd(t),e&&e(o)},uploadFile:function(t,e){for(var n=this,i=t.dataTransfer?t.dataTransfer.files:t.target.files,r=new FormData,s=this.config,a=s.params,l=0;l'+i.dropzoneContent+"
"),h(),"draggable"in o&&[o,a].forEach(function(t){t.ondragover=d,t.ondragleave=f,t.ondrop=p})},render:function(){return this.$el.html(this.template({title:this.config.uploadText,uploadId:this.uploadId,disabled:this.disabled,pfx:this.pfx})),this.initDrop(),this.$el.attr("class",this.pfx+"file-uploader"),this}},{embedAsBase64:function(t,e){var n=this,i=t.dataTransfer?t.dataTransfer.files:t.target.files,r={data:[]};if(FileReader){var o=[],s=/^(.+)\/(.+)$/,a=function(t){var e=new Promise(function(e,n){var i=new FileReader;i.addEventListener("load",function(r){var o=void 0,a=t.name,l=s.exec(t.type);if("image"===(o=l?l[1]:t.type)){var c={src:i.result,name:a,type:o,height:0,width:0},u=new Image;u.addEventListener("error",function(t){n(t)}),u.addEventListener("load",function(){c.height=u.height,c.width=u.width,e(c)}),u.src=c.src}else e(o?{src:i.result,name:a,type:o}:i.result)}),i.addEventListener("error",function(t){n(t)}),i.addEventListener("abort",function(t){n("Aborted")}),i.readAsDataURL(t)});o.push(e)},l=!0,c=!1,u=void 0;try{for(var h,d=i[Symbol.iterator]();!(l=(h=d.next()).done);l=!0){a(h.value)}}catch(t){c=!0,u=t}finally{try{!l&&d.return&&d.return()}finally{if(c)throw u}}Promise.all(o).then(function(t){r.data=t,n.onUploadResponse(r,e)},function(t){n.onUploadError(t)})}else this.onUploadError(new Error("Unsupported platform, FileReader is not defined"))}})},function(t,e,n){"use strict";(function(e){var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t,this.collection=t.collection;var e=t.config||{};this.config=e,this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.em=e.em,this.className=this.pfx+"asset",this.listenTo(this.model,"destroy remove",this.remove),this.model.view=this;var n=this.init&&this.init.bind(this);n&&n(t)},template:function(){var t=this.pfx;return'\n
\n '+this.getPreview()+'\n
\n
\n '+this.getInfo()+'\n
\n
\n ⨯\n
\n '},updateTarget:function(t){t&&t.set&&(t.set("attributes",e.clone(t.get("attributes"))),t.set("src",this.model.get("src")))},getPreview:function(){return""},getInfo:function(){return""},render:function(){var t=this.el;return t.innerHTML=this.template(this,this.model),t.className=this.className,this}})}).call(this,n(1))},function(t,e,n){"use strict";t.exports=n(64).extend({events:{"click [data-toggle=asset-remove]":"onRemove",click:"onClick",dblclick:"onDblClick"},getPreview:function(){var t=this.pfx;return'\n
\n
\n '},getInfo:function(){var t=this.pfx,e=this.model,n=e.get("name"),i=e.get("width"),r=e.get("height"),o=e.get("unitDim"),s=i&&r?i+"x"+r+o:"";return'\n
'+(n=n||e.getFilename())+'
\n
'+s+"
\n "},init:function(t){var e=this.pfx;this.className+=" "+e+"asset-image"},onClick:function(){var t=this.config.onClick,e=this.model;this.collection.trigger("deselectAll"),this.$el.addClass(this.pfx+"highlight"),"function"==typeof t?t(e):this.updateTarget(this.collection.target)},onDblClick:function(){var t=this.em,e=this.config.onDblClick,n=this.model;"function"==typeof e?e(n):(this.updateTarget(this.collection.target),t&&t.get("Modal").close());var i=this.collection.onSelect;"function"==typeof i&&i(this.model)},onRemove:function(t){t.stopImmediatePropagation(),this.model.collection.remove(this.model)}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return this.set({value:void 0,unit:void 0},t),this},parseValue:function(t){var e=o.prototype.parseValue.apply(this,arguments),n=this.input.validateInputValue(e.value,{deepCheck:1}),i=n.value,r=n.unit;return e.value=i,e.unit=r,e},getFullValue:function(){var t=this.get("value"),e=this.get("unit");return t=""+(t=(0,r.isUndefined)(t)?"":t)+(e=!(0,r.isUndefined)(e)&&t?e:""),o.prototype.getFullValue.apply(this,[t])}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:[];return this.set("options",t),this},addOption:function(t){if(t){var e=this.getOptions();this.setOptions([].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n '},init:function(){var t=this.em;this.modal=t.get("Modal"),this.am=t.get("AssetManager"),this.events["click #"+this.pfx+"close"]="removeFile",this.events["click #"+this.pfx+"images"]="openAssetManager",this.delegateEvents()},onRender:function(){if(!this.$input){var t=this.model.getDefaultValue();this.$input=o('')}this.$preview||(this.$preview=this.$el.find("#"+this.pfx+"preview-file")),this.$previewBox||(this.$previewBox=this.$el.find("#"+this.pfx+"preview-box")),this.setValue(this.componentValue,0)},setValue:function(t,e){r.prototype.setValue.apply(this,arguments),this.setPreviewView(t&&t!=this.model.getDefaultValue()),this.setPreview(t)},setPreviewView:function(t){var e=this.$previewBox;e&&e[t?"addClass":"removeClass"](this.pfx+"show")},spreadUrl:function(t){this.model.set("value",t),this.setPreviewView(1)},setPreview:function(t){var e=this.$preview;t=t&&t.indexOf("url(")<0?"url("+t+")":t,e&&e.css("background-image",t)},cleanValue:function(){this.setPreviewView(0),this.model.set({value:""},{silent:!0})},removeFile:function(){this.model.set("value",this.model.getDefaultValue());for(var t=arguments.length,e=Array(t),n=0;n\n
\n
\n
\n
\n
\n '},inputClass:function(){var t=this.ppfx;return t+"field "+t+"field-color"},holderClass:function(){return this.ppfx+"input-holder"},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model.get("defaults"),i=(0,o.isUndefined)(t)?(0,o.isUndefined)(n)?"":n:t,r=this.getInputEl(),s=this.getColorEl(),a="none"!=i?i:"";r.value=i,s.get(0).style.backgroundColor=a,e.fromTarget&&(s.spectrum("set",a),this.noneColor="none"==i)},getColorEl:function(){if(!this.colorEl){var t=this,e=this.ppfx,n=this.model,r=c('
'),o=r.get(0).style,s=this.em&&this.em.config?this.em.config.el:"",a=this.em&&this.em.getConfig&&this.em.getConfig("colorPicker")||{},l=function(t){return(1==t.getAlpha()?t.toHexString():t.toRgbString()).replace(/ /g,"")},u=0,h=void 0;this.$el.find("[data-colorp-c]").append(r),r.spectrum(i({containerClassName:e+"one-bg "+e+"two-color",appendTo:s||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[]},a,{move:function(t){var e=l(t);o.backgroundColor=e,n.setValueFromInput(e,0)},change:function(e){u=1;var i=l(e);o.backgroundColor=i,n.setValueFromInput(i),t.noneColor=0},show:function(t){u=0,h=l(t)},hide:function(e){!u&&h&&(t.noneColor&&(h=""),o.backgroundColor=h,r.spectrum("set",h),n.setValueFromInput(h,0))}})),this.colorEl=r}return this.colorEl},render:function(){return l.prototype.render.call(this),this.getColorEl(),this}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};e=i({},e,{silent:1}),this.inputInst.setValue(t,e)},onRender:function(){if(!this.input){var t=this.ppfx,e=new r({target:this.target,model:this.model,ppfx:t}).render();this.el.querySelector("."+t+"fields").appendChild(e.el),this.$input=e.inputEl,this.$color=e.colorEl,this.input=this.$input.get(0),this.inputInst=e}}})},function(t,e,n){"use strict";var i=o(n(0)),r=o(n(5));function o(t){return t&&t.__esModule?t:{default:t}}i.default.$;t.exports=r.default.extend({templateInput:function(){var t=this.pfx,e=this.ppfx;return'\n
\n \n
\n
\n
\n
\n '},initialize:function(){for(var t=arguments.length,e=Array(t),n=0;n"+e+""});var i=this.el.querySelector("#"+t+"input-holder");i.innerHTML="",this.input=i.firstChild}}})},function(t,e,n){"use strict";t.exports=n(5).extend({templateInput:function(){this.pfx;var t=this.ppfx;return'\n
\n
\n '},onRender:function(){var t=this.pfx,e=this.ppfx,n=e+"radio-item-label",i=this.model,r=i.get("property"),o=i.get("list")||i.get("options")||[];if(!this.input&&o&&o.length){var s="";o.forEach(function(i){var o=i.className?i.className+" "+t+"icon "+n:"",a=r+"-"+i.value,l=i.name||i.value,c=i.title?'title="'+i.title+'"':"";s+='\n
\n \n \n
\n "});var a=this.el.querySelector("."+e+"field");a.innerHTML='
'+s+"
",this.input=a.firstChild}},getInputValue:function(){var t=this.getCheckedEl();return t?t.value:""},getCheckedEl:function(){var t=this.getInputEl();return t?t.querySelector("input:checked"):""},setValue:function(t){var e=this.model,n=t||e.get("value")||e.getDefaultValue(),i=this.getInputEl(),r=i?i.querySelector('[value="'+n+'"]'):"";if(r)r.checked=!0;else{var o=this.getCheckedEl();o&&(o.checked=!1)}}})},function(t,e,n){"use strict";var i=n(0),r=i.$;t.exports=i.View.extend({events:{change:"handleChange"},template:function(){return''},inputClass:function(){return this.ppfx+"field"},holderClass:function(){return this.ppfx+"input-holder"},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ppfx||"";this.opts=t,this.ppfx=e,this.em=t.target||{},this.listenTo(this.model,"change:value",this.handleModelChange)},elementUpdated:function(){this.model.trigger("el:change")},setValue:function(t){var e=this.model,n=t||e.get("defaults"),i=this.getInputEl();i&&(i.value=n)},handleModelChange:function(t,e,n){this.setValue(e,n)},handleChange:function(t){t.stopPropagation();var e=this.getInputEl().value;this.model.set({value:e},{fromInput:1}),this.elementUpdated()},getInputEl:function(){if(!this.inputEl){var t=this.model.get("defaults")||"";this.inputEl=r('')}return this.inputEl.get(0)},render:function(){var t=this.$el;return t.addClass(this.inputClass()),t.html(this.template()),t.find("."+this.holderClass()).append(this.getInputEl()),this}})},function(t,e,n){"use strict";var i=n(43),r=n(168);t.exports=i.extend({templateInput:function(){var t=this.pfx;this.ppfx;return'\n
\n \n
\n
\n '},init:function(){var t=this.model;this.pfx;t.set("stackIndex",null),this.events["click [data-add-layer]"]="addLayer",this.listenTo(t,"change:stackIndex",this.indexChanged),this.listenTo(t,"updateValue",this.inputValueChanged),this.delegateEvents()},clear:function(t){t&&t.stopPropagation(),this.model.get("layers").reset(),this.model.clearValue(),this.targetUpdated()},targetUpdated:function(){if(this.model.get("detached"))this.checkVisibility();else{for(var t=arguments.length,e=Array(t),n=0;n0&&void 0!==arguments[0]&&arguments[0];return this.get("properties").each(function(t){return t.clearValue()}),r.prototype.clearValue.apply(this,arguments)},updateValues:function(){var t=this.getFullValue().split(this.get("separator"));this.get("properties").each(function(e,n){var i=t.length;t[n]||t[n%i+(1!=i&&i%2?1:0)]})},getDefaultValue:function(t){var e=this.get("defaults");return e&&!t?e:(e="",this.get("properties").each(function(t,n){return e+=t.getDefaultValue()+" "}),e.trim())},getFullValue:function(){return this.get("detached")?"":this.get("properties").getFullValue()}})},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var n=t.Model,i=t.View;e.default={types:[],initialize:function(t,e){var n=this;this.model=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=void 0,r=void 0,o=void 0;if(t&&t.type){var s=n.getBaseType();i=(o=n.getType(t.type))?o.model:s.model,r=o?o.view:s.view}else{var a=n.recognizeType(t);i=(o=a.type).model,r=o.view,t=a.attributes}var l=new i(t,e);return l.typeView=r,l};var i=this.init&&this.init.bind(this);i&&i()},recognizeType:function(t){for(var e=this.getTypes(),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=e.model,r=void 0===n?{}:n,s=e.view,a=void 0===s?{}:s,l=this.getType(t);if(l)return new l.view(i({model:new l.model(r),config:o},a))},render:function(){return e.render().el}}}},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0;r--)n.context=n.context.prev;return M(t,e,n)}function O(t){var e=t.current().toLowerCase();o=m.hasOwnProperty(e)?"atom":v.hasOwnProperty(e)?"keyword":"variable"}var P={top:function(t,e,n){if("{"==t)return T(n,e,"block");if("}"==t&&n.context.prev)return E(n);if(x&&/@component/i.test(t))return T(n,e,"atComponentBlock");if(/^@(-moz-)?document$/i.test(t))return T(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(t))return T(n,e,"atBlock");if(/^@(font-face|counter-style)/i.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return T(n,e,"at");if("hash"==t)o="builtin";else if("word"==t)o="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return T(n,e,"interpolation");if(":"==t)return"pseudo";if(y&&"("==t)return T(n,e,"parens")}return n.context.type},block:function(t,e,n){if("word"==t){var i=e.current().toLowerCase();return d.hasOwnProperty(i)?(o="property","maybeprop"):f.hasOwnProperty(i)?(o="string-2","maybeprop"):y?(o=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==t?"block":y||"hash"!=t&&"qualifier"!=t?P.top(t,e,n):(o="error","block")},maybeprop:function(t,e,n){return":"==t?T(n,e,"prop"):M(t,e,n)},prop:function(t,e,n){if(";"==t)return E(n);if("{"==t&&y)return T(n,e,"propBlock");if("}"==t||"{"==t)return A(t,e,n);if("("==t)return T(n,e,"parens");if("hash"!=t||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(e.current())){if("word"==t)O(e);else if("interpolation"==t)return T(n,e,"interpolation")}else o+=" error";return"prop"},propBlock:function(t,e,n){return"}"==t?E(n):"word"==t?(o="property","maybeprop"):n.context.type},parens:function(t,e,n){return"{"==t||"}"==t?A(t,e,n):")"==t?E(n):"("==t?T(n,e,"parens"):"interpolation"==t?T(n,e,"interpolation"):("word"==t&&O(e),"parens")},pseudo:function(t,e,n){return"meta"==t?"pseudo":"word"==t?(o="variable-3",n.context.type):M(t,e,n)},documentTypes:function(t,e,n){return"word"==t&&l.hasOwnProperty(e.current())?(o="tag",n.context.type):P.atBlock(t,e,n)},atBlock:function(t,e,n){if("("==t)return T(n,e,"atBlock_parens");if("}"==t||";"==t)return A(t,e,n);if("{"==t)return E(n)&&T(n,e,y?"block":"top");if("interpolation"==t)return T(n,e,"interpolation");if("word"==t){var i=e.current().toLowerCase();o="only"==i||"not"==i||"and"==i||"or"==i?"keyword":c.hasOwnProperty(i)?"attribute":u.hasOwnProperty(i)?"property":h.hasOwnProperty(i)?"keyword":d.hasOwnProperty(i)?"property":f.hasOwnProperty(i)?"string-2":m.hasOwnProperty(i)?"atom":v.hasOwnProperty(i)?"keyword":"error"}return n.context.type},atComponentBlock:function(t,e,n){return"}"==t?A(t,e,n):"{"==t?E(n)&&T(n,e,y?"block":"top",!1):("word"==t&&(o="error"),n.context.type)},atBlock_parens:function(t,e,n){return")"==t?E(n):"{"==t||"}"==t?A(t,e,n,2):P.atBlock(t,e,n)},restricted_atBlock_before:function(t,e,n){return"{"==t?T(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(o="variable","restricted_atBlock_before"):M(t,e,n)},restricted_atBlock:function(t,e,n){return"}"==t?(n.stateArg=null,E(n)):"word"==t?(o="@font-face"==n.stateArg&&!p.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!g.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(t,e,n){return"word"==t?(o="variable","keyframes"):"{"==t?T(n,e,"top"):M(t,e,n)},at:function(t,e,n){return";"==t?E(n):"{"==t||"}"==t?A(t,e,n):("word"==t?o="tag":"hash"==t&&(o="builtin"),"at")},interpolation:function(t,e,n){return"}"==t?E(n):"{"==t||";"==t?A(t,e,n):("word"==t?o="variable":"variable"!=t&&"("!=t&&")"!=t&&(o="error"),"interpolation")}};return{startState:function(t){return{tokenize:null,state:i?"block":"top",stateArg:null,context:new S(i?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||function(t,e){var n=t.next();if(a[n]){var i=a[n](t,e);if(!1!==i)return i}return"@"==n?(t.eatWhile(/[\w\\\-]/),w("def",t.current())):"="==n||("~"==n||"|"==n)&&t.eat("=")?w(null,"compare"):'"'==n||"'"==n?(e.tokenize=C(n),e.tokenize(t,e)):"#"==n?(t.eatWhile(/[\w\\\-]/),w("atom","hash")):"!"==n?(t.match(/^\s*\w*/),w("keyword","important")):/\d/.test(n)||"."==n&&t.eat(/\d/)?(t.eatWhile(/[\w.%]/),w("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?w(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?w("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?w(null,n):("u"==n||"U"==n)&&t.match(/rl(-prefix)?\(/i)||("d"==n||"D"==n)&&t.match("omain(",!0,!0)||("r"==n||"R"==n)&&t.match("egexp(",!0,!0)?(t.backUp(1),e.tokenize=k,w("property","word")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),w("property","word")):w(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),w("number","unit")):t.match(/^-[\w\\\-]+/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?w("variable-2","variable-definition"):w("variable-2","variable")):t.match(/^\w+-/)?w("meta","meta"):void 0})(t,e);return n&&"object"==typeof n&&(r=n[1],n=n[0]),o=n,"comment"!=r&&(e.state=P[e.state](r,t,e)),o},indent:function(t,e){var n=t.context,i=e&&e.charAt(0),r=n.indent;return"prop"!=n.type||"}"!=i&&")"!=i||(n=n.prev),n.prev&&("}"!=i||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=i||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=i||"at"!=n.type&&"atBlock"!=n.type)||(r=Math.max(0,n.indent-s)):(n=n.prev,r=n.indent)),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}});var n=["domain","regexp","url","url-prefix"],i=e(n),r=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=e(r),s=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],a=e(s),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],c=e(l),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],h=e(u),d=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],f=e(d),p=e(["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),g=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),v=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],m=e(v),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=e(y),x=n.concat(r).concat(s).concat(l).concat(u).concat(d).concat(v).concat(y);function w(t,e){for(var n,i=!1;null!=(n=t.next());){if(i&&"/"==n){e.tokenize=null;break}i="*"==n}return["comment","comment"]}t.registerHelper("hintWords","css",x),t.defineMIME("text/css",{documentTypes:i,mediaTypes:o,mediaFeatures:a,mediaValueKeywords:c,propertyKeywords:h,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:g,colorKeywords:m,valueKeywords:b,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=w,w(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:a,mediaValueKeywords:c,propertyKeywords:h,nonStandardPropertyKeywords:f,colorKeywords:m,valueKeywords:b,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=w,w(t,e)):["operator","operator"]},":":function(t){return!!t.match(/\s*\{/,!1)&&[null,null]},$:function(t){return t.match(/^[\w-]+/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(t){return!!t.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),t.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:a,mediaValueKeywords:c,propertyKeywords:h,nonStandardPropertyKeywords:f,colorKeywords:m,valueKeywords:b,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=w,w(t,e)):["operator","operator"]},"@":function(t){return t.eat("{")?[null,"interpolation"]:!t.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),t.defineMIME("text/x-gss",{documentTypes:i,mediaTypes:o,mediaFeatures:a,propertyKeywords:h,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:g,colorKeywords:m,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=w,w(t,e))}},name:"css",helperType:"gss"})}(n(6))},function(t,e,n){"use strict";t.exports=function(t){var e=t;return{compTypes:"",parseStyle:function(t){for(var e={},n=t.split(";"),i=0,r=n.length;i=0&&e<=k};function E(t){return function(e,n,i,r){n=y(n,r,4);var o=!T(e)&&m.keys(e),s=(o||e).length,a=t>0?0:s-1;return arguments.length<3&&(i=e[o?o[a]:a],a+=t),function(e,n,i,r,o,s){for(;o>=0&&o=0},m.invoke=function(t,e){var n=c.call(arguments,2),i=m.isFunction(e);return m.map(t,function(t){var r=i?e:t[e];return null==r?r:r.apply(t,n)})},m.pluck=function(t,e){return m.map(t,m.property(e))},m.where=function(t,e){return m.filter(t,m.matcher(e))},m.findWhere=function(t,e){return m.find(t,m.matcher(e))},m.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e&&null!=t)for(var a=0,l=(t=T(t)?t:m.values(t)).length;ao&&(o=i);else e=b(e,n),m.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},m.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e&&null!=t)for(var a=0,l=(t=T(t)?t:m.values(t)).length;ai||void 0===n)return 1;if(n0?0:r-1;o>=0&&o0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;else if(n&&o&&a)return i[o=n(i,r)]===r?o:-1;if(r!=r)return(o=e(c.call(i,s,a),m.isNaN))>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&oe?(s&&(clearTimeout(s),s=null),a=c,o=t.apply(i,r),s||(i=r=null)):s||!1===n.trailing||(s=setTimeout(l,u)),o}},m.debounce=function(t,e,n){var i,r,o,s,a,l=function(){var c=m.now()-s;c=0?i=setTimeout(l,e-c):(i=null,n||(a=t.apply(o,r),i||(o=r=null)))};return function(){o=this,r=arguments,s=m.now();var c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r),o=r=null),a}},m.wrap=function(t,e){return m.partial(e,t)},m.negate=function(t){return function(){return!t.apply(this,arguments)}},m.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,i=t[e].apply(this,arguments);n--;)i=t[n].call(this,i);return i}},m.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},m.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},m.once=m.partial(m.before,2);var L=!{toString:null}.propertyIsEnumerable("toString"),N=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];function D(t,e){var n=N.length,i=t.constructor,r=m.isFunction(i)&&i.prototype||s,o="constructor";for(m.has(t,o)&&!m.contains(e,o)&&e.push(o);n--;)(o=N[n])in t&&t[o]!==r[o]&&!m.contains(e,o)&&e.push(o)}m.keys=function(t){if(!m.isObject(t))return[];if(f)return f(t);var e=[];for(var n in t)m.has(t,n)&&e.push(n);return L&&D(t,e),e},m.allKeys=function(t){if(!m.isObject(t))return[];var e=[];for(var n in t)e.push(n);return L&&D(t,e),e},m.values=function(t){for(var e=m.keys(t),n=e.length,i=Array(n),r=0;r":">",'"':""","'":"'","`":"`"},R=m.invert(F),j=function(t){var e=function(e){return t[e]},n="(?:"+m.keys(t).join("|")+")",i=RegExp(n),r=RegExp(n,"g");return function(t){return t=null==t?"":""+t,i.test(t)?t.replace(r,e):t}};m.escape=j(F),m.unescape=j(R),m.result=function(t,e,n){var i=null==t?void 0:t[e];return void 0===i&&(i=n),m.isFunction(i)?i.call(t):i};var z=0;m.uniqueId=function(t){var e=++z+"";return t?t+e:e},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,H={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},$=/\\|'|\r|\n|\u2028|\u2029/g,B=function(t){return"\\"+H[t]};m.template=function(t,e,n){!e&&n&&(e=n),e=m.defaults({},e,m.templateSettings);var i=RegExp([(e.escape||V).source,(e.interpolate||V).source,(e.evaluate||V).source].join("|")+"|$","g"),r=0,o="__p+='";t.replace(i,function(e,n,i,s,a){return o+=t.slice(r,a).replace($,B),r=a+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":i?o+="'+\n((__t=("+i+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var s=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var a=function(t){return s.call(this,t,m)},l=e.variable||"obj";return a.source="function("+l+"){\n"+o+"}",a},m.chain=function(t){var e=m(t);return e._chain=!0,e};var W=function(t,e){return t._chain?m(e).chain():e};m.mixin=function(t){m.each(m.functions(t),function(e){var n=m[e]=t[e];m.prototype[e]=function(){var t=[this._wrapped];return l.apply(t,arguments),W(this,n.apply(m,t))}})},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=o[t];m.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],W(this,n)}}),m.each(["concat","join","slice"],function(t){var e=o[t];m.prototype[t]=function(){return W(this,e.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return""+this._wrapped},void 0===(i=function(){return m}.apply(e,[]))||(t.exports=i)}).call(this)},function(t,e,n){!function(e){var n,i={},r={16:!1,18:!1,17:!1,91:!1},o="all",s={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,command:91},a={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,home:36,end:35,pageup:33,pagedown:34,",":188,".":190,"/":191,"`":192,"-":189,"=":187,";":186,"'":222,"[":219,"]":221,"\\":220},l=function(t){return a[t]||t.toUpperCase().charCodeAt(0)},c=[];for(n=1;n<20;n++)a["f"+n]=111+n;function u(t,e){for(var n=t.length;n--;)if(t[n]===e)return n;return-1}function h(t,e){if(t.length!=e.length)return!1;for(var n=0;n1&&(o=m(t),t=[t[t.length-1]]),t=t[0],(t=l(t))in i||(i[t]=[]),i[t].push({shortcut:r[s],scope:e,method:n,key:r[s],mods:o})}for(n in s)p[n]=!1;function g(){return o||"all"}function v(t){var e;return""==(e=(t=t.replace(/\s/g,"")).split(","))[e.length-1]&&(e[e.length-2]+=","),e}function m(t){for(var e=t.slice(0,t.length-1),n=0;n0,r)(!r[o]&&u(n.mods,+o)>-1||r[o]&&-1==u(n.mods,+o))&&(l=!1);(0!=n.mods.length||r[16]||r[18]||r[17]||r[91])&&!l||!1===n.method(t,n)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}(t)}),y(document,"keyup",function(t){var e,n=t.keyCode,i=u(c,n);if(i>=0&&c.splice(i,1),93!=n&&224!=n||(n=91),n in r)for(e in r[n]=!1,s)s[e]==n&&(p[e]=!1)}),y(window,"focus",function(){for(n in r)r[n]=!1;for(n in s)p[n]=!1});var b=e.key;e.key=p,e.key.setScope=function(t){o=t||"all"},e.key.getScope=g,e.key.deleteScope=function(t){var e,n,r;for(e in i)for(n=i[e],r=0;r1&&(c=m(r),t=r[r.length-1]),t=l(t),void 0===e&&(e=g()),!i[t])return;for(o=0;o\n \n <%= label %>\n \n
\n '),events:{},initialize:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.config=t;var e=this.config.pStylePrefix||"";this.pfx=e,this.caretR="fa fa-caret-right",this.caretD="fa fa-caret-down",this.iconClass=e+"caret-icon",this.activeClass=e+"open",this.className=e+"block-category",this.events["click ."+e+"title"]="toggle",this.listenTo(this.model,"change:open",this.updateVisibility),this.delegateEvents()},updateVisibility:function(){this.model.get("open")?this.open():this.close()},open:function(){this.el.className=this.className+" "+this.activeClass,this.getIconEl().className=this.iconClass+" "+this.caretD,this.getBlocksEl().style.display=""},close:function(){this.el.className=this.className,this.getIconEl().className=this.iconClass+" "+this.caretR,this.getBlocksEl().style.display="none"},toggle:function(){var t=this.model;t.set("open",!t.get("open"))},getIconEl:function(){return this.iconEl||(this.iconEl=this.el.querySelector("."+this.iconClass)),this.iconEl},getBlocksEl:function(){return this.blocksEl||(this.blocksEl=this.el.querySelector("."+this.pfx+"blocks-c")),this.blocksEl},append:function(t){this.getBlocksEl().appendChild(t)},render:function(){return this.el.innerHTML=this.template({pfx:this.pfx,label:this.model.get("label")}),this.el.className=this.className,this.$el.css({order:this.model.get("order")}),this.updateVisibility(),this}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0)),r=n(1),o=n(2);t.exports=i.default.View.extend({events:{mousedown:"startDrag",dragstart:"handleDragStart",drag:"handleDrag",dragend:"handleDragEnd"},initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.em=e.em,this.config=e,this.endDrag=this.endDrag.bind(this),this.ppfx=e.pStylePrefix||"",this.listenTo(this.model,"destroy remove",this.remove)},startDrag:function(t){var e=this.config;if(0===t.button&&e.getSorter&&!this.el.draggable){e.em.refreshCanvas();var n=e.getSorter();n.setDragHelper(this.el,t),n.setDropContent(this.model.get("content")),n.startSort(this.el),(0,o.on)(document,"mouseup",this.endDrag)}},handleDragStart:function(t){var e=this.em,n=this.model,i=n.get("content"),o=(0,r.isObject)(i),s=o?JSON.stringify(i):i;t.dataTransfer.setData("text",s),e.set("dragContent",i),e.trigger("block:drag:start",n,t)},handleDrag:function(t){this.em.trigger("block:drag",this.model,t)},handleDragEnd:function(){var t=this.em,e=this.model,n=t.get("dragResult");if(n){var i=n.get&&n.get("activeOnRender");(e.get("activate")||i)&&(n.trigger("active"),n.set("activeOnRender",0)),e.get("select")&&t.setSelected(n),e.get("resetId")&&n.onAll(function(t){return t.resetId()})}t.set({dragResult:null,dragContent:null}),t.trigger("block:drag:stop",n,e)},endDrag:function(t){(0,o.off)(document,"mouseup",this.endDrag);var e=this.config.getSorter();e.moved=0,e.endMove()},render:function(){var t=this.el,e=this.ppfx,n=e+"block",i=this.model.get("label");return t.className+=" "+n+" "+e+"one-bg "+e+"four-color-h",t.innerHTML='
'+i+"
",t.title=t.textContent.trim(),(0,o.hasDnd)(this.em)&&t.setAttribute("draggable",!0),this}})},function(t,e,n){"use strict";var i=n(1),r=n(92),o=n(91);t.exports=n(0).View.extend({initialize:function(t,e){(0,i.bindAll)(this,"getSorter","onDrag","onDrop"),this.config=e||{},this.categories=t.categories||"",this.renderedCategories=[];var n=this.config.pStylePrefix||"";this.ppfx=n,this.noCatClass=n+"blocks-no-cat",this.blockContClass=n+"blocks-c",this.catsClass=n+"block-categories";var r=this.collection;this.listenTo(r,"add",this.addTo),this.listenTo(r,"reset",this.render),this.em=this.config.em,this.tac="test-tac",this.grabbingCls=this.ppfx+"grabbing",this.em&&(this.config.getSorter=this.getSorter,this.canvas=this.em.get("Canvas"))},getSorter:function(){if(this.em){if(!this.sorter){var t=this.em.get("Utils"),e=this.canvas;this.sorter=new t.Sorter({container:e.getBody(),placer:e.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onStart:this.onDrag,onEndMove:this.onDrop,onMove:this.onMove,document:e.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1,em:this.em,canvasRelative:1})}return this.sorter}},onDrag:function(t){this.em.stopDefault(),this.em.trigger("block:drag:start",t)},onMove:function(t){this.em.trigger("block:drag:move",t)},onDrop:function(t){var e=this.em;e.runDefault(),t&&t.get&&(t.get("activeOnRender")&&(t.trigger("active"),t.set("activeOnRender",0)),e.trigger("block:drag:stop",t))},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,s=new r({model:t,attributes:t.get("attributes")},this.config).render().el,a=t.get("category");if(a&&this.categories){(0,i.isString)(a)?a={id:a,label:a}:(0,i.isObject)(a)&&!a.id&&(a.id=a.label);var l=this.categories.add(a),c=l.get("id"),u=this.renderedCategories[c],h=this.getCategoriesEl();return t.set("category",l),!u&&h&&(u=new o({model:l},this.config).render(),this.renderedCategories[c]=u,h.appendChild(u.el)),void(u&&u.append(s))}n?n.appendChild(s):this.append(s)},getCategoriesEl:function(){return this.catsEl||(this.catsEl=this.el.querySelector("."+this.catsClass)),this.catsEl},getBlocksEl:function(){return this.blocksEl||(this.blocksEl=this.el.querySelector("."+this.noCatClass+" ."+this.blockContClass)),this.blocksEl},append:function(t){var e=this.getBlocksEl();e&&e.appendChild(t)},render:function(){var t=this,e=this.ppfx,n=document.createDocumentFragment();this.catsEl=null,this.blocksEl=null,this.renderedCategories=[],this.el.innerHTML='\n
\n
\n
\n
\n ',this.collection.each(function(e){return t.add(e,n)}),this.append(n);var i=this.blockContClass+"s "+e+"one-bg "+e+"two-color";return this.$el.addClass(i),this}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.Collection.extend({model:n(44)})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=n(44);t.exports=i.default.Model.extend({defaults:{activate:0,select:0,resetId:0,label:"",content:"",category:"",attributes:{}},initialize:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t=this.get("category");if(t&&"string"==typeof t)new r({id:t,label:t})}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=n(95);t.exports=i.default.Collection.extend({model:r})},function(t,e,n){"use strict";t.exports={appendTo:"",blocks:[]}},function(t,e,n){"use strict";var i=n(1);t.exports=function(){var t,e,r,o={},s=n(97),a=n(96),l=n(94),c=n(93),u=[];return{name:"BlockManager",init:function(n){var i=(o=n||{}).em;for(var h in s)h in o||(o[h]=s[h]);return t=new a([]),e=new a([]),u=new l,r=new c({collection:e,categories:u},o),t.listenTo(t,"add",function(t){e.add(t),i&&i.trigger("block:add",t)}),t.listenTo(t,"remove",function(t){e.remove(t),i&&i.trigger("block:remove",t)}),t.listenTo(t,"reset",function(t){e.reset(t.models)}),this},getConfig:function(){return o},onLoad:function(){var t=this.getAll();!t.length&&t.reset(o.blocks)},postRender:function(){var t=this.getConfig().appendTo;t&&((0,i.isElement)(t)?t:document.querySelector(t)).appendChild(this.render())},add:function(e,n){var i=n||{};return i.id=e,t.add(i)},get:function(e){return t.get(e)},getAll:function(){return t},getAllVisible:function(){return e},remove:function(e){return t.remove(e)},getCategories:function(){return u},getContainer:function(){return r.el},render:function(t){var e=t||this.getAll().models;return r.rendered||(r.render(),r.rendered=1),r.collection.reset(e),this.getContainer()}}}},function(t,e,n){var i={"./CanvasClear":52,"./CanvasClear.js":52,"./CommandAbstract":38,"./CommandAbstract.js":38,"./ComponentDelete":51,"./ComponentDelete.js":51,"./ComponentEnter":50,"./ComponentEnter.js":50,"./ComponentExit":49,"./ComponentExit.js":49,"./ComponentNext":48,"./ComponentNext.js":48,"./ComponentPrev":47,"./ComponentPrev.js":47,"./CopyComponent":46,"./CopyComponent.js":46,"./CreateComponent":7,"./CreateComponent.js":7,"./DeleteComponent":36,"./DeleteComponent.js":36,"./Drag":21,"./Drag.js":21,"./ExportTemplate":37,"./ExportTemplate.js":37,"./Fullscreen":24,"./Fullscreen.js":24,"./ImageComponent":35,"./ImageComponent.js":35,"./InsertCustom":12,"./InsertCustom.js":12,"./MoveComponent":34,"./MoveComponent.js":34,"./OpenAssets":27,"./OpenAssets.js":27,"./OpenBlocks":28,"./OpenBlocks.js":28,"./OpenLayers":31,"./OpenLayers.js":31,"./OpenStyleManager":30,"./OpenStyleManager.js":30,"./OpenTraitManager":29,"./OpenTraitManager.js":29,"./PasteComponent":45,"./PasteComponent.js":45,"./Preview":23,"./Preview.js":23,"./Resize":22,"./Resize.js":22,"./SelectComponent":8,"./SelectComponent.js":8,"./SelectParent":25,"./SelectParent.js":25,"./SelectPosition":13,"./SelectPosition.js":13,"./ShowOffset":26,"./ShowOffset.js":26,"./SwitchVisibility":32,"./SwitchVisibility.js":32,"./TextComponent":33,"./TextComponent.js":33};function r(t){var e=o(t);return n(e)}function o(t){var e=i[t];if(!(e+1)){var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}return e}r.keys=function(){return Object.keys(i)},r.resolve=o,t.exports=r,r.id=99},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{command:"",attributes:{}}})},function(t,e,n){"use strict";var i=n(0),r=n(100);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0);t.exports=i.View.extend({events:function(){return this.model.get("events")||{mousedown:"handleClick"}},attributes:function(){return this.model.get("attributes")},initialize:function(t){this.editor=t.config.editor},handleClick:function(t){t.preventDefault(),t.stopPropagation(),this.execCommand(t)},execCommand:function(t){var e={event:t},n=this.model.get("command"),i=this.editor;"function"==typeof n&&n(i,null,e),"string"==typeof n&&i.runCommand(n,e)},render:function(){var t=this.editor.getConfig();return this.el.className+=" "+t.stylePrefix+"toolbar-item",this}})},function(t,e,n){"use strict";n(0);var i=n(59),r=n(102);t.exports=i.extend({itemView:r,initialize:function(t){this.config={editor:t.editor||""},this.listenTo(this.collection,"reset",this.render)}})},function(t,e,n){"use strict";t.exports={ESCAPE_KEY:27,stylePrefix:"com-",defaults:[],em:null,firstCentered:!0,newFixedH:!1,minComponentH:50,minComponentW:50}},function(t,e,n){"use strict";var i=n(1);t.exports=function(){var t={},e={},r={},o=n(104),s=n(38);return{CommandAbstract:s,name:"Commands",init:function(e){for(var i in t=e||{},o)i in t||(t[i]=o[i]);t.em;var s=t.pStylePrefix;for(var a in s&&(t.stylePrefix=s+t.stylePrefix),t.defaults){var l=t.defaults[a];l.id&&this.add(l.id,l)}var c=n(37);return r["select-comp"]=n(8),r["create-comp"]=n(7),r["delete-comp"]=n(36),r["image-comp"]=n(35),r["move-comp"]=n(34),r["text-comp"]=n(33),r["insert-custom"]=n(12),r["export-template"]=c,r["sw-visibility"]=n(32),r["open-layers"]=n(31),r["open-sm"]=n(30),r["open-tm"]=n(29),r["open-blocks"]=n(28),r["open-assets"]=n(27),r["show-offset"]=n(26),r["select-parent"]=n(25),r.fullscreen=n(24),r.preview=n(23),r.resize=n(22),r.drag=n(21),r["tlb-delete"]={run:function(t){return t.runCommand("core:component-delete")}},r["tlb-clone"]={run:function(t){t.runCommand("core:copy"),t.runCommand("core:paste")}},r["tlb-move"]={run:function(t,e,n){var i=void 0,r=t.getModel(),o=n&&n.event,s=t.getSelected(),a=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e div")},render:function(){return this.$el.attr({class:this.ppfx+"frame"}),this}})},function(t,e,n){"use strict";(function(e){var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0)),r=n(2);var o=n(106),s=i.default.$;t.exports=i.default.View.extend({initialize:function(t){e.bindAll(this,"renderBody","onFrameScroll","clearOff"),(0,r.on)(window,"scroll resize",this.clearOff),this.config=t.config||{},this.em=this.config.em||{},this.ppfx=this.config.pStylePrefix||"",this.className=this.config.stylePrefix+"canvas",this.listenTo(this.em,"change:canvasOffset",this.clearOff),this.frame=new o({model:this.model.get("frame"),config:this.config})},isElInViewport:function(t){var e=(0,r.getElement)(t).getBoundingClientRect(),n=this.getFrameOffset(1),i=e.top,o=e.left;return i>=0&&o>=0&&i<=n.height&&o<=n.width},onFrameScroll:function(){var t=this.frame.el.contentDocument.body;this.toolsEl.style.top="-"+t.scrollTop+"px",this.toolsEl.style.left="-"+t.scrollLeft+"px",this.em.trigger("canvasScroll")},renderScripts:function(){var t=this.frame,e=this;t.el.onload=function(){!function n(i){if(i.length>0){var r=document.createElement("script");r.type="text/javascript",r.src=i.shift(),r.onerror=r.onload=n.bind(null,i),t.el.contentDocument.head.appendChild(r)}else e.renderBody()}(e.config.scripts.slice(0))}},renderBody:function(){var t=this.model.get("frame").get("wrapper"),e=this.config.em;if(t){var n=this.ppfx,i=s(this.frame.el.contentWindow.document.body),r=e.get("CssComposer"),o=e.get("Config"),a=this.config,l=o.protectedCss,c="";a.styles.forEach(function(t){c+=''});var u="\n "+(e.config.baseCss||"")+"\n\n ."+n+"dashed *[data-highlightable] {\n outline: 1px dashed rgba(170,170,170,0.7);\n outline-offset: -2px;\n }\n\n ."+n+"comp-selected {\n outline: 3px solid #3b97e3 !important;\n outline-offset: -3px;\n }\n\n ."+n+"comp-selected-parent {\n outline: 2px solid #ffca6f !important\n }\n\n ."+n+"no-select {\n user-select: none;\n -webkit-user-select:none;\n -moz-user-select: none;\n }\n\n ."+n+"freezed {\n opacity: 0.5;\n pointer-events: none;\n }\n\n ."+n+"no-pointer {\n pointer-events: none;\n }\n\n ."+n+"plh-image {\n background: #f5f5f5;\n border: none;\n height: 50px;\n width: 50px;\n display: block;\n outline: 3px solid #ffca6f;\n cursor: pointer;\n outline-offset: -2px\n }\n\n ."+n+"grabbing {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n\n "+(o.canvasCss||"")+"\n "+(l||"")+"\n ";c&&i.append(c),i.append(""),i.append(t.render()).append(r.render()),i.append(this.getJsContainer()),e.trigger("loaded"),this.frame.el.contentWindow.onscroll=this.onFrameScroll,this.frame.udpateOffset();var h=document,d=this.frame.el.contentDocument;[{event:"keydown keyup",class:"KeyboardEvent"}].forEach(function(t){return t.event.split(" ").forEach(function(e){d.addEventListener(e,function(e){return h.dispatchEvent(function(t,e){var n=void 0;try{n=new window[e](t.type,t)}catch(t){(n=document.createEvent(e)).initEvent(t.type,!0,!0)}return n.keyCodeVal=t.keyCode,["keyCode","which"].forEach(function(t){Object.defineProperty(n,t,{get:function(){return this.keyCodeVal}})}),n}(e,t.class))})})})}},offset:function(t){var e=t.getBoundingClientRect(),n=t.ownerDocument.body;return{top:e.top+n.scrollTop,left:e.left+n.scrollLeft,width:e.width,height:e.height}},clearOff:function(){this.frmOff=null,this.cvsOff=null},getFrameOffset:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.frmOff&&!t||(this.frmOff=this.offset(this.frame.el)),this.frmOff},getCanvasOffset:function(){return this.cvsOff||(this.cvsOff=this.offset(this.el)),this.cvsOff},getElementPos:function(t,e){var n=e||{},i=this.getFrameOffset(),r=this.getCanvasOffset(),o=this.offset(t),s=n.avoidFrameOffset?0:i.top,a=n.avoidFrameOffset?0:i.left;return{top:o.top+s-r.top,left:o.left+a-r.left,height:t.offsetHeight||t.clientHeight,width:t.offsetWidth||t.clientWidth}},getPosition:function(){var t=this.frame.el.contentDocument;if(t){var e=t.body,n=this.getFrameOffset(),i=this.getCanvasOffset();return{top:n.top+e.scrollTop-i.top,left:n.left+e.scrollLeft-i.left}}},updateScript:function(t){t.scriptContainer||(t.scriptContainer=s("
"),this.getJsContainer().appendChild(t.scriptContainer.get(0)));var e=t.model,n=e.getId();t.el.id=n,t.scriptContainer.html("");var i=document.createElement("script");i.innerHTML="\n setTimeout(function() {\n var item = document.getElementById('"+n+"');\n if (!item) return;\n (function(){\n "+e.getScriptString()+";\n }.bind(item))()\n }, 1);",setTimeout(function(){return t.scriptContainer.get(0).appendChild(i)},0)},getJsContainer:function(){return this.jsContainer||(this.jsContainer=s('
').get(0)),this.jsContainer},render:function(){if(this.wrapper=this.model.get("wrapper"),this.wrapper&&"function"==typeof this.wrapper.render){this.model.get("frame").set("wrapper",this.wrapper),this.$el.append(this.frame.render().el);var t=this.frame;0===this.config.scripts.length?t.el.onload=this.renderBody:this.renderScripts()}var e=this.ppfx;this.$el.append('\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n ');var n=this.el,i=n.querySelector("#"+e+"tools");return this.hlEl=n.querySelector("."+e+"highlighter"),this.badgeEl=n.querySelector("."+e+"badge"),this.placerEl=n.querySelector("."+e+"placeholder"),this.ghostEl=n.querySelector("."+e+"ghost"),this.toolbarEl=n.querySelector("."+e+"toolbar"),this.resizerEl=n.querySelector("."+e+"resizer"),this.offsetEl=n.querySelector("."+e+"offset-v"),this.fixedOffsetEl=n.querySelector("."+e+"offset-fixed-v"),this.toolsEl=i,this.el.className=this.className,this}})}).call(this,n(1))},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.Model.extend({defaults:{wrapper:"",width:"",height:"",attributes:{}}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=n(108);t.exports=i.default.Model.extend({defaults:{frame:"",wrapper:"",rulers:!1},initialize:function(t){var e=this.conf||{};this.set("frame",new r(e.frame))}})},function(t,e,n){"use strict";t.exports={stylePrefix:"cv-",rulers:!1,scripts:[],styles:[],customBadgeLabel:""}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n";this.sorter.setDropContent(o),this.sorter.startSort(),e.trigger("canvas:dragenter",n,o)}}},{key:"handleDragOver",value:function(t){t.preventDefault(),this.em.trigger("canvas:dragover",t)}},{key:"handleDrop",value:function(t){t.preventDefault();var e=t.dataTransfer,n=this.getContentByData(e).content;t.target.style.border="",n?this.sorter.setDropContent(n):this.sorter.moved=0,this.endDrop(0,t)}},{key:"getContentByData",value:function(t){var e=this.em,n=t.types,i=t.files,r=e.get("dragContent"),s=t.getData("text");if(i.length){s=[];for(var a=0;a=0)s=t.getData("text/html").replace(/<\/?meta[^>]*>/g,"");else if((0,o.indexOf)(n,"text/uri-list")>=0)s={type:"link",attributes:{href:s},content:s};else if((0,o.indexOf)(n,"text/json")>=0){var u=t.getData("text/json");u&&(s=JSON.parse(u))}var h={content:s};return e.trigger("canvas:dragdata",t,h),h}}]),t}();e.default=s},function(t,e,n){"use strict";var i=n(2),r=function(t){return t&&t.__esModule?t:{default:t}}(n(111));t.exports=function(){var t,e,o={},s=n(110),a=n(109),l=n(107);return{getCanvasView:function(){return l},name:"Canvas",init:function(e){for(var n in o=e||{},s)n in o||(o[n]=s[n]);var i=o.pStylePrefix;i&&(o.stylePrefix=i+o.stylePrefix),t=new a(e),l=new l({model:t,config:o});var r=o.em.get("DomComponents");return r&&this.setWrapper(r),this.startAutoscroll=this.startAutoscroll.bind(this),this.stopAutoscroll=this.stopAutoscroll.bind(this),this.autoscroll=this.autoscroll.bind(this),this},getConfig:function(){return o},setWrapper:function(e){t.set("wrapper",e)},getElement:function(){return l.el},getFrameEl:function(){return l.frame.el},getDocument:function(){return this.getFrameEl().contentDocument},getWindow:function(){return this.getFrameEl().contentWindow},getBody:function(){return l.frame.el.contentDocument.body},getWrapperEl:function(){return this.getBody().querySelector("#wrapper")},getToolsEl:function(){return l.toolsEl},getHighlighter:function(){return l.hlEl},getBadgeEl:function(){return l.badgeEl},getPlacerEl:function(){return l.placerEl},getGhostEl:function(){return l.ghostEl},getToolbarEl:function(){return l.toolbarEl},getResizerEl:function(){return l.resizerEl},getOffsetViewerEl:function(){return l.offsetEl},getFixedOffsetViewerEl:function(){return l.fixedOffsetEl},render:function(){return l.render().el},getOffset:function(){var t=this.offset(this.getFrameEl()),e=this.offset(this.getElement());return{top:t.top-e.top,left:t.left-e.left}},offset:function(t){return l.offset(t)},setCustomBadgeLabel:function(t){o.customBadgeLabel=t},getElementPos:function(t,e){return l.getElementPos(t,e)},getTargetToElementDim:function(t,e,n){var i=n||{},r=l.getPosition();if(r){var s=i.elPos||l.getElementPos(e),a=n.toRight||0,c=i.targetHeight||t.offsetHeight,u=i.targetWidth||t.offsetWidth,h=i.event||null,d=s.top-c,f=s.left;f+=a?s.width:0;var p=(f=a?f-u:f)s.top+s.height?s.top+s.height:g,left:p,elementTop:s.top,elementLeft:s.left,elementWidth:s.width,elementHeight:s.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:r.top,canvasLeft:r.left};return h&&o.em&&o.em.trigger(h,v),v}},getMouseRelativePos:function(t,e){var n=0,i=0,r=(e||{}).subWinOffset,o=t.target.ownerDocument,s=o.defaultView||o.parentWindow,a=s.frameElement,l=r?s.pageYOffset:0,c=r?s.pageXOffset:0;if(a){var u=a.getBoundingClientRect();n=u.top||0,i=u.left||0}return{y:t.clientY+n-l,x:t.clientX+i-c}},getMouseRelativeCanvas:function(t,e){var n=this.getFrameEl(),i=this.getBody(),r=n.offsetTop||0,o=n.offsetLeft||0,s=i.scrollTop||0,a=i.scrollLeft||0;return{y:t.clientY+r+s,x:t.clientX+o+a}},hasFocus:function(){return this.getDocument().hasFocus()},isInputFocused:function(){return"BODY"!==this.getFrameEl().contentDocument.activeElement.tagName},scrollTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,i.getElement)(t);this.getCanvasView().isElInViewport(n)&&!e.force||n.scrollIntoView(e)},startAutoscroll:function(){var t=this;this.dragging=1;var n=this.getScrollListeners();e=l.getFrameOffset(1),setTimeout(function(){(0,i.on)(n,"mousemove",t.autoscroll),(0,i.on)(n,"mouseup",t.stopAutoscroll)},0)},autoscroll:function(t){if(t.preventDefault(),this.dragging){var n=this.getFrameEl().contentWindow,i=n.document.body.scrollTop,r=t.clientY,o=e.height-50;r<50&&(i-=50-r),r>o&&(i+=r-o),n.scrollTo(0,i)}},stopAutoscroll:function(){this.dragging=0;var t=this.getScrollListeners();(0,i.off)(t,"mousemove",this.autoscroll),(0,i.off)(t,"mouseup",this.stopAutoscroll)},getScrollListeners:function(){return[this.getFrameEl().contentWindow,this.getElement()]},postRender:function(){(0,i.hasDnd)(o.em)&&(this.droppable=new r.default(o.em))},getFrameWrapperEl:function(){return l.frame.getWrapper()}}}},function(t,e,n){"use strict";var i=n(53);t.exports=n(0).View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||"",this.pfx=e.stylePrefix||"",this.parent=t.parent;var n=this.pfx,i=this.ppfx,r=this.parent,o=this.collection;this.listenTo(o,"add",this.addTo),this.listenTo(o,"reset resetNavigator",this.render),this.listenTo(o,"remove",this.removeChildren),this.className=n+"layers";var s=e.em;if(e.sortable&&!this.opt.sorter){var a=s.get("Utils");this.opt.sorter=new a.Sorter({container:e.sortContainer||this.el,containerSel:"."+this.className,itemSel:"."+n+"layer",ignoreViewChildren:1,onEndMove:function(t,e){var n=e.getSourceModel();s.setSelected(n,{forceChange:1})},avoidSelectOnEnd:1,nested:1,ppfx:i,pfx:n})}this.sorter=this.opt.sorter||"",this.$el.data("collection",o),r&&this.$el.data("model",r)},removeChildren:function(t){var e=t.viewLayer;e&&e.remove.apply(e)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var r=this.level,o=e||null,s=i;if(this.isCountable(t,this.config.hideTextnode)){var a=new s({level:r,model:t,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}).render().el;if(o)o.appendChild(a);else if(void 0!==n){var l="before";this.$el.children().length==n&&(n--,l="after"),n<0?this.$el.append(a):this.$el.children().eq(n)[l](a)}else this.$el.append(a);return a}},isCountable:function(t,e){var n=t.get("type"),i=t.get("tagName");return!(("textnode"==n||"br"==i)&&e||!t.get("layerable"))},render:function(){var t=this,e=document.createDocumentFragment(),n=this.el;return n.innerHTML="",this.collection.each(function(n){return t.addToCollection(n,e)}),n.appendChild(e),n.className=this.className,this}})},function(t,e,n){"use strict";t.exports={stylePrefix:"",appendTo:"",sortable:1,hidable:1,hideTextnode:1,root:"",showWrapper:1,showHover:1,scrollCanvas:{behavior:"smooth"},scrollLayers:1,highlightHover:1}},function(t,e,n){"use strict";t.exports=n(0).View.extend({})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return{build:function(e){var n=[];"string"==typeof e&&(e=[e]);for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:{},n=this.target,o=this.get("name");if(!(0,r.isUndefined)(t))if(this.get("changeProp"))n.set(o,t,e);else{var s=i({},n.get("attributes"));s[o]=t,n.set("attributes",s,e)}},setValueFromInput:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={value:t};this.set(r,i({},n,{avoidStore:1})),e&&(this.set("value","",n),this.set(r,n))},getInitValue:function(){var t=this.target,e=this.get("name"),n=void 0;if(t){var i=t.get("attributes");n=this.get("changeProp")?t.get(e):i[e]}return n||this.get("value")||this.get("default")}})},function(t,e,n){"use strict";var i=n(1),r=n(0),o=n(140),s=n(139);t.exports=r.Collection.extend({model:o,initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.em=e.em||"",this.listenTo(this,"add",this.handleAdd)},handleAdd:function(t){var e=this.target;e&&(t.target=e)},setTarget:function(t){this.target=t},add:function(t,e){var n=this.em;if((0,i.isString)(t)||(0,i.isArray)(t)){var o=n&&n.get&&n.get("TraitManager"),a=o&&o.getConfig(),l=s(a);(0,i.isString)(t)&&(t=[t]);for(var c=0,u=t.length;c2&&void 0!==arguments[2]?arguments[2]:{},r=t.components(),o=s.get("UndoManager"),a=s.handleUpdates.bind(s),l=this.handleChanges.bind(this),c=this.handleRemoves.bind(this);o&&o.add(t),o&&r&&o.add(r);[[t,"change:style change:content change:attributes change:src",a],[r,"add",l],[r,"remove",c],[t.get("classes"),"add remove",a]].forEach(function(t){s.stopListening(t[0],t[1],t[2]),s.listenTo(t[0],t[1],t[2])}),!i.avoidStore&&a("","",i),r.each(function(t){return n.handleChanges(t,e,i)})},handleRemoves:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!n.avoidStore&&s.handleUpdates(t,e,n)},load:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e="";if(!t&&o.stm&&(t=o.em.getCacheLoad()),t.components)try{e=JSON.parse(t.components)}catch(t){}else t.html&&(e=t.html);var n=e&&e.constructor===Object;return(e&&e.length||n)&&(this.clear(),this.getComponents().reset(),n?this.getWrapper().set(e).initComponents().initClasses().loadTraits():this.getComponents().add(e)),e},store:function(t){if(o.stm){var e={},n=this.storageKey();if(n.indexOf("html")>=0&&(e.html=o.em.getHtml()),n.indexOf("components")>=0){var i=o.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(i)}return t||o.stm.store(e),e}},getComponent:function(){return t},getWrapper:function(){return this.getComponent()},getComponents:function(){return this.getWrapper().get("components")},addComponent:function(t){return this.getComponents().add(t)},render:function(){return e.render().el},clear:function(){return this.getComponents().reset(),this},setComponents:function(t){this.clear().addComponent(t)},addType:function(t,e){var n=this.getType(t);n?(n.model=e.model,n.view=e.view):(e.id=t,d.unshift(e))},getType:function(t){for(var e=d,n=0;n1&&void 0!==arguments[1]?arguments[1]:{};t&&(t.set({status:"selected"}),["component:selected","component:toggled"].forEach(function(i){return e.em.trigger(i,t,n)}))},selectRemove:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t){this.em;t.set({status:"",state:""}),["component:deselected","component:toggled"].forEach(function(i){return e.em.trigger(i,t,n)})}},componentHovered:function(){var t=o.em,e=t.get("componentHovered"),n=t.previous("componentHovered");n&&"hovered"==n.get("status")&&n.set({status:"",state:""}),e&&(0,r.isEmpty)(e.get("status"))&&e.set("status","hovered")}}}},function(t,e,n){"use strict";var i=n(9),r=n(69);t.exports=i.extend({getInputEl:function(){if(!this.$input){var t=this.model,e=this.getModelValue(),n=new r({model:t,target:this.config.em,contClass:this.ppfx+"field-color",ppfx:this.ppfx}).render();this.$input=n.colorEl,n.setValue(e,{fromTarget:1}),this.input=n}return this.$input.get(0)},renderField:function(){this.$input||(this.getInputEl(),this.$el.append(this.input.el))}})},function(t,e,n){"use strict";var i=n(9),r=n(42);t.exports=i.extend({getValueForTarget:function(){var t=this.model,e=t.get("value"),n=t.get("unit");return e?e+n:""},getInputEl:function(){if(!this.$input){var t=this.getModelValue(),e=new r({contClass:this.ppfx+"field-int",model:this.model,ppfx:this.ppfx});this.input=e.render(),this.$input=this.input.inputEl,this.$unit=this.input.unitEl,this.model.set("value",t),this.$input.val(t)}return this.$input.get(0)},renderField:function(){this.$input||(this.$el.append(this.tmpl),this.getInputEl(),this.$el.find("."+this.inputhClass).prepend(this.input.el))}})},function(t,e,n){"use strict";var i=n(9);t.exports=i.extend({initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.ppfx+"chk-icon";this.tmpl='
'},onChange:function(){this.model.set("value",this.getInputEl().checked)},getInputEl:function(){var t;this.$input||(t=1);for(var e=arguments.length,n=Array(e),r=0;r
'},getInputEl:function(){if(!this.$input){var t=this.model,n=t.get("options")||[],i="",this.input=i,this.$input=r(this.input);var o=this.target,s=t.get("name"),a=t.get("value");if(t.get("changeProp"))a=a||o.get(s);else a=o.get("attributes")[s];a&&this.$input.val(a)}return this.$input.get(0)}})}).call(this,n(1))},function(t,e,n){"use strict";var i=n(59),r=n(9),o=n(147),s=n(146),a=n(145),l=n(144);t.exports=i.extend({itemView:r,itemsView:{text:r,number:a,select:o,checkbox:s,color:l},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.config||{};this.config=e,this.em=t.editor,this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.className=this.pfx+"traits";this.listenTo(this.em,"component:toggled",this.updatedCollection),this.updatedCollection()},updatedCollection:function(){var t=this.ppfx,e=this.em.getSelected();this.el.className=this.className+" "+t+"one-bg "+t+"two-color",e&&(this.collection=e.get("traits"),this.render())}})},function(t,e,n){"use strict";t.exports={stylePrefix:"trt-",appendTo:"",labelContainer:"Component settings",labelPlhText:"eg. Text here",labelPlhHref:"eg. https://google.com",optionsTarget:[{value:"",name:"This window"},{value:"_blank",name:"New window"}],textNoElement:"Select an element before using Trait Manager"}},function(t,e,n){"use strict";var i=n(1),r=n(149),o=n(148);t.exports=function(){var t={},e=void 0;return{TraitsView:o,name:"TraitManager",getConfig:function(){return t},init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=n,(0,i.defaults)(t,r);var s=t.pStylePrefix;return s&&(t.stylePrefix=""+s+t.stylePrefix),e=new o({collection:[],editor:t.em,config:t}),this},postRender:function(){var t=this.getConfig().appendTo;t&&((0,i.isElement)(t)?t:document.querySelector(t)).appendChild(this.render())},getTraitsViewer:function(){return e},addType:function(t,n){var i=e.itemView;e.itemsView[t]=i.extend(n)},getType:function(t){return e.itemsView[t]},render:function(){return e.render().el}}}},function(t,e,n){"use strict";t.exports=n(60).extend({_createElement:function(t){return document.createTextNode("")},render:function(){var t=this.model,e=t.get("important");return this.el.textContent=t.getDeclaration({important:e}),this}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=n(60),o=n(151),s=i.default.$,a=function(t,e){return t+(e?"-"+e.replace("%","pc"):"")};t.exports=i.default.View.extend({initialize:function(t){var e=t.config||{};this.atRules={},this.config=e,this.em=e.em,this.pfx=e.stylePrefix||"",this.className=this.pfx+"rules";var n=this.collection;this.listenTo(n,"add",this.addTo),this.listenTo(n,"reset",this.render)},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){if(this.renderStarted){var n=e||null,i=void 0,s=void 0,l={model:t,config:this.config};if("keyframes"===t.get("atRuleType")){var c=t.getAtRule(),u=this.atRules[c];if(!u){var h=document.createElement("style");u=document.createTextNode(""),h.appendChild(document.createTextNode(c+"{")),h.appendChild(u),h.appendChild(document.createTextNode("}")),this.atRules[c]=u,i=h}s=new o(l),u.appendData(s.render().el.textContent)}else i=(s=new r(l)).render().el;var d=this.className,f=t.get("mediaText"),p=a(d),g=p;if(f&&(g=a(d,this.getMediaWidth(f))),i){var v=n||this.el,m=void 0;try{m=v.querySelector("#"+g)}catch(t){}m||(m=v.querySelector("#"+p)),m.appendChild(i)}return i}},getMediaWidth:function(t){return t&&t.replace("("+this.em.getConfig("mediaCondition")+": ","").replace(")","")},render:function(){var t=this;this.renderStarted=1,this.atRules={};var e=this.$el,n=document.createDocumentFragment(),i=this.className;return e.empty(),this.em.get("DeviceManager").getAll().map(function(t){return t.get("widthMedia")}).sort(function(t,e){return(e&&e.replace("px","")||Number.MAX_VALUE)-(t&&t.replace("px","")||Number.MAX_VALUE)}).forEach(function(t){s('
').appendTo(n)}),this.collection.each(function(e){return t.addToCollection(e,n)}),e.append(n),e.attr("class",i),this}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=n(62);t.exports=i.default.Collection.extend({initialize:function(t,e){e&&e.em&&(this.editor=e.em),this.model=function(t,n){return!n.em&&e&&e.em&&(n.em=e.em),new r(t,n)}},add:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=this.editor.get("Parser").parseCss(t)),e.em=this.editor,i.default.Collection.prototype.add.apply(this,[t,e])}})},function(t,e,n){"use strict";t.exports={stylePrefix:"css-",staticRules:"",rules:[]}},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},n="change:style",i=o.get("UndoManager");i&&i.add(t);var r=o.handleUpdates.bind(o);o.stopListening(t,n,r),o.listenTo(t,n,r),!e.avoidStore&&r("","",e)},load:function(e){var n=e||"";!n&&s.stm&&(n=s.em.getCacheLoad());var i=n.styles||"";if(n.styles)try{i=JSON.parse(n.styles)}catch(t){}else n.css&&(i=s.em.get("Parser").parseCss(n.css));return(0,r.isArray)(i)?i.length&&t.reset(i):i&&t.reset(i),i},store:function(e){if(s.stm){var n={},i=this.storageKey();return i.indexOf("css")>=0&&(n.css=s.em.getCss()),i.indexOf("styles")>=0&&(n.styles=JSON.stringify(t)),e||s.stm.store(n),n}},add:function(e,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=n||"",c=r||"",u=i({},o),h=this.get(e,a,c,u);return h&&h.config&&!h.config.atRuleType?h:(u.state=a,u.mediaText=c,u.selectors="",(h=new l(u,s)).get("selectors").add(e),t.add(h),h)},get:function(e,n,i,r){var o=null;return t.each(function(t){o||t.compare(e,n,i,r)&&(o=t)}),o},getAll:function(){return t},clear:function(){return this.getAll().reset(),this},addCollection:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=t instanceof Array?t:[t],o=0,a=r.length;o1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.state||"",r=n.mediaText||o.getCurrentMedia(),s=o.get("SelectorManager").add({name:t,type:d.TYPE_ID}),a=this.add(s,i,r);return a.setStyle(e,n),a},getIdRule:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.state||"",i=e.mediaText||o.getCurrentMedia(),r=o.get("SelectorManager").get(t,d.TYPE_ID);return r&&this.get(r,n,i)},setClassRule:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.state||"",r=n.mediaText||o.getCurrentMedia(),s=o.get("SelectorManager").add({name:t,type:d.TYPE_CLASS}),a=this.add(s,i,r);return a.setStyle(e,n),a},getClassRule:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.state||"",i=e.mediaText||o.getCurrentMedia(),r=o.get("SelectorManager").get(t,d.TYPE_CLASS);return r&&this.get(r,n,i)},render:function(){return e.render().el}}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));n(64),n(65),n(63);t.exports=i.default.View.extend({events:{submit:"handleSubmit"},template:function(t){var e=t.pfx,n=t.ppfx;return'\n
\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n
\n
\n '},initialize:function(t){this.options=t,this.config=t.config,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"";var e=this.collection;this.listenTo(e,"reset",this.renderAssets),this.listenTo(e,"add",this.addToAsset),this.listenTo(e,"remove",this.removedAsset),this.listenTo(e,"deselectAll",this.deselectAll)},handleSubmit:function(t){t.preventDefault();var e=this.getAddInput(),n=e.value.trim(),i=this.config.handleAdd;n&&(e.value="",this.getAssetsEl().scrollTop=0,i?i.bind(this)(n):this.options.globalCollection.add(n,{at:0}))},getAssetsEl:function(){return this.el.querySelector("."+this.pfx+"assets")},getAddInput:function(){return this.inputUrl&&this.inputUrl.value||(this.inputUrl=this.el.querySelector("."+this.pfx+"add-asset input")),this.inputUrl},removedAsset:function(t){this.collection.length||this.toggleNoAssets()},addToAsset:function(t){1==this.collection.length&&this.toggleNoAssets(1),this.addAsset(t)},addAsset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.collection,i=this.config,r=new t.typeView({model:t,collection:n,config:i}).render().el;if(e)e.appendChild(r);else{var o=this.getAssetsEl();o&&o.insertBefore(r,o.firstChild)}return r},toggleNoAssets:function(t){var e=this.$el.find("."+this.pfx+"assets");if(t)e.empty();else{var n=this.config.noAssets;n&&e.append(n)}},deselectAll:function(){var t=this.pfx;this.$el.find("."+t+"highlight").removeClass(t+"highlight")},renderAssets:function(){var t=this,e=document.createDocumentFragment(),n=this.$el.find("."+this.pfx+"assets");n.empty(),this.toggleNoAssets(this.collection.length),this.collection.each(function(n){return t.addAsset(n,e)}),n.append(e)},render:function(){var t=this.options.fu.render().el;return this.$el.empty(),this.$el.append(t).append(this.template(this)),this.el.className=this.ppfx+"asset-manager",this.renderAssets(),this.rendered=1,this}})},function(t,e,n){"use strict";t.exports=n(0).Model.extend({idAttribute:"src",defaults:{type:"",src:""},getFilename:function(){return this.get("src").split("/").pop()},getExtension:function(){return this.getFilename().split(".").pop()}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};return void 0===e.at&&(e.at=0),s.add(t,e)},get:function(t){return s.where({src:t})[0]},getAll:function(){return s},getAllVisible:function(){return a.collection},remove:function(t){var e=this.get(t);return this.getAll().remove(e),this},store:function(e){var n={},i=JSON.stringify(this.getAll().toJSON());return n[this.storageKey]=i,!e&&t.stm&&t.stm.store(n),n},load:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.storageKey,n=t[e]||[];if("string"==typeof n)try{n=JSON.parse(t[e])}catch(t){}return n&&n.length&&this.getAll().reset(n),n},getContainer:function(){return a.el},getAssetsEl:function(){return a.el.querySelector("[data-el=assets]")},render:function(t){var e=t||this.getAll().models;return a.rendered||a.render(),a.collection.reset(e),this.getContainer()},addType:function(t,e){this.getAll().addType(t,e)},getType:function(t){return this.getAll().getType(t)},getTypes:function(){return this.getAll().getTypes()},AssetsView:function(){return a},FileUploader:function(){return l},onLoad:function(){this.getAll().reset(t.assets)},postRender:function(e){t.dropzone&&l.initDropzone(e)},setTarget:function(t){a.collection.target=t},onSelect:function(t){a.collection.onSelect=t},onClick:function(e){t.onClick=e},onDblClick:function(e){t.onDblClick=e}}}},function(t,e,n){"use strict";var i=o(n(1)),r=o(n(0));function o(t){return t&&t.__esModule?t:{default:t}}var s=n(16);t.exports=r.default.View.extend({template:i.default.template('\n
\n \n <%= label %>\n
'),events:{"click [data-sector-title]":"toggle"},initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.caretR="fa-caret-right",this.caretD="fa-caret-down";var e=this.model;this.listenTo(e,"change:open",this.updateOpen),this.listenTo(e,"updateVisibility",this.updateVisibility),this.listenTo(e,"destroy remove",this.remove)},updateVisibility:function(){var t;this.model.get("properties").each(function(e){e.get("visible")&&(t=1)}),this.el.style.display=t?"block":"none"},updateOpen:function(){this.model.get("open")?this.show():this.hide()},show:function(){this.$el.addClass(this.pfx+"open"),this.getPropertiesEl().style.display="",this.$caret.removeClass(this.caretR).addClass(this.caretD)},hide:function(){this.$el.removeClass(this.pfx+"open"),this.getPropertiesEl().style.display="none",this.$caret.removeClass(this.caretD).addClass(this.caretR)},getPropertiesEl:function(){return this.$el.find("."+this.pfx+"properties").get(0)},toggle:function(t){var e=this.model.get("open")?0:1;this.model.set("open",e)},render:function(){return this.$el.html(this.template({pfx:this.pfx,label:this.model.get("name")})),this.$caret=this.$el.find("#"+this.pfx+"caret"),this.renderProperties(),this.$el.attr("class",this.pfx+"sector no-select"),this.updateOpen(),this},renderProperties:function(){var t=this.model.get("properties");if(t){var e=new s({collection:t,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(e.render().el)}}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=t.config||{};this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.target=t.target||{},this.config=e;var n={};(0,o.extend)(n,r.default.Events);var s=document.body,a=document.createElement("el-"+(new Date).getTime());s.appendChild(a),n.computedDefault=i({},window.getComputedStyle(a)),s.removeChild(a),this.propTarget=n;var l=this.collection;this.listenTo(l,"add",this.addTo),this.listenTo(l,"reset",this.render),this.listenTo(this.target,"component:toggled component:update:classes component:update:state change:device",this.targetUpdated)},addTo:function(t){this.addToCollection(t)},targetUpdated:function(){var t=this.target,e=this.propTarget,n=t.getSelected();if(n){var i=t.get("Config").devicePreviewMode?"":n.get("state"),r=n.getEl();if(e.helper=null,r){var o=i?":"+i:null;e.computed=window.getComputedStyle(r,o)}n=t.get("StyleManager").getModelToStyle(n),i&&function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.get("CssComposer"),r=i.getAll(),o=i.getClassRule("hc-state");o?(r.remove(o),r.add(o)):o=i.setClassRule("hc-state"),o.set("important",1),o.setStyle(n),e.helper=o}(n.getStyle()),e.model=n,e.trigger("update")}},addToCollection:function(t,e){var n=e||null,i=new s({model:t,id:this.pfx+t.get("name").replace(" ","_").toLowerCase(),name:t.get("name"),properties:t.get("properties"),target:this.target,propTarget:this.propTarget,config:this.config}).render().el;return n?n.appendChild(i):this.$el.append(i),i},render:function(){var t=this,e=document.createDocumentFragment(),n=this.$el,i=this.pfx,r=this.ppfx;return n.empty(),this.collection.each(function(n){return t.addToCollection(n,e)}),n.append(e),n.addClass(i+"sectors "+r+"one-bg "+r+"two-color"),this}})},function(t,e,n){"use strict";n(0);t.exports=function(){return{build:function(t){var e=[];"string"==typeof t&&(t=[t]);for(var n=0,i=t.length;n\n \n
\n '},getSliderEl:function(){return this.slider||(this.slider=this.el.querySelector("input[type=range]")),this.slider},inputValueChanged:function(){var t=this.model,e=t.get("step");this.getInputEl().value=this.getSliderEl().value;var n=this.getInputValue()-e;t.set("value",n,{avoidStore:1}).set("value",n+e),this.elementUpdated()},inputValueChangedSoft:function(){this.getInputEl().value=this.getSliderEl().value,this.model.set("value",this.getInputValue(),{avoidStore:1}),this.elementUpdated()},setValue:function(t){this.getSliderEl().value=t,this.inputInst.setValue(t,{silent:1})},onRender:function(){r.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e\n \n \n
'+("Layer "+t.get("index"))+'
\n
\n \t
\n
\n
\n ⨯\n
\n
\n
\n '},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model;this.stackModel=t.stackModel||{},this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.sorter=t.sorter||null,this.propsConfig=t.propsConfig||{},this.customPreview=t.onPreview,this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:active",this.updateVisibility),this.listenTo(e.get("properties"),"change",this.updatePreview),e.get("preview")||this.$el.addClass(this.pfx+"no-preview"),e.view=this,e.set({droppable:0,draggable:1}),this.$el.data("model",e)},initSorter:function(t){this.sorter&&this.sorter.startSort(this.el)},remove:function(t){t&&t.stopPropagation&&t.stopPropagation();var e=this.model,n=e.collection,r=this.stackModel;i.default.View.prototype.remove.apply(this,arguments),n.contains(e)&&n.remove(e),r&&r.set&&(r.set({stackIndex:null},{silent:!0}),r.trigger("updateValue"))},onPreview:function(t){var e=t.split(" "),n=[];return this.model.get("properties").each(function(t,i){var r=e[i]||"";if(r&&"integer"==t.get("type")){var o=parseInt(r,10),s=r.replace(o,"");r=(o=(o=(o=isNaN(o)?0:o)>3?3:o)<-3?-3:o)+s}n.push(r)}),n.join(" ")},updatePreview:function(){var t=this.stackModel,e=this.customPreview,n=this.getPreviewEl(),i=this.model.getFullValue(),r=e?e(i):this.onPreview(i);r&&t&&n&&(n.style[t.get("property")]=r)},getPropertiesWrapper:function(){return this.propsWrapEl||(this.propsWrapEl=this.el.querySelector("[data-properties]")),this.propsWrapEl},getPreviewEl:function(){return this.previewEl||(this.previewEl=this.el.querySelector("[data-preview]")),this.previewEl},active:function(){var t=this.model,e=t.collection;e.active(e.indexOf(t))},updateVisibility:function(){var t=this.pfx,e=this.getPropertiesWrapper(),n=this.model.get("active");e.style.display=n?"":"none",this.$el[n?"addClass":"removeClass"](t+"active")},render:function(){var t=n(16),e=this.propsConfig,i=this.pfx+"layer",r=this.model,o=this.el,s=new t({collection:r.get("properties"),config:this.config,target:e.target,customValue:e.customValue,propTarget:e.propTarget,onChange:e.onChange}).render().el;return o.innerHTML=this.template(r),o.className=i,this.getPropertiesWrapper().appendChild(s),this.updateVisibility(),this.updatePreview(),this}})},function(t,e,n){"use strict";var i=n(0),r=n(167);t.exports=i.View.extend({initialize:function(t){this.config=t.config||{},this.stackModel=t.stackModel,this.preview=t.preview,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.propsConfig=t.propsConfig;var e=this.pfx,n=this.ppfx,i=this.collection;this.className=e+"layers "+n+"field",this.listenTo(i,"add",this.addTo),this.listenTo(i,"deselectAll",this.deselectAll),this.listenTo(i,"reset",this.render);var r=this.config.em||"",o=r?r.get("Utils"):"";this.sorter=o?new o.Sorter({container:this.el,ignoreViewChildren:1,containerSel:"."+e+"layers",itemSel:"."+e+"layer",pfx:this.config.pStylePrefix}):"",i.view=this,this.$el.data("model",i),this.$el.data("collection",i)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var i=e||null,o=this.stackModel,s=this.config,a=this.sorter,l=this.propsConfig;void 0!==this.preview&&t.set("preview",this.preview);var c=new r({model:t,config:s,sorter:a,stackModel:o,propsConfig:l}).render().el;if(i)i.appendChild(c);else if(void 0!==n){var u="before";this.$el.children().length==n&&(n--,u="after"),n<0?this.$el.append(c):this.$el.children().eq(n)[u](c)}else this.$el.append(c);return c},deselectAll:function(){this.$el.find("."+this.pfx+"layer").removeClass(this.pfx+"active")},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(e){this.addToCollection(e,t)},this),this.$el.append(t),this.$el.attr("class",this.className),this.sorter&&(this.sorter.plh=null),this}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=function(t,e){var n={beforeShow:h,move:h,change:h,show:h,hide:h,color:!1,flat:!1,showInput:!1,allowEmpty:!1,showButtons:!0,clickoutFiresChange:!0,showInitial:!1,showPalette:!1,showPaletteOnly:!1,hideAfterPaletteSelect:!1,togglePaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,appendTo:"body",maxSelectionSize:7,cancelText:"cancel",chooseText:"choose",togglePaletteMoreText:"more",togglePaletteLessText:"less",clearText:"Clear Color Selection",noColorSelectedText:"No Color Selected",preferredFormat:!1,className:"",containerClassName:"",replacerClassName:"",showAlpha:!1,theme:"sp-light",palette:[["#ffffff","#000000","#ff0000","#ff8000","#ffff00","#008000","#0000ff","#4b0082","#9400d3"]],selectionPalette:[],disabled:!1,offset:null},r=[],o=!!/msie/i.exec(window.navigator.userAgent),s=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div").style;return e.cssText="background-color:rgba(0,0,0,.5)",t(e.backgroundColor,"rgba")||t(e.backgroundColor,"hsla")}(),a=["
","
","
","
"].join(""),l=function(){var t="";if(o)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",t,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();function c(e,n,i,r){for(var o=[],a=0;a')}else{o.push(t("
").append(t('').attr("title",r.noColorSelectedText)).html())}}return"
"+o.join("")+"
"}function u(i,u){var h=function(e,i){var r=t.extend({},n,e);return r.callbacks={move:f(r.move,i),change:f(r.change,i),show:f(r.show,i),hide:f(r.hide,i),beforeShow:f(r.beforeShow,i)},r}(u,i),v=h.flat,m=h.showSelectionPalette,y=h.localStorageKey,b=h.theme,x=h.callbacks,w=function(t,e,n){var i;return function(){var r=this,o=arguments;n&&clearTimeout(i),!n&&i||(i=setTimeout(function(){i=null,t.apply(r,o)},e))}}(Vt,10),C=!1,k=!1,T=0,E=0,M=0,A=0,O=0,P=0,_=0,L=0,N=0,D=0,I=1,F=[],R=[],j={},z=h.selectionPalette.slice(0),V=h.maxSelectionSize,H="sp-dragging",$=null,B=i.ownerDocument,W=(B.body,t(i)),U=!1,q=t(l,B).addClass(b),K=q.find(".sp-picker-container"),Y=q.find(".sp-color"),G=q.find(".sp-dragger"),X=q.find(".sp-hue"),J=q.find(".sp-slider"),Z=q.find(".sp-alpha-inner"),Q=q.find(".sp-alpha"),tt=q.find(".sp-alpha-handle"),et=q.find(".sp-input"),nt=q.find(".sp-palette"),it=q.find(".sp-initial"),rt=q.find(".sp-cancel"),ot=q.find(".sp-clear"),st=q.find(".sp-choose"),at=q.find(".sp-palette-toggle"),lt=W.is("input"),ct=lt&&"color"===W.attr("type")&&g(),ut=lt&&!v,ht=ut?t(a).addClass(b).addClass(h.className).addClass(h.replacerClassName):t([]),dt=ut?ht:W,ft=ht.find(".sp-preview-inner"),pt=h.color||lt&&W.val(),gt=!1,vt=h.preferredFormat,mt=!h.showButtons||h.clickoutFiresChange,yt=!pt,bt=h.allowEmpty&&!ct;function xt(){if(h.showPaletteOnly&&(h.showPalette=!0),at.text(h.showPaletteOnly?h.togglePaletteMoreText:h.togglePaletteLessText),h.palette){F=h.palette.slice(0),R=t.isArray(F[0])?F:[F],j={};for(var e=0;e1&&(delete window.localStorage[y],t.each(e,function(t,e){Ct(e)}))}catch(t){}try{z=window.localStorage[y].split(";")}catch(t){}}}function Ct(e){if(m){var n=S(e).toRgbString();if(!j[n]&&-1===t.inArray(n,z))for(z.push(n);z.length>V;)z.shift();if(y&&window.localStorage)try{window.localStorage[y]=z.join(";")}catch(t){}}}function kt(){var e=It(),n=t.map(R,function(t,n){return c(t,e,"sp-palette-row sp-palette-row-"+n,h)});wt(),z&&n.push(c(function(){var t=[];if(h.showPalette)for(var e=0;ed&&d>i?Math.abs(p.left+i-d):0),p.top-=Math.min(p.top,p.top+r>f&&f>r?Math.abs(r+o-0):0),p}(q,dt))),jt(),h.showPalette&&kt(),W.trigger("reflow.spectrum"))}function Ht(){Lt(),U=!0,W.attr("disabled",!0),dt.addClass("sp-disabled")}!function(){if(o&&q.find("*:not(input)").attr("unselectable","on"),xt(),ut&&W.after(ht).hide(),bt||ot.hide(),v)W.after(q).hide();else{var e="parent"===h.appendTo?W.parent():t(h.appendTo);1!==e.length&&(e=t("body")),e.append(q)}function n(e){return e.data&&e.data.ignore?(Dt(t(e.target).closest(".sp-thumb-el").data("color")),Ft()):(Dt(t(e.target).closest(".sp-thumb-el").data("color")),Ft(),zt(!0),h.hideAfterPaletteSelect&&Lt()),!1}wt(),dt.bind("click.spectrum touchstart.spectrum",function(e){U||At(),e.stopPropagation(),t(e.target).is("input")||e.preventDefault()}),(W.is(":disabled")||!0===h.disabled)&&Ht(),q.click(d),et.change(Mt),et.bind("paste",function(){setTimeout(Mt,1)}),et.keydown(function(t){13==t.keyCode&&Mt()}),rt.text(h.cancelText),rt.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),Nt(),Lt()}),ot.attr("title",h.clearText),ot.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),yt=!0,Ft(),v&&zt(!0)}),st.text(h.chooseText),st.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),o&&et.is(":focus")&&et.trigger("change"),et.hasClass("sp-validation-error")||(zt(!0),Lt())}),at.text(h.showPaletteOnly?h.togglePaletteMoreText:h.togglePaletteLessText),at.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),h.showPaletteOnly=!h.showPaletteOnly,h.showPaletteOnly||v||q.css("left","-="+(K.outerWidth(!0)+5)),xt()}),p(Q,function(t,e,n){I=t/O,yt=!1,n.shiftKey&&(I=Math.round(10*I)/10),Ft()},Tt,Et),p(X,function(t,e){L=parseFloat(e/A),yt=!1,h.showAlpha||(I=1),Ft()},Tt,Et),p(Y,function(t,e,n){if(n.shiftKey){if(!$){var i=N*T,r=E-D*E,o=Math.abs(t-i)>Math.abs(e-r);$=o?"x":"y"}}else $=null;var s=!$||"y"===$;(!$||"x"===$)&&(N=parseFloat(t/T)),s&&(D=parseFloat((E-e)/E)),yt=!1,h.showAlpha||(I=1),Ft()},Tt,Et),pt?(Dt(pt),Rt(),vt=h.preferredFormat||S(pt).format,Ct(pt)):Rt(),v&&Ot();var i=o?"mousedown.spectrum":"click.spectrum touchstart.spectrum";nt.delegate(".sp-thumb-el",i,n),it.delegate(".sp-thumb-el:nth-child(1)",i,{ignore:!0},n)}();var $t={show:Ot,hide:Lt,toggle:At,reflow:Vt,option:function(n,i){return n===e?t.extend({},h):i===e?h[n]:(h[n]=i,"preferredFormat"===n&&(vt=h.preferredFormat),void xt())},enable:function(){U=!1,W.attr("disabled",!1),dt.removeClass("sp-disabled")},disable:Ht,offset:function(t){h.offset=t,Vt()},set:function(t){Dt(t),zt()},get:It,destroy:function(){W.show(),dt.unbind("click.spectrum touchstart.spectrum"),q.remove(),ht.remove(),r[$t.id]=null},container:q};return $t.id=r.push($t)-1,$t}function h(){}function d(t){t.stopPropagation()}function f(t,e){var n=Array.prototype.slice,i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function p(e,n,i,r){n=n||function(){},i=i||function(){},r=r||function(){};var s=document,a=!1,l={},c=0,u=0,h="ontouchstart"in window,d={};function f(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function p(t){if(a){if(o&&s.documentMode<9&&!t.button)return g();var i=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],r=i&&i.pageX||t.pageX,d=i&&i.pageY||t.pageY,p=Math.max(0,Math.min(r-l.left,u)),v=Math.max(0,Math.min(d-l.top,c));h&&f(t),n.apply(e,[p,v,t])}}function g(){a&&(t(s).unbind(d),t(s.body).removeClass("sp-dragging"),setTimeout(function(){r.apply(e,arguments)},0)),a=!1}d.selectstart=f,d.dragstart=f,d["touchmove mousemove"]=p,d["touchend mouseup"]=g,t(e).bind("touchstart mousedown",function(n){(n.which?3==n.which:2==n.button)||a||!1!==i.apply(e,arguments)&&(a=!0,c=t(e).height(),u=t(e).width(),l=t(e).offset(),t(s).bind(d),t(s.body).addClass("sp-dragging"),p(n),f(n))})}function g(){return t.fn.spectrum.inputTypeColorSupport()}t.fn.spectrum=function(e,n){if("string"==typeof e){var i=this,o=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=r[t(this).data("spectrum.id")];if(n){var s=n[e];if(!s)throw new Error("Spectrum: no such method: '"+e+"'");"get"==e?i=n.get():"container"==e?i=n.container:"option"==e?i=n.option.apply(n,o):"destroy"==e?(n.destroy(),t(this).removeData("spectrum.id")):s.apply(n,o)}}),i}return this.spectrum("destroy").each(function(){var n=u(this,t.extend({},e,t(this).data()));t(this).data("spectrum.id",n.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=p,t.fn.spectrum.defaults=n,t.fn.spectrum.inputTypeColorSupport=function e(){if(void 0===e._cachedResult){var n=t("")[0];e._cachedResult="color"===n.type&&""!==n.value}return e._cachedResult},t.spectrum={},t.spectrum.localization={},t.spectrum.palettes={},t.fn.spectrum.processNativeColorInputs=function(){var e=t("input[type=color]");e.length&&!g()&&e.spectrum({preferredFormat:"hex6"})};var v=/^[\s,#]+/,m=/\s+$/,y=0,b=Math,x=b.round,w=b.min,C=b.max,k=b.random,S=function t(e,n){if(e=e||"",n=n||{},e instanceof t)return e;if(!(this instanceof t))return new t(e,n);var r=function(t){var e={r:0,g:0,b:0},n=1,r=!1,o=!1;"string"==typeof t&&(t=function(t){t=t.replace(v,"").replace(m,"").toLowerCase();var e,n=!1;if($[t])t=$[t],n=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=X.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=X.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=X.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=X.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=X.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=X.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=X.hex8.exec(t))return{a:function(t){return K(t)/255}(e[1]),r:K(e[2]),g:K(e[3]),b:K(e[4]),format:n?"name":"hex8"};if(e=X.hex6.exec(t))return{r:K(e[1]),g:K(e[2]),b:K(e[3]),format:n?"name":"hex"};if(e=X.hex3.exec(t))return{r:K(e[1]+""+e[1]),g:K(e[2]+""+e[2]),b:K(e[3]+""+e[3]),format:n?"name":"hex"};return!1}(t));"object"==(void 0===t?"undefined":i(t))&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(e=function(t,e,n){return{r:255*U(t,255),g:255*U(e,255),b:255*U(n,255)}}(t.r,t.g,t.b),r=!0,o="%"===String(t.r).substr(-1)?"prgb":"rgb"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")?(t.s=G(t.s),t.v=G(t.v),e=function(t,e,n){t=6*U(t,360),e=U(e,100),n=U(n,100);var i=b.floor(t),r=t-i,o=n*(1-e),s=n*(1-r*e),a=n*(1-(1-r)*e),l=i%6;return{r:255*[n,s,o,o,a,n][l],g:255*[a,n,n,s,o,o][l],b:255*[o,o,a,n,n,s][l]}}(t.h,t.s,t.v),r=!0,o="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=G(t.s),t.l=G(t.l),e=function(t,e,n){var i,r,o;function s(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=U(t,360),e=U(e,100),n=U(n,100),0===e)i=r=o=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=s(l,a,t+1/3),r=s(l,a,t),o=s(l,a,t-1/3)}return{r:255*i,g:255*r,b:255*o}}(t.h,t.s,t.l),r=!0,o="hsl"),t.hasOwnProperty("a")&&(n=t.a));return n=W(n),{ok:r,format:t.format||o,r:w(255,C(e.r,0)),g:w(255,C(e.g,0)),b:w(255,C(e.b,0)),a:n}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=x(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=x(this._r)),this._g<1&&(this._g=x(this._g)),this._b<1&&(this._b=x(this._b)),this._ok=r.ok,this._tc_id=y++};function T(t,e,n){t=U(t,255),e=U(e,255),n=U(n,255);var i,r,o=C(t,e,n),s=w(t,e,n),a=(o+s)/2;if(o==s)i=r=0;else{var l=o-s;switch(r=a>.5?l/(2-o-s):l/(o+s),o){case t:i=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(S(i));return o}function H(t,e){e=e||6;for(var n=S(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(S({h:i,s:r,v:o})),o=(o+a)%1;return s}S.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},setAlpha:function(t){return this._a=W(t),this._roundA=x(100*this._a)/100,this},toHsv:function(){var t=E(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=E(this._r,this._g,this._b),e=x(360*t.h),n=x(100*t.s),i=x(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=T(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=T(this._r,this._g,this._b),e=x(360*t.h),n=x(100*t.s),i=x(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return M(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return A(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:x(this._r),g:x(this._g),b:x(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+x(this._r)+", "+x(this._g)+", "+x(this._b)+")":"rgba("+x(this._r)+", "+x(this._g)+", "+x(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:x(100*U(this._r,255))+"%",g:x(100*U(this._g,255))+"%",b:x(100*U(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+x(100*U(this._r,255))+"%, "+x(100*U(this._g,255))+"%, "+x(100*U(this._b,255))+"%)":"rgba("+x(100*U(this._r,255))+"%, "+x(100*U(this._g,255))+"%, "+x(100*U(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(B[M(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+A(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";t&&(n=S(t).toHex8String());return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,i=this._a<1&&this._a>=0;return e||!i||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"name"!==t?("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(L,arguments)},brighten:function(){return this._applyModification(N,arguments)},darken:function(){return this._applyModification(D,arguments)},desaturate:function(){return this._applyModification(O,arguments)},saturate:function(){return this._applyModification(P,arguments)},greyscale:function(){return this._applyModification(_,arguments)},spin:function(){return this._applyModification(I,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(V,arguments)},complement:function(){return this._applyCombination(F,arguments)},monochromatic:function(){return this._applyCombination(H,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(R,arguments)},tetrad:function(){return this._applyCombination(j,arguments)}},S.fromRatio=function(t,e){if("object"==(void 0===t?"undefined":i(t))){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]="a"===r?t[r]:G(t[r]));t=n}return S(t,e)},S.equals=function(t,e){return!(!t||!e)&&S(t).toRgbString()==S(e).toRgbString()},S.random=function(){return S.fromRatio({r:k(),g:k(),b:k()})},S.mix=function(t,e,n){n=0===n?0:n||50;var i,r=S(t).toRgb(),o=S(e).toRgb(),s=n/100,a=2*s-1,l=o.a-r.a,c=1-(i=((i=a*l==-1?a:(a+l)/(1+a*l))+1)/2),u={r:o.r*i+r.r*c,g:o.g*i+r.g*c,b:o.b*i+r.b*c,a:o.a*s+r.a*(1-s)};return S(u)},S.readability=function(t,e){var n=S(t),i=S(e),r=n.toRgb(),o=i.toRgb(),s=n.getBrightness(),a=i.getBrightness(),l=Math.max(r.r,o.r)-Math.min(r.r,o.r)+Math.max(r.g,o.g)-Math.min(r.g,o.g)+Math.max(r.b,o.b)-Math.min(r.b,o.b);return{brightness:Math.abs(s-a),color:l}},S.isReadable=function(t,e){var n=S.readability(t,e);return n.brightness>125&&n.color>500},S.mostReadable=function(t,e){for(var n=null,i=0,r=!1,o=0;o125&&s.color>500,l=s.brightness/125*3+s.color/500;(a&&!r||a&&r&&l>i||!a&&!r&&l>i)&&(r=a,i=l,n=S(e[o]))}return n};var $=S.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},B=S.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}($);function W(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function U(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=w(e,C(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),b.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function q(t){return w(1,C(0,t))}function K(t){return parseInt(t,16)}function Y(t){return 1==t.length?"0"+t:""+t}function G(t){return t<=1&&(t=100*t+"%"),t}var X=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",n="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+n),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();window.tinycolor=S,t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.Model.extend({defaults:{index:"",value:"",values:{},active:!1,preview:!1,properties:[]},initialize:function(){var t=n(18),e=this.get("properties"),i=this.get("value");if(this.set("properties",e instanceof t?e:new t(e)),!i){var r="",o=this.get("values");for(var s in o)r+=" "+o[s];this.set("value",r.trim())}},getPropertyValue:function(t){var e="";return this.get("properties").each(function(n){n.get("property")==t&&(e=n.getFullValue())}),e},getFullValue:function(){var t=[];return this.get("properties").each(function(e){return t.push(e.getFullValue())}),t.join(" ")}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;eB",attributes:{title:"Bold"},result:function(t){return t.exec("bold")}},italic:{name:"italic",icon:"I",attributes:{title:"Italic"},result:function(t){return t.exec("italic")}},underline:{name:"underline",icon:"U",attributes:{title:"Underline"},result:function(t){return t.exec("underline")}},strikethrough:{name:"strikethrough",icon:"S",attributes:{title:"Strike-through"},result:function(t){return t.exec("strikeThrough")}},link:{icon:'',name:"link",attributes:{style:"font-size:1.4rem;padding:0 4px 2px;",title:"Link"},result:function(t){return t.insertHTML(''+t.selection()+"")}}},l=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var r=n.el;if(r[s])return r[s];r[s]=this,this.setEl(r),this.updateActiveActions=this.updateActiveActions.bind(this);var o=n.actions||[];o.forEach(function(t,e){"string"==typeof t?t=a[t]:a[t.name]&&(t=i({},a[t.name],t)),o[e]=t});var l=o.length?o:Object.keys(a).map(function(t){return a[t]});n.classes=i({actionbar:"actionbar",button:"action",active:"active"},n.classes);var c=n.classes,u=n.actionbar;if(this.actionbar=u,this.settings=n,this.classes=c,this.actions=l,!u){var h=n.actionbarContainer;(u=document.createElement("div")).className=c.actionbar,h.appendChild(u),this.actionbar=u,l.forEach(function(t){return e.addAction(t)})}return n.styleWithCSS&&this.exec("styleWithCSS"),this.syncActions(),this}return r(t,[{key:"setEl",value:function(t){this.el=t,this.doc=t.ownerDocument}},{key:"updateActiveActions",value:function(){var t=this;this.getActions().forEach(function(e){var n=e.btn,i=e.update,r=t.classes.active,o=e.name,s=t.doc;n.className=n.className.replace(r,"").trim(),s.queryCommandSupported(o)&&s.queryCommandState(o)&&(n.className+=" "+r),i&&i(t,e)})}},{key:"enable",value:function(){return this.enabled?this:(this.actionbarEl().style.display="",this.el.contentEditable=!0,(0,o.on)(this.el,"mouseup keyup",this.updateActiveActions),this.syncActions(),this.updateActiveActions(),this.el.focus(),this.enabled=1,this)}},{key:"disable",value:function(){return this.actionbarEl().style.display="none",this.el.contentEditable=!1,(0,o.off)(this.el,"mouseup keyup",this.updateActiveActions),this.enabled=0,this}},{key:"syncActions",value:function(){var t=this;this.getActions().forEach(function(e){var n=e.event||"click";e.btn["on"+n]=function(n){e.result(t,e),t.updateActiveActions()}})}},{key:"addAction",value:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).sync,n=document.createElement("span"),i=t.icon,r=t.attributes||{};for(var o in n.className=this.classes.button,t.btn=n,r)n.setAttribute(o,r[o]);"string"==typeof i?n.innerHTML=i:n.appendChild(i),this.actionbarEl().appendChild(n),e&&(this.actions.push(t),this.syncActions())}},{key:"getActions",value:function(){return this.actions}},{key:"selection",value:function(){return this.doc.getSelection()}},{key:"exec",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.doc.execCommand(t,!1,e)}},{key:"actionbarEl",value:function(){return this.actionbar}},{key:"insertHTML",value:function(t){var e=this.doc,n=e.getSelection();if(n&&n.rangeCount){var i=e.createElement("div"),r=n.getRangeAt(0);r.deleteContents(),i.innerHTML=t,Array.prototype.slice.call(i.childNodes).forEach(function(t){r.insertNode(t),t}),n.removeAllRanges(),n.addRange(r),this.el.focus()}}}]),t}();e.default=l},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(177)),r=n(2);t.exports=function(){var t={},e=n(176),o=void 0,s=void 0,a=void 0,l=function(){var t=o.style;t.top="-100px",t.left="-100px",t.display="none"};return{customRte:null,name:"RichTextEditor",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var i in t=n,e)i in t||(t[i]=e[i]);var s=t.pStylePrefix;return s&&(t.stylePrefix=s+t.stylePrefix),this.pfx=t.stylePrefix,t.actions||[],(o=document.createElement("div")).className=s+"rte-toolbar "+s+"one-bg",a=this.initRte(document.createElement("div")),(0,r.on)(o,"mousedown",function(t){return t.stopPropagation()}),this},postRender:function(t){var e=t.model.get("Canvas");o.style.pointerEvents="all",l(),e.getToolsEl().appendChild(o)},initRte:function(e){var n=this.pfx,r=o,s=this.actionbar,l=this.actions||t.actions,c={actionbar:n+"actionbar",button:n+"action",active:n+"active"},u=new i.default({el:e,classes:c,actions:l,actionbar:s,actionbarContainer:r});return a&&a.setEl(e),u.actionbar&&(this.actionbar=u.actionbar),u.actions&&(this.actions=u.actions),u},add:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.name=t,a.addAction(e,{sync:1})},get:function(t){var e=void 0;return a.getActions().forEach(function(n){n.name==t&&(e=n)}),e},getAll:function(){return a.getActions()},remove:function(t){var e=this.getAll(),n=this.get(t);if(n){var i=n.btn,r=e.indexOf(n);i.parentNode.removeChild(i),e.splice(r,1)}return n},getToolbarEl:function(){return o},udpatePosition:function(){var e=t.em.get("Canvas").getTargetToElementDim(o,s,{event:"rteToolbarPosUpdate"});if(e){t.adjustToolbar&&e.top<=e.canvasTop&&(e.top=e.elementTop+e.elementHeight);var n=o.style;n.top=e.top+"px",n.left=e.left+"px"}},enable:function(e,n){s=e.el;var i=t.em,r=e.getChildrenContainer(),a=this.customRte;if(o.style.display="",n=a?a.enable(r,n):this.initRte(r).enable(),i){setTimeout(this.udpatePosition.bind(this),0);var l="change:canvasOffset canvasScroll";i.off(l,this.udpatePosition,this),i.on(l,this.udpatePosition,this),i.trigger("rte:enable",e,n)}return n},disable:function(e,n){var i=t.em,r=this.customRte,o=e.getChildrenContainer();r?r.disable(o,n):n&&n.disable(),l(),i&&i.trigger("rte:disable",e,n)}}}},function(t,e,n){"use strict";var i=n(0),r=n(78);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"";var e=this.collection;this.listenTo(e,"add",this.addTo),this.listenTo(e,"reset",this.render),this.listenTo(e,"remove",this.onRemove),this.className=this.pfx+"panels"},onRemove:function(t){var e=t.view;e&&e.remove()},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=this.config,o=t.get("el"),s=new r({el:o,model:t,config:i}),a=s.render().el,l=t.get("appendTo");if(o);else if(l){document.querySelector(l).appendChild(a)}else n?n.appendChild(a):this.$el.append(a);return s.initResize(),a},render:function(){var t=this,e=this.$el,n=document.createDocumentFragment();return e.empty(),this.collection.each(function(e){return t.addToCollection(e,n)}),e.append(n),e.attr("class",this.className),this}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e\n \t
<%= label %>
\n \t
\n
'),initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix},render:function(){var t=this.model.toJSON();return t.pfx=this.pfx,this.$el.html(this.template(t)),this.$el.attr("class",this.pfx+"editor-c"),this.$el.find("#"+this.pfx+"code").append(this.model.get("input")),this}})},function(t,e,n){!function(t){t.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e){return/^[;{}]$/.test(e)}}),t.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e,n,i){return this.jsonMode?/^[\[,{]$/.test(e)||/^}/.test(n):(";"!=e||!i.lexical||")"!=i.lexical.type)&&/^[;{}]$/.test(e)&&!/^;/.test(n)}});var e=/^(a|abbr|acronym|area|base|bdo|big|br|button|caption|cite|code|col|colgroup|dd|del|dfn|em|frame|hr|iframe|img|input|ins|kbd|label|legend|link|map|object|optgroup|option|param|q|samp|script|select|small|span|strong|sub|sup|textarea|tt|var)$/;t.extendMode("xml",{commentStart:"\x3c!--",commentEnd:"--\x3e",newlineAfterToken:function(t,n,i,r){var o=!1;return"html"==this.configuration&&(o=!!r.context&&e.test(r.context.tagName)),!o&&("tag"==t&&/>$/.test(n)&&r.context||/^-1&&a>-1&&a>s&&(t=t.substr(0,s)+t.substring(s+o.commentStart.length,a)+t.substr(a+o.commentEnd.length)),r.replaceRange(t,n,i)}})}),t.defineExtension("autoIndentRange",function(t,e){var n=this;this.operation(function(){for(var i=t.line;i<=e.line;i++)n.indentLine(i,"smart")})}),t.defineExtension("autoFormatRange",function(e,n){var i=this,r=i.getMode(),o=i.getRange(e,n).split("\n"),s=t.copyState(r,i.getTokenAt(e).state),a=i.getOption("tabSize"),l="",c=0,u=0===e.ch;function h(){l+="\n",u=!0,++c}for(var d=0;d!?|~^@]/,f=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function p(t,e,n){return i=t,r=n,e}function g(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=function(t){return function(e,n){var i,r=!1;if(a&&"@"==e.peek()&&e.match(f))return n.tokenize=g,p("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=t||r);)r=!r&&"\\"==i;return r||(n.tokenize=g),p("string","string")}}(n),e.tokenize(t,e);if("."==n&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return p("number","number");if("."==n&&t.match(".."))return p("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return p(n);if("="==n&&t.eat(">"))return p("=>","operator");if("0"==n&&t.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return p("number","number");if(/\d/.test(n))return t.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),p("number","number");if("/"==n)return t.eat("*")?(e.tokenize=v,v(t,e)):t.eat("/")?(t.skipToEnd(),p("comment","comment")):qt(t,e,1)?(function(t){for(var e,n=!1,i=!1;null!=(e=t.next());){if(!n){if("/"==e&&!i)return;"["==e?i=!0:i&&"]"==e&&(i=!1)}n=!n&&"\\"==e}}(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),p("regexp","string-2")):(t.eat("="),p("operator","operator",t.current()));if("`"==n)return e.tokenize=m,m(t,e);if("#"==n)return t.skipToEnd(),p("error","error");if(d.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||(t.eat("=")?"!"!=n&&"="!=n||t.eat("="):/[<>*+\-]/.test(n)&&(t.eat(n),">"==n&&t.eat(n))),p("operator","operator",t.current());if(u.test(n)){t.eatWhile(u);var i=t.current();if("."!=e.lastType){if(h.propertyIsEnumerable(i)){var r=h[i];return p(r.type,r.style,i)}if("async"==i&&t.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return p("async","keyword",i)}return p("variable","variable",i)}}function v(t,e){for(var n,i=!1;n=t.next();){if("/"==n&&i){e.tokenize=g;break}i="*"==n}return p("comment","comment")}function m(t,e){for(var n,i=!1;null!=(n=t.next());){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=g;break}i=!i&&"\\"==n}return p("quasi","string-2",t.current())}var y="([{}])";function b(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(c){var i=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,n));i&&(n=i.index)}for(var r=0,o=!1,s=n-1;s>=0;--s){var a=t.string.charAt(s),l=y.indexOf(a);if(l>=0&&l<3){if(!r){++s;break}if(0==--r){"("==a&&(o=!0);break}}else if(l>=3&&l<6)++r;else if(u.test(a))o=!0;else{if(/["'\/]/.test(a))return;if(o&&!r){++s;break}}}o&&!r&&(e.fatArrowAt=s)}}var x={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function w(t,e,n,i,r,o){this.indented=t,this.column=e,this.type=n,this.prev=r,this.info=o,null!=i&&(this.align=i)}function C(t,e){for(var n=t.localVars;n;n=n.next)if(n.name==e)return!0;for(var i=t.context;i;i=i.prev)for(var n=i.vars;n;n=n.next)if(n.name==e)return!0}var k={state:null,column:null,marked:null,cc:null};function S(){for(var t=arguments.length-1;t>=0;t--)k.cc.push(arguments[t])}function T(){return S.apply(null,arguments),!0}function E(t,e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}function M(t){var e=k.state;if(k.marked="def",e.context)if("var"==e.lexical.info&&e.context&&e.context.block){var i=function t(e,n){if(n){if(n.block){var i=t(e,n.prev);return i?i==n.prev?n:new O(i,n.vars,!0):null}return E(e,n.vars)?n:new O(n.prev,new P(e,n.vars),!1)}return null}(t,e.context);if(null!=i)return void(e.context=i)}else if(!E(t,e.localVars))return void(e.localVars=new P(t,e.localVars));n.globalVars&&!E(t,e.globalVars)&&(e.globalVars=new P(t,e.globalVars))}function A(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function O(t,e,n){this.prev=t,this.vars=e,this.block=n}function P(t,e){this.name=t,this.next=e}var _=new P("this",new P("arguments",null));function L(){k.state.context=new O(k.state.context,k.state.localVars,!1),k.state.localVars=_}function N(){k.state.context=new O(k.state.context,k.state.localVars,!0),k.state.localVars=null}function D(){k.state.localVars=k.state.context.vars,k.state.context=k.state.context.prev}function I(t,e){var n=function(){var n=k.state,i=n.indented;if("stat"==n.lexical.type)i=n.lexical.indented;else for(var r=n.lexical;r&&")"==r.type&&r.align;r=r.prev)i=r.indented;n.lexical=new w(i,k.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function F(){var t=k.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function R(t){return function e(n){return n==t?T():";"==t||"}"==n||")"==n||"]"==n?S():T(e)}}function j(t,e){return"var"==t?T(I("vardef",e),yt,R(";"),F):"keyword a"==t?T(I("form"),$,j,F):"keyword b"==t?T(I("form"),j,F):"keyword d"==t?k.stream.match(/^\s*$/,!1)?T():T(I("stat"),W,R(";"),F):"debugger"==t?T(R(";")):"{"==t?T(I("}"),N,st,F,D):";"==t?T():"if"==t?("else"==k.state.lexical.info&&k.state.cc[k.state.cc.length-1]==F&&k.state.cc.pop()(),T(I("form"),$,j,F,kt)):"function"==t?T(Ot):"for"==t?T(I("form"),St,j,F):"class"==t||c&&"interface"==e?(k.marked="keyword",T(I("form"),Lt,F)):"variable"==t?c&&"declare"==e?(k.marked="keyword",T(j)):c&&("module"==e||"enum"==e||"type"==e)&&k.stream.match(/^\s*\w/,!1)?(k.marked="keyword","enum"==e?T(Wt):"type"==e?T(ut,R("operator"),ut,R(";")):T(I("form"),bt,R("{"),I("}"),st,F,F)):c&&"namespace"==e?(k.marked="keyword",T(I("form"),V,st,F)):c&&"abstract"==e?(k.marked="keyword",T(j)):T(I("stat"),Q):"switch"==t?T(I("form"),$,R("{"),I("}","switch"),N,st,F,F,D):"case"==t?T(V,R(":")):"default"==t?T(R(":")):"catch"==t?T(I("form"),L,z,j,F,D):"export"==t?T(I("stat"),Ft,F):"import"==t?T(I("stat"),jt,F):"async"==t?T(j):"@"==e?T(V,j):S(I("stat"),V,R(";"),F)}function z(t){if("("==t)return T(Pt,R(")"))}function V(t,e){return B(t,e,!1)}function H(t,e){return B(t,e,!0)}function $(t){return"("!=t?S():T(I(")"),V,R(")"),F)}function B(t,e,n){if(k.state.fatArrowAt==k.stream.start){var i=n?X:G;if("("==t)return T(L,I(")"),rt(Pt,")"),F,R("=>"),i,D);if("variable"==t)return S(L,bt,R("=>"),i,D)}var r=n?q:U;return x.hasOwnProperty(t)?T(r):"function"==t?T(Ot,r):"class"==t||c&&"interface"==e?(k.marked="keyword",T(I("form"),_t,F)):"keyword c"==t||"async"==t?T(n?H:V):"("==t?T(I(")"),W,R(")"),F,r):"operator"==t||"spread"==t?T(n?H:V):"["==t?T(I("]"),Bt,F,r):"{"==t?ot(et,"}",null,r):"quasi"==t?S(K,r):"new"==t?T(function(t){return function(e){return"."==e?T(t?Z:J):"variable"==e&&c?T(gt,t?q:U):S(t?H:V)}}(n)):"import"==t?T(V):T()}function W(t){return t.match(/[;\}\)\],]/)?S():S(V)}function U(t,e){return","==t?T(V):q(t,e,!1)}function q(t,e,n){var i=0==n?U:q,r=0==n?V:H;return"=>"==t?T(L,n?X:G,D):"operator"==t?/\+\+|--/.test(e)||c&&"!"==e?T(i):c&&"<"==e&&k.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?T(I(">"),rt(ut,">"),F,i):"?"==e?T(V,R(":"),r):T(r):"quasi"==t?S(K,i):";"!=t?"("==t?ot(H,")","call",i):"."==t?T(tt,i):"["==t?T(I("]"),W,R("]"),F,i):c&&"as"==e?(k.marked="keyword",T(ut,i)):"regexp"==t?(k.state.lastType=k.marked="operator",k.stream.backUp(k.stream.pos-k.stream.start-1),T(r)):void 0:void 0}function K(t,e){return"quasi"!=t?S():"${"!=e.slice(e.length-2)?T(K):T(V,Y)}function Y(t){if("}"==t)return k.marked="string-2",k.state.tokenize=m,T(K)}function G(t){return b(k.stream,k.state),S("{"==t?j:V)}function X(t){return b(k.stream,k.state),S("{"==t?j:H)}function J(t,e){if("target"==e)return k.marked="keyword",T(U)}function Z(t,e){if("target"==e)return k.marked="keyword",T(q)}function Q(t){return":"==t?T(F,j):S(U,R(";"),F)}function tt(t){if("variable"==t)return k.marked="property",T()}function et(t,e){if("async"==t)return k.marked="property",T(et);if("variable"==t||"keyword"==k.style){return k.marked="property","get"==e||"set"==e?T(nt):(c&&k.state.fatArrowAt==k.stream.start&&(n=k.stream.match(/^\s*:\s*/,!1))&&(k.state.fatArrowAt=k.stream.pos+n[0].length),T(it));var n}else{if("number"==t||"string"==t)return k.marked=a?"property":k.style+" property",T(it);if("jsonld-keyword"==t)return T(it);if(c&&A(e))return k.marked="keyword",T(et);if("["==t)return T(V,at,R("]"),it);if("spread"==t)return T(H,it);if("*"==e)return k.marked="keyword",T(et);if(":"==t)return S(it)}}function nt(t){return"variable"!=t?S(it):(k.marked="property",T(Ot))}function it(t){return":"==t?T(H):"("==t?S(Ot):void 0}function rt(t,e,n){function i(r,o){if(n?n.indexOf(r)>-1:","==r){var s=k.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),T(function(n,i){return n==e||i==e?S():S(t)},i)}return r==e||o==e?T():T(R(e))}return function(n,r){return n==e||r==e?T():S(t,i)}}function ot(t,e,n){for(var i=3;i"),ut):void 0}function ht(t){if("=>"==t)return T(ut)}function dt(t,e){return"variable"==t||"keyword"==k.style?(k.marked="property",T(dt)):"?"==e?T(dt):":"==t?T(ut):"["==t?T(V,at,R("]"),dt):void 0}function ft(t,e){return"variable"==t&&k.stream.match(/^\s*[?:]/,!1)||"?"==e?T(ft):":"==t?T(ut):S(ut)}function pt(t,e){return"<"==e?T(I(">"),rt(ut,">"),F,pt):"|"==e||"."==t||"&"==e?T(ut):"["==t?T(R("]"),pt):"extends"==e||"implements"==e?(k.marked="keyword",T(ut)):void 0}function gt(t,e){if("<"==e)return T(I(">"),rt(ut,">"),F,pt)}function vt(){return S(ut,mt)}function mt(t,e){if("="==e)return T(ut)}function yt(t,e){return"enum"==e?(k.marked="keyword",T(Wt)):S(bt,at,wt,Ct)}function bt(t,e){return c&&A(e)?(k.marked="keyword",T(bt)):"variable"==t?(M(e),T()):"spread"==t?T(bt):"["==t?ot(bt,"]"):"{"==t?ot(xt,"}"):void 0}function xt(t,e){return"variable"!=t||k.stream.match(/^\s*:/,!1)?("variable"==t&&(k.marked="property"),"spread"==t?T(bt):"}"==t?S():T(R(":"),bt,wt)):(M(e),T(wt))}function wt(t,e){if("="==e)return T(H)}function Ct(t){if(","==t)return T(yt)}function kt(t,e){if("keyword b"==t&&"else"==e)return T(I("form","else"),j,F)}function St(t,e){return"await"==e?T(St):"("==t?T(I(")"),Tt,R(")"),F):void 0}function Tt(t){return"var"==t?T(yt,R(";"),Mt):";"==t?T(Mt):"variable"==t?T(Et):S(V,R(";"),Mt)}function Et(t,e){return"in"==e||"of"==e?(k.marked="keyword",T(V)):T(U,Mt)}function Mt(t,e){return";"==t?T(At):"in"==e||"of"==e?(k.marked="keyword",T(V)):S(V,R(";"),At)}function At(t){")"!=t&&T(V)}function Ot(t,e){return"*"==e?(k.marked="keyword",T(Ot)):"variable"==t?(M(e),T(Ot)):"("==t?T(L,I(")"),rt(Pt,")"),F,lt,j,D):c&&"<"==e?T(I(">"),rt(vt,">"),F,Ot):void 0}function Pt(t,e){return"@"==e&&T(V,Pt),"spread"==t?T(Pt):c&&A(e)?(k.marked="keyword",T(Pt)):S(bt,at,wt)}function _t(t,e){return"variable"==t?Lt(t,e):Nt(t,e)}function Lt(t,e){if("variable"==t)return M(e),T(Nt)}function Nt(t,e){return"<"==e?T(I(">"),rt(vt,">"),F,Nt):"extends"==e||"implements"==e||c&&","==t?("implements"==e&&(k.marked="keyword"),T(c?ut:V,Nt)):"{"==t?T(I("}"),Dt,F):void 0}function Dt(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||c&&A(e))&&k.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(k.marked="keyword",T(Dt)):"variable"==t||"keyword"==k.style?(k.marked="property",T(c?It:Ot,Dt)):"["==t?T(V,at,R("]"),c?It:Ot,Dt):"*"==e?(k.marked="keyword",T(Dt)):";"==t?T(Dt):"}"==t?T():"@"==e?T(V,Dt):void 0}function It(t,e){return"?"==e?T(It):":"==t?T(ut,wt):"="==e?T(H):S(Ot)}function Ft(t,e){return"*"==e?(k.marked="keyword",T($t,R(";"))):"default"==e?(k.marked="keyword",T(V,R(";"))):"{"==t?T(rt(Rt,"}"),$t,R(";")):S(j)}function Rt(t,e){return"as"==e?(k.marked="keyword",T(R("variable"))):"variable"==t?S(H,Rt):void 0}function jt(t){return"string"==t?T():"("==t?S(V):S(zt,Vt,$t)}function zt(t,e){return"{"==t?ot(zt,"}"):("variable"==t&&M(e),"*"==e&&(k.marked="keyword"),T(Ht))}function Vt(t){if(","==t)return T(zt,Vt)}function Ht(t,e){if("as"==e)return k.marked="keyword",T(zt)}function $t(t,e){if("from"==e)return k.marked="keyword",T(V)}function Bt(t){return"]"==t?T():S(rt(H,"]"))}function Wt(){return S(I("form"),bt,R("{"),I("}"),rt(Ut,"}"),F,F)}function Ut(){return S(bt,wt)}function qt(t,e,n){return e.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}return D.lex=!0,F.lex=!0,{startState:function(t){var e={tokenize:g,lastType:"sof",cc:[],lexical:new w((t||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&new O(null,null,!1),indented:t||0};return n.globalVars&&"object"==typeof n.globalVars&&(e.globalVars=n.globalVars),e},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),b(t,e)),e.tokenize!=v&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==i?n:(e.lastType="operator"!=i||"++"!=r&&"--"!=r?i:"incdec",function(t,e,n,i,r){var o=t.cc;for(k.state=t,k.stream=r,k.marked=null,k.cc=o,k.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){var s=o.length?o.pop():l?V:j;if(s(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return k.marked?k.marked:"variable"==n&&C(t,i)?"variable-2":e}}}(e,n,i,r,t))},indent:function(e,i){if(e.tokenize==v)return t.Pass;if(e.tokenize!=g)return 0;var r,a=i&&i.charAt(0),l=e.lexical;if(!/^\s*else\b/.test(i))for(var c=e.cc.length-1;c>=0;--c){var u=e.cc[c];if(u==F)l=l.prev;else if(u!=kt)break}for(;("stat"==l.type||"form"==l.type)&&("}"==a||(r=e.cc[e.cc.length-1])&&(r==U||r==q)&&!/^[,\.=+\-*:?[\(]/.test(i));)l=l.prev;s&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var h=l.type,f=a==h;return"vardef"==h?l.indented+("operator"==e.lastType||","==e.lastType?l.info.length+1:0):"form"==h&&"{"==a?l.indented:"form"==h?l.indented+o:"stat"==h?l.indented+(function(t,e){return"operator"==t.lastType||","==t.lastType||d.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}(e,i)?s||o:0):"switch"!=l.info||f||0==n.doubleIndentSwitch?l.align?l.column+(f?0:1):l.indented+(f?0:o):l.indented+(/^(?:case|default)\b/.test(i)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:a,jsonMode:l,expressionAllowed:qt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=V&&e!=H||t.cc.pop()}}}),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(6))},function(t,e,n){!function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",function(i,r){var o,s,a=i.indentUnit,l={},c=r.htmlMode?e:n;for(var u in c)l[u]=c[u];for(var u in r)l[u]=r[u];function h(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();return"<"==i?t.eat("!")?t.eat("[")?t.match("CDATA[")?n(f("atom","]]>")):null:t.match("--")?n(f("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(function t(e){return function(n,i){for(var r;null!=(r=n.next());){if("<"==r)return i.tokenize=t(e+1),i.tokenize(n,i);if(">"==r){if(1==e){i.tokenize=h;break}return i.tokenize=t(e-1),i.tokenize(n,i)}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=f("meta","?>"),"meta"):(o=t.eat("/")?"closeTag":"openTag",e.tokenize=d,"tag bracket"):"&"==i?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function d(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=h,o=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return o="equals",null;if("<"==n){e.tokenize=h,e.state=v,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=function(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=d;break}return"string"};return e.isInAttribute=!0,e}(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=h;break}n.next()}return t}}function p(t){t.context&&(t.context=t.context.prev)}function g(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(e))return;p(t)}}function v(t,e,n){return"openTag"==t?(n.tagStart=e.column(),m):"closeTag"==t?y:v}function m(t,e,n){return"word"==t?(n.tagName=e.current(),s="tag",w):l.allowMissingTagName&&"endTag"==t?(s="tag bracket",w(t,0,n)):(s="error",m)}function y(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&p(n),n.context&&n.context.tagName==i||!1===l.matchClosing?(s="tag",b):(s="tag error",x)}return l.allowMissingTagName&&"endTag"==t?(s="tag bracket",b(t,0,n)):(s="error",x)}function b(t,e,n){return"endTag"!=t?(s="error",b):(p(n),v)}function x(t,e,n){return s="error",b(t,0,n)}function w(t,e,n){if("word"==t)return s="attribute",C;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(i)?g(n,i):(g(n,i),n.context=new function(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}(n,i,r==n.indented)),v}return s="error",w}function C(t,e,n){return"equals"==t?k:(l.allowMissing||(s="error"),w(t,0,n))}function k(t,e,n){return"string"==t?S:"word"==t&&l.allowUnquoted?(s="string",w):(s="error",w(t,0,n))}function S(t,e,n){return"string"==t?S:w(t,0,n)}return h.isInText=!0,{startState:function(t){var e={tokenize:h,state:v,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;o=null;var n=e.tokenize(t,e);return(n||o)&&"comment"!=n&&(s=null,e.state=e.state(o||n,t,e),s&&(n="error"==s?n+" error":s)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+a;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=d&&e.tokenize!=h)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+a*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==k&&(t.state=w)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(6))},function(t,e,n){!function(t){"use strict";var e={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},n={};function i(t,e){var i=t.match(function(t){var e=n[t];return e||(n[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(e));return i?/^\s*(.*?)\s*$/.exec(i[2])[1]:""}function r(t,e){return new RegExp((e?"^":"")+"","i")}function o(t,e){for(var n in t)for(var i=e[n]||(e[n]=[]),r=t[n],o=r.length-1;o>=0;o--)i.unshift(r[o])}t.defineMode("htmlmixed",function(n,s){var a=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:s.multilineTagIndentFactor,multilineTagIndentPastTag:s.multilineTagIndentPastTag}),l={},c=s&&s.tags,u=s&&s.scriptTypes;if(o(e,l),c&&o(c,l),u)for(var h=u.length-1;h>=0;h--)l.script.unshift(["type",u[h].matches,u[h].mode]);function d(e,o){var s,c=a.token(e,o.htmlState),u=/\btag\b/.test(c);if(u&&!/[<>\s\/]/.test(e.current())&&(s=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&l.hasOwnProperty(s))o.inTag=s+" ";else if(o.inTag&&u&&/>$/.test(e.current())){var h=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var f=">"==e.current()&&function(t,e){for(var n=0;n-1?t.backUp(i.length-r):i.match(/<\/?$/)&&(t.backUp(i.length),t.match(e,!1)||t.match(i)),n}(t,v,e.localMode.token(t,e.localState))},o.localMode=p,o.localState=t.startState(p,a.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=e.current(),e.eol()&&(o.inTag+=" "));return c}return{startState:function(){var e=t.startState(a);return{token:d,inTag:null,localMode:null,localState:null,htmlState:e}},copyState:function(e){var n;return e.localState&&(n=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:n,htmlState:t.copyState(a,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,i){return!e.localMode||/^\s*<\//.test(n)?a.indent(e.htmlState,n):e.localMode.indent?e.localMode.indent(e.localState,n,i):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||a}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")}(n(6),n(189),n(188),n(81))},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},i="",r=this.em,o=r&&r.getConfig("avoidInlineStyle"),s=t.styleToString(),a=t.get("classes"),l=n.wrappesIsBody,c=t.get("wrapper");if(this.ids.push("#"+t.getId()),a.each(function(t){return e.compCls.push(t.getFullName())}),(!o||c)&&s){var u="#"+t.getId();i=(u=l&&c?"body":u)+"{"+s+"}"}return t.components().each(function(t){return i+=e.buildFromModel(t,n)}),i},build:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.cssc,o=n.em||"";this.em=o,this.compCls=[],this.ids=[];var s=this.buildFromModel(t,n),a=(0,i.isUndefined)(n.clearStyles)&&o?o.getConfig("clearStyles"):n.clearStyles;return r&&function(){var t=r.getAll(),i={},l=[];for(var c in t.each(function(t){var r=t.getAtRule();if(r){var o=i[r];o?o.push(t):i[r]=[t]}else s+=e.buildFromRule(t,l,n)}),i){var u="";i[c].forEach(function(t){return u+=e.buildFromRule(t,l,n)}),u&&(s+=c+"{"+u+"}")}o&&a&&t.remove(l)}(),s},buildFromRule:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="",o=t.selectorsToString({skipAdd:1}),s=t.get("selectorsAdd"),a=t.get("singleAtRule"),l=void 0;if(t.get("selectors").each(function(t){var e=t.getFullName();(n.compCls.indexOf(e)>=0||n.ids.indexOf(e)>=0||i.keepUnusedStyles)&&(l=1)}),o&&l||s||a){var c=t.getDeclaration();c&&(r+=c)}else e.push(t);return r}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.Model.extend({build:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.get("components");return e.exportWrapper?e.wrappesIsBody?""+this.buildModels(n)+"":t.toHTML():this.buildModels(n)},buildModels:function(t){var e="";return t.each(function(t){e+=t.toHTML()}),e}})},function(t,e,n){"use strict";t.exports={stylePrefix:"cm-",inlineCss:!1}},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(196),i=n(195),r=n(194),o=n(193),s=n(192),a=n(191),l=n(186),c={},u={},h={},d={};return{getConfig:function(){return t},config:t,EditorView:l,name:"CodeManager",init:function(n){for(var l in t=n||{},e)l in t||(t[l]=e[l]);var c=t.pStylePrefix;return c&&(t.stylePrefix=c+t.stylePrefix),u.html=new i,u.css=new r,u.json=new o,u.js=new s,d.CodeMirror=new a,this.loadDefaultGenerators().loadDefaultViewers(),this},addGenerator:function(t,e){return c[t]=e,this},getGenerator:function(t){return c[t]||null},getGenerators:function(){return c},addViewer:function(t,e){return h[t]=e,this},getViewer:function(t){return h[t]||null},getViewers:function(){return h},updateViewer:function(t,e){t.setContent(e)},getCode:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.em=t.em;var r=this.getGenerator(n);return r?r.build(e,i):""},loadDefaultGenerators:function(){for(var t in u)this.addGenerator(t,u[t]);return this},loadDefaultViewers:function(){for(var t in d)this.addViewer(t,d[t]);return this}}}},function(t,e,n){"use strict";t.exports=n(0).View.extend({template:function(t){var e=t.pfx,n=t.ppfx,i=t.content;return'
\n
\n
'+t.title+'
\n
\n
\n
\n
'+i+'
\n
\n
\n
\n '},events:{click:"onClick","click [data-close-modal]":"hide"},initialize:function(t){var e=this.model,n=t.config||{},i=n.stylePrefix||"";this.config=n,this.pfx=i,this.ppfx=n.pStylePrefix||"",this.listenTo(e,"change:open",this.updateOpen),this.listenTo(e,"change:title",this.updateTitle),this.listenTo(e,"change:content",this.updateContent)},onClick:function(t){this.config.backdrop&&t.target===this.el&&this.hide()},getCollector:function(){return this.$collector||(this.$collector=this.$el.find("."+this.pfx+"collector")),this.$collector},getContent:function(){var t=this.pfx;return this.$content||(this.$content=this.$el.find("."+t+"content #"+t+"c")),this.$content},getTitle:function(){return this.$title||(this.$title=this.$el.find("."+this.pfx+"title")),this.$title.get(0)},updateContent:function(){var t=this.getContent(),e=t.children(),n=this.getCollector(),i=this.model.get("content");e.length&&n.append(e),t.empty().append(i)},updateTitle:function(){var t=this.getTitle();t&&(t.innerHTML=this.model.get("title"))},updateOpen:function(){this.el.style.display=this.model.get("open")?"":"none"},hide:function(){this.model.set("open",0)},show:function(){this.model.set("open",1)},render:function(){var t=this.$el,e=this.pfx,n=(this.ppfx,this.model.toJSON());return n.pfx=this.pfx,n.ppfx=this.ppfx,t.html(this.template(n)),t.attr("class",e+"container"),this.updateOpen(),this}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{title:"",content:"",open:!1}})},function(t,e,n){"use strict";t.exports={stylePrefix:"mdl-",title:"",content:"",backdrop:!0}},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(200),o=n(199),s=n(198);return{name:"Modal",init:function(n){for(var a in i=n||{},r)a in i||(i[a]=r[a]);var l=i.pStylePrefix;return l&&(i.stylePrefix=l+i.stylePrefix),t=new o(i),e=new s({model:t,config:i}),this},postRender:function(t){var e=t.model.getConfig().el||t.el;this.render().appendTo(e)},open:function(){return e.show(),this},close:function(){return e.hide(),this},isOpen:function(){return!!t.get("open")},setTitle:function(e){return t.set("title",e),this},getTitle:function(){return t.get("title")},setContent:function(e){return t.set("content"," "),t.set("content",e),this},getContent:function(){return t.get("content")},getContentEl:function(){return e.getContent().get(0)},getModel:function(){return t},render:function(){return e.render().$el}}}},function(t,e,n){"use strict";var i=n(10);t.exports=n(0).View.extend({template:function(){var t=this.pfx;this.ppfx;return'\n \n '+(this.model.get("label")||"")+'\n \n ⨯\n \n '},events:{"click [data-tag-remove]":"removeTag","click [data-tag-status]":"changeStatus","dblclick [data-tag-name]":"startEditTag","focusout [data-tag-name]":"endEditTag"},initialize:function(t){this.config=t.config||{},this.coll=t.coll||null,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=this.config.em,this.listenTo(this.model,"change:active",this.updateStatus)},getInputEl:function(){return this.inputEl||(this.inputEl=this.el.querySelector("[data-tag-name]")),this.inputEl},startEditTag:function(){var t=this.getInputEl();t.contentEditable=!0,t.focus()},endEditTag:function(){var t=this.model,e=this.getInputEl(),n=e.textContent,r=i.escapeName(n),o=this.target,s=o&&o.get("SelectorManager");e.contentEditable=!1,s&&(s.get(r)?e.innerText=t.get("label"):t.set({name:r,label:n}))},changeStatus:function(){this.model.set("active",!this.model.get("active"))},removeTag:function(t){var e=this,n=this.target,i=this.model,r=this.coll,o=(this.el,n&&n.getSelected());o&&(o.get,o.get("classes").remove(i)),r&&r.remove(i),setTimeout(function(){return e.remove()},0)},updateStatus:function(){var t="fa-check-square-o";this.$chk||(this.$chk=this.$el.find("#"+this.pfx+"checkbox")),this.model.get("active")?(this.$chk.removeClass("fa-square-o").addClass(t),this.$el.removeClass("opac50")):(this.$chk.removeClass(t).addClass("fa-square-o"),this.$el.addClass("opac50"))},render:function(){var t=this.pfx,e=this.ppfx;return this.$el.html(this.template()),this.$el.attr("class",t+"tag "+e+"three-bg"),this.updateStatus(),this}})},function(t,e,n){"use strict";var i=o(n(1)),r=o(n(0));function o(t){return t&&t.__esModule?t:{default:t}}var s=n(202);t.exports=r.default.View.extend({template:i.default.template('\n
\n
<%= label %>
\n
\n \n
\n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
<%= selectedLabel %>
\n
\n
\n
'),events:{},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.className=this.pfx+"tags",this.addBtnId=this.pfx+"add-tag",this.newInputId=this.pfx+"new",this.stateInputId=this.pfx+"states",this.stateInputC=this.pfx+"input-c",this.states=this.config.states||[],this.events["click #"+this.addBtnId]="startNewTag",this.events["blur #"+this.newInputId]="endNewTag",this.events["keyup #"+this.newInputId]="onInputKeyUp",this.events["change #"+this.stateInputId]="stateChanged",this.target=this.config.em,this.em=this.target,this.listenTo(this.target,"component:toggled",this.componentChanged),this.listenTo(this.target,"component:update:classes",this.updateSelector),this.listenTo(this.collection,"add",this.addNew),this.listenTo(this.collection,"reset",this.renderClasses),this.listenTo(this.collection,"remove",this.tagRemoved),this.delegateEvents()},tagRemoved:function(t){this.updateStateVis()},getStateOptions:function(){for(var t="",e=0;e'+this.states[e].label+"";return t},addNew:function(t){this.addToClasses(t)},startNewTag:function(t){this.$addBtn.get(0).style.display="none",this.$input.show().focus()},endNewTag:function(t){this.$addBtn.get(0).style.display="",this.$input.hide().val("")},onInputKeyUp:function(t){13===t.keyCode?this.addNewTag(this.$input.val()):27===t.keyCode&&this.endNewTag()},componentChanged:function(t){this.compTarget=this.target.getSelected();var e=this.compTarget,n=[];e&&(this.getStates().val(e.get("state")),n=e.get("classes").getValid()),this.collection.reset(n),this.updateStateVis()},updateStateVis:function(){var t=this.em,e=t&&t.getConfig("avoidInlineStyle");this.collection.length||e?this.getStatesC().css("display","block"):this.getStatesC().css("display","none"),this.updateSelector()},updateSelector:function(){var t=this.target.getSelected();if(this.compTarget=t,t&&t.get){var e=t.get("state"),n=this.collection,i=n.getFullString(n.getStyleable());i=i||"#"+t.getId(),i+=e?":"+e:"";var r=this.el.querySelector("#"+this.pfx+"sel");r&&(r.innerHTML=i)}},stateChanged:function(t){this.compTarget&&(this.compTarget.set("state",this.$states.val()),this.updateSelector())},addNewTag:function(t){var e=this.target,n=this.compTarget;if(t.trim()){if(e){var i=e.get("SelectorManager").add({label:t});if(n){var r=n.get("classes");r.length;r.add(i);r.length;this.collection.add(i),this.updateStateVis()}}this.endNewTag()}},addToClasses:function(t,e){var n=e||null,i=new s({model:t,config:this.config,coll:this.collection}).render().el;return n?n.appendChild(i):this.getClasses().append(i),i},renderClasses:function(){var t=document.createDocumentFragment();return this.collection.each(function(e){this.addToClasses(e,t)},this),this.getClasses()&&this.getClasses().empty().append(t),this},getClasses:function(){return this.$classes||(this.$classes=this.$el.find("#"+this.pfx+"tags-c")),this.$classes},getStates:function(){return this.$states||(this.$states=this.$el.find("#"+this.stateInputId)),this.$states},getStatesC:function(){return this.$statesC||(this.$statesC=this.$el.find("#"+this.stateInputC)),this.$statesC},render:function(){var t=this.ppfx,e=this.config,n=this.$el;return n.html(this.template({selectedLabel:e.selectedLabel,statesLabel:e.statesLabel,label:e.label,pfx:this.pfx,ppfx:this.ppfx})),this.$input=n.find("input#"+this.newInputId),this.$addBtn=n.find("#"+this.addBtnId),this.$classes=n.find("#"+this.pfx+"tags-c"),this.$states=n.find("#"+this.stateInputId),this.$statesC=n.find("#"+this.stateInputC),this.$states.append(this.getStateOptions()),this.renderClasses(),n.attr("class",this.className+" "+t+"one-bg "+t+"two-color"),this}})},function(t,e,n){"use strict";t.exports={stylePrefix:"clm-",appendTo:"",selectors:[],label:"Classes",statesLabel:"- State -",selectedLabel:"Selected",states:[{name:"hover",label:"Hover"},{name:"active",label:"Click"},{name:"nth-of-type(2n)",label:"Even/Odd"}]}},function(t,e,n){"use strict";var i=n(1),r=function(t){return(0,i.isString)(t)&&"#"==t[0]};t.exports=function(t){var e,o,s=t||{},a=n(204),l=n(10),c=n(19),u=n(203);return{Selector:l,Selectors:c,name:"SelectorManager",getConfig:function(){return s},init:function(t){for(var n in s=t||{},a)n in s||(s[n]=a[n]);var i=s.em,r=s.pStylePrefix;return r&&(s.stylePrefix=r+s.stylePrefix),o=new u({collection:new c([],{em:i,config:s}),config:s}),(e=new c(s.selectors)).on("add",function(t){return i.trigger("selector:add",t)}),this},postRender:function(){var t=this.getConfig().appendTo;t&&((0,i.isElement)(t)?t:document.querySelector(t)).appendChild(this.render([]))},add:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.isObject)(t)?n=t:n.name=t,r(n.name)&&(n.name=n.name.substr(1),n.type=l.TYPE_ID),n.label&&!n.name&&(n.name=l.escapeName(n.label));var o=n.name,s=o?this.get(o,n.type):e.where(n)[0];return s||e.add(n)},addClass:function(t){var n=[];return(0,i.isString)(t)&&(t=t.trim().split(" ")),t.forEach(function(t){return n.push(e.add({name:t}))}),n},get:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.TYPE_CLASS;return r(t)&&(t=t.substr(1),n=l.TYPE_ID),e.where({name:t,type:n})[0]},getAll:function(){return e},render:function(t){return t?new u({collection:new c(t),config:s}).render().el:o.render().el}}}},function(t,e,n){"use strict";var i={4:"media",5:"font-face",6:"page",7:"keyframes",11:"counter-style",12:"supports",13:"document",14:"font-feature-values",15:"viewport"},r=(0,n(1).keys)(i),o=["5","6","11","15"];t.exports=function(t){return{parseSelector:function(){for(var t=[],e=[],n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(","),i=0,r=n.length;i=0;if(p)u=1,h=i[c],d=this.parseCondition(l);else if(r.indexOf(c)>=0){var g=this.parseNode(l);d=this.parseCondition(l);for(var v=0,m=g.length;v<%= deviceLabel %>\n
\n \n \n \n
\n
\n
\n
\n '),events:{change:"updateDevice"},initialize:function(t){this.config=t.config||{},this.em=this.config.em,this.ppfx=this.config.pStylePrefix||"",this.events["click ."+this.ppfx+"add-trasp"]=this.startAdd,this.listenTo(this.em,"change:device",this.updateSelect),this.delegateEvents()},startAdd:function(){},updateDevice:function(){var t=this.em;if(t){var e=this.devicesEl,n=e?e.val():"";t.set("device",n)}},updateSelect:function(){var t=this.em,e=this.devicesEl;if(t&&t.getDeviceModel&&e){var n=t.getDeviceModel(),i=n?n.get("name"):"";e.val(i)}},getOptions:function(){var t="";return this.collection.each(function(e){var n=e.get("name");t+='"}),t},render:function(){var t=this.ppfx;return this.$el.html(this.template({ppfx:t,deviceLabel:this.config.deviceLabel})),this.devicesEl=this.$el.find("."+t+"devices"),this.devicesEl.append(this.getOptions()),this.el.className=t+"devices-c",this}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.Model.extend({idAttribute:"name",defaults:{name:"",width:"",height:"",widthMedia:null},initialize:function(){null==this.get("widthMedia")&&this.set("widthMedia",this.get("width"))}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=n(210);t.exports=i.default.Collection.extend({model:r})},function(t,e,n){"use strict";t.exports={devices:[],deviceLabel:"Device"}},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(212),o=n(211),s=n(209);return{name:"DeviceManager",init:function(n){for(var a in i=n||{},r)a in i||(i[a]=r[a]);return t=new o(i.devices),e=new s({collection:t,config:i}),this},add:function(e,n,i){var r=i||{};return r.name=e,r.width=n,t.add(r)},get:function(e){return t.get(e)},getAll:function(){return t},render:function(){return e.render().el}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=this.constructor;return this.then(function(n){return e.resolve(t()).then(function(){return n})},function(n){return e.resolve(t()).then(function(){return e.reject(n)})})}},function(t,e){var n,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var l,c=[],u=!1,h=-1;function d(){u&&l&&(u=!1,l.length?c=l.concat(c):h=-1,c.length&&f())}function f(){if(!u){var t=a(d);u=!0;for(var e=c.length;e;){for(l=c,c=[];++h1)for(var n=1;n=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(216),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(11))},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t){return t&&t.__esModule?t:{default:t}}(n(214));var o=setTimeout;function s(){}function a(t){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],d(t,this)}function l(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,a._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var i;try{i=n(t._value)}catch(t){return void u(e.promise,t)}c(e.promise,i)}else(1===t._state?c:u)(e.promise,t._value)})):t._deferreds.push(e)}function c(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"===(void 0===e?"undefined":i(e))||"function"==typeof e)){var n=e.then;if(e instanceof a)return t._state=3,t._value=e,void h(t);if("function"==typeof n)return void d(function(t,e){return function(){t.apply(e,arguments)}}(n,e),t)}t._state=1,t._value=e,h(t)}catch(e){u(t,e)}}function u(t,e){t._state=2,t._value=e,h(t)}function h(t){2===t._state&&0===t._deferreds.length&&a._immediateFn(function(){t._handled||a._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e1&&void 0!==arguments[1]?arguments[1]:{},n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.get("contentTypeJson"),a=this.get("headers")||{},l=this.get("params"),c=e.body||{},u=void 0,h=void 0;for(var d in l)c[d]=l[d];if((0,r.isUndefined)(a["X-Requested-With"])&&(a["X-Requested-With"]="XMLHttpRequest"),(0,r.isUndefined)(a["Content-Type"])&&s&&(a["Content-Type"]="application/json; charset=utf-8"),s)h=JSON.stringify(c);else for(var f in h=new FormData,c)h.append(f,c[f]);"post"===(u={method:e.method||"post",credentials:"include",headers:a}).method&&(u.body=h),this.onStart(),this.fetch(t,u).then(function(t){return 1==(t.status/200|0)?t.text():t.text().then(function(t){return Promise.reject(t)})}).then(function(t){return n.onResponse(t,i)}).catch(function(t){return n.onError(t,o)})}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{checkLocal:!0},store:function(t,e){for(var n in this.checkStorageEnvironment(),t)localStorage.setItem(n,t[n]);"function"==typeof e&&e()},load:function(t,e){this.checkStorageEnvironment();for(var n={},i=0,r=t.length;ithis.length&&(r=this.length),r<0&&(r+=this.length+1);var o,s,a=[],l=[],c=[],u=[],h={},d=e.add,f=e.merge,p=e.remove,g=!1,v=this.comparator&&null==r&&!1!==e.sort,m=n.isString(this.comparator)?this.comparator:null;for(s=0;s7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(D,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var i=document.body,r=i.insertBefore(this.iframe,i.firstChild).contentWindow;r.document.open(),r.document.close(),r.location.hash="#"+this.fragment}var o=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),L.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),n.some(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0}))},navigate:function(t,e){if(!L.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var n=this.root;""!==t&&"?"!==t.charAt(0)||(n=n.slice(0,-1)||"/");var i=n+t;if(t=this.decodeFragment(t.replace(I,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,i);else{if(!this._wantsHashChange)return this.location.assign(i);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var r=this.iframe.contentWindow;e.replace||(r.document.open(),r.document.close()),this._updateHash(r.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var i=t.href.replace(/(javascript:|#).*$/,"");t.replace(i+"#"+e)}else t.hash="#"+e}}),e.history=new L;y.extend=b.extend=M.extend=k.extend=L.extend=function(t,e){var i,r=this;i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)};return n.extend(i,r,e),i.prototype=n.create(r.prototype,t),i.prototype.constructor=i,i.__super__=r.prototype,i};var F=function(){throw new Error('A "url" property or function must be specified')},R=function(t,e){var n=e.error;e.error=function(i){n&&n.call(e.context,t,i,e),t.trigger("error",t,i,e)}};return e}(a,n,t,e)}.apply(e,r))||(t.exports=o)}()}).call(this,n(11))},function(t,e,n){(function(t,n){var i;!function(){var r="object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t||this||{},o=r._,s=Array.prototype,a=Object.prototype,l="undefined"!=typeof Symbol?Symbol.prototype:null,c=s.push,u=s.slice,h=a.toString,d=a.hasOwnProperty,f=Array.isArray,p=Object.keys,g=Object.create,v=function(){},m=function(t){return t instanceof m?t:this instanceof m?void(this._wrapped=t):new m(t)};void 0===e||e.nodeType?r._=m:(void 0!==n&&!n.nodeType&&n.exports&&(e=n.exports=m),e._=m),m.VERSION="1.9.1";var y,b=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,i,r){return t.call(e,n,i,r)};case 4:return function(n,i,r,o){return t.call(e,n,i,r,o)}}return function(){return t.apply(e,arguments)}},x=function(t,e,n){return m.iteratee!==y?m.iteratee(t,e):null==t?m.identity:m.isFunction(t)?b(t,e,n):m.isObject(t)&&!m.isArray(t)?m.matcher(t):m.property(t)};m.iteratee=y=function(t,e){return x(t,e,1/0)};var w=function(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),i=Array(n),r=0;r=0&&e<=E};m.each=m.forEach=function(t,e,n){var i,r;if(e=b(e,n),A(t))for(i=0,r=t.length;i=3;return function(e,n,i,r){var o=!A(e)&&m.keys(e),s=(o||e).length,a=t>0?0:s-1;for(r||(i=e[o?o[a]:a],a+=t);a>=0&&a=0},m.invoke=w(function(t,e,n){var i,r;return m.isFunction(e)?r=e:m.isArray(e)&&(i=e.slice(0,-1),e=e[e.length-1]),m.map(t,function(t){var o=r;if(!o){if(i&&i.length&&(t=T(t,i)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)})}),m.pluck=function(t,e){return m.map(t,m.property(e))},m.where=function(t,e){return m.filter(t,m.matcher(e))},m.findWhere=function(t,e){return m.find(t,m.matcher(e))},m.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var a=0,l=(t=A(t)?t:m.values(t)).length;ao&&(o=i);else e=x(e,n),m.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},m.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var a=0,l=(t=A(t)?t:m.values(t)).length;ai||void 0===n)return 1;if(n0?0:r-1;o>=0&&o0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;else if(n&&o&&a)return i[o=n(i,r)]===r?o:-1;if(r!=r)return(o=e(u.call(i,s,a),m.isNaN))>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&oe?(i&&(clearTimeout(i),i=null),a=c,s=t.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(l,u)),s};return c.cancel=function(){clearTimeout(i),a=0,i=r=o=null},c},m.debounce=function(t,e,n){var i,r,o=function(e,n){i=null,n&&(r=t.apply(e,n))},s=w(function(s){if(i&&clearTimeout(i),n){var a=!i;i=setTimeout(o,e),a&&(r=t.apply(this,s))}else i=m.delay(o,e,this,s);return r});return s.cancel=function(){clearTimeout(i),i=null},s},m.wrap=function(t,e){return m.partial(e,t)},m.negate=function(t){return function(){return!t.apply(this,arguments)}},m.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,i=t[e].apply(this,arguments);n--;)i=t[n].call(this,i);return i}},m.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},m.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},m.once=m.partial(m.before,2),m.restArguments=w;var F=!{toString:null}.propertyIsEnumerable("toString"),R=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],j=function(t,e){var n=R.length,i=t.constructor,r=m.isFunction(i)&&i.prototype||a,o="constructor";for(S(t,o)&&!m.contains(e,o)&&e.push(o);n--;)(o=R[n])in t&&t[o]!==r[o]&&!m.contains(e,o)&&e.push(o)};m.keys=function(t){if(!m.isObject(t))return[];if(p)return p(t);var e=[];for(var n in t)S(t,n)&&e.push(n);return F&&j(t,e),e},m.allKeys=function(t){if(!m.isObject(t))return[];var e=[];for(var n in t)e.push(n);return F&&j(t,e),e},m.values=function(t){for(var e=m.keys(t),n=e.length,i=Array(n),r=0;r1&&(i=b(i,e[1])),e=m.allKeys(t)):(i=$,e=L(e,!1,!1),t=Object(t));for(var r=0,o=e.length;r1&&(n=e[1])):(e=m.map(L(e,!1,!1),String),i=function(t,n){return!m.contains(e,n)}),m.pick(t,i,n)}),m.defaults=z(m.allKeys,!0),m.create=function(t,e){var n=C(t);return e&&m.extendOwn(n,e),n},m.clone=function(t){return m.isObject(t)?m.isArray(t)?t.slice():m.extend({},t):t},m.tap=function(t,e){return e(t),t},m.isMatch=function(t,e){var n=m.keys(e),i=n.length;if(null==t)return!i;for(var r=Object(t),o=0;o":">",'"':""","'":"'","`":"`"},U=m.invert(W),q=function(t){var e=function(e){return t[e]},n="(?:"+m.keys(t).join("|")+")",i=RegExp(n),r=RegExp(n,"g");return function(t){return t=null==t?"":""+t,i.test(t)?t.replace(r,e):t}};m.escape=q(W),m.unescape=q(U),m.result=function(t,e,n){m.isArray(e)||(e=[e]);var i=e.length;if(!i)return m.isFunction(n)?n.call(t):n;for(var r=0;r/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Y=/(.)^/,G={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},X=/\\|'|\r|\n|\u2028|\u2029/g,J=function(t){return"\\"+G[t]};m.template=function(t,e,n){!e&&n&&(e=n),e=m.defaults({},e,m.templateSettings);var i,r=RegExp([(e.escape||Y).source,(e.interpolate||Y).source,(e.evaluate||Y).source].join("|")+"|$","g"),o=0,s="__p+='";t.replace(r,function(e,n,i,r,a){return s+=t.slice(o,a).replace(X,J),o=a+e.length,n?s+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":i?s+="'+\n((__t=("+i+"))==null?'':__t)+\n'":r&&(s+="';\n"+r+"\n__p+='"),e}),s+="';\n",e.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{i=new Function(e.variable||"obj","_",s)}catch(t){throw t.source=s,t}var a=function(t){return i.call(this,t,m)},l=e.variable||"obj";return a.source="function("+l+"){\n"+s+"}",a},m.chain=function(t){var e=m(t);return e._chain=!0,e};var Z=function(t,e){return t._chain?m(e).chain():e};m.mixin=function(t){return m.each(m.functions(t),function(e){var n=m[e]=t[e];m.prototype[e]=function(){var t=[this._wrapped];return c.apply(t,arguments),Z(this,n.apply(m,t))}}),m},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=s[t];m.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],Z(this,n)}}),m.each(["concat","join","slice"],function(t){var e=s[t];m.prototype[t]=function(){return Z(this,e.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return String(this._wrapped)},void 0===(i=function(){return m}.apply(e,[]))||(n.exports=i)}()}).call(this,n(11),n(231)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getUnitFromValue=e.normalizeFloat=e.shallowDiff=e.getElement=e.camelCase=e.getModel=e.matches=e.upFirst=e.hasDnd=e.off=e.on=void 0;var i=n(1),r=window.Element.prototype,o=r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector,s=function(t){return t[0].toUpperCase()+t.toLowerCase().slice(1)};e.on=function(t,e,n){e=e.split(/\s+/),t=t instanceof Array?t:[t];for(var i=function(i){t.forEach(function(t){return t.addEventListener(e[i],n)})},r=0;r=0?s!==a&&(n[o]=a):n[o]=null}for(var l in e)e.hasOwnProperty(l)&&(0,i.isUndefined)(t[l])&&(n[l]=e[l]);return n},e.normalizeFloat=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=0;if(isNaN(t))return n;if(t=parseFloat(t),Math.floor(t)!==t){var r=e.toString().split(".")[1];i=r?r.length:0}return i?parseFloat(t.toFixed(i)):t},e.getUnitFromValue=function(t){return t.replace(parseFloat(t),"")}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0)),r=n(1);var o=n(57);t.exports=i.default.View.extend({className:function(){return this.getClasses()},tagName:function(){return this.model.get("tagName")},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=t.config||{};this.opts=t,this.config=n,this.em=n.em||"",this.pfx=n.stylePrefix||"",this.ppfx=n.pStylePrefix||"",this.attr=e.get("attributes"),this.classe=this.attr.class||[];var i=this.$el,r=e.get("classes");this.listenTo(e,"change:style",this.updateStyle),this.listenTo(e,"change:attributes",this.updateAttributes),this.listenTo(e,"change:highlightable",this.updateHighlight),this.listenTo(e,"change:status",this.updateStatus),this.listenTo(e,"change:state",this.updateState),this.listenTo(e,"change:script",this.render),this.listenTo(e,"change:content",this.updateContent),this.listenTo(e,"change",this.handleChange),this.listenTo(e,"active",this.onActive),this.listenTo(r,"add remove change",this.updateClasses),i.data("model",e),i.data("collection",e.get("components")),e.view=this,r.length&&this.importClasses(),this.init()},init:function(){},onActive:function(){},handleChange:function(){var t=this.model;for(var e in t.emitUpdate(),t.changed)t.emitUpdate(e)},importClasses:function(){var t=this.config.em.get("SelectorManager");t&&this.model.get("classes").each(function(e){t.add(e.get("name"))})},updateState:function(t){var e="hc-state";this.model.get("state")?this.$el.addClass(e):this.$el.removeClass(e)},updateStatus:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(this.em,this.el),n=this.model.get("status"),i=this.pfx,r=this.ppfx,o=i+"selected",s=o+"-parent",a=r+"freezed",l=r+"hovered",c=[o,s,a,l];this.$el.removeClass(c.join(" "));var u=e.getAttribute("class")||"",h="";switch(n){case"selected":h=u+" "+o;break;case"selected-parent":h=u+" "+s;break;case"freezed":h=u+" "+a;break;case"freezed-selected":h=u+" "+a+" "+o;break;case"hovered":h=t.avoidHover?"":u+" "+l}(h=h.trim())&&e.setAttribute("class",h)},updateHighlight:function(){var t=this.model.get("highlightable");this.setAttribute("data-highlightable",t?1:"")},updateStyle:function(){var t=this.em,e=this.model;if(t&&t.get("avoidInlineStyle")){this.el.id=e.getId();var n=e.getStyle();!(0,r.isEmpty)(n)&&e.setStyle(n)}else this.setAttribute("style",e.styleToString())},updateClasses:function(){var t=this.model.get("classes").pluck("name").join(" ");this.setAttribute("class",t),this.updateStatus()},setAttribute:function(t,e){var n=this.$el;e?n.attr(t,e):n.removeAttr(t)},getClasses:function(){var t=this.model.get("attributes").class||[];return(t=(0,r.isArray)(t)?t:[t]).length?t.join(" "):null},updateAttributes:function(){var t=this.model,e={"data-gjs-type":t.get("type")||"default"},n=t.get("attributes"),i=t.get("src");for(var r in n)e[r]=n[r];i&&(e.src=i),this.$el.attr(e),this.updateHighlight(),this.updateStyle()},updateContent:function(){this.getChildrenContainer().innerHTML=this.model.get("content")},prevDef:function(t){t.preventDefault()},updateScript:function(){if(this.model.get("script")){var t=this.em;if(t)t.get("Canvas").getCanvasView().updateScript(this)}},getChildrenContainer:function(){var t=this.el;return"function"==typeof this.getChildrenSelector?t=this.el.querySelector(this.getChildrenSelector()):this.getTemplate,t},renderChildren:function(){var t=this.getChildrenContainer(),e=new o({collection:this.model.get("components"),config:this.config,componentTypes:this.opts.componentTypes});e.render(t),this.childrenView=e;for(var n=Array.prototype.slice.call(e.el.childNodes),i=0,r=n.length;i0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.em,s=this.parent(),a=s&&s.attributes;if(a&&a.propagate){var l={},c=a.propagate;c.forEach(function(t){return l[t]=s.get(t)}),l.propagate=c,l=i({},l,e),this.set(l)}var u=this.get("propagate");u&&this.set("propagate",(0,r.isArray)(u)?u:[u]),n&&n.config&&n.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),n.em=o,this.opt=n,this.em=o,this.config=n.config||{},this.ccid=g.createId(this),this.set("attributes",this.get("attributes")||{}),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:traits",this.traitsUpdated),this.listenTo(this,"change:tagName",this.tagUpdated),this.listenTo(this,"change:attributes",this.attrUpdated),this.initClasses(),this.loadTraits(),this.initComponents(),this.initToolbar(),this.set("status",""),["classes","traits"].forEach(function(e){return t.listenTo(t.get(e),"add remove change",function(){return t.emitUpdate(e)})}),this.init()},is:function(t){return!(this.get("type")!=t)},find:function(t){var e=[];return this.view.$el.find(t).each(function(t,n,i){var r=i.eq(n).data("model");r&&e.push(r)}),e},closest:function(t){var e=this.view.$el.closest(t);return e.length&&e.data("model")},tagUpdated:function(){var t=this.collection,e=t.indexOf(this);t.remove(this),t.add(this,{at:e})},replaceWith:function(t){var e=this.collection,n=e.indexOf(this);return e.remove(this),e.add(t,{at:n})},attrUpdated:function(){var t=this,e=i({},this.previous("attributes")),n=i({},this.get("attributes")),s=(0,o.shallowDiff)(e,n);(0,r.keys)(s).forEach(function(e){return t.trigger("change:attributes:"+e)})},setAttributes:function(t){var e=(t=i({},t)).class;e&&this.setClass(e),delete t.class;var n=t.style;n&&this.setStyle(n),delete t.style,this.set("attributes",t)},addAttributes:function(t){var e=i({},this.getAttributes(),t);this.setAttributes(e)},getStyle:function(){var t=this.em;if(t&&t.getConfig("avoidInlineStyle")){var e=this.get("state"),n=t.get("CssComposer").getIdRule(this.getId(),{state:e});if(this.rule=n,n)return n.getStyle()}return s.default.getStyle.call(this)},setStyle:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=this.em;if(a&&a.getConfig("avoidInlineStyle")){e=(0,r.isString)(e)?this.parseStyle(e):e,e=i({},e,this.get("style"));var l=this.get("state"),c=a.get("CssComposer"),u=this.getStyle();this.rule=c.setIdRule(this.getId(),e,i({},n,{state:l}));var h=(0,o.shallowDiff)(u,e);this.set("style",{},{silent:1}),(0,r.keys)(h).forEach(function(e){return t.trigger("change:style:"+e)})}else e=s.default.setStyle.apply(this,arguments);return e},getAttributes:function(){var t=this.em,e=[],n=i({},this.get("attributes")),o=t&&t.get("SelectorManager"),s=this.getId();if(this.get("classes").each(function(t){return e.push(t.get("name"))}),e.length&&(n.class=e.join(" ")),!(0,r.has)(n,"id")){var a=void 0;!function(t){return t&&t.getConfig("avoidInlineStyle")}(t)?(0,r.isEmpty)(this.getStyle())||(a=1):a=o&&o.get(s,o.Selector.TYPE_ID),a&&(n.id=this.getId())}return n},addClass:function(t){var e=this.em.get("SelectorManager").addClass(t);return this.get("classes").add(e)},setClass:function(t){return this.get("classes").reset(),this.addClass(t)},removeClass:function(t){var e=[];t=(0,r.isArray)(t)?t:[t];var n=this.get("classes"),i=c.TYPE_CLASS;return t.forEach(function(t){t.split(" ").forEach(function(t){var r=n.where({name:t,type:i})[0];r&&e.push(n.remove(r))})}),e},initClasses:function(){var t=this.normalizeClasses(this.get("classes")||[]);return this.set("classes",new u(t)),this},initComponents:function(){var t=new l(null,this.opt);return t.parent=this,!this.opt.avoidChildren&&t.reset(this.get("components")),this.set("components",t),this},init:function(){},append:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.components().add(t,e);return(0,r.isArray)(n)?n:[n]},components:function(t){var e=this.get("components");if((0,r.isUndefined)(t))return e;e.reset(),t&&this.append(t)},parent:function(){var t=this.collection;return t&&t.parent},scriptUpdated:function(){this.set("scriptUpdated",1)},traitsUpdated:function(){var t=0,e=i({},this.get("attributes")),n=this.get("traits");n instanceof h?(n.each(function(n){if(t=1,!n.get("changeProp")){var i=n.get("name"),r=n.getInitValue();i&&r&&(e[i]=r)}}),t&&this.set("attributes",e)):this.loadTraits()},initToolbar:function(){if(!this.get("toolbar")){var t=[];this.collection&&t.push({attributes:{class:"fa fa-arrow-up"},command:"select-parent"}),this.get("draggable")&&t.push({attributes:{class:"fa fa-arrows",draggable:!0},command:"tlb-move"}),this.get("copyable")&&t.push({attributes:{class:"fa fa-clone"},command:"tlb-clone"}),this.get("removable")&&t.push({attributes:{class:"fa fa-trash-o"},command:"tlb-delete"}),this.set("toolbar",t)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new h([],this.opt);return n.setTarget(this),(t=t||this.get("traits")).length&&n.add(t),this.set("traits",n,e),this},normalizeClasses:function(t){var e=[],n=this.em;if(n){var i=n.get("SelectorManager");if(i)return t.forEach(function(t){var n="";n="string"==typeof t?t:t.name;var r=i.add(n);e.push(r)}),e}},clone:function(){var t=this.em,e=this.getStyle(),n=i({},this.attributes),o=i({},this.opt);return n.attributes=i({},n.attributes),delete n.attributes.id,n.components=[],n.classes=[],n.traits=[],this.get("components").each(function(t,e){n.components[e]=t.clone()}),this.get("traits").each(function(t,e){n.traits[e]=t.clone()}),this.get("classes").each(function(t,e){n.classes[e]=t.get("name")}),n.status="",n.view="",o.collection=null,t&&t.getConfig("avoidInlineStyle")&&!(0,r.isEmpty)(e)&&(n.style=e),new this.constructor(n,o)},getName:function(){var t=this.get("name")||this.get("custom-name"),e=this.get("tagName");e="div"==e?"box":e;var n=this.get("type")||e;return n=n.charAt(0).toUpperCase()+n.slice(1),t||n},getIcon:function(){var t=this.get("icon");return t?t+" ":""},toHTML:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=this.get("tagName"),i=this.get("void"),o=t.attributes,s=this.getAttrToHTML();for(var a in o&&((0,r.isFunction)(o)?s=o(this,s)||{}:(0,r.isObject)(o)&&(s=o)),s){var l=s[a],c=(0,r.isString)(l)?l.replace(/"/g,"""):l;(0,r.isUndefined)(c)||((0,r.isBoolean)(c)?c&&e.push(a):e.push(a+'="'+c+'"'))}var u="<"+n+(e.length?" "+e.join(" "):"")+(i?"/":"")+">"+this.get("content");return this.get("components").each(function(e){return u+=e.toHTML(t)}),!i&&(u+=""),u},getAttrToHTML:function(){var t=this.getAttributes();return delete t.style,t},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;n0&&void 0!==arguments[0]&&arguments[0];var t=this.em,e=this.getId();if(e){var n=g.createId(this);this.setId(n);var i=t&&t.get("CssComposer").getIdRule(e),r=i&&i.get("selectors").at(0);return r&&r.set("name",n),this}}},{isComponent:function(t){return{tagName:t.tagName?t.tagName.toLowerCase():""}},createId:function(t){var e=(++f).toString().length+2,n="i"+(Math.random()+1.1).toString(36).slice(-e);return d[n]=t,n},getList:function(){return d}});t.exports=g},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0)),r=n(1),o=n(2);t.exports=i.default.View.extend({template:function(t){return'\n
\n '+this.templateLabel(t)+'\n
\n
\n '+this.templateInput(t)+"\n
\n "},templateLabel:function(t){var e=this.pfx;return'\n \n '+t.get("name")+'\n \n \n '},templateInput:function(t){return'\n
\n \n
\n '},events:function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({change:"inputValueChanged"},"click [data-clear-style]","clear"),initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.bindAll)(this,"targetUpdated"),this.config=t.config||{};var e=this.config.em;this.em=e,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange,this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{};var n=this.model;this.property=n.get("property"),this.input=null;var i=this.pfx;this.inputHolderId="#"+i+"input-holder",this.sector=n.collection&&n.collection.sector,n.view=this,n.get("value")||n.set("value",n.getDefaultValue()),e&&e.on("update:component:style:"+this.property,this.targetUpdated),this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(n,"destroy remove",this.remove),this.listenTo(n,"change:value",this.modelValueChanged),this.listenTo(n,"targetUpdated",this.targetUpdated),this.listenTo(n,"change:visible",this.updateVisibility),this.listenTo(n,"change:status",this.updateStatus);var o=this.init&&this.init.bind(this);o&&o()},updateStatus:function(){var t=this.model.get("status"),e=this.pfx,n=this.ppfx,i=this.config,r=n+"four-color",o=n+"color-warn",s=this.$el.children("."+e+"label"),a=this.getClearEl().style;switch(s.removeClass(r+" "+o),a.display="none",t){case"updated":s.addClass(r),i.clearProperties&&(a.display="inline");break;case"computed":s.addClass(o)}},clear:function(t){t&&t.stopPropagation(),this.model.clearValue(),this.targetUpdated()},getClearEl:function(){return this.clearEl||(this.clearEl=this.el.querySelector("[data-clear-style]")),this.clearEl},getTarget:function(){return this.getTargetModel()},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},inputValueChanged:function(t){t&&t.stopPropagation(),this.model.setValue(this.getInputValue(),1,{fromInput:1}),this.elementUpdated()},elementUpdated:function(){this.setStatus("updated")},setStatus:function(t){this.model.set("status",t);var e=this.model.parent;e&&e.set("status",t)},targetUpdated:function(){if(this.checkVisibility()){var t=this.config,e=t.em,n=this.model,i="",r="",o=this.getTargetValue({ignoreDefault:1}),s=n.getDefaultValue(),a=this.getComputedValue();o?(i=o,t.highlightChanged&&(r="updated")):a&&t.showComputed&&a!=s?(i=a,t.highlightComputed&&(r="computed")):(i=s,r=""),n.setValue(i,0,{fromTarget:1}),this.setStatus(r),e&&(e.trigger("styleManager:change",this),e.trigger("styleManager:change:"+n.get("property"),this))}},checkVisibility:function(){var t=1;return this.config.hideNotStylable&&(this.isTargetStylable()&&this.isComponentStylable()?this.show():(this.hide(),t=0),this.sector&&this.sector.trigger("updateVisibility")),t},getTargetValue:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.model,i=this.getTargetModel(),r=this.customValue;if(!i)return t;if((t=i.getStyle()[n.get("property")])||e.ignoreDefault||(t=n.getDefaultValue()),"function"==typeof r&&!e.ignoreCustomValue){var o=r(this,n.collection.indexOf(n));o&&(t=o)}return t},getComputedValue:function(){var t=this.propTarget,e=t.computed||{},n=t.computedDefault||{},i=this.config.avoidComputed||[],r=this.model.get("property"),s=i.indexOf(r)<0,a=e[r],l=n[(0,o.camelCase)(r)];return e&&s&&l!==a&&a},getInputValue:function(){var t=this.getInputEl();return t?t.value:""},modelValueChanged:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.config.em,r=this.model,o=r.getFullValue(),s=this.getTarget(),a=this.onChange;n.fromInput||this.setValue(o),s&&this.isTargetStylable()&&this.isComponentStylable()&&(n.fromTarget||(a&&!n.fromParent?a(s,this,n):this.updateTargetStyle(o,null,n)),i&&(i.trigger("component:update",s),i.trigger("component:styleUpdate",s),i.trigger("component:styleUpdate:"+r.get("property"),s)))},updateTargetStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e||this.model.get("property"),r=this.getTarget(),o=r.getStyle();t?o[i]=t:delete o[i],r.setStyle(o,n);var s=this.getHelperModel();s&&s.setStyle(o,n)},isTargetStylable:function(t){var e=t||this.getTarget(),n=this.model,i=n.get("property"),o=n.get("toRequire"),s=e.get("unstylable"),a=e.get("stylable-require"),l=e.get("stylable");return(0,r.isArray)(l)&&(l=l.indexOf(i)>=0),(0,r.isArray)(s)&&(l=s.indexOf(i)<0),o&&(l=a&&a.indexOf(i)>=0||!t),l},isComponentStylable:function(){var t=this.em,e=t&&t.getSelected();return!e||this.isTargetStylable(e)},setRawValue:function(t){this.setValue(this.model.parseValue(t))},setValue:function(t){var e=this.model,n=(0,r.isUndefined)(t)?e.getDefaultValue():t,i=this.getInputEl();i&&(i.value=n)},getInputEl:function(){return this.input||(this.input=this.el.querySelector("input")),this.input},updateVisibility:function(){this.el.style.display=this.model.get("visible")?"block":"none"},show:function(){this.model.set("visible",1)},hide:function(){this.model.set("visible",0)},cleanValue:function(){this.setValue("")},render:function(){var t=this.pfx,e=this.model,n=this.el;n.innerHTML=this.template(e),n.className=t+"property "+t+e.get("type"),this.updateStatus();var i=this.onRender&&this.onRender.bind(this);i&&i(),this.setValue(e.get("value"),{targetUpdate:1})}})},function(t,e,n){t.exports=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),i=/MSIE \d/.test(t),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),s=i||r||o,a=s&&(i?document.documentMode||6:+(o||r)[1]),l=!o&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!o&&/Chrome\//.test(t),h=/Opera\//.test(t),d=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),p=/PhantomJS/.test(t),g=!o&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),v=/Android/.test(t),m=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),y=g||/Mac/.test(e),b=/\bCrOS\b/.test(t),x=/win/i.test(e),w=h&&t.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(h=!1,l=!0);var C=y&&(c||h&&(null==w||w<12.11)),k=n||s&&a>=9;function S(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var T,E=function(t,e){var n=t.className,i=S(e).exec(n);if(i){var r=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(r?i[1]+r:"")}};function M(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function A(t,e){return M(t).appendChild(e)}function O(t,e,n,i){var r=document.createElement(t);if(n&&(r.className=n),i&&(r.style.cssText=i),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var o=0;o=e)return s+(e-o);s+=a-o,s+=n-s%n,o=a+1}}g?I=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:s&&(I=function(t){try{t.select()}catch(t){}});var z=function(){this.id=null};function V(t,e){for(var n=0;n=e)return i+Math.min(s,e-r);if(r+=o-i,i=o+1,(r+=n-r%n)>=e)return i}}var K=[""];function Y(t){for(;K.length<=t;)K.push(G(K)+" ");return K[t]}function G(t){return t[t.length-1]}function X(t,e){for(var n=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||Q.test(t))}function et(t,e){return e?!!(e.source.indexOf("\\w")>-1&&tt(t))||e.test(t):tt(t)}function nt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var it=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function rt(t){return t.charCodeAt(0)>=768&&it.test(t)}function ot(t,e,n){for(;(n<0?e>0:en?-1:1;;){if(e==n)return e;var r=(e+n)/2,o=i<0?Math.ceil(r):Math.floor(r);if(o==e)return t(o)?e:n;t(o)?n=o:e=o+i}}function at(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(e=t.first&&en?gt(n,at(t,n).text.length):function(t,e){var n=t.ch;return null==n||n>e?gt(t.line,e):n<0?gt(t.line,0):t}(e,at(t,e.line).text.length)}function kt(t,e){for(var n=[],i=0;i=e:o.to>e);(i||(i=[])).push(new Et(s,o.from,l?null:o.to))}}return i}(n,r,s),l=function(t,e,n){var i;if(t)for(var r=0;r=e:o.to>e);if(a||o.from==e&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(s.inclusiveLeft?o.from<=e:o.from0&&a)for(var x=0;xe)&&(!n||It(n,o.marker)<0)&&(n=o.marker)}return n}function Vt(t,e,n,i,r){var o=at(t,e),s=Tt&&o.markedSpans;if(s)for(var a=0;a=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?vt(c.to,n)>=0:vt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?vt(c.from,i)<=0:vt(c.from,i)<0)))return!0}}}function Ht(t){for(var e;e=Rt(t);)t=e.find(-1,!0).line;return t}function $t(t,e){var n=at(t,e),i=Ht(n);return n==i?e:ht(i)}function Bt(t,e){if(e>t.lastLine())return e;var n,i=at(t,e);if(!Wt(t,i))return e;for(;n=jt(i);)i=n.find(1,!0).line;return ht(i)+1}function Wt(t,e){var n=Tt&&e.markedSpans;if(n)for(var i=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}var Gt=null;function Xt(t,e,n){var i;Gt=null;for(var r=0;re)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:Gt=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:Gt=r)}return null!=i?i:Gt}var Jt=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?t.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?e.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,o=/[LRr]/,s=/[Lb1n]/,a=/[1n]/;function l(t,e,n){this.level=t,this.from=e,this.to=n}return function(t,e){var c="ltr"==e?"L":"R";if(0==t.length||"ltr"==e&&!i.test(t))return!1;for(var u=t.length,h=[],d=0;d-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function ie(t,e){var n=ee(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r0}function ae(t){t.prototype.on=function(t,e){te(this,t,e)},t.prototype.off=function(t,e){ne(this,t,e)}}function le(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function ce(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function ue(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function he(t){le(t),ce(t)}function de(t){return t.target||t.srcElement}function fe(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),y&&t.ctrlKey&&1==e&&(e=3),e}var pe,ge,ve=function(){if(s&&a<9)return!1;var t=O("div");return"draggable"in t||"dragDrop"in t}();function me(t){if(null==pe){var e=O("span","​");A(t,O("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(pe=e.offsetWidth<=1&&e.offsetHeight>2&&!(s&&a<8))}var n=pe?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function ye(t){if(null!=ge)return ge;var e=A(t,document.createTextNode("AخA")),n=T(e,0,1).getBoundingClientRect(),i=T(e,1,2).getBoundingClientRect();return M(t),!(!n||n.left==n.right)&&(ge=i.right-n.right<3)}var be=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],i=t.length;e<=i;){var r=t.indexOf("\n",e);-1==r&&(r=t.length);var o=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),s=o.indexOf("\r");-1!=s?(n.push(o.slice(0,s)),e+=s+1):(n.push(o),e=r+1)}return n}:function(t){return t.split(/\r\n?|\n/)},xe=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},we=function(){var t=O("div");return"oncopy"in t||(t.setAttribute("oncopy","return;"),"function"==typeof t.oncopy)}(),Ce=null,ke={},Se={};function Te(t){if("string"==typeof t&&Se.hasOwnProperty(t))t=Se[t];else if(t&&"string"==typeof t.name&&Se.hasOwnProperty(t.name)){var e=Se[t.name];"string"==typeof e&&(e={name:e}),(t=Z(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Te("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Te("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Ee(t,e){e=Te(e);var n=ke[e.name];if(!n)return Ee(t,"text/plain");var i=n(t,e);if(Me.hasOwnProperty(e.name)){var r=Me[e.name];for(var o in r)r.hasOwnProperty(o)&&(i.hasOwnProperty(o)&&(i["_"+o]=i[o]),i[o]=r[o])}if(i.name=e.name,e.helperType&&(i.helperType=e.helperType),e.modeProps)for(var s in e.modeProps)i[s]=e.modeProps[s];return i}var Me={};function Ae(t,e){var n=Me.hasOwnProperty(t)?Me[t]:Me[t]={};R(e,n)}function Oe(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var i in e){var r=e[i];r instanceof Array&&(r=r.concat([])),n[i]=r}return n}function Pe(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function _e(t,e,n){return!t.startState||t.startState(e,n)}var Le=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Le.prototype.eol=function(){return this.pos>=this.string.length},Le.prototype.sol=function(){return this.pos==this.lineStart},Le.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Le.prototype.next=function(){if(this.pose},Le.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Le.prototype.skipToEnd=function(){this.pos=this.string.length},Le.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Le.prototype.backUp=function(t){this.pos-=t},Le.prototype.column=function(){return this.lastColumnPos0?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}var r=function(t){return n?t.toLowerCase():t},o=this.string.substr(this.pos,t.length);if(r(o)==r(t))return!1!==e&&(this.pos+=t.length),!0},Le.prototype.current=function(){return this.string.slice(this.start,this.pos)},Le.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Le.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Le.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var Ne=function(t,e){this.state=t,this.lookAhead=e},De=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};function Ie(t,e,n,i){var r=[t.state.modeGen],o={};We(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},o,i);for(var s=n.state,a=function(i){n.baseTokens=r;var a=t.state.overlays[i],l=1,c=0;n.state=!0,We(t,e.text,a.mode,n,function(t,e){for(var n=l;ct&&r.splice(l,1,t,r[l+1],i),l+=2,c=Math.min(t,i)}if(e)if(a.opaque)r.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;nt.options.maxHighlightLength&&Oe(t.doc.mode,i.state),o=Ie(t,e,i);r&&(i.state=r),e.stateAfter=i.save(!r),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function Re(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new De(i,!0,e);var o=function(t,e,n){for(var i,r,o=t.doc,s=n?-1:e-(t.doc.mode.innerMode?1e3:100),a=e;a>s;--a){if(a<=o.first)return o.first;var l=at(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof Ne?c.lookAhead:0)<=o.modeFrontier))return a;var u=j(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=a-1,i=u)}return r}(t,e,n),s=o>i.first&&at(i,o-1).stateAfter,a=s?De.fromSaved(i,s,o):new De(i,_e(i.mode),o);return i.iter(o,e,function(n){je(t,n.text,a);var i=a.line;n.stateAfter=i==e-1||i%5==0||i>=r.viewFrom&&ie.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}De.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},De.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},De.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},De.fromSaved=function(t,e,n){return e instanceof Ne?new De(t,Oe(t.mode,e.state),n,e.lookAhead):new De(t,Oe(t.mode,e),n)},De.prototype.save=function(t){var e=!1!==t?Oe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ne(e,this.maxLookAhead):e};var He=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function $e(t,e,n,i){var r,o=t.doc,s=o.mode;e=Ct(o,e);var a,l=at(o,e.line),c=Re(t,e.line,n),u=new Le(l.text,t.options.tabSize,c);for(i&&(a=[]);(i||u.post.options.maxHighlightLength?(a=!1,s&&je(t,e,i,h.pos),h.pos=e.length,l=null):l=Be(Ve(n,h,i.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;c1&&!/ /.test(t))return t;for(var n=e,i="",r=0;rc&&h.from<=c);d++);if(h.to>=u)return t(n,i,r,o,s,a,l);t(n,i.slice(0,h.to-c),r,o,null,a,l),o=null,i=i.slice(h.to-c),c=h.to}}}function tn(t,e,n,i){var r=!i&&n.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!i&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function en(t,e,n){var i=t.markedSpans,r=t.text,o=0;if(i)for(var s,a,l,c,u,h,d,f=r.length,p=0,g=1,v="",m=0;;){if(m==p){l=c=u=h=a="",d=null,m=1/0;for(var y=[],b=void 0,x=0;xp||C.collapsed&&w.to==p&&w.from==p)?(null!=w.to&&w.to!=p&&m>w.to&&(m=w.to,c=""),C.className&&(l+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&w.from==p&&(u+=" "+C.startStyle),C.endStyle&&w.to==m&&(b||(b=[])).push(C.endStyle,w.to),C.title&&!h&&(h=C.title),C.collapsed&&(!d||It(d.marker,C)<0)&&(d=w)):w.from>p&&m>w.from&&(m=w.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,m);;){if(v){var E=p+v.length;if(!d){var M=E>T?v.slice(0,T-p):v;e.addToken(e,M,s?s+l:l,u,p+M.length==m?c:"",h,a)}if(E>=T){v=v.slice(T-p),p=T;break}p=E,u=""}v=r.slice(o,o=n[g++]),s=Ge(n[g++],e.cm.options)}}else for(var A=1;An)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function On(t,e,n,i){return Ln(t,_n(t,e),n,i)}function Pn(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&e2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(t,e.view,e.rect),e.hasHeights=!0),(o=function(t,e,n,i){var r,o=In(e.map,n,i),l=o.node,c=o.start,u=o.end,h=o.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&rt(e.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u1}(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*i,bottom:e.bottom*i}}(t.display.measure,r))}else{var f;c>0&&(h=i="right"),r=t.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==i?f.length-1:0]:l.getBoundingClientRect()}if(s&&a<9&&!c&&(!r||!r.left&&!r.right)){var p=l.parentNode.getClientRects()[0];r=p?{left:p.left,right:p.left+ei(t.display),top:p.top,bottom:p.bottom}:Dn}for(var g=r.top-e.rect.top,v=r.bottom-e.rect.top,m=(g+v)/2,y=e.view.measure.heights,b=0;be)&&(r=(o=l-a)-1,e>=l&&(s="right")),null!=r){if(i=t[c+2],a==l&&n==(i.insertLeft?"left":"right")&&(s=n),"left"==n&&0==r)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)i=t[2+(c-=3)],s="left";if("right"==n&&r==l-a)for(;c=0&&(n=t[r]).left==n.right;r--);return n}function Rn(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e=i.text.length?(l=i.text.length,c="before"):l<=0&&(l=0,c="after"),!a)return s("before"==c?l-1:l,"before"==c);function u(t,e,n){var i=a[e],r=1==i.level;return s(n?t-1:t,r!=n)}var h=Xt(a,l,c),d=Gt,f=u(l,h,"before"==c);return null!=d&&(f.other=u(l,d,"before"!=c)),f}function Kn(t,e){var n=0;e=Ct(t.doc,e),t.options.lineWrapping||(n=ei(t.display)*e.ch);var i=at(t.doc,e.line),r=qt(i)+Cn(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function Yn(t,e,n,i,r){var o=gt(t,e,n);return o.xRel=r,i&&(o.outside=!0),o}function Gn(t,e,n){var i=t.doc;if((n+=t.display.viewOffset)<0)return Yn(i.first,0,null,!0,-1);var r=dt(i,n),o=i.first+i.size-1;if(r>o)return Yn(i.first+i.size-1,at(i,o).text.length,null,!0,1);e<0&&(e=0);for(var s=at(i,r);;){var a=Qn(t,s,r,e,n),l=zt(s,a.ch+(a.xRel>0?1:0));if(!l)return a;var c=l.find(1);if(c.line==r)return c;s=at(i,r=c.line)}}function Xn(t,e,n,i){i-=$n(e);var r=e.text.length,o=st(function(e){return Ln(t,n,e-1).bottom<=i},r,0);return r=st(function(e){return Ln(t,n,e).top>i},o,r),{begin:o,end:r}}function Jn(t,e,n,i){n||(n=_n(t,e));var r=Bn(t,e,Ln(t,n,i),"line").top;return Xn(t,e,n,r)}function Zn(t,e,n,i){return!(t.bottom<=n)&&(t.top>n||(i?t.left:t.right)>e)}function Qn(t,e,n,i,r){r-=qt(e);var o=_n(t,e),s=$n(e),a=0,l=e.text.length,c=!0,u=Zt(e,t.doc.direction);if(u){var h=(t.options.lineWrapping?function(t,e,n,i,r,o,s){var a=Xn(t,e,i,s),l=a.begin,c=a.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d=c||f.to<=l)){var p=1!=f.level,g=Ln(t,i,p?Math.min(c,f.to)-1:Math.max(l,f.from)).right,v=gv)&&(u=f,h=v)}}return u||(u=r[r.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}:function(t,e,n,i,r,o,s){var a=st(function(a){var l=r[a],c=1!=l.level;return Zn(qn(t,gt(n,c?l.to:l.from,c?"before":"after"),"line",e,i),o,s,!0)},0,r.length-1),l=r[a];if(a>0){var c=1!=l.level,u=qn(t,gt(n,c?l.from:l.to,c?"after":"before"),"line",e,i);Zn(u,o,s,!0)&&u.top>s&&(l=r[a-1])}return l})(t,e,n,o,u,i,r);c=1!=h.level,a=c?h.from:h.to-1,l=c?h.to:h.from-1}var d,f,p=null,g=null,v=st(function(e){var n=Ln(t,o,e);return n.top+=s,n.bottom+=s,!!Zn(n,i,r,!1)&&(n.top<=r&&n.left<=i&&(p=e,g=n),!0)},a,l),m=!1;if(g){var y=i-g.left=x.bottom}return v=ot(e.text,v,1),Yn(n,v,f,m,i-d)}function ti(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Nn){Nn=O("pre");for(var e=0;e<49;++e)Nn.appendChild(document.createTextNode("x")),Nn.appendChild(O("br"));Nn.appendChild(document.createTextNode("x"))}A(t.measure,Nn);var n=Nn.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),M(t.measure),n||1}function ei(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=O("span","xxxxxxxxxx"),n=O("pre",[e]);A(t.measure,n);var i=e.getBoundingClientRect(),r=(i.right-i.left)/10;return r>2&&(t.cachedCharWidth=r),r||10}function ni(t){for(var e=t.display,n={},i={},r=e.gutters.clientLeft,o=e.gutters.firstChild,s=0;o;o=o.nextSibling,++s)n[t.options.gutters[s]]=o.offsetLeft+o.clientLeft+r,i[t.options.gutters[s]]=o.clientWidth;return{fixedPos:ii(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function ii(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function ri(t){var e=ti(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/ei(t.display)-3);return function(r){if(Wt(t.doc,r))return 0;var o=0;if(r.widgets)for(var s=0;s=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,i=0;i=t.display.viewTo||a.to().linee||e==n&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr",o),r=!0)}r||i(e,n,"ltr")}(g,n||0,null==i?d:i,function(t,e,r,h){var v="ltr"==r,m=f(t,v?"left":"right"),y=f(e-1,v?"right":"left"),b=null==n&&0==t,x=null==i&&e==d,w=0==h,C=!g||h==g.length-1;if(y.top-m.top<=3){var k=(c?b:x)&&w,S=(c?x:b)&&C,T=k?a:(v?m:y).left,E=S?l:(v?y:m).right;u(T,m.top,E-T,m.bottom)}else{var M,A,O,P;v?(M=c&&b&&w?a:m.left,A=c?l:p(t,r,"before"),O=c?a:p(e,r,"after"),P=c&&x&&C?l:y.right):(M=c?p(t,r,"before"):a,A=!c&&b&&w?l:m.right,O=!c&&x&&C?a:y.left,P=c?p(e,r,"after"):l),u(M,m.top,A-M,m.bottom),m.bottom0?e.blinker=setInterval(function(){return e.cursorDiv.style.visibility=(n=!n)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function pi(t){t.state.focused||(t.display.input.focus(),vi(t))}function gi(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,mi(t))},100)}function vi(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(ie(t,"focus",t,e),t.state.focused=!0,N(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),fi(t))}function mi(t,e){t.state.delayingBlurEvent||(t.state.focused&&(ie(t,"blur",t,e),t.state.focused=!1,E(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function yi(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i.005||u<-.005)&&(ut(r.line,o),bi(r.line),r.rest))for(var h=0;h=s&&(o=dt(e,qt(at(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function wi(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=ii(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",s=0;so&&(e.bottom=e.top+o);var a=t.doc.height+kn(n),l=e.topa-i;if(e.topr+o){var u=Math.min(e.top,(c?a:e.bottom)-o);u!=r&&(s.scrollTop=u)}var h=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft,d=En(t)-(t.options.fixedGutter?n.gutters.offsetWidth:0),f=e.right-e.left>d;return f&&(e.right=e.left+d),e.left<10?s.scrollLeft=0:e.leftd+h-3&&(s.scrollLeft=e.right+(f?0:10)-d),s}function Si(t,e){null!=e&&(Mi(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Ti(t){Mi(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Ei(t,e,n){null==e&&null==n||Mi(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Mi(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var n=Kn(t,e.from),i=Kn(t,e.to);Ai(t,n,i,e.margin)}}function Ai(t,e,n,i){var r=ki(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-i,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+i});Ei(t,r.scrollLeft,r.scrollTop)}function Oi(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||ar(t,{top:e}),Pi(t,e,!0),n&&ar(t),nr(t,100))}function Pi(t,e,n){e=Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function _i(t,e,n,i){e=Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!i||(t.doc.scrollLeft=e,wi(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Li(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+kn(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+Tn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var Ni=function(t,e,n){this.cm=n;var i=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=r.tabIndex=-1,t(i),t(r),te(i,"scroll",function(){i.clientHeight&&e(i.scrollTop,"vertical")}),te(r,"scroll",function(){r.clientWidth&&e(r.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,s&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ni.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,i=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?i+"px":"0";var r=t.viewHeight-(e?i:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?i:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:e?i:0}},Ni.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ni.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ni.prototype.zeroWidthHack=function(){var t=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new z,this.disableVert=new z},Ni.prototype.enableZeroWidthBar=function(t,e,n){t.style.pointerEvents="auto",e.set(1e3,function i(){var r=t.getBoundingClientRect(),o="vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1);o!=t?t.style.pointerEvents="none":e.set(1e3,i)})},Ni.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Di=function(){};function Ii(t,e){e||(e=Li(t));var n=t.display.barWidth,i=t.display.barHeight;Fi(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&yi(t),Fi(t,Li(t)),n=t.display.barWidth,i=t.display.barHeight}function Fi(t,e){var n=t.display,i=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}Di.prototype.update=function(){return{bottom:0,right:0}},Di.prototype.setScrollLeft=function(){},Di.prototype.setScrollTop=function(){},Di.prototype.clear=function(){};var Ri={native:Ni,null:Di};function ji(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&E(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Ri[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),te(e,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?_i(t,e):Oi(t,e)},t),t.display.scrollbars.addClass&&N(t.display.wrapper,t.display.scrollbars.addClass)}var zi=0;function Vi(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++zi},function(t){on?on.ops.push(t):t.ownsGroup=on={ops:[t],delayedCallbacks:[]}}(t.curOp)}function Hi(t){var e=t.curOp;!function(t,e){var n=t.ownsGroup;if(n)try{!function(t){var e=t.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new rr(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Bi(t){t.updatedDisplay=t.mustUpdate&&or(t.cm,t.update)}function Wi(t){var e=t.cm,n=e.display;t.updatedDisplay&&yi(e),t.barMeasure=Li(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=On(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Tn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-En(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Ui(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft1&&(s=!0)),null!=c.scrollLeft&&(_i(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return r}(e,Ct(i,t.scrollToPos.from),Ct(i,t.scrollToPos.to),t.scrollToPos.margin);!function(t,e){if(!re(t,"scrollCursorIntoView")){var n=t.display,i=n.sizer.getBoundingClientRect(),r=null;if(e.top+i.top<0?r=!0:e.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!p){var o=O("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-Cn(t.display))+"px;\n height: "+(e.bottom-e.top+Tn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(r),t.display.lineSpace.removeChild(o)}}}(e,r)}var o=t.maybeHiddenMarkers,s=t.maybeUnhiddenMarkers;if(o)for(var a=0;ae)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Tt&&$t(t.doc,e)r.viewFrom?Qi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)Qi(t);else if(e<=r.viewFrom){var o=tr(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):Qi(t)}else if(n>=r.viewTo){var s=tr(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):Qi(t)}else{var a=tr(t,e,e,-1),l=tr(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(rn(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):Qi(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=i.viewTo)){var o=i.view[ai(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==V(s,n)&&s.push(n)}}}function Qi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function tr(t,e,n,i){var r,o=ai(t,e),s=t.display.view;if(!Tt||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var a=t.display.viewFrom,l=0;l0){if(o==s.length-1)return null;r=a+s[o].size-e,o++}else r=a-e;e+=r,n+=r}for(;$t(t.doc,n)!=n;){if(o==(i<0?0:s.length-1))return null;n+=i*s[o-(i<0?1:0)].size,o+=i}return{index:o,lineN:n}}function er(t){for(var e=t.display.view,n=0,i=0;i=t.display.viewTo)){var n=+new Date+t.options.workTime,i=Re(t,e.highlightFrontier),r=[];e.iter(i.line,Math.min(e.first+e.size,t.display.viewTo+500),function(o){if(i.line>=t.display.viewFrom){var s=o.styles,a=o.text.length>t.options.maxHighlightLength?Oe(e.mode,i.state):null,l=Ie(t,o,i,!0);a&&(i.state=a),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var h=!s||s.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&dn)return nr(t,t.options.workDelay),!0}),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&Ki(t,function(){for(var e=0;e=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==er(t))return!1;Ci(t)&&(Qi(t),e.dims=ni(t));var r=i.first+i.size,o=Math.max(e.visible.from-t.options.viewportMargin,i.first),s=Math.min(r,e.visible.to+t.options.viewportMargin);n.viewFroms&&n.viewTo-s<20&&(s=Math.min(r,n.viewTo)),Tt&&(o=$t(t.doc,o),s=Bt(t.doc,s));var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;!function(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=rn(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=rn(t,e,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,ai(t,n)))),i.viewTo=n}(t,o,s),n.viewOffset=qt(at(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var c=er(t);if(!a&&0==c&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(t){if(t.hasFocus())return null;var e=L();if(!e||!_(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var i=window.getSelection();i.anchorNode&&i.extend&&_(t.display.lineDiv,i.anchorNode)&&(n.anchorNode=i.anchorNode,n.anchorOffset=i.anchorOffset,n.focusNode=i.focusNode,n.focusOffset=i.focusOffset)}return n}(t);return c>4&&(n.lineDiv.style.display="none"),function(t,e,n){var i=t.display,r=t.options.lineNumbers,o=i.lineDiv,s=o.firstChild;function a(e){var n=e.nextSibling;return l&&y&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=i.view,u=i.viewFrom,h=0;h-1&&(f=!1),cn(t,d,u,n)),f&&(M(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(pt(t.options,u)))),s=d.node.nextSibling}else{var p=vn(t,d,u,n);o.insertBefore(p,s)}u+=d.size}for(;s;)s=a(s)}(t,n.updateLineNumbers,e.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(t){if(t&&t.activeElt&&t.activeElt!=L()&&(t.activeElt.focus(),t.anchorNode&&_(document.body,t.anchorNode)&&_(document.body,t.focusNode))){var e=window.getSelection(),n=document.createRange();n.setEnd(t.anchorNode,t.anchorOffset),n.collapse(!1),e.removeAllRanges(),e.addRange(n),e.extend(t.focusNode,t.focusOffset)}}(u),M(n.cursorDiv),M(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,nr(t,400)),n.updateLineNumbers=null,!0}function sr(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=En(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+kn(t.display)-Mn(t),n.top)}),e.visible=xi(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&or(t,e);i=!1){yi(t);var r=Li(t);li(t),Ii(t,r),cr(t,r),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function ar(t,e){var n=new rr(t,e);if(or(t,n)){yi(t),sr(t,n);var i=Li(t);li(t),Ii(t,i),cr(t,i),n.finish()}}function lr(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function cr(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Tn(t)+"px"}function ur(t){var e=t.display.gutters,n=t.options.gutters;M(e);for(var i=0;i-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}rr.prototype.signal=function(t,e){se(t,e)&&this.events.push(arguments)},rr.prototype.finish=function(){for(var t=0;ta.clientWidth,u=a.scrollHeight>a.clientHeight;if(r&&c||o&&u){if(o&&y&&l)t:for(var d=e.target,f=s.view;d!=a;d=d.parentNode)for(var p=0;p=0&&vt(t,i.to())<=0)return n}return-1};var yr=function(t,e){this.anchor=t,this.head=e};function br(t,e){var n=t[e];t.sort(function(t,e){return vt(t.from(),e.from())}),e=V(t,n);for(var i=1;i=0){var s=xt(o.from(),r.from()),a=bt(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;i<=e&&--e,t.splice(--i,2,new yr(l?a:s,l?s:a))}}return new mr(t,e)}function xr(t,e){return new mr([new yr(t,e||t)],0)}function wr(t){return t.text?gt(t.from.line+t.text.length-1,G(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Cr(t,e){if(vt(t,e.from)<0)return t;if(vt(t,e.to)<=0)return wr(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,i=t.ch;return t.line==e.to.line&&(i+=wr(e).ch-e.to.ch),gt(n,i)}function kr(t,e){for(var n=[],i=0;i1&&t.remove(a.line+1,p-1),t.insert(a.line+1,m)}an(t,"change",t,e)}function Or(t,e,n){!function t(i,r,o){if(i.linked)for(var s=0;sa-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=function(t,e){return e?(Dr(t.done),G(t.done)):t.done.length&&!G(t.done).ranges?G(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),G(t.done)):void 0}(r,r.lastOp==i)))s=G(o.changes),0==vt(e.from,e.to)&&0==vt(e.from,s.to)?s.to=wr(e):o.changes.push(Nr(t,e));else{var l=G(r.done);for(l&&l.ranges||Rr(t.sel,r.done),o={changes:[Nr(t,e)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=a,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=e.origin,s||ie(t,"historyAdded")}function Fr(t,e,n,i){var r=t.history,o=i&&i.origin;n==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||function(t,e,n,i){var r=e.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,o,G(r.done),e))?r.done[r.done.length-1]=e:Rr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&Dr(r.undone)}function Rr(t,e){var n=G(e);n&&n.ranges&&n.equals(t)||e.push(t)}function jr(t,e,n,i){var r=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,i),function(n){n.markedSpans&&((r||(r=e["spans_"+t.id]={}))[o]=n.markedSpans),++o})}function zr(t){if(!t)return null;for(var e,n=0;n-1&&(G(a)[h]=c[h],delete c[h])}}}return i}function $r(t,e,n,i){if(i){var r=t.anchor;if(n){var o=vt(e,r)<0;o!=vt(n,r)<0?(r=e,e=n):o!=vt(e,n)<0&&(e=n)}return new yr(r,e)}return new yr(n||e,e)}function Br(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),Yr(t,new mr([$r(t.sel.primary(),e,n,r)],0),i)}function Wr(t,e,n){for(var i=[],r=t.cm&&(t.cm.display.shift||t.extend),o=0;o=e.ch:a.to>e.ch))){if(r&&(ie(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var c=l.find(i<0?1:-1),u=void 0;if((i<0?l.inclusiveRight:l.inclusiveLeft)&&(c=eo(t,c,-i,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=vt(c,n))&&(i<0?u<0:u>0))return Qr(t,c,e,i,r)}var h=l.find(i<0?-1:1);return(i<0?l.inclusiveLeft:l.inclusiveRight)&&(h=eo(t,h,i,h.line==e.line?o:null)),h?Qr(t,h,e,i,r):null}}return e}function to(t,e,n,i,r){var o=i||1,s=Qr(t,e,n,o,r)||!r&&Qr(t,e,n,o,!0)||Qr(t,e,n,-o,r)||!r&&Qr(t,e,n,-o,!0);return s||(t.cantEdit=!0,gt(t.first,0))}function eo(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?Ct(t,gt(e.line-1)):null:n>0&&e.ch==(i||at(t,e.line)).text.length?e.line0)){var u=[l,1],h=vt(c.from,a.from),d=vt(c.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(d>0||!s.inclusiveRight&&!d)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}(t,e.from,e.to);if(i)for(var r=i.length-1;r>=0;--r)oo(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else oo(t,e)}}function oo(t,e){if(1!=e.text.length||""!=e.text[0]||0!=vt(e.from,e.to)){var n=kr(t,e);Ir(t,e,n,t.cm?t.cm.curOp.id:NaN),lo(t,e,n,Ot(t,e));var i=[];Or(t,function(t,n){n||-1!=V(i,t.history)||(fo(t.history,e),i.push(t.history)),lo(t,e,null,Ot(t,e))})}}function so(t,e,n){var i=t.cm&&t.cm.state.suppressEdits;if(!i||n){for(var r,o=t.history,s=t.sel,a="undo"==e?o.done:o.undone,l="undo"==e?o.undone:o.done,c=0;c=0;--f){var p=d(f);if(p)return p.v}}}}function ao(t,e){if(0!=e&&(t.first+=e,t.sel=new mr(X(t.sel.ranges,function(t){return new yr(gt(t.anchor.line+e,t.anchor.ch),gt(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){Ji(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,i=n.viewFrom;it.lastLine())){if(e.from.lineo&&(e={from:e.from,to:gt(o,at(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=lt(t,e.from,e.to),n||(n=kr(t,e)),t.cm?function(t,e,n){var i=t.doc,r=t.display,o=e.from,s=e.to,a=!1,l=o.line;t.options.lineWrapping||(l=ht(Ht(at(i,o.line))),i.iter(l,s.line+1,function(t){if(t==r.maxLine)return a=!0,!0})),i.sel.contains(e.from,e.to)>-1&&oe(t),Ar(i,e,n,ri(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=Kt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;i--){var r=at(t,i).stateAfter;if(r&&(!(r instanceof Ne)||i+r.lookAhead1||!(this.children[0]instanceof go))){var a=[];this.collapse(a),this.children=[new go(a)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var s=r.lines.length%25+25,a=s;a10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=0;i0||0==s&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=P("span",[o.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Vt(t,e.line,e,n,o)||e.line!=n.line&&Vt(t,n.line,e,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Tt=!0}o.addToHistory&&Ir(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var a,l=e.line,c=t.cm;if(t.iter(l,n.line+1,function(t){c&&o.collapsed&&!c.options.lineWrapping&&Ht(t)==c.display.maxLine&&(a=!0),o.collapsed&&l!=e.line&&ut(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new Et(o,l==e.line?e.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&t.iter(e.line,n.line+1,function(e){Wt(t,e)&&ut(e,0)}),o.clearOnEnter&&te(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(St=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++bo,o.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),o.collapsed)Ji(c,e.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var u=e.line;u<=n.line;u++)Zi(c,u,"text");o.atomic&&Jr(c.doc),an(c,"markerAdded",c,o)}return o}xo.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Vi(t),se(this,"clear")){var n=this.find();n&&an(this,"clear",n.from,n.to)}for(var i=null,r=null,o=0;ot.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&Ji(t,i,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Jr(t.doc)),t&&an(t,"markerCleared",t,this,i,r),e&&Hi(t),this.parent&&this.parent.clear()}},xo.prototype.find=function(t,e){var n,i;null==t&&"bookmark"==this.type&&(t=1);for(var r=0;r=0;l--)ro(this,i[l]);a?Kr(this,a):this.cm&&Ti(this.cm)}),undo:Xi(function(){so(this,"undo")}),redo:Xi(function(){so(this,"redo")}),undoSelection:Xi(function(){so(this,"undo",!0)}),redoSelection:Xi(function(){so(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,i=0;i=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,n){t=Ct(this,t),e=Ct(this,e);var i=[],r=t.line;return this.iter(t.line,e.line+1,function(o){var s=o.markedSpans;if(s)for(var a=0;a=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||n&&!n(l.marker)||i.push(l.marker.parent||l.marker)}++r}),i},getAllMarks:function(){var t=[];return this.iter(function(e){var n=e.markedSpans;if(n)for(var i=0;it)return e=t,!0;t-=o,++n}),Ct(this,gt(n,e))},indexFromPos:function(t){var e=(t=Ct(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var u=t.dataTransfer.getData("Text");if(u){var h;if(e.state.draggingText&&!e.state.draggingText.copy&&(h=e.listSelections()),Gr(e.doc,xr(n,n)),h)for(var d=0;d=0;e--)co(t.doc,"",i[e].from,i[e].to,"+delete");Ti(t)})}function Ko(t,e,n){var i=ot(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Yo(t,e,n){var i=Ko(t,e.ch,n);return null==i?null:new gt(e.line,i,n<0?"after":"before")}function Go(t,e,n,i,r){if(t){var o=Zt(n,e.doc.direction);if(o){var s,a=r<0?G(o):o[0],l=r<0==(1==a.level),c=l?"after":"before";if(a.level>0||"rtl"==e.doc.direction){var u=_n(e,n);s=r<0?n.text.length-1:0;var h=Ln(e,u,s).top;s=st(function(t){return Ln(e,u,t).top==h},r<0==(1==a.level)?a.from:a.to-1,s),"before"==c&&(s=Ko(n,s,1))}else s=r<0?a.to:a.from;return new gt(i,s,c)}}return new gt(i,r<0?n.text.length:0,r<0?"before":"after")}jo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},jo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},jo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},jo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},jo.default=y?jo.macDefault:jo.pcDefault;var Xo={selectAll:no,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),B)},killLine:function(t){return qo(t,function(e){if(e.empty()){var n=at(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line0)r=new gt(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),gt(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=at(t.doc,r.line-1).text;s&&(r=new gt(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),gt(r.line-1,s.length-1),r,"+transpose"))}n.push(new yr(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return Ki(t,function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var i=0;i-1&&(vt((r=c.ranges[r]).from(),e)<0||e.xRel>0)&&(vt(r.to(),e)>0||e.xRel<0)?function(t,e,n,i){var r=t.display,o=!1,c=Yi(t,function(e){l&&(r.scroller.draggable=!1),t.state.draggingText=!1,ne(r.wrapper.ownerDocument,"mouseup",c),ne(r.wrapper.ownerDocument,"mousemove",u),ne(r.scroller,"dragstart",h),ne(r.scroller,"drop",c),o||(le(e),i.addNew||Br(t.doc,n,null,null,i.extend),l||s&&9==a?setTimeout(function(){r.wrapper.ownerDocument.body.focus(),r.input.focus()},20):r.input.focus())}),u=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},h=function(){return o=!0};l&&(r.scroller.draggable=!0),t.state.draggingText=c,c.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),te(r.wrapper.ownerDocument,"mouseup",c),te(r.wrapper.ownerDocument,"mousemove",u),te(r.scroller,"dragstart",h),te(r.scroller,"drop",c),gi(t),setTimeout(function(){return r.input.focus()},20)}(t,i,e,o):function(t,e,n,i){var r=t.display,o=t.doc;le(e);var s,a,l=o.sel,c=l.ranges;if(i.addNew&&!i.extend?(a=o.sel.contains(n),s=a>-1?c[a]:new yr(n,n)):(s=o.sel.primary(),a=o.sel.primIndex),"rectangle"==i.unit)i.addNew||(s=new yr(n,n)),n=si(t,e,!0,!0),a=-1;else{var u=ds(t,n,i.unit);s=i.extend?$r(s,u.anchor,u.head,i.extend):u}i.addNew?-1==a?(a=c.length,Yr(o,br(c.concat([s]),a),{scroll:!1,origin:"*mouse"})):c.length>1&&c[a].empty()&&"char"==i.unit&&!i.extend?(Yr(o,br(c.slice(0,a).concat(c.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):Ur(o,a,s,W):(a=0,Yr(o,new mr([s],0),W),l=o.sel);var h=n;function d(e){if(0!=vt(h,e))if(h=e,"rectangle"==i.unit){for(var r=[],c=t.options.tabSize,u=j(at(o,n.line).text,n.ch,c),d=j(at(o,e.line).text,e.ch,c),f=Math.min(u,d),p=Math.max(u,d),g=Math.min(n.line,e.line),v=Math.min(t.lastLine(),Math.max(n.line,e.line));g<=v;g++){var m=at(o,g).text,y=q(m,f,c);f==p?r.push(new yr(gt(g,y),gt(g,y))):m.length>y&&r.push(new yr(gt(g,y),gt(g,q(m,p,c))))}r.length||r.push(new yr(n,n)),Yr(o,br(l.ranges.slice(0,a).concat(r),a),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,x=s,w=ds(t,e,i.unit),C=x.anchor;vt(w.anchor,C)>0?(b=w.head,C=xt(x.from(),w.anchor)):(b=w.anchor,C=bt(x.to(),w.head));var k=l.ranges.slice(0);k[a]=function(t,e){var n=e.anchor,i=e.head,r=at(t.doc,n.line);if(0==vt(n,i)&&n.sticky==i.sticky)return e;var o=Zt(r);if(!o)return e;var s=Xt(o,n.ch,n.sticky),a=o[s];if(a.from!=n.ch&&a.to!=n.ch)return e;var l,c=s+(a.from==n.ch==(1!=a.level)?0:1);if(0==c||c==o.length)return e;if(i.line!=n.line)l=(i.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=Xt(o,i.ch,i.sticky),h=u-s||(i.ch-n.ch)*(1==a.level?-1:1);l=u==c-1||u==c?h<0:h>0}var d=o[c+(l?-1:0)],f=l==(1==d.level),p=f?d.from:d.to,g=f?"after":"before";return n.ch==p&&n.sticky==g?e:new yr(new gt(n.line,p,g),i)}(t,new yr(Ct(o,C),b)),Yr(o,br(k,a),W)}}var f=r.wrapper.getBoundingClientRect(),p=0;function g(e){t.state.selectingText=!1,p=1/0,le(e),r.input.focus(),ne(r.wrapper.ownerDocument,"mousemove",v),ne(r.wrapper.ownerDocument,"mouseup",m),o.history.lastSelOrigin=null}var v=Yi(t,function(e){0!==e.buttons&&fe(e)?function e(n){var s=++p,a=si(t,n,!0,"rectangle"==i.unit);if(a)if(0!=vt(a,h)){t.curOp.focus=L(),d(a);var l=xi(r,o);(a.line>=l.to||a.linef.bottom?20:0;c&&setTimeout(Yi(t,function(){p==s&&(r.scroller.scrollTop+=c,e(n))}),50)}}(e):g(e)}),m=Yi(t,g);t.state.selectingText=m,te(r.wrapper.ownerDocument,"mousemove",v),te(r.wrapper.ownerDocument,"mouseup",m)}(t,i,e,o)}(e,i,o,t):de(t)==n.scroller&&le(t):2==r?(i&&Br(e.doc,i),setTimeout(function(){return n.input.focus()},20)):3==r&&(k?gs(e,t):gi(e)))}}function ds(t,e,n){if("char"==n)return new yr(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new yr(gt(e.line,0),Ct(t.doc,gt(e.line+1,0)));var i=n(t,e);return new yr(i.from,i.to)}function fs(t,e,n,i){var r,o;if(e.touches)r=e.touches[0].clientX,o=e.touches[0].clientY;else try{r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&le(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!se(t,n))return ue(e);o-=a.top-s.viewOffset;for(var l=0;l=r){var u=dt(t.doc,o),h=t.options.gutters[l];return ie(t,n,t,u,h,e),ue(e)}}}function ps(t,e){return fs(t,e,"gutterClick",!0)}function gs(t,e){wn(t.display,e)||function(t,e){return!!se(t,"gutterContextMenu")&&fs(t,e,"gutterContextMenu",!1)}(t,e)||re(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function vs(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),zn(t)}us.prototype.compare=function(t,e,n){return this.time+400>t&&0==vt(e,this.pos)&&n==this.button};var ms={toString:function(){return"CodeMirror.Init"}},ys={},bs={};function xs(t){ur(t),Ji(t),wi(t)}function ws(t,e,n){var i=n&&n!=ms;if(!e!=!i){var r=t.display.dragFunctions,o=e?te:ne;o(t.display.scroller,"dragstart",r.start),o(t.display.scroller,"dragenter",r.enter),o(t.display.scroller,"dragover",r.over),o(t.display.scroller,"dragleave",r.leave),o(t.display.scroller,"drop",r.drop)}}function Cs(t){t.options.lineWrapping?(N(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(E(t.display.wrapper,"CodeMirror-wrap"),Yt(t)),oi(t),Ji(t),zn(t),setTimeout(function(){return Ii(t)},100)}function ks(t,e){var i=this;if(!(this instanceof ks))return new ks(t,e);this.options=e=e?R(e):{},R(ys,e,!1),hr(e);var r=e.value;"string"==typeof r&&(r=new Eo(r,e.mode,null,e.lineSeparator,e.direction)),this.doc=r;var o=new ks.inputStyles[e.inputStyle](this),c=this.display=new function(t,e,i){var r=this;this.input=i,r.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=P("div",null,"CodeMirror-code"),r.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=O("div",null,"CodeMirror-cursors"),r.measure=O("div",null,"CodeMirror-measure"),r.lineMeasure=O("div",null,"CodeMirror-measure"),r.lineSpace=P("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none");var o=P("div",[r.lineSpace],"CodeMirror-lines");r.mover=O("div",[o],null,"position: relative"),r.sizer=O("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=O("div",null,null,"position: absolute; height: "+H+"px; width: 1px;"),r.gutters=O("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=O("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=O("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),s&&a<8&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),l||n&&m||(r.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(r.wrapper):t(r.wrapper)),r.viewFrom=r.viewTo=e.first,r.reportedViewFrom=r.reportedViewTo=e.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,i.init(r)}(t,r,o);for(var u in c.wrapper.CodeMirror=this,ur(this),vs(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ji(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new z,keySeq:null,specialChars:null},e.autofocus&&!m&&c.input.focus(),s&&a<11&&setTimeout(function(){return i.display.input.reset(!0)},20),function(t){var e=t.display;te(e.scroller,"mousedown",Yi(t,hs)),te(e.scroller,"dblclick",s&&a<11?Yi(t,function(e){if(!re(t,e)){var n=si(t,e);if(n&&!ps(t,e)&&!wn(t.display,e)){le(e);var i=t.findWordAt(n);Br(t.doc,i.anchor,i.head)}}}):function(e){return re(t,e)||le(e)}),k||te(e.scroller,"contextmenu",function(e){return gs(t,e)});var n,i={end:0};function r(){e.activeTouch&&(n=setTimeout(function(){return e.activeTouch=null},1e3),(i=e.activeTouch).end=+new Date)}function o(t,e){if(null==e.left)return!0;var n=e.left-t.left,i=e.top-t.top;return n*n+i*i>400}te(e.scroller,"touchstart",function(r){if(!re(t,r)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(r)&&!ps(t,r)){e.input.ensurePolled(),clearTimeout(n);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-i.end<=300?i:null},1==r.touches.length&&(e.activeTouch.left=r.touches[0].pageX,e.activeTouch.top=r.touches[0].pageY)}}),te(e.scroller,"touchmove",function(){e.activeTouch&&(e.activeTouch.moved=!0)}),te(e.scroller,"touchend",function(n){var i=e.activeTouch;if(i&&!wn(e,n)&&null!=i.left&&!i.moved&&new Date-i.start<300){var s,a=t.coordsChar(e.activeTouch,"page");s=!i.prev||o(i,i.prev)?new yr(a,a):!i.prev.prev||o(i,i.prev.prev)?t.findWordAt(a):new yr(gt(a.line,0),Ct(t.doc,gt(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),le(n)}r()}),te(e.scroller,"touchcancel",r),te(e.scroller,"scroll",function(){e.scroller.clientHeight&&(Oi(t,e.scroller.scrollTop),_i(t,e.scroller.scrollLeft,!0),ie(t,"scroll",t))}),te(e.scroller,"mousewheel",function(e){return vr(t,e)}),te(e.scroller,"DOMMouseScroll",function(e){return vr(t,e)}),te(e.wrapper,"scroll",function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0}),e.dragFunctions={enter:function(e){re(t,e)||he(e)},over:function(e){re(t,e)||(function(t,e){var n=si(t,e);if(n){var i=document.createDocumentFragment();ui(t,n,i),t.display.dragCursor||(t.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),A(t.display.dragCursor,i)}}(t,e),he(e))},start:function(e){return function(t,e){if(s&&(!t.state.draggingText||+new Date-Mo<100))he(e);else if(!re(t,e)&&!wn(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!d)){var n=O("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),h&&n.parentNode.removeChild(n)}}(t,e)},drop:Yi(t,Ao),leave:function(e){re(t,e)||Oo(t)}};var l=e.input.getField();te(l,"keyup",function(e){return ss.call(t,e)}),te(l,"keydown",Yi(t,os)),te(l,"keypress",Yi(t,as)),te(l,"focus",function(e){return vi(t,e)}),te(l,"blur",function(e){return mi(t,e)})}(this),Lo(),Vi(this),this.curOp.forceUpdate=!0,Pr(this,r),e.autofocus&&!m||this.hasFocus()?setTimeout(F(vi,this),20):mi(this),bs)bs.hasOwnProperty(u)&&bs[u](i,e[u],ms);Ci(this),e.finishInit&&e.finishInit(this);for(var f=0;f150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?j(at(o,e-1).text,null,s):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var h="",d=0;if(t.options.indentWithTabs)for(var f=Math.floor(c/s);f;--f)d+=s,h+="\t";if(d1)if(Es&&Es.text.join("\n")==e){if(i.ranges.length%Es.text.length==0){c=[];for(var u=0;u=0;h--){var d=i.ranges[h],f=d.from(),p=d.to();d.empty()&&(n&&n>0?f=gt(f.line,f.ch-n):t.state.overwrite&&!a?p=gt(p.line,Math.min(at(o,p.line).text.length,p.ch+G(l).length)):Es&&Es.lineWise&&Es.text.join("\n")==e&&(f=p=gt(f.line,0))),s=t.curOp.updateInput;var g={from:f,to:p,text:c?c[h%c.length]:l,origin:r||(a?"paste":t.state.cutIncoming?"cut":"+input")};ro(t.doc,g),an(t,"inputRead",t,g)}e&&!a&&Ps(t,e),Ti(t),t.curOp.updateInput=s,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Os(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Ki(e,function(){return As(e,n,0,null,"paste")}),!0}function Ps(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,i=n.ranges.length-1;i>=0;i--){var r=n.ranges[i];if(!(r.head.ch>100||i&&n.ranges[i-1].head.line==r.head.line)){var o=t.getModeAt(r.head),s=!1;if(o.electricChars){for(var a=0;a-1){s=Ts(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(at(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Ts(t,r.head.line,"smart"));s&&an(t,"electricInput",t,r.head.line)}}}function _s(t){for(var e=[],n=[],i=0;i=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Xt(r,n.ch,n.sticky),s=r[o];if("ltr"==t.doc.direction&&s.level%2==0&&(i>0?s.to>n.ch:s.from=s.from&&d>=u.begin)){var f=h?"before":"after";return new gt(n.line,d,f)}}var p=function(t,e,i){for(var o=function(t,e){return e?new gt(n.line,l(t,1),"before"):new gt(n.line,t,"after")};t>=0&&t0==(1!=s.level),c=a?i.begin:l(i.end,-1);if(s.from<=c&&c0?u.end:l(u.begin,-1);return null==v||i>0&&v==e.text.length||!(g=p(i>0?0:r.length-1,i,c(v)))?null:g}(t.cm,a,e,n):Yo(a,e,n))){if(i||!function(){var i=e.line+n;return!(i=t.first+t.size)&&(e=new gt(i,e.ch,e.sticky),a=at(t,i))}())return!1;e=Go(r,t.cm,a,e.line,n)}else e=o;return!0}if("char"==i)l();else if("column"==i)l(!0);else if("word"==i||"group"==i)for(var c=null,u="group"==i,h=t.cm&&t.cm.getHelper(e,"wordChars"),d=!0;!(n<0)||l(!d);d=!1){var f=a.text.charAt(e.ch)||"\n",p=et(f,h)?"w":u&&"\n"==f?"n":!u||/\s/.test(f)?null:"p";if(!u||d||p||(p="s"),c&&c!=p){n<0&&(n=1,l(),e.sticky="after");break}if(p&&(c=p),n>0&&!l(!d))break}var g=to(t,e,o,s,!0);return mt(o,g)&&(g.hitSide=!0),g}function Is(t,e,n,i){var r,o,s=t.doc,a=e.left;if("page"==i){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*ti(t.display),3);r=(n>0?e.bottom:e.top)+n*c}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(;(o=Gn(t,a,r)).outside;){if(n<0?r<=0:r>=s.height){o.hitSide=!0;break}r+=5*n}return o}var Fs=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Rs(t,e){var n=Pn(t,e.line);if(!n||n.hidden)return null;var i=at(t.doc,e.line),r=An(n,i,e.line),o=Zt(i,t.doc.direction),s="left";if(o){var a=Xt(o,e.ch);s=a%2?"right":"left"}var l=In(r.map,e.ch,s);return l.offset="right"==l.collapse?l.end:l.start,l}function js(t,e){return e&&(t.bad=!0),t}function zs(t,e,n){var i;if(e==t.display.lineDiv){if(!(i=t.display.lineDiv.childNodes[n]))return js(t.clipPos(gt(t.display.viewTo-1)),!0);e=null,n=0}else for(i=e;;i=i.parentNode){if(!i||i==t.display.lineDiv)return null;if(i.parentNode&&i.parentNode==t.display.lineDiv)break}for(var r=0;r=e.display.viewTo||o.line=e.display.viewFrom&&Rs(e,r)||{node:l[0].measure.map[2],offset:0},u=o.linei.firstLine()&&(s=gt(s.line-1,at(i.doc,s.line-1).length)),a.ch==at(i.doc,a.line).text.length&&a.liner.viewTo-1)return!1;s.line==r.viewFrom||0==(t=ai(i,s.line))?(e=ht(r.view[0].line),n=r.view[0].node):(e=ht(r.view[t].line),n=r.view[t-1].node.nextSibling);var l,c,u=ai(i,a.line);if(u==r.view.length-1?(l=r.viewTo-1,c=r.lineDiv.lastChild):(l=ht(r.view[u+1].line)-1,c=r.view[u+1].node.previousSibling),!n)return!1;for(var h=i.doc.splitLines(function(t,e,n,i,r){var o="",s=!1,a=t.doc.lineSeparator(),l=!1;function c(){s&&(o+=a,l&&(o+=a),s=l=!1)}function u(t){t&&(c(),o+=t)}function h(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void u(n);var o,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(gt(i,0),gt(r+1,0),function(t){return function(e){return e.id==t}}(+d));return void(f.length&&(o=f[0].find(0))&&u(lt(t.doc,o.from,o.to).join(a)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;p&&c();for(var g=0;g1&&d.length>1;)if(G(h)==G(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),e++}for(var f=0,p=0,g=h[0],v=d[0],m=Math.min(g.length,v.length);fs.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)f--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var w=gt(e,f),C=gt(l,d.length?G(d).length-p:0);return h.length>1||h[0]||vt(w,C)?(co(i.doc,h,w,C,"+input"),!0):void 0},Fs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Fs.prototype.reset=function(){this.forceCompositionEnd()},Fs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Fs.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()},80))},Fs.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Ki(this.cm,function(){return Ji(t.cm)})},Fs.prototype.setUneditable=function(t){t.contentEditable="false"},Fs.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Yi(this.cm,As)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Fs.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Fs.prototype.onContextMenu=function(){},Fs.prototype.resetPosition=function(){},Fs.prototype.needsContentAttribute=!0;var Hs=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new z,this.hasSelection=!1,this.composing=null};Hs.prototype.init=function(t){var e=this,n=this,i=this.cm;this.createField(t);var r=this.textarea;function o(t){if(!re(i,t)){if(i.somethingSelected())Ms({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var e=_s(i);Ms({lineWise:!0,text:e.text}),"cut"==t.type?i.setSelections(e.ranges,null,B):(n.prevInput="",r.value=e.text.join("\n"),I(r))}"cut"==t.type&&(i.state.cutIncoming=!0)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),g&&(r.style.width="0px"),te(r,"input",function(){s&&a>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()}),te(r,"paste",function(t){re(i,t)||Os(t,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),te(r,"cut",o),te(r,"copy",o),te(t.scroller,"paste",function(e){wn(t,e)||re(i,e)||(i.state.pasteIncoming=!0,n.focus())}),te(t.lineSpace,"selectstart",function(e){wn(t,e)||le(e)}),te(r,"compositionstart",function(){var t=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:i.markText(t,i.getCursor("to"),{className:"CodeMirror-composing"})}}),te(r,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Hs.prototype.createField=function(t){this.wrapper=Ns(),this.textarea=this.wrapper.firstChild},Hs.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=ci(t);if(t.options.moveInputWithCursor){var r=qn(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),s=e.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+s.top-o.top)),i.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+s.left-o.left))}return i},Hs.prototype.showSelection=function(t){var e=this.cm,n=e.display;A(n.cursorDiv,t.cursors),A(n.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Hs.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&I(this.textarea),s&&a>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",s&&a>=9&&(this.hasSelection=null))}},Hs.prototype.getField=function(){return this.textarea},Hs.prototype.supportsTouch=function(){return!1},Hs.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||L()!=this.textarea))try{this.textarea.focus()}catch(t){}},Hs.prototype.blur=function(){this.textarea.blur()},Hs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Hs.prototype.receivedFocus=function(){this.slowPoll()},Hs.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Hs.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,function n(){var i=e.poll();i||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))})},Hs.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||xe(n)&&!i&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=n.value;if(r==i&&!e.somethingSelected())return!1;if(s&&a>=9&&this.hasSelection===r||y&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=r.charCodeAt(0);if(8203!=o||i||(i="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(i.length,r.length);l1e3||r.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Hs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Hs.prototype.onKeyPress=function(){s&&a>=9&&(this.hasSelection=null),this.fastPoll()},Hs.prototype.onContextMenu=function(t){var e=this,n=e.cm,i=n.display,r=e.textarea,o=si(n,t),c=i.scroller.scrollTop;if(o&&!h){var u=n.options.resetSelectionOnContextMenu;u&&-1==n.doc.sel.contains(o)&&Yi(n,Yr)(n.doc,xr(o),B);var d=r.style.cssText,f=e.wrapper.style.cssText;e.wrapper.style.cssText="position: absolute";var p,g=e.wrapper.getBoundingClientRect();if(r.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-g.top-5)+"px; left: "+(t.clientX-g.left-5)+"px;\n z-index: 1000; background: "+(s?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(p=window.scrollY),i.input.focus(),l&&window.scrollTo(null,p),i.input.reset(),n.somethingSelected()||(r.value=e.prevInput=" "),e.contextMenuPending=!0,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),s&&a>=9&&m(),k){he(t);var v=function(){ne(window,"mouseup",v),setTimeout(y,20)};te(window,"mouseup",v)}else setTimeout(y,50)}function m(){if(null!=r.selectionStart){var t=n.somethingSelected(),o="​"+(t?r.value:"");r.value="⇚",r.value=o,e.prevInput=t?"":"​",r.selectionStart=1,r.selectionEnd=o.length,i.selForContextMenu=n.doc.sel}}function y(){if(e.contextMenuPending=!1,e.wrapper.style.cssText=f,r.style.cssText=d,s&&a<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=c),null!=r.selectionStart){(!s||s&&a<9)&&m();var t=0,o=function(){i.selForContextMenu==n.doc.sel&&0==r.selectionStart&&r.selectionEnd>0&&"​"==e.prevInput?Yi(n,no)(n):t++<10?i.detectingSelectAll=setTimeout(o,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(o,200)}}},Hs.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},Hs.prototype.setUneditable=function(){},Hs.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function n(n,i,r,o){t.defaults[n]=i,r&&(e[n]=o?function(t,e,n){n!=ms&&r(t,e,n)}:r)}t.defineOption=n,t.Init=ms,n("value","",function(t,e){return t.setValue(e)},!0),n("mode",null,function(t,e){t.doc.modeOption=e,Tr(t)},!0),n("indentUnit",2,Tr,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(t){Er(t),zn(t),Ji(t)},!0),n("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var n=[],i=t.doc.first;t.doc.iter(function(t){for(var r=0;;){var o=t.text.indexOf(e,r);if(-1==o)break;r=o+e.length,n.push(gt(i,o))}i++});for(var r=n.length-1;r>=0;r--)co(t.doc,e,n[r],gt(n[r].line,n[r].ch+e.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=ms&&t.refresh()}),n("specialCharPlaceholder",Je,function(t){return t.refresh()},!0),n("electricChars",!0),n("inputStyle",m?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",function(t){vs(t),xs(t)},!0),n("keyMap","default",function(t,e,n){var i=Uo(e),r=n!=ms&&Uo(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Cs,!0),n("gutters",[],function(t){hr(t.options),xs(t)},!0),n("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?ii(t.display)+"px":"0",t.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(t){return Ii(t)},!0),n("scrollbarStyle","native",function(t){ji(t),Ii(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),n("lineNumbers",!1,function(t){hr(t.options),xs(t)},!0),n("firstLineNumber",1,xs,!0),n("lineNumberFormatter",function(t){return t},xs,!0),n("showCursorWhenSelecting",!1,li,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("readOnly",!1,function(t,e){"nocursor"==e&&(mi(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),n("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),n("dragDrop",!0,ws),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,li,!0),n("singleCursorHeightPerLine",!0,li,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Er,!0),n("addModeClass",!1,Er,!0),n("pollInterval",100),n("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),n("historyEventDelay",1250),n("viewportMargin",10,function(t){return t.refresh()},!0),n("maxHighlightLength",1e4,Er,!0),n("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),n("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),n("autofocus",null),n("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0)}(ks),function(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var i=this.options,r=i[t];i[t]==n&&"mode"!=t||(i[t]=n,e.hasOwnProperty(t)&&Yi(this,e[t])(this,n,r),ie(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Uo(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;nn&&(Ts(this,r.head.line,t,!0),n=r.head.line,i==this.doc.sel.primIndex&&Ti(this));else{var o=r.from(),s=r.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;l0&&Ur(this.doc,i,new yr(o,c[i].to()),B)}}}),getTokenAt:function(t,e){return $e(this,t,e)},getLineTokens:function(t,e){return $e(this,gt(t),e,!0)},getTokenTypeAt:function(t){t=Ct(this.doc,t);var e,n=Fe(this,at(this.doc,t.line)),i=0,r=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var s=i+r>>1;if((s?n[2*s-1]:0)>=o)r=s;else{if(!(n[2*s+1]o&&(t=o,r=!0),i=at(this.doc,t)}else i=t;return Bn(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-qt(i):0)},defaultTextHeight:function(){return ti(this.display)},defaultCharWidth:function(){return ei(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display,s=(t=qn(this,Ct(this.doc,t))).bottom,a=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),o.sizer.appendChild(e),"over"==i)s=t.top;else if("above"==i||"near"==i){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==i||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?s=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(s=t.bottom),a+e.offsetWidth>c&&(a=c-e.offsetWidth)}e.style.top=s+"px",e.style.left=e.style.right="","right"==r?(a=o.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?a=0:"middle"==r&&(a=(o.sizer.clientWidth-e.offsetWidth)/2),e.style.left=a+"px"),n&&function(t,e){var n=ki(t,e);null!=n.scrollTop&&Oi(t,n.scrollTop),null!=n.scrollLeft&&_i(t,n.scrollLeft)}(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:Gi(os),triggerOnKeyPress:Gi(as),triggerOnKeyUp:ss,triggerOnMouseDown:Gi(hs),execCommand:function(t){if(Xo.hasOwnProperty(t))return Xo[t].call(null,this)},triggerElectric:Gi(function(t){Ps(this,t)}),findPosH:function(t,e,n,i){var r=1;e<0&&(r=-1,e=-e);for(var o=Ct(this.doc,t),s=0;s0&&a(n.charAt(i-1));)--i;for(;r.5)&&oi(this),ie(this,"refresh",this)}),swapDoc:Gi(function(t){var e=this.doc;return e.cm=null,Pr(this,t),zn(this),this.display.input.reset(),Ei(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,an(this,"swapDoc",this,e),e}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ae(t),t.registerHelper=function(e,i,r){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][i]=r},t.registerGlobalHelper=function(e,i,r,o){t.registerHelper(e,i,o),n[e]._global.push({pred:r,val:o})}}(ks);var $s="iter insert remove copy getEditor constructor".split(" ");for(var Bs in Eo.prototype)Eo.prototype.hasOwnProperty(Bs)&&V($s,Bs)<0&&(ks.prototype[Bs]=function(t){return function(){return t.apply(this.doc,arguments)}}(Eo.prototype[Bs]));return ae(Eo),ks.inputStyles={textarea:Hs,contenteditable:Fs},ks.defineMode=function(t){ks.defaults.mode||"null"==t||(ks.defaults.mode=t),function(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),ke[t]=e}.apply(this,arguments)},ks.defineMIME=function(t,e){Se[t]=e},ks.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),ks.defineMIME("text/plain","null"),ks.defineExtension=function(t,e){ks.prototype[t]=e},ks.defineDocExtension=function(t,e){Eo.prototype[t]=e},ks.fromTextArea=function(t,e){if((e=e?R(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=L();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function i(){t.value=a.getValue()}var r;if(t.form&&(te(t.form,"submit",i),!e.leaveSubmitMethodAlone)){var o=t.form;r=o.submit;try{var s=o.submit=function(){i(),o.submit=r,o.submit(),o.submit=s}}catch(t){}}e.finishInit=function(e){e.save=i,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,i(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(ne(t.form,"submit",i),"function"==typeof t.form.submit&&(t.form.submit=r))}},t.style.display="none";var a=ks(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return a},function(t){t.off=ne,t.on=te,t.wheelEventPixels=gr,t.Doc=Eo,t.splitLines=be,t.countColumn=j,t.findColumn=q,t.isWordChar=tt,t.Pass=$,t.signal=ie,t.Line=Ue,t.changeEnd=wr,t.scrollbarModel=Ri,t.Pos=gt,t.cmpPos=vt,t.modes=ke,t.mimeModes=Se,t.resolveMode=Te,t.getMode=Ee,t.modeExtensions=Me,t.extendMode=Ae,t.copyState=Oe,t.startState=_e,t.innerMode=Pe,t.commands=Xo,t.keyMap=jo,t.keyName=Wo,t.isModifierKey=$o,t.lookupKey=Ho,t.normalizeKeyMap=Vo,t.StringStream=Le,t.SharedTextMarker=Co,t.TextMarker=xo,t.LineWidget=mo,t.e_preventDefault=le,t.e_stopPropagation=ce,t.e_stop=he,t.addClass=N,t.contains=_,t.rmClass=E,t.keyNames=Do}(ks),ks.version="5.39.0",ks}()},function(t,e,n){"use strict";var i=o(n(1)),r=o(n(0));function o(t){return t&&t.__esModule?t:{default:t}}var s=n(13),a=r.default.$;t.exports=i.default.extend({},s,{init:function(t){i.default.bindAll(this,"startDraw","draw","endDraw","rollback"),this.config=t||{},this.hType=this.config.newFixedH?"height":"min-height",this.allowDraw=1},enable:function(){for(var t=arguments.length,e=Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(t){var n=e.ctrlKey||e.metaKey,i=e.shiftKey,r=this.editor,s=r.getConfig("multipleSelection"),a=this.em;if(n&&s)r.selectToggle(t);else if(i&&s){a.clearSelection(r.Canvas.getWindow());var l=t.collection,c=l.indexOf(t),u=(r.getSelectedAll(),void 0),h=void 0;if(r.getSelectedAll().forEach(function(t){var e=t.collection,n=e.indexOf(t);e===l&&(nc&&(h=(0,o.isUndefined)(h)?n:Math.min(h,n)))}),!(0,o.isUndefined)(u))for(;u!==c;)r.selectAdd(l.at(u)),u++;if(!(0,o.isUndefined)(h))for(;h!==c;)r.selectAdd(l.at(h)),h--;r.selectAdd(t)}else r.select(t);this.initResize(t)}},updateBadge:function(t,e){var n=c(t),i=this.canvas,r=i.getConfig().customBadgeLabel;this.cacheEl=t;var o=n.data("model");if(o&&o.get("badgable")){var s=this.getBadge(),a=o.getIcon()+o.getName();a=r?r(o):a,s.innerHTML=a;var l=s.style;l.display="block";var u=i.getCanvasView().getPosition();if(u){var h=s?s.offsetHeight:0,d=s?s.offsetWidth:0,f=e.top-h1&&void 0!==arguments[1]?arguments[1]:{},i=n.el,r=n.config,o=n.resizer,a=r.keyHeight,l=r.keyWidth,h=r.currentUnit;g("add",0,n),p=e.get("StyleManager").getModelToStyle(c);var d=getComputedStyle(i),f=p.getStyle(),v=f[l]||d[l],m=f[a]||d[a];o.startDim.w=parseFloat(v),o.startDim.h=parseFloat(m),u=0,h&&(r.unitHeight=(0,s.getUnitFromValue)(m),r.unitWidth=(0,s.getUnitFromValue)(v))},onMove:function(){n.trigger("change:canvasOffset")},onEnd:function(t,e){g("remove",0,e),n.trigger("change:canvasOffset"),u=1},updateTarget:function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(p){var r=i.store,o=i.selectedHandler,s=i.config,a=s.keyHeight,l=s.keyWidth,c=["tc","bc"].indexOf(o)>=0,u=["cl","cr"].indexOf(o)>=0,h=p.getStyle();c||(h[l]=n.w+s.unitWidth),u||(h[a]=n.h+s.unitHeight),p.setStyle(h,{avoidStore:1});e&&e.trigger("update:component:style:"+a+" update:component:style:"+l),r&&p.trigger("change:style",p,h,{})}}},"object"==(void 0===h?"undefined":r(h))&&(f=i({},f,h)),n.runCommand("resize",{el:d,options:f})):n.stopCommand("resize")},updateToolbar:function(t){var e=this,n=this.config.em,i=t==n?n.getSelected():t,r=this.canvas.getToolbarEl(),o=r.style;if(i){var s=i.get("toolbar");this.ppfx;if(n.get("Config").showToolbar&&s&&s.length){if(o.opacity="",o.display="",!this.toolbar){r.innerHTML="",this.toolbar=new l(s);var c=new a({collection:this.toolbar,editor:this.editor});r.appendChild(c.render().el)}this.toolbar.reset(s);var u=i.view;o.top="-100px",o.left=0,setTimeout(function(){return u&&e.updateToolbarPos(u.el)},0)}else o.display="none"}else o.opacity=0},updateToolbarPos:function(t,e){var n=this.canvas.getToolbarEl(),i=n.style;i.opacity=0;var r=this.canvas.getTargetToElementDim(n,t,{elPos:e,event:"toolbarPosUpdate"});if(r){var o=r.left+r.elementWidth-r.targetWidth;i.top=r.top+"px",i.left=(o<0?0:o)+"px",i.opacity=""}},getCanvasPosition:function(){return this.canvas.getCanvasView().getPosition()},clean:function(){this.selEl&&this.selEl.removeClass(this.hoverClass)},getBadge:function(){return this.canvas.getBadgeEl()},onFrameScroll:function(t){var e=this.cacheEl;if(e){var n=this.getElementPos(e);this.updateBadge(e,n);var i=this.em.getSelected();i&&this.updateToolbarPos(i.view.el)}},updateAttached:function(t){var e=this.em.getSelected();if(e){var n=e.view;this.updateToolbarPos(n.el),this.showFixedElementOffset(n.el)}},getElementPos:function(t,e){return this.canvas.getCanvasView().getElementPos(t)},hideBadge:function(){this.getBadge().style.display="none"},cleanPrevious:function(t){t&&t.set({status:"",state:""})},getContentWindow:function(){return this.frameEl.contentWindow},run:function(t){this.editor=t&&t.get("Editor"),this.enable(),this.onSelect()},stop:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.em;this.stopSelectComponent(),!n.preserveSelected&&i.setSelected(null),this.clean(),this.hideBadge(),this.hideFixedElementOffset(),this.canvas.getToolbarEl().style.display="none",i.off("component:update",this.updateAttached,this),i.off("change:canvasOffset",this.updateAttached,this)}}},function(t,e,n){"use strict";var i=n(1),r=n(0),o=r.$;t.exports=r.View.extend({events:{change:"onChange"},attributes:function(){return this.model.get("attributes")},initialize:function(t){var e=this.model,n=(e.get("name"),e.target);this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=n,this.className=this.pfx+"trait",this.labelClass=this.ppfx+"label",this.fieldClass=this.ppfx+"field "+this.ppfx+"field-"+e.get("type"),this.inputhClass=this.ppfx+"input-holder",e.off("change:value",this.onValueChange),this.listenTo(e,"change:value",this.onValueChange),e.view=this,this.tmpl='
'},onChange:function(){this.model.set("value",this.getInputEl().value)},getValueForTarget:function(){return this.model.get("value")},setInputValue:function(t){this.getInputEl().value=t},onValueChange:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.model;this.target,i.get("name");if(n.fromTarget)this.setInputValue(i.get("value"));else{var r=this.getValueForTarget();i.setTargetValue(r,n)}},renderLabel:function(){var t=this.getLabel();this.$el.html('
'+t+"
")},getLabel:function(){var t=this.model,e=t.get("label")||t.get("name");return e.charAt(0).toUpperCase()+e.slice(1).replace(/-/g," ")},getInputEl:function(){if(!this.$input){var t=this.model,e=t.get("placeholder")||t.get("default")||"",n=t.get("type")||"text",i=t.get("min"),r=t.get("max"),s=this.getModelValue(),a=o('');s&&(t.set({value:s},{silent:!0}),a.prop("value",s)),i&&a.prop("min",i),r&&a.prop("max",r),this.$input=a}return this.$input.get(0)},getModelValue:function(){var t=void 0,e=this.model,n=this.target,r=e.get("name");if(e.get("changeProp"))t=n.get(r);else{var o=n.get("attributes");t=e.get("value")||o[r]}return(0,i.isUndefined)(t)?"":t},renderField:function(){if(!this.$input){this.$el.append(this.tmpl);var t=this.getInputEl(),e=this.el.querySelector("."+this.inputhClass);e.insertBefore(t,e.childNodes[0])}},render:function(){return this.renderLabel(),this.renderField(),this.el.className=this.className,this}})},function(t,e,n){"use strict";var i=n(0).Model.extend({idAttribute:"name",defaults:{name:"",label:"",type:1,active:!0,private:!1,protected:!1},initialize:function(){var t=this.get("name"),e=this.get("label");t?e||this.set("label",t):this.set("name",e),this.set("name",i.escapeName(this.get("name")))},getFullName:function(){var t="";switch(this.get("type")){case 1:t=".";break;case 2:t="#"}return t+this.get("name")}},{TYPE_CLASS:1,TYPE_ID:2,escapeName:function(t){return(""+t).trim().replace(/([^a-z0-9\w-]+)/gi,"-")}});t.exports=i},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var i=r(n(1));r(n(0));function r(t){return t&&t.__esModule?t:{default:t}}var o=n(7);t.exports=i.default.extend({},o,{init:function(){for(var t=arguments.length,e=Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return this.set({value:void 0},t),this},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.parseValue(t);this.set(r,i({},n,{avoidStore:1})),e&&(this.set("value","",n),this.set(r,n))},setValueFromInput:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.setValue(t,e,i({},n,{fromInput:1}))},parseValue:function(t){var e={value:t},n="!important";if((0,r.isString)(t)&&-1!==t.indexOf(n)&&(e.value=t.replace(n,"").trim(),e.important=1),!this.get("functionName"))return e;var i=[],o=""+e.value,s=o.indexOf("(")+1,a=o.lastIndexOf(")");return i.push(s),a>=0&&i.push(a),e.value=String.prototype.substring.apply(o,i),e},getDefaultValue:function(){return this.get("defaults")},getFullValue:function(t){var e=this.get("functionName"),n=(0,r.isUndefined)(t)?this.get("value"):t;return e&&!(0,r.isUndefined)(n)&&(n=e+"("+n+")"),this.get("important")&&(n+=" !important"),n||""}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e/,f=/^\w+$/;function p(t,n){n=n||e;var i=h.test(t)?n.getElementsByClassName(t.slice(1)):f.test(t)?n.getElementsByTagName(t):n.querySelectorAll(t);return i}function g(n){if(!t){var i=(t=e.implementation.createHTMLDocument(null)).createElement("base");i.href=e.location.href,t.head.appendChild(i)}return t.body.innerHTML=n,t.body.childNodes}function v(t){"loading"!==e.readyState?setTimeout(t):e.addEventListener("DOMContentLoaded",t)}function m(t,i){if(!t)return this;if(t.cash&&t!==n)return t;var r,o=t,s=0;if(c(t))o=u.test(t)?e.getElementById(t.slice(1)):d.test(t)?g(t):p(t,i);else if(l(t))return v(t),this;if(!o)return this;if(o.nodeType||o===n)this[0]=o,this.length=1;else for(r=this.length=o.length;s=0&&o.splice(i,1)):(x(o,function(n){t.removeEventListener(e,n)}),o=[]))}function R(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(/%20/g,"+")}function j(t){var e=t.type;if(!e)return null;switch(e.toLowerCase()){case"select-one":return function(t){var e=t.selectedIndex;return e>=0?t.options[e].value:null}(t);case"select-multiple":return function(t){var e=[];return x(t.options,function(t){t.selected&&e.push(t.value)}),e.length?e:null}(t);case"radio":case"checkbox":return t.checked?t.value:null;default:return t.value?t.value:null}}function z(t,e,n){var i=c(e);i||!e.length?x(t,i?function(t){return t.insertAdjacentHTML(n?"afterbegin":"beforeend",e)}:function(t,i){return function(t,e,n){if(n){var i=t.childNodes[0];t.insertBefore(e,i)}else t.appendChild(e)}(t,0===i?e:e.cloneNode(!0),n)}):x(e,function(e){return z(t,e,n)})}y.prefixedProp=D,y.camelCase=N,b.extend({css:function(t,e){if(c(t))return t=D(t),arguments.length>1?this.each(function(n){return n.style[t]=e}):n.getComputedStyle(this[0])[t];for(var i in t)this.css(i,t[i]);return this}}),x(["Width","Height"],function(t){var e=t.toLowerCase();b[e]=function(){return this[0].getBoundingClientRect()[e]},b["inner"+t]=function(){return this[0]["client"+t]},b["outer"+t]=function(e){return this[0]["offset"+t]+(e?I(this,"margin"+("Width"===t?"Left":"Top"))+I(this,"margin"+("Width"===t?"Right":"Bottom")):0)}}),b.extend({off:function(t,e){return this.each(function(n){return F(n,t,e)})},on:function(t,e,n,i){var r;if(!c(t)){for(var o in t)this.on(o,e,t[o]);return this}return l(e)&&(n=e,e=null),"ready"===t?(v(n),this):(e&&(r=n,n=function(t){for(var n=t.target;!w(n,e);){if(n===this)return n=!1;n=n.parentNode}n&&r.call(n,t)}),this.each(function(e){var r=n;i&&(r=function(){n.apply(this,arguments),F(e,t,r)}),function(t,e,n){var i=M(t,"_cashEvents")||E(t,"_cashEvents",{});i[e]=i[e]||[],i[e].push(n),t.addEventListener(e,n)}(e,t,r)}))},one:function(t,e,n){return this.on(t,e,n,!0)},ready:v,trigger:function(t,n){var i=e.createEvent("HTMLEvents");return i.data=n,i.initEvent(t,!0,!1),this.each(function(t){return t.dispatchEvent(i)})}}),b.extend({serialize:function(){var t="";return x(this[0].elements||this,function(e){if(!e.disabled&&"FIELDSET"!==e.tagName){var n=e.name;switch(e.type.toLowerCase()){case"file":case"reset":case"submit":case"button":break;case"select-multiple":var i=j(e);null!==i&&x(i,function(e){t+=R(n,e)});break;default:var r=j(e);null!==r&&(t+=R(n,r))}}}),t.substr(1)},val:function(t){return void 0===t?j(this[0]):this.each(function(e){return e.value=t})}}),b.extend({after:function(t){return y(t).insertAfter(this),this},append:function(t){return z(this,t),this},appendTo:function(t){return z(y(t),this),this},before:function(t){return y(t).insertBefore(this),this},clone:function(){return y(this.map(function(t){return t.cloneNode(!0)}))},empty:function(){return this.html(""),this},html:function(t){if(void 0===t)return this[0].innerHTML;var e=t.nodeType?t[0].outerHTML:t;return this.each(function(t){return t.innerHTML=e})},insertAfter:function(t){var e=this;return y(t).each(function(t,n){var i=t.parentNode,r=t.nextSibling;e.each(function(t){i.insertBefore(0===n?t:t.cloneNode(!0),r)})}),this},insertBefore:function(t){var e=this;return y(t).each(function(t,n){var i=t.parentNode;e.each(function(e){i.insertBefore(0===n?e:e.cloneNode(!0),t)})}),this},prepend:function(t){return z(this,t,!0),this},prependTo:function(t){return z(y(t),this,!0),this},remove:function(){return this.each(function(t){return t.parentNode.removeChild(t)})},text:function(t){return void 0===t?this[0].textContent:this.each(function(e){return e.textContent=t})}});var V=e.documentElement;return b.extend({position:function(){var t=this[0];return{left:t.offsetLeft,top:t.offsetTop}},offset:function(){var t=this[0].getBoundingClientRect();return{top:t.top+n.pageYOffset-V.clientTop,left:t.left+n.pageXOffset-V.clientLeft}},offsetParent:function(){return y(this[0].offsetParent)}}),b.extend({children:function(t){var e=[];return this.each(function(t){s.apply(e,t.children)}),e=k(e),t?e.filter(function(e){return w(e,t)}):e},closest:function(t){return!t||this.length<1?y():this.is(t)?this.filter(t):this.parent().closest(t)},is:function(t){if(!t)return!1;var e=!1,n=C(t);return this.each(function(i){return!(e=n(i,t))}),e},find:function(t){if(!t||t.nodeType)return y(t&&this.has(t).length?t:null);var e=[];return this.each(function(n){s.apply(e,p(t,n))}),k(e)},has:function(t){var e=c(t)?function(e){return 0!==p(t,e).length}:function(e){return e.contains(t)};return this.filter(e)},next:function(){return y(this[0].nextElementSibling)},not:function(t){if(!t)return this;var e=C(t);return this.filter(function(n){return!e(n,t)})},parent:function(){var t=[];return this.each(function(e){e&&e.parentNode&&t.push(e.parentNode)}),k(t)},parents:function(t){var n,i=[];return this.each(function(r){for(n=r;n&&n.parentNode&&n!==e.body.parentNode;)n=n.parentNode,(!t||t&&w(n,t))&&i.push(n)}),k(i)},prev:function(){return y(this[0].previousElementSibling)},siblings:function(){var t=this.parent().children(),e=this[0];return t.filter(function(t){return t!==e})}}),y})?i.call(e,n,e,t):i)||(t.exports=r)},function(t,e,n){"use strict";t.exports={run:function(t,e,n){var i=n&&n.el||"",r=t.Canvas,o=this.dragger,s=n.options||{},a=r.getCanvasView();return s.prefix=t.getConfig().stylePrefix,s.mousePosFetcher=r.getMouseRelativePos,s.posFetcher=a.getElementPos.bind(a),o||(o=t.Utils.Dragger.init(s),this.dragger=o),o.setOptions(s),o.focus(i),s.event&&o.start(s.event),o},stop:function(){this.canvasResizer&&this.canvasResizer.blur()}}},function(t,e,n){"use strict";t.exports={run:function(t,e,n){var i=n||{},r=i.el||"",o=t.Canvas,s=this.canvasResizer,a=i.options||{},l=o.getCanvasView();return a.ratioDefault=1,a.appendTo=o.getResizerEl(),a.prefix=t.getConfig().stylePrefix,a.posFetcher=l.getElementPos.bind(l),a.mousePosFetcher=o.getMouseRelativePos,s&&!i.forceNew||(this.canvasResizer=t.Utils.Resizer.init(a),s=this.canvasResizer),s.setOptions(a),s.blur(),s.focus(r),s},stop:function(){var t=this.canvasResizer;t&&t.blur()}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(1));t.exports={getPanels:function(t){return this.panels||(this.panels=t.Panels.getPanelsEl()),this.panels},tglPointers:function(t,e){var n=t.Canvas.getBody().querySelectorAll("."+this.ppfx+"no-pointer");i.default.each(n,function(t){t.style.pointerEvents=e?"":"all"})},run:function(t,e){e&&e.set&&e.set("active",!1),t.stopCommand("sw-visibility"),t.getModel().stopDefault();var n=this.getPanels(t),i=t.Canvas.getElement(),r=t.getEl(),o=t.Config.stylePrefix;this.helper||(this.helper=document.createElement("span"),this.helper.className=o+"off-prv fa fa-eye-slash",r.appendChild(this.helper),this.helper.onclick=function(){t.stopCommand("preview")}),this.helper.style.display="inline-block",this.tglPointers(t),n.style.display="none";var s=i.style;s.width="100%",s.height="100%",s.top="0",s.left="0",s.padding="0",s.margin="0",t.trigger("change:canvasOffset")},stop:function(t,e){var n=this.getPanels(t);t.runCommand("sw-visibility"),t.getModel().runDefault(),n.style.display="block",t.Canvas.getElement().setAttribute("style",""),this.helper&&(this.helper.style.display="none"),t.trigger("change:canvasOffset"),this.tglPointers(t,1)}}},function(t,e,n){"use strict";t.exports={isEnabled:function(){var t=document;return t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement?1:0},enable:function(t){var e="";return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?(e="webkit",t.webkitRequestFullscreen()):t.mozRequestFullScreen?(e="moz",t.mozRequestFullScreen()):t.msRequestFullscreen?t.msRequestFullscreen():console.warn("Fullscreen not supported"),e},disable:function(){var t=document;t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen()},fsChanged:function(t,e){document;var n=(t||"")+"fullscreenchange";this.isEnabled()||(this.stop(null,this.sender),document.removeEventListener(n,this.fsChanged))},run:function(t,e){this.sender=e;var n=this.enable(t.getContainer());this.fsChanged=this.fsChanged.bind(this,n),document.addEventListener(n+"fullscreenchange",this.fsChanged),t&&t.trigger("change:canvasOffset")},stop:function(t,e){e&&e.set&&e.set("active",!1),this.disable(),t&&t.trigger("change:canvasOffset")}}},function(t,e,n){"use strict";t.exports={run:function(t){for(var e=t.getSelected(),n=e&&e.parent();n&&!n.get("selectable");)n=n.parent();n&&t.select(n)}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0)).default.$;t.exports={getOffsetMethod:function(t){return"get"+(t||"")+"OffsetViewerEl"},run:function(t,e,n){var r=n||{},o=r.state||"",s=t.getConfig();if(s.showOffsets&&(s.showOffsetsSelected||"Fixed"!=o)){var a=t.Canvas,l=r.el||"",c=r.elPos||a.getElementPos(l),u=window.getComputedStyle(l),h=this.ppfx,d=o+"State",f=a[this.getOffsetMethod(o)]();f.style.display="block";var p=this["marginT"+o],g=this["marginB"+o],v=this["marginL"+o],m=this["marginR"+o],y=this["padT"+o],b=this["padB"+o],x=this["padL"+o],w=this["padR"+o];if(!this[d]){var C=o.toLowerCase(),k=C+"margin-v",S=C+"padding-v",T=i('
').get(0),E=i('
').get(0),M=h+k+"-el"+" "+(h+k),A=h+S+"-el"+" "+(h+S);p=i('
').get(0),g=i('
').get(0),v=i('
').get(0),m=i('
').get(0),y=i('
').get(0),b=i('
').get(0),x=i('
').get(0),w=i('
').get(0),this["marginT"+o]=p,this["marginB"+o]=g,this["marginL"+o]=v,this["marginR"+o]=m,this["padT"+o]=y,this["padB"+o]=b,this["padL"+o]=x,this["padR"+o]=w,T.appendChild(p),T.appendChild(g),T.appendChild(v),T.appendChild(m),E.appendChild(y),E.appendChild(b),E.appendChild(x),E.appendChild(w),f.appendChild(T),f.appendChild(E),this[d]="1"}var O=u.marginLeft.replace("px",""),P=parseInt(u.marginTop.replace("px","")),_=parseInt(u.marginBottom.replace("px","")),L=p.style,N=g.style,D=v.style,I=m.style,F=y.style,R=b.style,j=x.style,z=w.style,V=parseInt(c.left);L.height=u.marginTop,L.width=u.width,L.top=c.top-u.marginTop.replace("px","")+"px",L.left=V+"px",N.height=u.marginBottom,N.width=u.width,N.top=c.top+c.height+"px",N.left=V+"px";var H=c.height+P+_+"px",$=c.top-P+"px";D.height=H,D.width=u.marginLeft,D.top=$,D.left=V-O+"px",I.height=H,I.width=u.marginRight,I.top=$,I.left=V+c.width+"px";var B=parseInt(u.paddingTop.replace("px",""));F.height=u.paddingTop,F.width=u.width,F.top=c.top+"px",F.left=V+"px";var W=parseInt(u.paddingBottom.replace("px",""));R.height=u.paddingBottom,R.width=u.width,R.top=c.top+c.height-W+"px",R.left=V+"px";var U=c.height-W-B+"px",q=c.top+B+"px";j.height=U,j.width=u.paddingLeft,j.top=q,j.left=c.left+"px";var K=parseInt(u.paddingRight.replace("px",""));z.height=U,z.width=u.paddingRight,z.top=q,z.left=c.left+c.width-K+"px"}},stop:function(t,e,n){var i=(n||{}).state||"",r=this.getOffsetMethod(i);t.Canvas[r]().style.display="none"}}},function(t,e,n){"use strict";t.exports={run:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.Modal,r=t.AssetManager,o=r.getConfig(),s=r.getContainer(),a=n.modalTitle||o.modalTitle||"",l=n.types,c=n.accept;if(r.setTarget(n.target),r.onClick(n.onClick),r.onDblClick(n.onDblClick),r.onSelect(n.onSelect),!this.rendered||l){var u=r.getAll();l&&(u=u.filter(function(t){return-1!==l.indexOf(t.get("type"))})),r.render(u),this.rendered=1}if(c){var h=s.querySelector("input#"+o.stylePrefix+"uploadFile");h&&h.setAttribute("accept",c)}i.setTitle(a),i.setContent(s),i.open()}}},function(t,e,n){"use strict";t.exports={run:function(t,e){var n=t.BlockManager,i=t.Panels;if(!this.blocks){n.render();var r="views-container",o=document.createElement("div"),s=i.getPanel(r)||i.addPanel({id:r});o.appendChild(n.getContainer()),s.set("appendContent",o).trigger("change:appendContent"),this.blocks=o}this.blocks.style.display="block"},stop:function(){var t=this.blocks;t&&(t.style.display="none")}}},function(t,e,n){"use strict";var i=n(0).$;t.exports={run:function(t,e){this.sender=e;var n=t.Config.stylePrefix,r=t.TraitManager;if(!this.$cn){var o=r.getTraitsViewer(),s=r.getConfig();this.$cn=i("
"),this.$cn2=i("
"),this.$cn.append(this.$cn2),this.$header=i("
").append('
'+s.textNoElement+"
"),this.$cn.append(this.$header),this.$cn2.append('
'+s.labelContainer+"
"),this.$cn2.append(o.render().el);var a=t.Panels;(a.getPanel("views-container")?a.getPanel("views-container"):a.addPanel({id:"views-container"})).set("appendContent",this.$cn.get(0)).trigger("change:appendContent"),this.target=t.getModel(),this.listenTo(this.target,"component:toggled",this.toggleTm)}this.toggleTm()},toggleTm:function(){var t=this.sender;t&&t.get&&!t.get("active")||(1===this.target.getSelectedAll().length?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show()))},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));n(77);var r=i.default.$;t.exports={run:function(t,e){if(this.sender=e,!this.$cn){var n=t.getConfig(),i=t.Panels;this.$cn=r("
"),this.$cn2=r("
"),this.$cn.append(this.$cn2);var o=t.DeviceManager;if(o&&n.showDevices)i.addPanel({id:"devices-c"}).set("appendContent",o.render()).trigger("change:appendContent");var s=t.SelectorManager;s&&this.$cn2.append(s.render([])),this.$cn2.append(t.StyleManager.render());var a=t.StyleManager.getConfig(),l=a.stylePrefix;this.$header=r('
'+a.textNoElement+"
"),this.$cn.append(this.$header),i.getPanel("views-container")?this.panel=i.getPanel("views-container"):this.panel=i.addPanel({id:"views-container"}),this.panel.set("appendContent",this.$cn).trigger("change:appendContent"),this.target=t.editor,this.listenTo(this.target,"component:toggled",this.toggleSm)}this.toggleSm()},toggleSm:function(){var t=this.target,e=this.sender;e&&e.get&&!e.get("active")||(1===t.getSelectedAll().length?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show()))},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));n(54),i.default.$;t.exports={run:function(t){var e=t.LayerManager,n=t.Panels;if(!this.layers){var i="views-container",r=document.createElement("div"),o=n.getPanel(i)||n.addPanel({id:i});r.appendChild(e.render()),o.set("appendContent",r).trigger("change:appendContent"),this.layers=r}this.layers.style.display="block"},stop:function(){var t=this.layers;t&&(t.style.display="none")}}},function(t,e,n){"use strict";t.exports={run:function(t){t.Canvas.getBody().className=this.ppfx+"dashed"},stop:function(t){t.Canvas.getBody().className=""}}},function(t,e,n){"use strict";var i=r(n(1));r(n(0));function r(t){return t&&t.__esModule?t:{default:t}}var o=n(7);t.exports=i.default.extend({},o,{beforeDraw:function(t){t.type="text",t.style||(t.style={}),t.style.padding="10px"},afterDraw:function(t){t&&t.set&&(t.trigger("focus"),this.sender&&this.sender.set("active",!1))}})},function(t,e,n){"use strict";var i=s(n(1)),r=s(n(0)),o=n(2);function s(t){return t&&t.__esModule?t:{default:t}}var a=n(8),l=n(13),c=r.default.$;t.exports=i.default.extend({},l,a,{init:function(t){a.init.apply(this,arguments),i.default.bindAll(this,"initSorter","rollback","onEndMove"),this.opt=t,this.hoverClass=this.ppfx+"highlighter-warning",this.badgeClass=this.ppfx+"badge-warning",this.noSelClass=this.ppfx+"no-select"},enable:function(){for(var t=arguments.length,e=Array(t),n=0;n2&&void 0!==arguments[2]&&arguments[2];e&&e.set&&e.set("active",0);var n=t.getConfig(),r=t.Modal,o=n.stylePrefix;if(this.cm=t.CodeManager||null,!this.$editors){var s=this.buildEditor("htmlmixed","hopscotch","HTML"),a=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=s.el,this.cssEditor=a.el;var l=i('
');l.append(s.$el).append(a.$el),this.$editors=l}r.setTitle(n.textViewCode),r.setContent(this.$editors),r.open(),this.htmlEditor.setContent(t.getHtml()),this.cssEditor.setContent(t.getCss())},stop:function(t){var e=t.Modal;e&&e.close()},buildEditor:function(t,e,n){var i=document.createElement("textarea");!this.codeMirror&&(this.codeMirror=this.cm.getViewer("CodeMirror"));var r=this.codeMirror.clone().set({label:n,codeName:t,theme:e,input:i}),o=new this.cm.EditorView({model:r,config:this.cm.getConfig()}).render().$el;return r.init(i),{el:r,$el:o}}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=i.default.$;t.exports=i.default.View.extend({initialize:function(t){this.config=t||{},this.editorModel=this.em=this.config.em||{},this.pfx=this.config.stylePrefix,this.ppfx=this.config.pStylePrefix,this.hoverClass=this.pfx+"hover",this.badgeClass=this.pfx+"badge",this.plhClass=this.pfx+"placeholder",this.freezClass=this.ppfx+"freezed",this.canvas=this.em.get&&this.em.get("Canvas"),this.em.get&&this.setElement(this.getCanvas()),this.canvas&&(this.$canvas=this.$el,this.$wrapper=r(this.getCanvasWrapper()),this.frameEl=this.canvas.getFrameEl(),this.canvasTool=this.getCanvasTools(),this.bodyEl=this.getCanvasBody()),this.init(this.config)},onFrameScroll:function(t){},getCanvas:function(){return this.canvas.getElement()},getCanvasBody:function(){return this.canvas.getBody()},getCanvasWrapper:function(){return this.canvas.getWrapperEl()},getCanvasTools:function(){return this.canvas.getToolsEl()},offset:function(t){var e=t.getBoundingClientRect();return{top:e.top+t.ownerDocument.body.scrollTop,left:e.left+t.ownerDocument.body.scrollLeft}},init:function(t){},callRun:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.id;if(t.trigger("run:"+n+":before",e),!e||!e.abort){var i=e.sender||t,r=this.run(t,i,e);return t.trigger("run:"+n,r,e),r}t.trigger("abort:"+n,e)},callStop:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.id,i=e.sender||t;t.trigger("stop:"+n+":before",e);var r=this.stop(t,i,e);return t.trigger("stop:"+n,r,e),r},run:function(t,e){},stop:function(t,e){}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e\n \n
\n
\n
\n
\n '},inputClass:function(){var t=this.ppfx;return this.opts.contClass||t+"field "+t+"field-integer"},initialize:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];o.prototype.initialize.apply(this,arguments),(0,i.bindAll)(this,"moveIncrement","upIncrement"),this.doc=document,this.listenTo(this.model,"change:unit",this.handleModelChange)},setValue:function(t,e){var n=e||{},i=this.validateInputValue(t,{deepCheck:1}),r={value:i.value};(i.unit||i.force)&&(r.unit=i.unit),this.model.set(r,n),n.silent&&this.handleModelChange()},handleChange:function(t){t.stopPropagation(),this.setValue(this.getInputEl().value),this.elementUpdated()},handleUnitChange:function(t){t.stopPropagation();var e=this.getUnitEl().value;this.model.set("unit",e),this.elementUpdated()},elementUpdated:function(){this.model.trigger("el:change")},handleModelChange:function(){var t=this.model;this.getInputEl().value=t.get("value");var e=this.getUnitEl();e&&(e.value=t.get("unit")||"")},getUnitEl:function(){if(!this.unitEl){var t=this.model,e=t.get("units")||[];if(e.length){var n=[];e.forEach(function(e){var i=e==t.get("unit")?"selected":"";n.push("")});var i=document.createElement("div");i.innerHTML='",this.unitEl=i.firstChild}}return this.unitEl},upArrowClick:function(){var t=this.model,e=t.get("step"),n=parseInt(t.get("value"),10);n=this.normalizeValue(n+e);var i=this.validateInputValue(n);t.set("value",i.value),this.elementUpdated()},downArrowClick:function(){var t=this.model,e=t.get("step"),n=parseInt(t.get("value"),10),i=this.normalizeValue(n-e),r=this.validateInputValue(i);t.set("value",r.value),this.elementUpdated()},downIncrement:function(t){t.preventDefault(),this.moved=0;var e=this.model.get("value");e=this.normalizeValue(e),this.current={y:t.pageY,val:e},(0,r.on)(this.doc,"mousemove",this.moveIncrement),(0,r.on)(this.doc,"mouseup",this.upIncrement)},moveIncrement:function(t){this.moved=1;var e=this.model,n=e.get("step"),i=this.current,r=this.normalizeValue(i.val+(i.y-t.pageY)*n);return this.prValue=this.validateInputValue(r).value,e.set("value",this.prValue,{avoidStore:1}),!1},upIncrement:function(){var t=this.model,e=t.get("step");if((0,r.off)(this.doc,"mouseup",this.upIncrement),(0,r.off)(this.doc,"mousemove",this.moveIncrement),this.prValue&&this.moved){var n=this.prValue-e;t.set("value",n,{avoidStore:1}).set("value",n+e),this.elementUpdated()}},normalizeValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.model.get("step"),i=0;if(isNaN(t))return e;if(t=parseFloat(t),Math.floor(t)!==t){var r=n.toString().split(".")[1];i=r?r.length:0}return i?parseFloat(t.toFixed(i)):t},validateInputValue:function(t,n){var r=0,o=n||{},s=this.model,a=(0,i.isUndefined)(t)?"":t,l=s.get("units")||[],c=s.get("unit")||l.length&&l[0]||"",u=s.get("max"),h=s.get("min");if(o.deepCheck){var d=s.get("fixedValues")||[];if(a){var f=new RegExp("^"+d.join("|"),"g");if(d.length&&f.test(a))a=a.match(f)[0],c="",r=1;else{var p=a+"";a+="",a=parseFloat(a.replace(",",".")),a=isNaN(a)?"":a;var g=p.replace(a,"");e.indexOf(l,g)>=0&&(c=g)}}}return(0,i.isUndefined)(u)||""===u||(a=a>u?u:a),(0,i.isUndefined)(h)||""===h||(a=a\n \n
\n '},inputValueChanged:function(){if(!this.model.get("detached")){for(var t=arguments.length,e=Array(t),n=0;n'),this.input=this.$input.get(0)),this.props||(this.props=t.get("properties")),!this.$props)){this.props.each(function(e,n){e&&"composite"==e.get("type")&&(this.props.remove(e),console.warn("Nested composite types not yet allowed.")),e.parent=t},this);var i=new(n(16))(this.getPropsConfig());this.$props=i.render().$el,this.properties=i.properties,this.$el.find("#"+this.pfx+"input-holder").append(this.$props)}},getPropsConfig:function(t){var e=this,n=this.model,i={config:this.config,collection:this.props,target:this.target,propTarget:this.propTarget,onChange:function(t,e,i){n.set("value",n.getFullValue(),i)},customValue:function(t,n){return e.valueOnIndex(n,t)}};return n.get("detached")&&delete i.onChange,i},valueOnIndex:function(t,e){var n=void 0,i=this.getTargetValue({ignoreDefault:1});i?n=i.split(" ")[t]:n=e&&e.getTargetValue({ignoreCustomValue:1,ignoreDefault:1});return e&&(n=e.model.parseValue(n).value),n}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.Model.extend({defaults:{id:"",label:"",open:!0,attributes:{}}})},function(t,e,n){"use strict";var i=n(1);t.exports={run:function(t){var e=t.getModel(),n=e.get("clipboard"),r=t.getSelected();n&&r&&!e.isEditing()&&(t.getSelectedAll().forEach(function(e){if(e){var r=e.collection,o=r.indexOf(e)+1,s=n.filter(function(t){return t.get("copyable")}),a=void 0;a=(0,i.contains)(n,e)&&e.get("copyable")?r.add(e.clone(),{at:o}):r.add(s.map(function(t){return t.clone()}),{at:o}),(a=(0,i.isArray)(a)?a:[a]).forEach(function(e){return t.trigger("component:clone",e)})}}),r.emitUpdate())}}},function(t,e,n){"use strict";t.exports={run:function(t){var e=t.getModel(),n=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e=0?r:t)}),e.length&&t.select(e)}}}},function(t,e,n){"use strict";t.exports={run:function(t){if(t.Canvas.hasFocus()&&!t.getModel().isEditing()){var e=[];t.getSelectedAll().forEach(function(t){var n=t.collection,i=n.indexOf(t),r=n.at(i+1);e.push(r||t)}),e.length&&t.select(e)}}}},function(t,e,n){"use strict";t.exports={run:function(t){if(t.Canvas.hasFocus()&&!t.getModel().isEditing()){var e=[];t.getSelectedAll().forEach(function(t){var n=t.parent();n&&e.push(n)}),e.length&&t.select(e)}}}},function(t,e,n){"use strict";t.exports={run:function(t){if(t.Canvas.hasFocus()&&!t.getModel().isEditing()){var e=[];t.getSelectedAll().forEach(function(t){var n=t.components(),i=n&&n.at(0);i&&e.push(i)}),e.length&&t.select(e)}}}},function(t,e,n){"use strict";var i=n(1);t.exports={run:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t.getModel().isEditing()){var r=n.component||t.getSelectedAll();return r=(0,i.isArray)(r)?[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e':"")+'\n
\n
\n
\n \n '+t.getIcon()+'\n '+h+'\n
\n
\n
\n
'+(r||"")+'
\n
\n \n
\n
'},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t,this.level=t.level,this.config=t.config,this.em=t.config.em,this.ppfx=this.em.get("Config").stylePrefix,this.sorter=t.sorter||"",this.pfx=this.config.stylePrefix;var e=this.pfx,n=this.ppfx,i=this.model,r=i.get("components");i.set("open",!1),this.listenTo(r,"remove add change reset",this.checkChildren),this.listenTo(i,"change:status",this.updateStatus),this.listenTo(i,"change:open",this.updateOpening),this.listenTo(i,"change:style:display",this.updateVisibility),this.className=e+"layer no-select "+n+"two-color",this.inputNameCls=n+"layer-name",this.clsTitleC=e+"layer-title-c",this.clsTitle=e+"layer-title",this.clsCaret=e+"layer-caret",this.clsCount=e+"layer-count",this.clsMove=e+"layer-move",this.clsChildren=e+"layer-children",this.clsNoChild=e+"layer-no-chld",this.$el.data("model",i),this.$el.data("collection",r),i.viewLayer=this},getVisibilityEl:function(){return this.eyeEl||(this.eyeEl=this.$el.children("."+this.pfx+"layer-vis")),this.eyeEl},updateVisibility:function(){var t=this.pfx+"layer-hidden",e="none"==this.model.getStyle().display?"addClass":"removeClass";this.$el[e](t),this.getVisibilityEl()[e]("fa-eye-slash")},toggleVisibility:function(t){t&&t.stopPropagation();var e=this.model,n=e.getStyle();"none"==n.display?delete n.display:n.display="none",e.setStyle(n)},handleEdit:function(t){t&&t.stopPropagation();var e=this.getInputName();e.contentEditable=!0,e.focus()},handleEditEnd:function(t){t&&t.stopPropagation();var e=this.getInputName(),n=e.textContent;e.contentEditable=!1,this.model.set({name:n})},getInputName:function(){return this.inputName||(this.inputName=this.el.querySelector("."+this.inputNameCls)),this.inputName},updateOpening:function(){var t=this.opt.opened||{},e=this.model;e.get("open")?(this.$el.addClass("open"),this.getCaret().addClass("fa-chevron-down"),t[e.cid]=e):(this.$el.removeClass("open"),this.getCaret().removeClass("fa-chevron-down"),delete t[e.cid])},toggleOpening:function(t){t.stopPropagation(),this.model.get("components").length&&this.model.set("open",!this.model.get("open"))},handleSelect:function(t){t.stopPropagation();var e=this.em,n=this.config;if(e){var i=this.model;e.setSelected(i,{fromLayers:1});var r=n.scrollCanvas;r&&e.get("Canvas").scrollTo(i,r)}},handleHover:function(t){t.stopPropagation();var e=this.em,n=this.config,i=this.model;e&&n.showHover&&e.setHovered(i,{fromLayers:1})},startSort:function(t){t.stopPropagation();var e=this.sorter;0===t.button&&e&&e.startSort(t.target)},freeze:function(){this.$el.addClass(this.pfx+"opac50"),this.model.set("open",0)},unfreeze:function(){this.$el.removeClass(this.pfx+"opac50")},updateStatus:function(t){s.prototype.updateStatus.apply(this,[{avoidHover:!this.config.highlightHover}])},isVisible:function(){var t=this.model.get("style").display;if(!t||"none"!=t)return 1},checkChildren:function(){var t=this.model,e=this.countChildren(t),n=(this.pfx,this.clsNoChild),i=this.$el.children("."+this.clsTitleC).children("."+this.clsTitle);this.cnt||(this.cnt=this.$el.children("."+this.clsCount)),e?(i.removeClass(n),this.cnt.html(e)):(i.addClass(n),this.cnt.empty(),t.set("open",0))},countChildren:function(t){var e=0;return t.get("components").each(function(t){var n=this.opt.isCountable,i=this.config.hideTextnode;n&&!n(t,i)||e++},this),e},getCaret:function(){if(!this.caret||!this.caret.length){this.pfx;this.caret=this.$el.children("."+this.clsTitleC).find("."+this.clsCaret)}return this.caret},setRoot:function(t){t=(0,i.isString)(t)?this.em.getWrapper().find(t)[0]:t;var e=(0,r.getModel)(t,a);e&&(this.stopListening(),this.model=e,this.initialize(this.opt),this.render())},render:function(){var t=this.model,e=this.pfx,r=this.isVisible(),o=this.$el.empty(),s=this.level+1;(0,i.isUndefined)(l)&&(l=n(113));var a=new l({collection:t.get("components"),config:this.config,sorter:this.sorter,opened:this.opt.opened,parent:t,level:s}).render().$el;return this.config.showWrapper||1!==s?(o.html(this.template(t)),o.find("."+this.clsChildren).append(a)):o.append(a),t.get("draggable")&&this.config.sortable||o.children("."+this.clsMove).remove(),!r&&(this.className+=" "+e+"hide"),o.attr("class",this.className),this.updateOpening(),this.updateStatus(),this.updateVisibility(),this}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return(n=i({},r.default,e)).stylePrefix=e.pStylePrefix,t=n.em,this},getConfig:function(){return n},onLoad:function(){e=new o.default({level:0,config:n,opened:n.opened||{},model:t.get("DomComponents").getWrapper()}),t&&t.on("component:selected",this.componentChanged),this.componentChanged()},postRender:function(){var t=n.appendTo,e=n.root;(e&&this.setRoot(e),t)&&((0,s.isElement)(t)?t:document.querySelector(t)).appendChild(this.render())},setRoot:function(t){return e.setRoot(t),this},getRoot:function(){return e.model},getAll:function(){return e},componentChanged:function(e){if(!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).fromLayers){var i=t.get("opened"),r=t.getSelected(),o=n.scrollLayers,s=r&&r.collection?r.collection.parent:null;for(var a in i)i[a].set("open",0);for(;s;)s.set("open",1),i[s.cid]=s,s=s.collection?s.collection.parent:null;if(r&&o){var l=r.viewLayer&&r.viewLayer.el;l&&l.scrollIntoView(o)}}},render:function(){return e.render().el}}}},function(t,e,n){"use strict";var i=n(2),r=n(3);t.exports=r.extend({events:{dblclick:"enableEditing",input:"onInput"},initialize:function(t){r.prototype.initialize.apply(this,arguments),this.disableEditing=this.disableEditing.bind(this);var e=this.model,n=this.em;this.listenTo(e,"focus active",this.enableEditing),this.listenTo(e,"change:content",this.updateContent),this.rte=n&&n.get("RichTextEditor")},enableEditing:function(t){t&&t.stopPropagation&&t.stopPropagation();var e=this.rte;if(!this.rteEnabled&&this.model.get("editable")){if(e)try{this.activeRte=e.enable(this,this.activeRte)}catch(t){console.error(t)}this.rteEnabled=1,this.toggleEvents(1)}},disableEditing:function(){var t=this.model,e=t.get("editable"),n=this.rte;if(n&&e){try{n.disable(this,this.activeRte)}catch(t){console.error(t)}var i=this.getChildrenContainer().innerHTML,r=t.get("components");if(r.length&&r.reset(),t.set("content",""),n.customRte)t.set("content",i);else{t.trigger("change:content",t),r.add(i),r.each(function(t){return function t(e){e.set({editable:0,highlightable:0,removable:0,draggable:0,copyable:0,toolbar:""}),e.get("components").each(function(e){return t(e)})}(t)}),r.trigger("resetNavigator")}}this.rteEnabled=0,this.toggleEvents()},onInput:function(t){var e=this.em;e&&e.trigger("change:canvasOffset")},disablePropagation:function(t){t.stopPropagation()},toggleEvents:function(t){var e=t?"on":"off",n={on:i.on,off:i.off};this.em.setEditing(t);var r=[this.el.ownerDocument,document];n.off(r,"mousedown",this.disableEditing),n[e](r,"mousedown",this.disableEditing),this.$el.off("mousedown",this.disablePropagation),this.$el[e]("mousedown",this.disablePropagation)}})},function(t,e,n){"use strict";n(0);var i=n(55);t.exports=i.extend({render:function(){for(var t=arguments.length,e=Array(t),n=0;n1&&void 0!==arguments[1]&&arguments[1];var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.config.em,i=this.collection.indexOf(t);this.addToCollection(t,null,i),n&&!e.temporary&&n.trigger("component:add",t)},addToCollection:function(t,e,i){this.compView||(this.compView=n(3));for(var o=e||null,s=this.compView,a=this.opts.componentTypes,l=t.get("type"),c=0;c1&&void 0!==arguments[1]?arguments[1]:{};this.listenTo(this,"add",this.onAdd),this.config=e.config,this.em=e.em,this.model=function(t,n){var i,r=e.componentTypes;n.em=e.em,n.config=e.config,n.componentTypes=r;for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof t){var n=this.em.get("CssComposer"),i=this.em.get("Parser").parseHtml(t);if(t=i.html,i.css&&n){var o=e.avoidUpdateStyle;n.addCollection(i.css,{extend:1,avoidUpdateStyle:o})}}return r.Collection.prototype.add.apply(this,[t,e])},onAdd:function(t,e,n){var r=this.em,o=t.getStyle(),s=r&&r.getConfig("avoidInlineStyle");if(!(0,i.isEmpty)(o)&&!s&&r&&r.get&&r.getConfig("forceClass")){var a=t.cid;r.get("CssComposer").setClassRule(a,o);t.setStyle({}),t.addClass(a)}}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.View.extend({itemView:"",itemsView:"",itemType:"type",initialize:function(t,e){this.config=e||{}},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,i=this.itemView,r=t.get(this.itemType);this.itemsView&&this.itemsView[r]&&(i=this.itemsView[r]);var o=new i({model:t,config:this.config},this.config).render().el;n?n.appendChild(o):this.$el.append(o)},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.length&&this.collection.each(function(e){this.add(e,t)},this),this.$el.append(t),this}})},function(t,e,n){"use strict";t.exports=n(0).View.extend({tagName:"style",initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{};var e=this.model;this.listenTo(e,"change:style change:state change:mediaText",this.render),this.listenTo(e,"destroy remove",this.remove),this.listenTo(e.get("selectors"),"change",this.render)},render:function(){var t=this.model.get("important");return this.el.innerHTML=this.model.toCSS({important:t}),this}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.isString)(e)&&(e=s(e));var a=this.getStyle(),l=i({},e);this.set("style",l,n);var c=(0,o.shallowDiff)(a,l);return(0,r.keys)(c).forEach(function(e){var n=t.em;t.trigger("change:style:"+e),n&&(n.trigger("styleable:change",t,e),n.trigger("styleable:change:"+e,t,e))}),l},addStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"string"==typeof t?t={prop:e}:n=e||{},t=this.extendStyle(t),this.setStyle(t,n)},removeStyle:function(t){var e=this.getStyle();delete e[t],this.setStyle(e)},styleToString:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=this.getStyle();for(var i in n){var o=t.important,s=(0,r.isArray)(o)?o.indexOf(i)>=0:o,a=n[i]+(s?" !important":"");a&&e.push(i+":"+a+";")}return e.join("")}}},function(t,e,n){"use strict";var i=n(1),r=a(i),o=a(n(0)),s=a(n(61));function a(t){return t&&t.__esModule?t:{default:t}}var l=n(19);t.exports=o.default.Model.extend(s.default).extend({defaults:{selectors:{},selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0,atRuleType:"",singleAtRule:0,important:0},initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.config=t||{};var n=e.em,i=this.config.selectors||[];if(this.em=n,n){var r=n.get("SelectorManager"),o=[];i.forEach(function(t){o.push(r.add(t))}),i=o}this.set("selectors",new l(i))},getAtRule:function(){var t=this.get("atRuleType"),e=this.get("mediaText"),n=t?"@"+t:e?"@media":"";return n+(e&&n?" "+e:"")},selectorsToString:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=this.get("state"),i=this.get("selectorsAdd"),r=this.get("selectors").getFullString(),o=n?":"+n:"";return r&&e.push(""+r+o),i&&!t.skipAdd&&e.push(i),e.join(", ")},getDeclaration:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e="",n=this.selectorsToString(),i=this.styleToString(t),r=this.get("singleAtRule");return(n||r)&&i&&(e=r?i:n+"{"+i+"}"),e},toCSS:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e="",n=this.getAtRule(),i=this.getDeclaration(t);return i&&(e=i),n&&e&&(e=n+"{"+e+"}"),e},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;n3&&void 0!==arguments[3]?arguments[3]:{},o=e||"",s=n||"",a=i.selectorsAdd||"",l=i.atRuleType||"";t instanceof Array||t.models||(t=[t]);var c=r.default.map(t.models||t,function(t){return t.get("name")}),u=r.default.map(this.get("selectors").models,function(t){return t.get("name")});if(c.length!==u.length)return!1;for(var h=0;h\n
<%= title %>
\n multiple/>\n
\n \n '),events:{},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t;var e=t.config||{};this.config=e,this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.target=this.options.globalCollection||{},this.uploadId=this.pfx+"uploadFile",this.disabled=void 0!==e.disableUpload?e.disableUpload:!e.upload&&!e.embedAsBase64,this.events["change #"+this.uploadId]="uploadFile";var n=e.uploadFile;n?this.uploadFile=n.bind(this):e.embedAsBase64&&(this.uploadFile=this.constructor.embedAsBase64),this.delegateEvents()},onUploadStart:function(){var t=this.config.em;t&&t.trigger("asset:upload:start")},onUploadEnd:function(t){var e=this.config.em;e&&e.trigger("asset:upload:end",t)},onUploadError:function(t){var e=this.config.em;console.error(t),this.onUploadEnd(t),e&&e.trigger("asset:upload:error",t)},onUploadResponse:function(t,e){var n=this.config.em,i=this.config,r=this.target,o="string"==typeof t?JSON.parse(t):t;n&&n.trigger("asset:upload:response",o),i.autoAdd&&r&&r.add(o.data,{at:0}),this.onUploadEnd(t),e&&e(o)},uploadFile:function(t,e){for(var n=this,i=t.dataTransfer?t.dataTransfer.files:t.target.files,r=new FormData,s=this.config,a=s.params,l=0;l'+i.dropzoneContent+"
"),h(),"draggable"in o&&[o,a].forEach(function(t){t.ondragover=d,t.ondragleave=f,t.ondrop=p})},render:function(){return this.$el.html(this.template({title:this.config.uploadText,uploadId:this.uploadId,disabled:this.disabled,pfx:this.pfx})),this.initDrop(),this.$el.attr("class",this.pfx+"file-uploader"),this}},{embedAsBase64:function(t,e){var n=this,i=t.dataTransfer?t.dataTransfer.files:t.target.files,r={data:[]};if(FileReader){var o=[],s=/^(.+)\/(.+)$/,a=function(t){var e=new Promise(function(e,n){var i=new FileReader;i.addEventListener("load",function(r){var o=void 0,a=t.name,l=s.exec(t.type);if("image"===(o=l?l[1]:t.type)){var c={src:i.result,name:a,type:o,height:0,width:0},u=new Image;u.addEventListener("error",function(t){n(t)}),u.addEventListener("load",function(){c.height=u.height,c.width=u.width,e(c)}),u.src=c.src}else e(o?{src:i.result,name:a,type:o}:i.result)}),i.addEventListener("error",function(t){n(t)}),i.addEventListener("abort",function(t){n("Aborted")}),i.readAsDataURL(t)});o.push(e)},l=!0,c=!1,u=void 0;try{for(var h,d=i[Symbol.iterator]();!(l=(h=d.next()).done);l=!0){a(h.value)}}catch(t){c=!0,u=t}finally{try{!l&&d.return&&d.return()}finally{if(c)throw u}}Promise.all(o).then(function(t){r.data=t,n.onUploadResponse(r,e)},function(t){n.onUploadError(t)})}else this.onUploadError(new Error("Unsupported platform, FileReader is not defined"))}})},function(t,e,n){"use strict";(function(e){var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t,this.collection=t.collection;var e=t.config||{};this.config=e,this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.em=e.em,this.className=this.pfx+"asset",this.listenTo(this.model,"destroy remove",this.remove),this.model.view=this;var n=this.init&&this.init.bind(this);n&&n(t)},template:function(){var t=this.pfx;return'\n
\n '+this.getPreview()+'\n
\n
\n '+this.getInfo()+'\n
\n
\n ⨯\n
\n '},updateTarget:function(t){t&&t.set&&(t.set("attributes",e.clone(t.get("attributes"))),t.set("src",this.model.get("src")))},getPreview:function(){return""},getInfo:function(){return""},render:function(){var t=this.el;return t.innerHTML=this.template(this,this.model),t.className=this.className,this}})}).call(this,n(1))},function(t,e,n){"use strict";var i=n(1);t.exports=n(64).extend({events:{"click [data-toggle=asset-remove]":"onRemove",click:"onClick",dblclick:"onDblClick"},getPreview:function(){var t=this.pfx;return'\n
\n
\n '},getInfo:function(){var t=this.pfx,e=this.model,n=e.get("name"),i=e.get("width"),r=e.get("height"),o=e.get("unitDim"),s=i&&r?i+"x"+r+o:"";return'\n
'+(n=n||e.getFilename())+'
\n
'+s+"
\n "},init:function(t){var e=this.pfx;this.className+=" "+e+"asset-image"},onClick:function(){var t=this.config.onClick,e=this.model;this.collection.trigger("deselectAll"),this.$el.addClass(this.pfx+"highlight"),(0,i.isFunction)(t)?t(e):this.updateTarget(this.collection.target)},onDblClick:function(){var t=this.em,e=this.model,n=this.config.onDblClick;(0,i.isFunction)(n)?n(e):(this.updateTarget(this.collection.target),t&&t.get("Modal").close());var r=this.collection.onSelect;(0,i.isFunction)(r)&&r(e)},onRemove:function(t){t.stopImmediatePropagation(),this.model.collection.remove(this.model)}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return this.set({value:void 0,unit:void 0},t),this},parseValue:function(t){var e=o.prototype.parseValue.apply(this,arguments),n=this.input.validateInputValue(e.value,{deepCheck:1}),i=n.value,r=n.unit;return e.value=i,e.unit=r,e},getFullValue:function(){var t=this.get("value"),e=this.get("unit");return t=""+(t=(0,r.isUndefined)(t)?"":t)+(e=!(0,r.isUndefined)(e)&&t?e:""),o.prototype.getFullValue.apply(this,[t])}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:[];return this.set("options",t),this},addOption:function(t){if(t){var e=this.getOptions();this.setOptions([].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n '},init:function(){var t=this.em;this.modal=t.get("Modal"),this.am=t.get("AssetManager"),this.events["click #"+this.pfx+"close"]="removeFile",this.events["click #"+this.pfx+"images"]="openAssetManager",this.delegateEvents()},onRender:function(){if(!this.$input){var t=this.model.getDefaultValue();this.$input=o('')}this.$preview||(this.$preview=this.$el.find("#"+this.pfx+"preview-file")),this.$previewBox||(this.$previewBox=this.$el.find("#"+this.pfx+"preview-box")),this.setValue(this.componentValue,0)},setValue:function(t,e){r.prototype.setValue.apply(this,arguments),this.setPreviewView(t&&t!=this.model.getDefaultValue()),this.setPreview(t)},setPreviewView:function(t){var e=this.$previewBox;e&&e[t?"addClass":"removeClass"](this.pfx+"show")},spreadUrl:function(t){this.model.set("value",t),this.setPreviewView(1)},setPreview:function(t){var e=this.$preview;t=t&&t.indexOf("url(")<0?"url("+t+")":t,e&&e.css("background-image",t)},cleanValue:function(){this.setPreviewView(0),this.model.set({value:""},{silent:!0})},removeFile:function(){this.model.set("value",this.model.getDefaultValue());for(var t=arguments.length,e=Array(t),n=0;n\n
\n
\n
\n
\n
\n '},inputClass:function(){var t=this.ppfx;return t+"field "+t+"field-color"},holderClass:function(){return this.ppfx+"input-holder"},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model.get("defaults"),i=(0,o.isUndefined)(t)?(0,o.isUndefined)(n)?"":n:t,r=this.getInputEl(),s=this.getColorEl(),a="none"!=i?i:"";r.value=i,s.get(0).style.backgroundColor=a,e.fromTarget&&(s.spectrum("set",a),this.noneColor="none"==i)},getColorEl:function(){if(!this.colorEl){var t=this,e=this.ppfx,n=this.model,r=c('
'),o=r.get(0).style,s=this.em&&this.em.config?this.em.config.el:"",a=this.em&&this.em.getConfig&&this.em.getConfig("colorPicker")||{},l=function(t){return(1==t.getAlpha()?t.toHexString():t.toRgbString()).replace(/ /g,"")},u=0,h=void 0;this.$el.find("[data-colorp-c]").append(r),r.spectrum(i({containerClassName:e+"one-bg "+e+"two-color",appendTo:s||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[]},a,{move:function(t){var e=l(t);o.backgroundColor=e,n.setValueFromInput(e,0)},change:function(e){u=1;var i=l(e);o.backgroundColor=i,n.setValueFromInput(i),t.noneColor=0},show:function(t){u=0,h=l(t)},hide:function(e){!u&&h&&(t.noneColor&&(h=""),o.backgroundColor=h,r.spectrum("set",h),n.setValueFromInput(h,0))}})),this.colorEl=r}return this.colorEl},render:function(){return l.prototype.render.call(this),this.getColorEl(),this}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};e=i({},e,{silent:1}),this.inputInst.setValue(t,e)},onRender:function(){if(!this.input){var t=this.ppfx,e=new r({target:this.target,model:this.model,ppfx:t}).render();this.el.querySelector("."+t+"fields").appendChild(e.el),this.$input=e.inputEl,this.$color=e.colorEl,this.input=this.$input.get(0),this.inputInst=e}}})},function(t,e,n){"use strict";var i=o(n(0)),r=o(n(5));function o(t){return t&&t.__esModule?t:{default:t}}i.default.$;t.exports=r.default.extend({templateInput:function(){var t=this.pfx,e=this.ppfx;return'\n
\n \n
\n
\n
\n
\n '},initialize:function(){for(var t=arguments.length,e=Array(t),n=0;n"+e+""});var i=this.el.querySelector("#"+t+"input-holder");i.innerHTML="",this.input=i.firstChild}}})},function(t,e,n){"use strict";t.exports=n(5).extend({templateInput:function(){this.pfx;var t=this.ppfx;return'\n
\n
\n '},onRender:function(){var t=this.pfx,e=this.ppfx,n=e+"radio-item-label",i=this.model,r=i.get("property"),o=i.get("list")||i.get("options")||[];if(!this.input&&o&&o.length){var s="";o.forEach(function(i){var o=i.className?i.className+" "+t+"icon "+n:"",a=r+"-"+i.value,l=i.name||i.value,c=i.title?'title="'+i.title+'"':"";s+='\n
\n \n \n
\n "});var a=this.el.querySelector("."+e+"field");a.innerHTML='
'+s+"
",this.input=a.firstChild}},getInputValue:function(){var t=this.getCheckedEl();return t?t.value:""},getCheckedEl:function(){var t=this.getInputEl();return t?t.querySelector("input:checked"):""},setValue:function(t){var e=this.model,n=t||e.get("value")||e.getDefaultValue(),i=this.getInputEl(),r=i?i.querySelector('[value="'+n+'"]'):"";if(r)r.checked=!0;else{var o=this.getCheckedEl();o&&(o.checked=!1)}}})},function(t,e,n){"use strict";var i=n(0),r=i.$;t.exports=i.View.extend({events:{change:"handleChange"},template:function(){return''},inputClass:function(){return this.ppfx+"field"},holderClass:function(){return this.ppfx+"input-holder"},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ppfx||"";this.opts=t,this.ppfx=e,this.em=t.target||{},this.listenTo(this.model,"change:value",this.handleModelChange)},elementUpdated:function(){this.model.trigger("el:change")},setValue:function(t){var e=this.model,n=t||e.get("defaults"),i=this.getInputEl();i&&(i.value=n)},handleModelChange:function(t,e,n){this.setValue(e,n)},handleChange:function(t){t.stopPropagation();var e=this.getInputEl().value;this.model.set({value:e},{fromInput:1}),this.elementUpdated()},getInputEl:function(){if(!this.inputEl){var t=this.model.get("defaults")||"";this.inputEl=r('')}return this.inputEl.get(0)},render:function(){var t=this.$el;return t.addClass(this.inputClass()),t.html(this.template()),t.find("."+this.holderClass()).append(this.getInputEl()),this}})},function(t,e,n){"use strict";var i=n(43),r=n(168);t.exports=i.extend({templateInput:function(){var t=this.pfx;this.ppfx;return'\n
\n \n
\n
\n '},init:function(){var t=this.model;this.pfx;t.set("stackIndex",null),this.events["click [data-add-layer]"]="addLayer",this.listenTo(t,"change:stackIndex",this.indexChanged),this.listenTo(t,"updateValue",this.inputValueChanged),this.delegateEvents()},clear:function(t){t&&t.stopPropagation(),this.model.get("layers").reset(),this.model.clearValue(),this.targetUpdated()},targetUpdated:function(){if(this.model.get("detached"))this.checkVisibility();else{for(var t=arguments.length,e=Array(t),n=0;n0&&void 0!==arguments[0]&&arguments[0];return this.get("properties").each(function(t){return t.clearValue()}),r.prototype.clearValue.apply(this,arguments)},updateValues:function(){var t=this.getFullValue().split(this.get("separator"));this.get("properties").each(function(e,n){var i=t.length;t[n]||t[n%i+(1!=i&&i%2?1:0)]})},getDefaultValue:function(t){var e=this.get("defaults");return e&&!t?e:(e="",this.get("properties").each(function(t,n){return e+=t.getDefaultValue()+" "}),e.trim())},getFullValue:function(){return this.get("detached")?"":this.get("properties").getFullValue()}})},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var n=t.Model,i=t.View;e.default={types:[],initialize:function(t,e){var n=this;this.model=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=void 0,r=void 0,o=void 0;if(t&&t.type){var s=n.getBaseType();i=(o=n.getType(t.type))?o.model:s.model,r=o?o.view:s.view}else{var a=n.recognizeType(t);i=(o=a.type).model,r=o.view,t=a.attributes}var l=new i(t,e);return l.typeView=r,l};var i=this.init&&this.init.bind(this);i&&i()},recognizeType:function(t){for(var e=this.getTypes(),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=e.model,r=void 0===n?{}:n,s=e.view,a=void 0===s?{}:s,l=this.getType(t);if(l)return new l.view(i({model:new l.model(r),config:o},a))},render:function(){return e.render().el}}}},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0;r--)n.context=n.context.prev;return M(t,e,n)}function O(t){var e=t.current().toLowerCase();o=m.hasOwnProperty(e)?"atom":v.hasOwnProperty(e)?"keyword":"variable"}var P={top:function(t,e,n){if("{"==t)return T(n,e,"block");if("}"==t&&n.context.prev)return E(n);if(x&&/@component/i.test(t))return T(n,e,"atComponentBlock");if(/^@(-moz-)?document$/i.test(t))return T(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(t))return T(n,e,"atBlock");if(/^@(font-face|counter-style)/i.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return T(n,e,"at");if("hash"==t)o="builtin";else if("word"==t)o="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return T(n,e,"interpolation");if(":"==t)return"pseudo";if(y&&"("==t)return T(n,e,"parens")}return n.context.type},block:function(t,e,n){if("word"==t){var i=e.current().toLowerCase();return d.hasOwnProperty(i)?(o="property","maybeprop"):f.hasOwnProperty(i)?(o="string-2","maybeprop"):y?(o=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==t?"block":y||"hash"!=t&&"qualifier"!=t?P.top(t,e,n):(o="error","block")},maybeprop:function(t,e,n){return":"==t?T(n,e,"prop"):M(t,e,n)},prop:function(t,e,n){if(";"==t)return E(n);if("{"==t&&y)return T(n,e,"propBlock");if("}"==t||"{"==t)return A(t,e,n);if("("==t)return T(n,e,"parens");if("hash"!=t||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(e.current())){if("word"==t)O(e);else if("interpolation"==t)return T(n,e,"interpolation")}else o+=" error";return"prop"},propBlock:function(t,e,n){return"}"==t?E(n):"word"==t?(o="property","maybeprop"):n.context.type},parens:function(t,e,n){return"{"==t||"}"==t?A(t,e,n):")"==t?E(n):"("==t?T(n,e,"parens"):"interpolation"==t?T(n,e,"interpolation"):("word"==t&&O(e),"parens")},pseudo:function(t,e,n){return"meta"==t?"pseudo":"word"==t?(o="variable-3",n.context.type):M(t,e,n)},documentTypes:function(t,e,n){return"word"==t&&l.hasOwnProperty(e.current())?(o="tag",n.context.type):P.atBlock(t,e,n)},atBlock:function(t,e,n){if("("==t)return T(n,e,"atBlock_parens");if("}"==t||";"==t)return A(t,e,n);if("{"==t)return E(n)&&T(n,e,y?"block":"top");if("interpolation"==t)return T(n,e,"interpolation");if("word"==t){var i=e.current().toLowerCase();o="only"==i||"not"==i||"and"==i||"or"==i?"keyword":c.hasOwnProperty(i)?"attribute":u.hasOwnProperty(i)?"property":h.hasOwnProperty(i)?"keyword":d.hasOwnProperty(i)?"property":f.hasOwnProperty(i)?"string-2":m.hasOwnProperty(i)?"atom":v.hasOwnProperty(i)?"keyword":"error"}return n.context.type},atComponentBlock:function(t,e,n){return"}"==t?A(t,e,n):"{"==t?E(n)&&T(n,e,y?"block":"top",!1):("word"==t&&(o="error"),n.context.type)},atBlock_parens:function(t,e,n){return")"==t?E(n):"{"==t||"}"==t?A(t,e,n,2):P.atBlock(t,e,n)},restricted_atBlock_before:function(t,e,n){return"{"==t?T(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(o="variable","restricted_atBlock_before"):M(t,e,n)},restricted_atBlock:function(t,e,n){return"}"==t?(n.stateArg=null,E(n)):"word"==t?(o="@font-face"==n.stateArg&&!p.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!g.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(t,e,n){return"word"==t?(o="variable","keyframes"):"{"==t?T(n,e,"top"):M(t,e,n)},at:function(t,e,n){return";"==t?E(n):"{"==t||"}"==t?A(t,e,n):("word"==t?o="tag":"hash"==t&&(o="builtin"),"at")},interpolation:function(t,e,n){return"}"==t?E(n):"{"==t||";"==t?A(t,e,n):("word"==t?o="variable":"variable"!=t&&"("!=t&&")"!=t&&(o="error"),"interpolation")}};return{startState:function(t){return{tokenize:null,state:i?"block":"top",stateArg:null,context:new S(i?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||function(t,e){var n=t.next();if(a[n]){var i=a[n](t,e);if(!1!==i)return i}return"@"==n?(t.eatWhile(/[\w\\\-]/),w("def",t.current())):"="==n||("~"==n||"|"==n)&&t.eat("=")?w(null,"compare"):'"'==n||"'"==n?(e.tokenize=C(n),e.tokenize(t,e)):"#"==n?(t.eatWhile(/[\w\\\-]/),w("atom","hash")):"!"==n?(t.match(/^\s*\w*/),w("keyword","important")):/\d/.test(n)||"."==n&&t.eat(/\d/)?(t.eatWhile(/[\w.%]/),w("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?w(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?w("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?w(null,n):("u"==n||"U"==n)&&t.match(/rl(-prefix)?\(/i)||("d"==n||"D"==n)&&t.match("omain(",!0,!0)||("r"==n||"R"==n)&&t.match("egexp(",!0,!0)?(t.backUp(1),e.tokenize=k,w("property","word")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),w("property","word")):w(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),w("number","unit")):t.match(/^-[\w\\\-]+/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?w("variable-2","variable-definition"):w("variable-2","variable")):t.match(/^\w+-/)?w("meta","meta"):void 0})(t,e);return n&&"object"==typeof n&&(r=n[1],n=n[0]),o=n,"comment"!=r&&(e.state=P[e.state](r,t,e)),o},indent:function(t,e){var n=t.context,i=e&&e.charAt(0),r=n.indent;return"prop"!=n.type||"}"!=i&&")"!=i||(n=n.prev),n.prev&&("}"!=i||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=i||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=i||"at"!=n.type&&"atBlock"!=n.type)||(r=Math.max(0,n.indent-s)):(n=n.prev,r=n.indent)),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}});var n=["domain","regexp","url","url-prefix"],i=e(n),r=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=e(r),s=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],a=e(s),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],c=e(l),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],h=e(u),d=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],f=e(d),p=e(["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),g=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),v=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],m=e(v),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=e(y),x=n.concat(r).concat(s).concat(l).concat(u).concat(d).concat(v).concat(y);function w(t,e){for(var n,i=!1;null!=(n=t.next());){if(i&&"/"==n){e.tokenize=null;break}i="*"==n}return["comment","comment"]}t.registerHelper("hintWords","css",x),t.defineMIME("text/css",{documentTypes:i,mediaTypes:o,mediaFeatures:a,mediaValueKeywords:c,propertyKeywords:h,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:g,colorKeywords:m,valueKeywords:b,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=w,w(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:a,mediaValueKeywords:c,propertyKeywords:h,nonStandardPropertyKeywords:f,colorKeywords:m,valueKeywords:b,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=w,w(t,e)):["operator","operator"]},":":function(t){return!!t.match(/\s*\{/,!1)&&[null,null]},$:function(t){return t.match(/^[\w-]+/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(t){return!!t.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),t.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:a,mediaValueKeywords:c,propertyKeywords:h,nonStandardPropertyKeywords:f,colorKeywords:m,valueKeywords:b,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=w,w(t,e)):["operator","operator"]},"@":function(t){return t.eat("{")?[null,"interpolation"]:!t.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),t.defineMIME("text/x-gss",{documentTypes:i,mediaTypes:o,mediaFeatures:a,propertyKeywords:h,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:g,colorKeywords:m,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=w,w(t,e))}},name:"css",helperType:"gss"})}(n(6))},function(t,e,n){"use strict";t.exports=function(t){var e=t;return{compTypes:"",parseStyle:function(t){for(var e={},n=t.split(";"),i=0,r=n.length;i=0&&e<=k};function E(t){return function(e,n,i,r){n=y(n,r,4);var o=!T(e)&&m.keys(e),s=(o||e).length,a=t>0?0:s-1;return arguments.length<3&&(i=e[o?o[a]:a],a+=t),function(e,n,i,r,o,s){for(;o>=0&&o=0},m.invoke=function(t,e){var n=c.call(arguments,2),i=m.isFunction(e);return m.map(t,function(t){var r=i?e:t[e];return null==r?r:r.apply(t,n)})},m.pluck=function(t,e){return m.map(t,m.property(e))},m.where=function(t,e){return m.filter(t,m.matcher(e))},m.findWhere=function(t,e){return m.find(t,m.matcher(e))},m.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e&&null!=t)for(var a=0,l=(t=T(t)?t:m.values(t)).length;ao&&(o=i);else e=b(e,n),m.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},m.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e&&null!=t)for(var a=0,l=(t=T(t)?t:m.values(t)).length;ai||void 0===n)return 1;if(n0?0:r-1;o>=0&&o0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;else if(n&&o&&a)return i[o=n(i,r)]===r?o:-1;if(r!=r)return(o=e(c.call(i,s,a),m.isNaN))>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&oe?(s&&(clearTimeout(s),s=null),a=c,o=t.apply(i,r),s||(i=r=null)):s||!1===n.trailing||(s=setTimeout(l,u)),o}},m.debounce=function(t,e,n){var i,r,o,s,a,l=function(){var c=m.now()-s;c=0?i=setTimeout(l,e-c):(i=null,n||(a=t.apply(o,r),i||(o=r=null)))};return function(){o=this,r=arguments,s=m.now();var c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r),o=r=null),a}},m.wrap=function(t,e){return m.partial(e,t)},m.negate=function(t){return function(){return!t.apply(this,arguments)}},m.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,i=t[e].apply(this,arguments);n--;)i=t[n].call(this,i);return i}},m.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},m.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},m.once=m.partial(m.before,2);var L=!{toString:null}.propertyIsEnumerable("toString"),N=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];function D(t,e){var n=N.length,i=t.constructor,r=m.isFunction(i)&&i.prototype||s,o="constructor";for(m.has(t,o)&&!m.contains(e,o)&&e.push(o);n--;)(o=N[n])in t&&t[o]!==r[o]&&!m.contains(e,o)&&e.push(o)}m.keys=function(t){if(!m.isObject(t))return[];if(f)return f(t);var e=[];for(var n in t)m.has(t,n)&&e.push(n);return L&&D(t,e),e},m.allKeys=function(t){if(!m.isObject(t))return[];var e=[];for(var n in t)e.push(n);return L&&D(t,e),e},m.values=function(t){for(var e=m.keys(t),n=e.length,i=Array(n),r=0;r":">",'"':""","'":"'","`":"`"},R=m.invert(F),j=function(t){var e=function(e){return t[e]},n="(?:"+m.keys(t).join("|")+")",i=RegExp(n),r=RegExp(n,"g");return function(t){return t=null==t?"":""+t,i.test(t)?t.replace(r,e):t}};m.escape=j(F),m.unescape=j(R),m.result=function(t,e,n){var i=null==t?void 0:t[e];return void 0===i&&(i=n),m.isFunction(i)?i.call(t):i};var z=0;m.uniqueId=function(t){var e=++z+"";return t?t+e:e},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,H={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},$=/\\|'|\r|\n|\u2028|\u2029/g,B=function(t){return"\\"+H[t]};m.template=function(t,e,n){!e&&n&&(e=n),e=m.defaults({},e,m.templateSettings);var i=RegExp([(e.escape||V).source,(e.interpolate||V).source,(e.evaluate||V).source].join("|")+"|$","g"),r=0,o="__p+='";t.replace(i,function(e,n,i,s,a){return o+=t.slice(r,a).replace($,B),r=a+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":i?o+="'+\n((__t=("+i+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var s=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var a=function(t){return s.call(this,t,m)},l=e.variable||"obj";return a.source="function("+l+"){\n"+o+"}",a},m.chain=function(t){var e=m(t);return e._chain=!0,e};var W=function(t,e){return t._chain?m(e).chain():e};m.mixin=function(t){m.each(m.functions(t),function(e){var n=m[e]=t[e];m.prototype[e]=function(){var t=[this._wrapped];return l.apply(t,arguments),W(this,n.apply(m,t))}})},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=o[t];m.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],W(this,n)}}),m.each(["concat","join","slice"],function(t){var e=o[t];m.prototype[t]=function(){return W(this,e.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return""+this._wrapped},void 0===(i=function(){return m}.apply(e,[]))||(t.exports=i)}).call(this)},function(t,e,n){!function(e){var n,i={},r={16:!1,18:!1,17:!1,91:!1},o="all",s={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,command:91},a={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,home:36,end:35,pageup:33,pagedown:34,",":188,".":190,"/":191,"`":192,"-":189,"=":187,";":186,"'":222,"[":219,"]":221,"\\":220},l=function(t){return a[t]||t.toUpperCase().charCodeAt(0)},c=[];for(n=1;n<20;n++)a["f"+n]=111+n;function u(t,e){for(var n=t.length;n--;)if(t[n]===e)return n;return-1}function h(t,e){if(t.length!=e.length)return!1;for(var n=0;n1&&(o=m(t),t=[t[t.length-1]]),t=t[0],(t=l(t))in i||(i[t]=[]),i[t].push({shortcut:r[s],scope:e,method:n,key:r[s],mods:o})}for(n in s)p[n]=!1;function g(){return o||"all"}function v(t){var e;return""==(e=(t=t.replace(/\s/g,"")).split(","))[e.length-1]&&(e[e.length-2]+=","),e}function m(t){for(var e=t.slice(0,t.length-1),n=0;n0,r)(!r[o]&&u(n.mods,+o)>-1||r[o]&&-1==u(n.mods,+o))&&(l=!1);(0!=n.mods.length||r[16]||r[18]||r[17]||r[91])&&!l||!1===n.method(t,n)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}(t)}),y(document,"keyup",function(t){var e,n=t.keyCode,i=u(c,n);if(i>=0&&c.splice(i,1),93!=n&&224!=n||(n=91),n in r)for(e in r[n]=!1,s)s[e]==n&&(p[e]=!1)}),y(window,"focus",function(){for(n in r)r[n]=!1;for(n in s)p[n]=!1});var b=e.key;e.key=p,e.key.setScope=function(t){o=t||"all"},e.key.getScope=g,e.key.deleteScope=function(t){var e,n,r;for(e in i)for(n=i[e],r=0;r1&&(c=m(r),t=r[r.length-1]),t=l(t),void 0===e&&(e=g()),!i[t])return;for(o=0;o\n \n <%= label %>\n \n
\n '),events:{},initialize:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.config=t;var e=this.config.pStylePrefix||"";this.pfx=e,this.caretR="fa fa-caret-right",this.caretD="fa fa-caret-down",this.iconClass=e+"caret-icon",this.activeClass=e+"open",this.className=e+"block-category",this.events["click ."+e+"title"]="toggle",this.listenTo(this.model,"change:open",this.updateVisibility),this.delegateEvents()},updateVisibility:function(){this.model.get("open")?this.open():this.close()},open:function(){this.el.className=this.className+" "+this.activeClass,this.getIconEl().className=this.iconClass+" "+this.caretD,this.getBlocksEl().style.display=""},close:function(){this.el.className=this.className,this.getIconEl().className=this.iconClass+" "+this.caretR,this.getBlocksEl().style.display="none"},toggle:function(){var t=this.model;t.set("open",!t.get("open"))},getIconEl:function(){return this.iconEl||(this.iconEl=this.el.querySelector("."+this.iconClass)),this.iconEl},getBlocksEl:function(){return this.blocksEl||(this.blocksEl=this.el.querySelector("."+this.pfx+"blocks-c")),this.blocksEl},append:function(t){this.getBlocksEl().appendChild(t)},render:function(){return this.el.innerHTML=this.template({pfx:this.pfx,label:this.model.get("label")}),this.el.className=this.className,this.$el.css({order:this.model.get("order")}),this.updateVisibility(),this}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0)),r=n(1),o=n(2);t.exports=i.default.View.extend({events:{mousedown:"startDrag",dragstart:"handleDragStart",drag:"handleDrag",dragend:"handleDragEnd"},initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.em=e.em,this.config=e,this.endDrag=this.endDrag.bind(this),this.ppfx=e.pStylePrefix||"",this.listenTo(this.model,"destroy remove",this.remove)},startDrag:function(t){var e=this.config;if(0===t.button&&e.getSorter&&!this.el.draggable){e.em.refreshCanvas();var n=e.getSorter();n.setDragHelper(this.el,t),n.setDropContent(this.model.get("content")),n.startSort(this.el),(0,o.on)(document,"mouseup",this.endDrag)}},handleDragStart:function(t){var e=this.em,n=this.model,i=n.get("content"),o=(0,r.isObject)(i),s=o?JSON.stringify(i):i;t.dataTransfer.setData("text",s),e.set("dragContent",i),e.trigger("block:drag:start",n,t)},handleDrag:function(t){this.em.trigger("block:drag",this.model,t)},handleDragEnd:function(){var t=this.em,e=this.model,n=t.get("dragResult");if(n){var i=n.get&&n.get("activeOnRender");(e.get("activate")||i)&&(n.trigger("active"),n.set("activeOnRender",0)),e.get("select")&&t.setSelected(n),e.get("resetId")&&n.onAll(function(t){return t.resetId()})}t.set({dragResult:null,dragContent:null}),t.trigger("block:drag:stop",n,e)},endDrag:function(t){(0,o.off)(document,"mouseup",this.endDrag);var e=this.config.getSorter();e.moved=0,e.endMove()},render:function(){var t=this.el,e=this.ppfx,n=e+"block",i=this.model.get("label");return t.className+=" "+n+" "+e+"one-bg "+e+"four-color-h",t.innerHTML='
'+i+"
",t.title=t.textContent.trim(),(0,o.hasDnd)(this.em)&&t.setAttribute("draggable",!0),this}})},function(t,e,n){"use strict";var i=n(1),r=n(92),o=n(91);t.exports=n(0).View.extend({initialize:function(t,e){(0,i.bindAll)(this,"getSorter","onDrag","onDrop"),this.config=e||{},this.categories=t.categories||"",this.renderedCategories=[];var n=this.config.pStylePrefix||"";this.ppfx=n,this.noCatClass=n+"blocks-no-cat",this.blockContClass=n+"blocks-c",this.catsClass=n+"block-categories";var r=this.collection;this.listenTo(r,"add",this.addTo),this.listenTo(r,"reset",this.render),this.em=this.config.em,this.tac="test-tac",this.grabbingCls=this.ppfx+"grabbing",this.em&&(this.config.getSorter=this.getSorter,this.canvas=this.em.get("Canvas"))},getSorter:function(){if(this.em){if(!this.sorter){var t=this.em.get("Utils"),e=this.canvas;this.sorter=new t.Sorter({container:e.getBody(),placer:e.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onStart:this.onDrag,onEndMove:this.onDrop,onMove:this.onMove,document:e.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1,em:this.em,canvasRelative:1})}return this.sorter}},onDrag:function(t){this.em.stopDefault(),this.em.trigger("block:drag:start",t)},onMove:function(t){this.em.trigger("block:drag:move",t)},onDrop:function(t){var e=this.em;e.runDefault(),t&&t.get&&(t.get("activeOnRender")&&(t.trigger("active"),t.set("activeOnRender",0)),e.trigger("block:drag:stop",t))},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,s=new r({model:t,attributes:t.get("attributes")},this.config).render().el,a=t.get("category");if(a&&this.categories){(0,i.isString)(a)?a={id:a,label:a}:(0,i.isObject)(a)&&!a.id&&(a.id=a.label);var l=this.categories.add(a),c=l.get("id"),u=this.renderedCategories[c],h=this.getCategoriesEl();return t.set("category",l),!u&&h&&(u=new o({model:l},this.config).render(),this.renderedCategories[c]=u,h.appendChild(u.el)),void(u&&u.append(s))}n?n.appendChild(s):this.append(s)},getCategoriesEl:function(){return this.catsEl||(this.catsEl=this.el.querySelector("."+this.catsClass)),this.catsEl},getBlocksEl:function(){return this.blocksEl||(this.blocksEl=this.el.querySelector("."+this.noCatClass+" ."+this.blockContClass)),this.blocksEl},append:function(t){var e=this.getBlocksEl();e&&e.appendChild(t)},render:function(){var t=this,e=this.ppfx,n=document.createDocumentFragment();this.catsEl=null,this.blocksEl=null,this.renderedCategories=[],this.el.innerHTML='\n
\n
\n
\n
\n ',this.collection.each(function(e){return t.add(e,n)}),this.append(n);var i=this.blockContClass+"s "+e+"one-bg "+e+"two-color";return this.$el.addClass(i),this}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.Collection.extend({model:n(44)})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=n(44);t.exports=i.default.Model.extend({defaults:{activate:0,select:0,resetId:0,label:"",content:"",category:"",attributes:{}},initialize:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t=this.get("category");if(t&&"string"==typeof t)new r({id:t,label:t})}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=n(95);t.exports=i.default.Collection.extend({model:r})},function(t,e,n){"use strict";t.exports={appendTo:"",blocks:[]}},function(t,e,n){"use strict";var i=n(1);t.exports=function(){var t,e,r,o={},s=n(97),a=n(96),l=n(94),c=n(93),u=[];return{name:"BlockManager",init:function(n){var i=(o=n||{}).em;for(var h in s)h in o||(o[h]=s[h]);return t=new a([]),e=new a([]),u=new l,r=new c({collection:e,categories:u},o),t.listenTo(t,"add",function(t){e.add(t),i&&i.trigger("block:add",t)}),t.listenTo(t,"remove",function(t){e.remove(t),i&&i.trigger("block:remove",t)}),t.listenTo(t,"reset",function(t){e.reset(t.models)}),this},getConfig:function(){return o},onLoad:function(){var t=this.getAll();!t.length&&t.reset(o.blocks)},postRender:function(){var t=this.getConfig().appendTo;t&&((0,i.isElement)(t)?t:document.querySelector(t)).appendChild(this.render())},add:function(e,n){var i=n||{};return i.id=e,t.add(i)},get:function(e){return t.get(e)},getAll:function(){return t},getAllVisible:function(){return e},remove:function(e){return t.remove(e)},getCategories:function(){return u},getContainer:function(){return r.el},render:function(t){var e=t||this.getAll().models;return r.rendered||(r.render(),r.rendered=1),r.collection.reset(e),this.getContainer()}}}},function(t,e,n){var i={"./CanvasClear":52,"./CanvasClear.js":52,"./CommandAbstract":38,"./CommandAbstract.js":38,"./ComponentDelete":51,"./ComponentDelete.js":51,"./ComponentEnter":50,"./ComponentEnter.js":50,"./ComponentExit":49,"./ComponentExit.js":49,"./ComponentNext":48,"./ComponentNext.js":48,"./ComponentPrev":47,"./ComponentPrev.js":47,"./CopyComponent":46,"./CopyComponent.js":46,"./CreateComponent":7,"./CreateComponent.js":7,"./DeleteComponent":36,"./DeleteComponent.js":36,"./Drag":21,"./Drag.js":21,"./ExportTemplate":37,"./ExportTemplate.js":37,"./Fullscreen":24,"./Fullscreen.js":24,"./ImageComponent":35,"./ImageComponent.js":35,"./InsertCustom":12,"./InsertCustom.js":12,"./MoveComponent":34,"./MoveComponent.js":34,"./OpenAssets":27,"./OpenAssets.js":27,"./OpenBlocks":28,"./OpenBlocks.js":28,"./OpenLayers":31,"./OpenLayers.js":31,"./OpenStyleManager":30,"./OpenStyleManager.js":30,"./OpenTraitManager":29,"./OpenTraitManager.js":29,"./PasteComponent":45,"./PasteComponent.js":45,"./Preview":23,"./Preview.js":23,"./Resize":22,"./Resize.js":22,"./SelectComponent":8,"./SelectComponent.js":8,"./SelectParent":25,"./SelectParent.js":25,"./SelectPosition":13,"./SelectPosition.js":13,"./ShowOffset":26,"./ShowOffset.js":26,"./SwitchVisibility":32,"./SwitchVisibility.js":32,"./TextComponent":33,"./TextComponent.js":33};function r(t){var e=o(t);return n(e)}function o(t){var e=i[t];if(!(e+1)){var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}return e}r.keys=function(){return Object.keys(i)},r.resolve=o,t.exports=r,r.id=99},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{command:"",attributes:{}}})},function(t,e,n){"use strict";var i=n(0),r=n(100);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0);t.exports=i.View.extend({events:function(){return this.model.get("events")||{mousedown:"handleClick"}},attributes:function(){return this.model.get("attributes")},initialize:function(t){this.editor=t.config.editor},handleClick:function(t){t.preventDefault(),t.stopPropagation(),this.execCommand(t)},execCommand:function(t){var e={event:t},n=this.model.get("command"),i=this.editor;"function"==typeof n&&n(i,null,e),"string"==typeof n&&i.runCommand(n,e)},render:function(){var t=this.editor,e=this.$el,n=this.model,i=n.get("id"),r=n.get("label"),o=t.getConfig("stylePrefix");return e.addClass(o+"toolbar-item"),i&&e.addClass(o+"toolbar-item__"+i),r&&e.append(r),this}})},function(t,e,n){"use strict";n(0);var i=n(59),r=n(102);t.exports=i.extend({itemView:r,initialize:function(t){this.config={editor:t.editor||""},this.listenTo(this.collection,"reset",this.render)}})},function(t,e,n){"use strict";t.exports={ESCAPE_KEY:27,stylePrefix:"com-",defaults:[],em:null,firstCentered:!0,newFixedH:!1,minComponentH:50,minComponentW:50}},function(t,e,n){"use strict";var i=n(1);t.exports=function(){var t=void 0,e={},r={},o={},s=n(104),a=n(38);return{CommandAbstract:a,name:"Commands",init:function(i){for(var r in e=i||{},s)r in e||(e[r]=s[r]);t=e.em;var a=e.pStylePrefix;for(var l in a&&(e.stylePrefix=a+e.stylePrefix),e.defaults){var c=e.defaults[l];c.id&&this.add(c.id,c)}var u=n(37);return o["select-comp"]=n(8),o["create-comp"]=n(7),o["delete-comp"]=n(36),o["image-comp"]=n(35),o["move-comp"]=n(34),o["text-comp"]=n(33),o["insert-custom"]=n(12),o["export-template"]=u,o["sw-visibility"]=n(32),o["open-layers"]=n(31),o["open-sm"]=n(30),o["open-tm"]=n(29),o["open-blocks"]=n(28),o["open-assets"]=n(27),o["show-offset"]=n(26),o["select-parent"]=n(25),o.fullscreen=n(24),o.preview=n(23),o.resize=n(22),o.drag=n(21),o["tlb-delete"]={run:function(t){return t.runCommand("core:component-delete")}},o["tlb-clone"]={run:function(t){t.runCommand("core:copy"),t.runCommand("core:paste")}},o["tlb-move"]={run:function(t,e,n){var i=void 0,r=t.getModel(),o=n&&n.event,s=t.getSelected(),a=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e1&&void 0!==arguments[1]?arguments[1]:{},i=void 0,r=this.get(e),o=t.get("Editor");return r&&(i=r.callRun(o,n)),i},stop:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=void 0,r=this.get(e),o=t.get("Editor");return r&&(i=r.callStop(o,n)),i},loadDefaultCommands:function(){for(var t in o)this.add(t,o[t]);return this},create:function(t){return new(a.extend(t))(e)}}}},function(t,e,n){"use strict";var i=n(1),r="transitionend oTransitionEnd transitionend webkitTransitionEnd";t.exports=n(0).View.extend({tagName:"iframe",attributes:{allowfullscreen:"allowfullscreen"},initialize:function(t){(0,i.bindAll)(this,"udpateOffset"),this.config=t.config||{},this.ppfx=this.config.pStylePrefix||"",this.em=this.config.em,this.listenTo(this.em,"change:device",this.updateDim)},updateDim:function(t){var e=this.em,n=e.getDeviceModel(),i=this.el.style,o=i.width||"",s=i.height||"",a=n?n.get("width"):"",l=n?n.get("height"):"",c=o==a&&s==l;i.width=a,i.height=l,this.udpateOffset(),e.stopDefault({preserveSelected:1}),c?this.udpateOffset():this.$el.on(r,this.udpateOffset)},udpateOffset:function(){var t=this.em,e=t.get("Canvas").getOffset();t.set("canvasOffset",e),t.runDefault({preserveSelected:1}),this.$el.off(r,this.udpateOffset)},getBody:function(){this.$el.contents().find("body")},getWrapper:function(){return this.$el.contents().find("body > div")},render:function(){return this.$el.attr({class:this.ppfx+"frame"}),this}})},function(t,e,n){"use strict";(function(e){var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0)),r=n(2);var o=n(106),s=i.default.$;t.exports=i.default.View.extend({initialize:function(t){e.bindAll(this,"renderBody","onFrameScroll","clearOff"),(0,r.on)(window,"scroll resize",this.clearOff),this.config=t.config||{},this.em=this.config.em||{},this.ppfx=this.config.pStylePrefix||"",this.className=this.config.stylePrefix+"canvas",this.listenTo(this.em,"change:canvasOffset",this.clearOff),this.frame=new o({model:this.model.get("frame"),config:this.config})},isElInViewport:function(t){var e=(0,r.getElement)(t).getBoundingClientRect(),n=this.getFrameOffset(1),i=e.top,o=e.left;return i>=0&&o>=0&&i<=n.height&&o<=n.width},onFrameScroll:function(){var t=this.frame.el.contentDocument.body;this.toolsEl.style.top="-"+t.scrollTop+"px",this.toolsEl.style.left="-"+t.scrollLeft+"px",this.em.trigger("canvasScroll")},renderScripts:function(){var t=this.frame,e=this;t.el.onload=function(){!function n(i){if(i.length>0){var r=document.createElement("script");r.type="text/javascript",r.src=i.shift(),r.onerror=r.onload=n.bind(null,i),t.el.contentDocument.head.appendChild(r)}else e.renderBody()}(e.config.scripts.slice(0))}},renderBody:function(){var t=this.model.get("frame").get("wrapper"),e=this.config.em;if(t){var n=this.ppfx,i=s(this.frame.el.contentWindow.document.body),r=e.get("CssComposer"),o=e.get("Config"),a=this.config,l=o.protectedCss,c="";a.styles.forEach(function(t){c+=''});var u="\n "+(e.config.baseCss||"")+"\n\n ."+n+"dashed *[data-highlightable] {\n outline: 1px dashed rgba(170,170,170,0.7);\n outline-offset: -2px;\n }\n\n ."+n+"comp-selected {\n outline: 3px solid #3b97e3 !important;\n outline-offset: -3px;\n }\n\n ."+n+"comp-selected-parent {\n outline: 2px solid #ffca6f !important\n }\n\n ."+n+"no-select {\n user-select: none;\n -webkit-user-select:none;\n -moz-user-select: none;\n }\n\n ."+n+"freezed {\n opacity: 0.5;\n pointer-events: none;\n }\n\n ."+n+"no-pointer {\n pointer-events: none;\n }\n\n ."+n+"plh-image {\n background: #f5f5f5;\n border: none;\n height: 50px;\n width: 50px;\n display: block;\n outline: 3px solid #ffca6f;\n cursor: pointer;\n outline-offset: -2px\n }\n\n ."+n+"grabbing {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n\n "+(o.canvasCss||"")+"\n "+(l||"")+"\n ";c&&i.append(c),i.append(""),i.append(t.render()).append(r.render()),i.append(this.getJsContainer()),e.trigger("loaded"),this.frame.el.contentWindow.onscroll=this.onFrameScroll,this.frame.udpateOffset();var h=document,d=this.frame.el.contentDocument;[{event:"keydown keyup",class:"KeyboardEvent"}].forEach(function(t){return t.event.split(" ").forEach(function(e){d.addEventListener(e,function(e){return h.dispatchEvent(function(t,e){var n=void 0;try{n=new window[e](t.type,t)}catch(t){(n=document.createEvent(e)).initEvent(t.type,!0,!0)}return n.keyCodeVal=t.keyCode,["keyCode","which"].forEach(function(t){Object.defineProperty(n,t,{get:function(){return this.keyCodeVal}})}),n}(e,t.class))})})})}},offset:function(t){var e=t.getBoundingClientRect(),n=t.ownerDocument.body;return{top:e.top+n.scrollTop,left:e.left+n.scrollLeft,width:e.width,height:e.height}},clearOff:function(){this.frmOff=null,this.cvsOff=null},getFrameOffset:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.frmOff&&!t||(this.frmOff=this.offset(this.frame.el)),this.frmOff},getCanvasOffset:function(){return this.cvsOff||(this.cvsOff=this.offset(this.el)),this.cvsOff},getElementPos:function(t,e){var n=e||{},i=this.getFrameOffset(),r=this.getCanvasOffset(),o=this.offset(t),s=n.avoidFrameOffset?0:i.top,a=n.avoidFrameOffset?0:i.left;return{top:o.top+s-r.top,left:o.left+a-r.left,height:t.offsetHeight||t.clientHeight,width:t.offsetWidth||t.clientWidth}},getPosition:function(){var t=this.frame.el.contentDocument;if(t){var e=t.body,n=this.getFrameOffset(),i=this.getCanvasOffset();return{top:n.top+e.scrollTop-i.top,left:n.left+e.scrollLeft-i.left}}},updateScript:function(t){t.scriptContainer||(t.scriptContainer=s("
"),this.getJsContainer().appendChild(t.scriptContainer.get(0)));var e=t.model,n=e.getId();t.el.id=n,t.scriptContainer.html("");var i=document.createElement("script");i.innerHTML="\n setTimeout(function() {\n var item = document.getElementById('"+n+"');\n if (!item) return;\n (function(){\n "+e.getScriptString()+";\n }.bind(item))()\n }, 1);",setTimeout(function(){return t.scriptContainer.get(0).appendChild(i)},0)},getJsContainer:function(){return this.jsContainer||(this.jsContainer=s('
').get(0)),this.jsContainer},render:function(){if(this.wrapper=this.model.get("wrapper"),this.wrapper&&"function"==typeof this.wrapper.render){this.model.get("frame").set("wrapper",this.wrapper),this.$el.append(this.frame.render().el);var t=this.frame;0===this.config.scripts.length?t.el.onload=this.renderBody:this.renderScripts()}var e=this.ppfx;this.$el.append('\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n ');var n=this.el,i=n.querySelector("#"+e+"tools");return this.hlEl=n.querySelector("."+e+"highlighter"),this.badgeEl=n.querySelector("."+e+"badge"),this.placerEl=n.querySelector("."+e+"placeholder"),this.ghostEl=n.querySelector("."+e+"ghost"),this.toolbarEl=n.querySelector("."+e+"toolbar"),this.resizerEl=n.querySelector("."+e+"resizer"),this.offsetEl=n.querySelector("."+e+"offset-v"),this.fixedOffsetEl=n.querySelector("."+e+"offset-fixed-v"),this.toolsEl=i,this.el.className=this.className,this}})}).call(this,n(1))},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.Model.extend({defaults:{wrapper:"",width:"",height:"",attributes:{}}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=n(108);t.exports=i.default.Model.extend({defaults:{frame:"",wrapper:"",rulers:!1},initialize:function(t){var e=this.conf||{};this.set("frame",new r(e.frame))}})},function(t,e,n){"use strict";t.exports={stylePrefix:"cv-",rulers:!1,scripts:[],styles:[],customBadgeLabel:""}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n";this.sorter.setDropContent(o),this.sorter.startSort(),e.trigger("canvas:dragenter",n,o)}}},{key:"handleDragOver",value:function(t){t.preventDefault(),this.em.trigger("canvas:dragover",t)}},{key:"handleDrop",value:function(t){t.preventDefault();var e=t.dataTransfer,n=this.getContentByData(e).content;t.target.style.border="",n?this.sorter.setDropContent(n):this.sorter.moved=0,this.endDrop(0,t)}},{key:"getContentByData",value:function(t){var e=this.em,n=t.types,i=t.files,r=e.get("dragContent"),s=t.getData("text");if(i.length){s=[];for(var a=0;a=0)s=t.getData("text/html").replace(/<\/?meta[^>]*>/g,"");else if((0,o.indexOf)(n,"text/uri-list")>=0)s={type:"link",attributes:{href:s},content:s};else if((0,o.indexOf)(n,"text/json")>=0){var u=t.getData("text/json");u&&(s=JSON.parse(u))}var h={content:s};return e.trigger("canvas:dragdata",t,h),h}}]),t}();e.default=s},function(t,e,n){"use strict";var i=n(2),r=function(t){return t&&t.__esModule?t:{default:t}}(n(111));t.exports=function(){var t,e,o={},s=n(110),a=n(109),l=n(107);return{getCanvasView:function(){return l},name:"Canvas",init:function(e){for(var n in o=e||{},s)n in o||(o[n]=s[n]);var i=o.pStylePrefix;i&&(o.stylePrefix=i+o.stylePrefix),t=new a(e),l=new l({model:t,config:o});var r=o.em.get("DomComponents");return r&&this.setWrapper(r),this.startAutoscroll=this.startAutoscroll.bind(this),this.stopAutoscroll=this.stopAutoscroll.bind(this),this.autoscroll=this.autoscroll.bind(this),this},getConfig:function(){return o},setWrapper:function(e){t.set("wrapper",e)},getElement:function(){return l.el},getFrameEl:function(){return l.frame.el},getDocument:function(){return this.getFrameEl().contentDocument},getWindow:function(){return this.getFrameEl().contentWindow},getBody:function(){return l.frame.el.contentDocument.body},getWrapperEl:function(){return this.getBody().querySelector("#wrapper")},getToolsEl:function(){return l.toolsEl},getHighlighter:function(){return l.hlEl},getBadgeEl:function(){return l.badgeEl},getPlacerEl:function(){return l.placerEl},getGhostEl:function(){return l.ghostEl},getToolbarEl:function(){return l.toolbarEl},getResizerEl:function(){return l.resizerEl},getOffsetViewerEl:function(){return l.offsetEl},getFixedOffsetViewerEl:function(){return l.fixedOffsetEl},render:function(){return l.render().el},getOffset:function(){var t=this.offset(this.getFrameEl()),e=this.offset(this.getElement());return{top:t.top-e.top,left:t.left-e.left}},offset:function(t){return l.offset(t)},setCustomBadgeLabel:function(t){o.customBadgeLabel=t},getElementPos:function(t,e){return l.getElementPos(t,e)},getTargetToElementDim:function(t,e,n){var i=n||{},r=l.getPosition();if(r){var s=i.elPos||l.getElementPos(e),a=n.toRight||0,c=i.targetHeight||t.offsetHeight,u=i.targetWidth||t.offsetWidth,h=i.event||null,d=s.top-c,f=s.left;f+=a?s.width:0;var p=(f=a?f-u:f)s.top+s.height?s.top+s.height:g,left:p,elementTop:s.top,elementLeft:s.left,elementWidth:s.width,elementHeight:s.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:r.top,canvasLeft:r.left};return h&&o.em&&o.em.trigger(h,v),v}},getMouseRelativePos:function(t,e){var n=0,i=0,r=(e||{}).subWinOffset,o=t.target.ownerDocument,s=o.defaultView||o.parentWindow,a=s.frameElement,l=r?s.pageYOffset:0,c=r?s.pageXOffset:0;if(a){var u=a.getBoundingClientRect();n=u.top||0,i=u.left||0}return{y:t.clientY+n-l,x:t.clientX+i-c}},getMouseRelativeCanvas:function(t,e){var n=this.getFrameEl(),i=this.getBody(),r=n.offsetTop||0,o=n.offsetLeft||0,s=i.scrollTop||0,a=i.scrollLeft||0;return{y:t.clientY+r+s,x:t.clientX+o+a}},hasFocus:function(){return this.getDocument().hasFocus()},isInputFocused:function(){return"BODY"!==this.getFrameEl().contentDocument.activeElement.tagName},scrollTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,i.getElement)(t);this.getCanvasView().isElInViewport(n)&&!e.force||n.scrollIntoView(e)},startAutoscroll:function(){var t=this;this.dragging=1;var n=this.getScrollListeners();e=l.getFrameOffset(1),setTimeout(function(){(0,i.on)(n,"mousemove",t.autoscroll),(0,i.on)(n,"mouseup",t.stopAutoscroll)},0)},autoscroll:function(t){if(t.preventDefault(),this.dragging){var n=this.getFrameEl().contentWindow,i=n.document.body.scrollTop,r=t.clientY,o=e.height-50;r<50&&(i-=50-r),r>o&&(i+=r-o),n.scrollTo(0,i)}},stopAutoscroll:function(){this.dragging=0;var t=this.getScrollListeners();(0,i.off)(t,"mousemove",this.autoscroll),(0,i.off)(t,"mouseup",this.stopAutoscroll)},getScrollListeners:function(){return[this.getFrameEl().contentWindow,this.getElement()]},postRender:function(){(0,i.hasDnd)(o.em)&&(this.droppable=new r.default(o.em))},getFrameWrapperEl:function(){return l.frame.getWrapper()}}}},function(t,e,n){"use strict";var i=n(53);t.exports=n(0).View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||"",this.pfx=e.stylePrefix||"",this.parent=t.parent;var n=this.pfx,i=this.ppfx,r=this.parent,o=this.collection;this.listenTo(o,"add",this.addTo),this.listenTo(o,"reset resetNavigator",this.render),this.listenTo(o,"remove",this.removeChildren),this.className=n+"layers";var s=e.em;if(e.sortable&&!this.opt.sorter){var a=s.get("Utils");this.opt.sorter=new a.Sorter({container:e.sortContainer||this.el,containerSel:"."+this.className,itemSel:"."+n+"layer",ignoreViewChildren:1,onEndMove:function(t,e){var n=e.getSourceModel();s.setSelected(n,{forceChange:1})},avoidSelectOnEnd:1,nested:1,ppfx:i,pfx:n})}this.sorter=this.opt.sorter||"",this.$el.data("collection",o),r&&this.$el.data("model",r)},removeChildren:function(t){var e=t.viewLayer;e&&e.remove.apply(e)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var r=this.level,o=e||null,s=i;if(this.isCountable(t,this.config.hideTextnode)){var a=new s({level:r,model:t,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}).render().el;if(o)o.appendChild(a);else if(void 0!==n){var l="before";this.$el.children().length==n&&(n--,l="after"),n<0?this.$el.append(a):this.$el.children().eq(n)[l](a)}else this.$el.append(a);return a}},isCountable:function(t,e){var n=t.get("type"),i=t.get("tagName");return!(("textnode"==n||"br"==i)&&e||!t.get("layerable"))},render:function(){var t=this,e=document.createDocumentFragment(),n=this.el;return n.innerHTML="",this.collection.each(function(n){return t.addToCollection(n,e)}),n.appendChild(e),n.className=this.className,this}})},function(t,e,n){"use strict";t.exports={stylePrefix:"",appendTo:"",sortable:1,hidable:1,hideTextnode:1,root:"",showWrapper:1,showHover:1,scrollCanvas:{behavior:"smooth"},scrollLayers:1,highlightHover:1}},function(t,e,n){"use strict";t.exports=n(0).View.extend({})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return{build:function(e){var n=[];"string"==typeof e&&(e=[e]);for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:{},n=this.target,o=this.get("name");if(!(0,r.isUndefined)(t))if(this.get("changeProp"))n.set(o,t,e);else{var s=i({},n.get("attributes"));s[o]=t,n.set("attributes",s,e)}},setValueFromInput:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={value:t};this.set(r,i({},n,{avoidStore:1})),e&&(this.set("value","",n),this.set(r,n))},getInitValue:function(){var t=this.target,e=this.get("name"),n=void 0;if(t){var i=t.get("attributes");n=this.get("changeProp")?t.get(e):i[e]}return n||this.get("value")||this.get("default")}})},function(t,e,n){"use strict";var i=n(1),r=n(0),o=n(140),s=n(139);t.exports=r.Collection.extend({model:o,initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.em=e.em||"",this.listenTo(this,"add",this.handleAdd)},handleAdd:function(t){var e=this.target;e&&(t.target=e)},setTarget:function(t){this.target=t},add:function(t,e){var n=this.em;if((0,i.isString)(t)||(0,i.isArray)(t)){var o=n&&n.get&&n.get("TraitManager"),a=o&&o.getConfig(),l=s(a);(0,i.isString)(t)&&(t=[t]);for(var c=0,u=t.length;c2&&void 0!==arguments[2]?arguments[2]:{},r=t.components(),o=s.get("UndoManager"),a=s.handleUpdates.bind(s),l=this.handleChanges.bind(this),c=this.handleRemoves.bind(this);o&&o.add(t),o&&r&&o.add(r);[[t,"change:style change:content change:attributes change:src",a],[r,"add",l],[r,"remove",c],[t.get("classes"),"add remove",a]].forEach(function(t){s.stopListening(t[0],t[1],t[2]),s.listenTo(t[0],t[1],t[2])}),!i.avoidStore&&a("","",i),r.each(function(t){return n.handleChanges(t,e,i)})},handleRemoves:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!n.avoidStore&&s.handleUpdates(t,e,n)},load:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e="";if(!t&&o.stm&&(t=o.em.getCacheLoad()),t.components)try{e=JSON.parse(t.components)}catch(t){}else t.html&&(e=t.html);var n=e&&e.constructor===Object;return(e&&e.length||n)&&(this.clear(),this.getComponents().reset(),n?this.getWrapper().set(e).initComponents().initClasses().loadTraits():this.getComponents().add(e)),e},store:function(t){if(o.stm){var e={},n=this.storageKey();if(n.indexOf("html")>=0&&(e.html=o.em.getHtml()),n.indexOf("components")>=0){var i=o.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(i)}return t||o.stm.store(e),e}},getComponent:function(){return t},getWrapper:function(){return this.getComponent()},getComponents:function(){return this.getWrapper().get("components")},addComponent:function(t){return this.getComponents().add(t)},render:function(){return e.render().el},clear:function(){return this.getComponents().reset(),this},setComponents:function(t){this.clear().addComponent(t)},addType:function(t,e){var n=this.getType(t);n?(n.model=e.model,n.view=e.view):(e.id=t,d.unshift(e))},getType:function(t){for(var e=d,n=0;n1&&void 0!==arguments[1]?arguments[1]:{};t&&(t.set({status:"selected"}),["component:selected","component:toggled"].forEach(function(i){return e.em.trigger(i,t,n)}))},selectRemove:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t){this.em;t.set({status:"",state:""}),["component:deselected","component:toggled"].forEach(function(i){return e.em.trigger(i,t,n)})}},componentHovered:function(){var t=o.em,e=t.get("componentHovered"),n=t.previous("componentHovered");n&&"hovered"==n.get("status")&&n.set({status:"",state:""}),e&&(0,r.isEmpty)(e.get("status"))&&e.set("status","hovered")}}}},function(t,e,n){"use strict";var i=n(9),r=n(69);t.exports=i.extend({getInputEl:function(){if(!this.$input){var t=this.model,e=this.getModelValue(),n=new r({model:t,target:this.config.em,contClass:this.ppfx+"field-color",ppfx:this.ppfx}).render();this.$input=n.colorEl,n.setValue(e,{fromTarget:1}),this.input=n}return this.$input.get(0)},renderField:function(){this.$input||(this.getInputEl(),this.$el.append(this.input.el))}})},function(t,e,n){"use strict";var i=n(9),r=n(42);t.exports=i.extend({getValueForTarget:function(){var t=this.model,e=t.get("value"),n=t.get("unit");return e?e+n:""},getInputEl:function(){if(!this.$input){var t=this.getModelValue(),e=new r({contClass:this.ppfx+"field-int",model:this.model,ppfx:this.ppfx});this.input=e.render(),this.$input=this.input.inputEl,this.$unit=this.input.unitEl,this.model.set("value",t),this.$input.val(t)}return this.$input.get(0)},renderField:function(){this.$input||(this.$el.append(this.tmpl),this.getInputEl(),this.$el.find("."+this.inputhClass).prepend(this.input.el))}})},function(t,e,n){"use strict";var i=n(9);t.exports=i.extend({initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.ppfx+"chk-icon";this.tmpl='
'},onChange:function(){this.model.set("value",this.getInputEl().checked)},getInputEl:function(){var t;this.$input||(t=1);for(var e=arguments.length,n=Array(e),r=0;r
'},getInputEl:function(){if(!this.$input){var t=this.model,n=t.get("options")||[],i="",this.input=i,this.$input=r(this.input);var o=this.target,s=t.get("name"),a=t.get("value");if(t.get("changeProp"))a=a||o.get(s);else a=o.get("attributes")[s];a&&this.$input.val(a)}return this.$input.get(0)}})}).call(this,n(1))},function(t,e,n){"use strict";var i=n(59),r=n(9),o=n(147),s=n(146),a=n(145),l=n(144);t.exports=i.extend({itemView:r,itemsView:{text:r,number:a,select:o,checkbox:s,color:l},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.config||{};this.config=e,this.em=t.editor,this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.className=this.pfx+"traits";this.listenTo(this.em,"component:toggled",this.updatedCollection),this.updatedCollection()},updatedCollection:function(){var t=this.ppfx,e=this.em.getSelected();this.el.className=this.className+" "+t+"one-bg "+t+"two-color",e&&(this.collection=e.get("traits"),this.render())}})},function(t,e,n){"use strict";t.exports={stylePrefix:"trt-",appendTo:"",labelContainer:"Component settings",labelPlhText:"eg. Text here",labelPlhHref:"eg. https://google.com",optionsTarget:[{value:"",name:"This window"},{value:"_blank",name:"New window"}],textNoElement:"Select an element before using Trait Manager"}},function(t,e,n){"use strict";var i=n(1),r=n(149),o=n(148);t.exports=function(){var t={},e=void 0;return{TraitsView:o,name:"TraitManager",getConfig:function(){return t},init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=n,(0,i.defaults)(t,r);var s=t.pStylePrefix;return s&&(t.stylePrefix=""+s+t.stylePrefix),e=new o({collection:[],editor:t.em,config:t}),this},postRender:function(){var t=this.getConfig().appendTo;t&&((0,i.isElement)(t)?t:document.querySelector(t)).appendChild(this.render())},getTraitsViewer:function(){return e},addType:function(t,n){var i=e.itemView;e.itemsView[t]=i.extend(n)},getType:function(t){return e.itemsView[t]},render:function(){return e.render().el}}}},function(t,e,n){"use strict";t.exports=n(60).extend({_createElement:function(t){return document.createTextNode("")},render:function(){var t=this.model,e=t.get("important");return this.el.textContent=t.getDeclaration({important:e}),this}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=n(60),o=n(151),s=i.default.$,a=function(t,e){return t+(e?"-"+e.replace("%","pc"):"")};t.exports=i.default.View.extend({initialize:function(t){var e=t.config||{};this.atRules={},this.config=e,this.em=e.em,this.pfx=e.stylePrefix||"",this.className=this.pfx+"rules";var n=this.collection;this.listenTo(n,"add",this.addTo),this.listenTo(n,"reset",this.render)},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){if(this.renderStarted){var n=e||null,i=void 0,s=void 0,l={model:t,config:this.config};if("keyframes"===t.get("atRuleType")){var c=t.getAtRule(),u=this.atRules[c];if(!u){var h=document.createElement("style");u=document.createTextNode(""),h.appendChild(document.createTextNode(c+"{")),h.appendChild(u),h.appendChild(document.createTextNode("}")),this.atRules[c]=u,i=h}s=new o(l),u.appendData(s.render().el.textContent)}else i=(s=new r(l)).render().el;var d=this.className,f=t.get("mediaText"),p=a(d),g=p;if(f&&(g=a(d,this.getMediaWidth(f))),i){var v=n||this.el,m=void 0;try{m=v.querySelector("#"+g)}catch(t){}m||(m=v.querySelector("#"+p)),m.appendChild(i)}return i}},getMediaWidth:function(t){return t&&t.replace("("+this.em.getConfig("mediaCondition")+": ","").replace(")","")},render:function(){var t=this;this.renderStarted=1,this.atRules={};var e=this.$el,n=document.createDocumentFragment(),i=this.className;return e.empty(),this.em.get("DeviceManager").getAll().map(function(t){return t.get("widthMedia")}).sort(function(t,e){return(e&&e.replace("px","")||Number.MAX_VALUE)-(t&&t.replace("px","")||Number.MAX_VALUE)}).forEach(function(t){s('
').appendTo(n)}),this.collection.each(function(e){return t.addToCollection(e,n)}),e.append(n),e.attr("class",i),this}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=n(62);t.exports=i.default.Collection.extend({initialize:function(t,e){e&&e.em&&(this.editor=e.em),this.model=function(t,n){return!n.em&&e&&e.em&&(n.em=e.em),new r(t,n)}},add:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=this.editor.get("Parser").parseCss(t)),e.em=this.editor,i.default.Collection.prototype.add.apply(this,[t,e])}})},function(t,e,n){"use strict";t.exports={stylePrefix:"css-",staticRules:"",rules:[]}},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},n="change:style",i=o.get("UndoManager");i&&i.add(t);var r=o.handleUpdates.bind(o);o.stopListening(t,n,r),o.listenTo(t,n,r),!e.avoidStore&&r("","",e)},load:function(e){var n=e||"";!n&&s.stm&&(n=s.em.getCacheLoad());var i=n.styles||"";if(n.styles)try{i=JSON.parse(n.styles)}catch(t){}else n.css&&(i=s.em.get("Parser").parseCss(n.css));return(0,r.isArray)(i)?i.length&&t.reset(i):i&&t.reset(i),i},store:function(e){if(s.stm){var n={},i=this.storageKey();return i.indexOf("css")>=0&&(n.css=s.em.getCss()),i.indexOf("styles")>=0&&(n.styles=JSON.stringify(t)),e||s.stm.store(n),n}},add:function(e,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=n||"",c=r||"",u=i({},o),h=this.get(e,a,c,u);return h&&h.config&&!h.config.atRuleType?h:(u.state=a,u.mediaText=c,u.selectors="",(h=new l(u,s)).get("selectors").add(e),t.add(h),h)},get:function(e,n,i,r){var o=null;return t.each(function(t){o||t.compare(e,n,i,r)&&(o=t)}),o},getAll:function(){return t},clear:function(){return this.getAll().reset(),this},addCollection:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=t instanceof Array?t:[t],o=0,a=r.length;o1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.state||"",r=n.mediaText||o.getCurrentMedia(),s=o.get("SelectorManager").add({name:t,type:d.TYPE_ID}),a=this.add(s,i,r);return a.setStyle(e,n),a},getIdRule:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.state||"",i=e.mediaText||o.getCurrentMedia(),r=o.get("SelectorManager").get(t,d.TYPE_ID);return r&&this.get(r,n,i)},setClassRule:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.state||"",r=n.mediaText||o.getCurrentMedia(),s=o.get("SelectorManager").add({name:t,type:d.TYPE_CLASS}),a=this.add(s,i,r);return a.setStyle(e,n),a},getClassRule:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.state||"",i=e.mediaText||o.getCurrentMedia(),r=o.get("SelectorManager").get(t,d.TYPE_CLASS);return r&&this.get(r,n,i)},render:function(){return e.render().el}}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));n(64),n(65),n(63);t.exports=i.default.View.extend({events:{submit:"handleSubmit"},template:function(t){var e=t.pfx,n=t.ppfx;return'\n
\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n
\n
\n '},initialize:function(t){this.options=t,this.config=t.config,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"";var e=this.collection;this.listenTo(e,"reset",this.renderAssets),this.listenTo(e,"add",this.addToAsset),this.listenTo(e,"remove",this.removedAsset),this.listenTo(e,"deselectAll",this.deselectAll)},handleSubmit:function(t){t.preventDefault();var e=this.getAddInput(),n=e.value.trim(),i=this.config.handleAdd;n&&(e.value="",this.getAssetsEl().scrollTop=0,i?i.bind(this)(n):this.options.globalCollection.add(n,{at:0}))},getAssetsEl:function(){return this.el.querySelector("."+this.pfx+"assets")},getAddInput:function(){return this.inputUrl&&this.inputUrl.value||(this.inputUrl=this.el.querySelector("."+this.pfx+"add-asset input")),this.inputUrl},removedAsset:function(t){this.collection.length||this.toggleNoAssets()},addToAsset:function(t){1==this.collection.length&&this.toggleNoAssets(1),this.addAsset(t)},addAsset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.collection,i=this.config,r=new t.typeView({model:t,collection:n,config:i}).render().el;if(e)e.appendChild(r);else{var o=this.getAssetsEl();o&&o.insertBefore(r,o.firstChild)}return r},toggleNoAssets:function(t){var e=this.$el.find("."+this.pfx+"assets");if(t)e.empty();else{var n=this.config.noAssets;n&&e.append(n)}},deselectAll:function(){var t=this.pfx;this.$el.find("."+t+"highlight").removeClass(t+"highlight")},renderAssets:function(){var t=this,e=document.createDocumentFragment(),n=this.$el.find("."+this.pfx+"assets");n.empty(),this.toggleNoAssets(this.collection.length),this.collection.each(function(n){return t.addAsset(n,e)}),n.append(e)},render:function(){var t=this.options.fu.render().el;return this.$el.empty(),this.$el.append(t).append(this.template(this)),this.el.className=this.ppfx+"asset-manager",this.renderAssets(),this.rendered=1,this}})},function(t,e,n){"use strict";t.exports=n(0).Model.extend({idAttribute:"src",defaults:{type:"",src:""},getFilename:function(){return this.get("src").split("/").pop()},getExtension:function(){return this.getFilename().split(".").pop()}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};return void 0===e.at&&(e.at=0),s.add(t,e)},get:function(t){return s.where({src:t})[0]},getAll:function(){return s},getAllVisible:function(){return a.collection},remove:function(t){var e=this.get(t);return this.getAll().remove(e),this},store:function(e){var n={},i=JSON.stringify(this.getAll().toJSON());return n[this.storageKey]=i,!e&&t.stm&&t.stm.store(n),n},load:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.storageKey,n=t[e]||[];if("string"==typeof n)try{n=JSON.parse(t[e])}catch(t){}return n&&n.length&&this.getAll().reset(n),n},getContainer:function(){return a.el},getAssetsEl:function(){return a.el.querySelector("[data-el=assets]")},render:function(t){var e=t||this.getAll().models;return a.rendered||a.render(),a.collection.reset(e),this.getContainer()},addType:function(t,e){this.getAll().addType(t,e)},getType:function(t){return this.getAll().getType(t)},getTypes:function(){return this.getAll().getTypes()},AssetsView:function(){return a},FileUploader:function(){return l},onLoad:function(){this.getAll().reset(t.assets)},postRender:function(e){t.dropzone&&l.initDropzone(e)},setTarget:function(t){a.collection.target=t},onSelect:function(t){a.collection.onSelect=t},onClick:function(e){t.onClick=e},onDblClick:function(e){t.onDblClick=e}}}},function(t,e,n){"use strict";var i=o(n(1)),r=o(n(0));function o(t){return t&&t.__esModule?t:{default:t}}var s=n(16);t.exports=r.default.View.extend({template:i.default.template('\n
\n \n <%= label %>\n
'),events:{"click [data-sector-title]":"toggle"},initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.caretR="fa-caret-right",this.caretD="fa-caret-down";var e=this.model;this.listenTo(e,"change:open",this.updateOpen),this.listenTo(e,"updateVisibility",this.updateVisibility),this.listenTo(e,"destroy remove",this.remove)},updateVisibility:function(){var t;this.model.get("properties").each(function(e){e.get("visible")&&(t=1)}),this.el.style.display=t?"block":"none"},updateOpen:function(){this.model.get("open")?this.show():this.hide()},show:function(){this.$el.addClass(this.pfx+"open"),this.getPropertiesEl().style.display="",this.$caret.removeClass(this.caretR).addClass(this.caretD)},hide:function(){this.$el.removeClass(this.pfx+"open"),this.getPropertiesEl().style.display="none",this.$caret.removeClass(this.caretD).addClass(this.caretR)},getPropertiesEl:function(){return this.$el.find("."+this.pfx+"properties").get(0)},toggle:function(t){var e=this.model.get("open")?0:1;this.model.set("open",e)},render:function(){return this.$el.html(this.template({pfx:this.pfx,label:this.model.get("name")})),this.$caret=this.$el.find("#"+this.pfx+"caret"),this.renderProperties(),this.$el.attr("class",this.pfx+"sector no-select"),this.updateOpen(),this},renderProperties:function(){var t=this.model.get("properties");if(t){var e=new s({collection:t,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(e.render().el)}}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=t.config||{};this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.target=t.target||{},this.config=e;var n={};(0,o.extend)(n,r.default.Events);var s=document.body,a=document.createElement("el-"+(new Date).getTime());s.appendChild(a),n.computedDefault=i({},window.getComputedStyle(a)),s.removeChild(a),this.propTarget=n;var l=this.collection;this.listenTo(l,"add",this.addTo),this.listenTo(l,"reset",this.render),this.listenTo(this.target,"component:toggled component:update:classes component:update:state change:device",this.targetUpdated)},addTo:function(t){this.addToCollection(t)},targetUpdated:function(){var t=this.target,e=this.propTarget,n=t.getSelected();if(n){var i=t.get("Config").devicePreviewMode?"":n.get("state"),r=n.getEl();if(e.helper=null,r){var o=i?":"+i:null;e.computed=window.getComputedStyle(r,o)}n=t.get("StyleManager").getModelToStyle(n),i&&function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.get("CssComposer"),r=i.getAll(),o=i.getClassRule("hc-state");o?(r.remove(o),r.add(o)):o=i.setClassRule("hc-state"),o.set("important",1),o.setStyle(n),e.helper=o}(n.getStyle()),e.model=n,e.trigger("update")}},addToCollection:function(t,e){var n=e||null,i=new s({model:t,id:this.pfx+t.get("name").replace(" ","_").toLowerCase(),name:t.get("name"),properties:t.get("properties"),target:this.target,propTarget:this.propTarget,config:this.config}).render().el;return n?n.appendChild(i):this.$el.append(i),i},render:function(){var t=this,e=document.createDocumentFragment(),n=this.$el,i=this.pfx,r=this.ppfx;return n.empty(),this.collection.each(function(n){return t.addToCollection(n,e)}),n.append(e),n.addClass(i+"sectors "+r+"one-bg "+r+"two-color"),this}})},function(t,e,n){"use strict";n(0);t.exports=function(){return{build:function(t){var e=[];"string"==typeof t&&(t=[t]);for(var n=0,i=t.length;n\n \n
\n '},getSliderEl:function(){return this.slider||(this.slider=this.el.querySelector("input[type=range]")),this.slider},inputValueChanged:function(){var t=this.model,e=t.get("step");this.getInputEl().value=this.getSliderEl().value;var n=this.getInputValue()-e;t.set("value",n,{avoidStore:1}).set("value",n+e),this.elementUpdated()},inputValueChangedSoft:function(){this.getInputEl().value=this.getSliderEl().value,this.model.set("value",this.getInputValue(),{avoidStore:1}),this.elementUpdated()},setValue:function(t){this.getSliderEl().value=t,this.inputInst.setValue(t,{silent:1})},onRender:function(){r.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e\n \n \n
'+("Layer "+t.get("index"))+'
\n
\n \t
\n
\n
\n ⨯\n
\n
\n
\n '},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model;this.stackModel=t.stackModel||{},this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.sorter=t.sorter||null,this.propsConfig=t.propsConfig||{},this.customPreview=t.onPreview,this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:active",this.updateVisibility),this.listenTo(e.get("properties"),"change",this.updatePreview),e.get("preview")||this.$el.addClass(this.pfx+"no-preview"),e.view=this,e.set({droppable:0,draggable:1}),this.$el.data("model",e)},initSorter:function(t){this.sorter&&this.sorter.startSort(this.el)},remove:function(t){t&&t.stopPropagation&&t.stopPropagation();var e=this.model,n=e.collection,r=this.stackModel;i.default.View.prototype.remove.apply(this,arguments),n.contains(e)&&n.remove(e),r&&r.set&&(r.set({stackIndex:null},{silent:!0}),r.trigger("updateValue"))},onPreview:function(t){var e=t.split(" "),n=[];return this.model.get("properties").each(function(t,i){var r=e[i]||"";if(r&&"integer"==t.get("type")){var o=parseInt(r,10),s=r.replace(o,"");r=(o=(o=(o=isNaN(o)?0:o)>3?3:o)<-3?-3:o)+s}n.push(r)}),n.join(" ")},updatePreview:function(){var t=this.stackModel,e=this.customPreview,n=this.getPreviewEl(),i=this.model.getFullValue(),r=e?e(i):this.onPreview(i);r&&t&&n&&(n.style[t.get("property")]=r)},getPropertiesWrapper:function(){return this.propsWrapEl||(this.propsWrapEl=this.el.querySelector("[data-properties]")),this.propsWrapEl},getPreviewEl:function(){return this.previewEl||(this.previewEl=this.el.querySelector("[data-preview]")),this.previewEl},active:function(){var t=this.model,e=t.collection;e.active(e.indexOf(t))},updateVisibility:function(){var t=this.pfx,e=this.getPropertiesWrapper(),n=this.model.get("active");e.style.display=n?"":"none",this.$el[n?"addClass":"removeClass"](t+"active")},render:function(){var t=n(16),e=this.propsConfig,i=this.pfx+"layer",r=this.model,o=this.el,s=new t({collection:r.get("properties"),config:this.config,target:e.target,customValue:e.customValue,propTarget:e.propTarget,onChange:e.onChange}).render().el;return o.innerHTML=this.template(r),o.className=i,this.getPropertiesWrapper().appendChild(s),this.updateVisibility(),this.updatePreview(),this}})},function(t,e,n){"use strict";var i=n(0),r=n(167);t.exports=i.View.extend({initialize:function(t){this.config=t.config||{},this.stackModel=t.stackModel,this.preview=t.preview,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.propsConfig=t.propsConfig;var e=this.pfx,n=this.ppfx,i=this.collection;this.className=e+"layers "+n+"field",this.listenTo(i,"add",this.addTo),this.listenTo(i,"deselectAll",this.deselectAll),this.listenTo(i,"reset",this.render);var r=this.config.em||"",o=r?r.get("Utils"):"";this.sorter=o?new o.Sorter({container:this.el,ignoreViewChildren:1,containerSel:"."+e+"layers",itemSel:"."+e+"layer",pfx:this.config.pStylePrefix}):"",i.view=this,this.$el.data("model",i),this.$el.data("collection",i)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var i=e||null,o=this.stackModel,s=this.config,a=this.sorter,l=this.propsConfig;void 0!==this.preview&&t.set("preview",this.preview);var c=new r({model:t,config:s,sorter:a,stackModel:o,propsConfig:l}).render().el;if(i)i.appendChild(c);else if(void 0!==n){var u="before";this.$el.children().length==n&&(n--,u="after"),n<0?this.$el.append(c):this.$el.children().eq(n)[u](c)}else this.$el.append(c);return c},deselectAll:function(){this.$el.find("."+this.pfx+"layer").removeClass(this.pfx+"active")},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(e){this.addToCollection(e,t)},this),this.$el.append(t),this.$el.attr("class",this.className),this.sorter&&(this.sorter.plh=null),this}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=function(t,e){var n={beforeShow:h,move:h,change:h,show:h,hide:h,color:!1,flat:!1,showInput:!1,allowEmpty:!1,showButtons:!0,clickoutFiresChange:!0,showInitial:!1,showPalette:!1,showPaletteOnly:!1,hideAfterPaletteSelect:!1,togglePaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,appendTo:"body",maxSelectionSize:7,cancelText:"cancel",chooseText:"choose",togglePaletteMoreText:"more",togglePaletteLessText:"less",clearText:"Clear Color Selection",noColorSelectedText:"No Color Selected",preferredFormat:!1,className:"",containerClassName:"",replacerClassName:"",showAlpha:!1,theme:"sp-light",palette:[["#ffffff","#000000","#ff0000","#ff8000","#ffff00","#008000","#0000ff","#4b0082","#9400d3"]],selectionPalette:[],disabled:!1,offset:null},r=[],o=!!/msie/i.exec(window.navigator.userAgent),s=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div").style;return e.cssText="background-color:rgba(0,0,0,.5)",t(e.backgroundColor,"rgba")||t(e.backgroundColor,"hsla")}(),a=["
","
","
","
"].join(""),l=function(){var t="";if(o)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",t,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();function c(e,n,i,r){for(var o=[],a=0;a')}else{o.push(t("
").append(t('').attr("title",r.noColorSelectedText)).html())}}return"
"+o.join("")+"
"}function u(i,u){var h=function(e,i){var r=t.extend({},n,e);return r.callbacks={move:f(r.move,i),change:f(r.change,i),show:f(r.show,i),hide:f(r.hide,i),beforeShow:f(r.beforeShow,i)},r}(u,i),v=h.flat,m=h.showSelectionPalette,y=h.localStorageKey,b=h.theme,x=h.callbacks,w=function(t,e,n){var i;return function(){var r=this,o=arguments;n&&clearTimeout(i),!n&&i||(i=setTimeout(function(){i=null,t.apply(r,o)},e))}}(Vt,10),C=!1,k=!1,T=0,E=0,M=0,A=0,O=0,P=0,_=0,L=0,N=0,D=0,I=1,F=[],R=[],j={},z=h.selectionPalette.slice(0),V=h.maxSelectionSize,H="sp-dragging",$=null,B=i.ownerDocument,W=(B.body,t(i)),U=!1,q=t(l,B).addClass(b),K=q.find(".sp-picker-container"),Y=q.find(".sp-color"),G=q.find(".sp-dragger"),X=q.find(".sp-hue"),J=q.find(".sp-slider"),Z=q.find(".sp-alpha-inner"),Q=q.find(".sp-alpha"),tt=q.find(".sp-alpha-handle"),et=q.find(".sp-input"),nt=q.find(".sp-palette"),it=q.find(".sp-initial"),rt=q.find(".sp-cancel"),ot=q.find(".sp-clear"),st=q.find(".sp-choose"),at=q.find(".sp-palette-toggle"),lt=W.is("input"),ct=lt&&"color"===W.attr("type")&&g(),ut=lt&&!v,ht=ut?t(a).addClass(b).addClass(h.className).addClass(h.replacerClassName):t([]),dt=ut?ht:W,ft=ht.find(".sp-preview-inner"),pt=h.color||lt&&W.val(),gt=!1,vt=h.preferredFormat,mt=!h.showButtons||h.clickoutFiresChange,yt=!pt,bt=h.allowEmpty&&!ct;function xt(){if(h.showPaletteOnly&&(h.showPalette=!0),at.text(h.showPaletteOnly?h.togglePaletteMoreText:h.togglePaletteLessText),h.palette){F=h.palette.slice(0),R=t.isArray(F[0])?F:[F],j={};for(var e=0;e1&&(delete window.localStorage[y],t.each(e,function(t,e){Ct(e)}))}catch(t){}try{z=window.localStorage[y].split(";")}catch(t){}}}function Ct(e){if(m){var n=S(e).toRgbString();if(!j[n]&&-1===t.inArray(n,z))for(z.push(n);z.length>V;)z.shift();if(y&&window.localStorage)try{window.localStorage[y]=z.join(";")}catch(t){}}}function kt(){var e=It(),n=t.map(R,function(t,n){return c(t,e,"sp-palette-row sp-palette-row-"+n,h)});wt(),z&&n.push(c(function(){var t=[];if(h.showPalette)for(var e=0;ed&&d>i?Math.abs(p.left+i-d):0),p.top-=Math.min(p.top,p.top+r>f&&f>r?Math.abs(r+o-0):0),p}(q,dt))),jt(),h.showPalette&&kt(),W.trigger("reflow.spectrum"))}function Ht(){Lt(),U=!0,W.attr("disabled",!0),dt.addClass("sp-disabled")}!function(){if(o&&q.find("*:not(input)").attr("unselectable","on"),xt(),ut&&W.after(ht).hide(),bt||ot.hide(),v)W.after(q).hide();else{var e="parent"===h.appendTo?W.parent():t(h.appendTo);1!==e.length&&(e=t("body")),e.append(q)}function n(e){return e.data&&e.data.ignore?(Dt(t(e.target).closest(".sp-thumb-el").data("color")),Ft()):(Dt(t(e.target).closest(".sp-thumb-el").data("color")),Ft(),zt(!0),h.hideAfterPaletteSelect&&Lt()),!1}wt(),dt.bind("click.spectrum touchstart.spectrum",function(e){U||At(),e.stopPropagation(),t(e.target).is("input")||e.preventDefault()}),(W.is(":disabled")||!0===h.disabled)&&Ht(),q.click(d),et.change(Mt),et.bind("paste",function(){setTimeout(Mt,1)}),et.keydown(function(t){13==t.keyCode&&Mt()}),rt.text(h.cancelText),rt.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),Nt(),Lt()}),ot.attr("title",h.clearText),ot.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),yt=!0,Ft(),v&&zt(!0)}),st.text(h.chooseText),st.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),o&&et.is(":focus")&&et.trigger("change"),et.hasClass("sp-validation-error")||(zt(!0),Lt())}),at.text(h.showPaletteOnly?h.togglePaletteMoreText:h.togglePaletteLessText),at.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),h.showPaletteOnly=!h.showPaletteOnly,h.showPaletteOnly||v||q.css("left","-="+(K.outerWidth(!0)+5)),xt()}),p(Q,function(t,e,n){I=t/O,yt=!1,n.shiftKey&&(I=Math.round(10*I)/10),Ft()},Tt,Et),p(X,function(t,e){L=parseFloat(e/A),yt=!1,h.showAlpha||(I=1),Ft()},Tt,Et),p(Y,function(t,e,n){if(n.shiftKey){if(!$){var i=N*T,r=E-D*E,o=Math.abs(t-i)>Math.abs(e-r);$=o?"x":"y"}}else $=null;var s=!$||"y"===$;(!$||"x"===$)&&(N=parseFloat(t/T)),s&&(D=parseFloat((E-e)/E)),yt=!1,h.showAlpha||(I=1),Ft()},Tt,Et),pt?(Dt(pt),Rt(),vt=h.preferredFormat||S(pt).format,Ct(pt)):Rt(),v&&Ot();var i=o?"mousedown.spectrum":"click.spectrum touchstart.spectrum";nt.delegate(".sp-thumb-el",i,n),it.delegate(".sp-thumb-el:nth-child(1)",i,{ignore:!0},n)}();var $t={show:Ot,hide:Lt,toggle:At,reflow:Vt,option:function(n,i){return n===e?t.extend({},h):i===e?h[n]:(h[n]=i,"preferredFormat"===n&&(vt=h.preferredFormat),void xt())},enable:function(){U=!1,W.attr("disabled",!1),dt.removeClass("sp-disabled")},disable:Ht,offset:function(t){h.offset=t,Vt()},set:function(t){Dt(t),zt()},get:It,destroy:function(){W.show(),dt.unbind("click.spectrum touchstart.spectrum"),q.remove(),ht.remove(),r[$t.id]=null},container:q};return $t.id=r.push($t)-1,$t}function h(){}function d(t){t.stopPropagation()}function f(t,e){var n=Array.prototype.slice,i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function p(e,n,i,r){n=n||function(){},i=i||function(){},r=r||function(){};var s=document,a=!1,l={},c=0,u=0,h="ontouchstart"in window,d={};function f(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function p(t){if(a){if(o&&s.documentMode<9&&!t.button)return g();var i=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],r=i&&i.pageX||t.pageX,d=i&&i.pageY||t.pageY,p=Math.max(0,Math.min(r-l.left,u)),v=Math.max(0,Math.min(d-l.top,c));h&&f(t),n.apply(e,[p,v,t])}}function g(){a&&(t(s).unbind(d),t(s.body).removeClass("sp-dragging"),setTimeout(function(){r.apply(e,arguments)},0)),a=!1}d.selectstart=f,d.dragstart=f,d["touchmove mousemove"]=p,d["touchend mouseup"]=g,t(e).bind("touchstart mousedown",function(n){(n.which?3==n.which:2==n.button)||a||!1!==i.apply(e,arguments)&&(a=!0,c=t(e).height(),u=t(e).width(),l=t(e).offset(),t(s).bind(d),t(s.body).addClass("sp-dragging"),p(n),f(n))})}function g(){return t.fn.spectrum.inputTypeColorSupport()}t.fn.spectrum=function(e,n){if("string"==typeof e){var i=this,o=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=r[t(this).data("spectrum.id")];if(n){var s=n[e];if(!s)throw new Error("Spectrum: no such method: '"+e+"'");"get"==e?i=n.get():"container"==e?i=n.container:"option"==e?i=n.option.apply(n,o):"destroy"==e?(n.destroy(),t(this).removeData("spectrum.id")):s.apply(n,o)}}),i}return this.spectrum("destroy").each(function(){var n=u(this,t.extend({},e,t(this).data()));t(this).data("spectrum.id",n.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=p,t.fn.spectrum.defaults=n,t.fn.spectrum.inputTypeColorSupport=function e(){if(void 0===e._cachedResult){var n=t("")[0];e._cachedResult="color"===n.type&&""!==n.value}return e._cachedResult},t.spectrum={},t.spectrum.localization={},t.spectrum.palettes={},t.fn.spectrum.processNativeColorInputs=function(){var e=t("input[type=color]");e.length&&!g()&&e.spectrum({preferredFormat:"hex6"})};var v=/^[\s,#]+/,m=/\s+$/,y=0,b=Math,x=b.round,w=b.min,C=b.max,k=b.random,S=function t(e,n){if(e=e||"",n=n||{},e instanceof t)return e;if(!(this instanceof t))return new t(e,n);var r=function(t){var e={r:0,g:0,b:0},n=1,r=!1,o=!1;"string"==typeof t&&(t=function(t){t=t.replace(v,"").replace(m,"").toLowerCase();var e,n=!1;if($[t])t=$[t],n=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=X.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=X.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=X.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=X.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=X.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=X.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=X.hex8.exec(t))return{a:function(t){return K(t)/255}(e[1]),r:K(e[2]),g:K(e[3]),b:K(e[4]),format:n?"name":"hex8"};if(e=X.hex6.exec(t))return{r:K(e[1]),g:K(e[2]),b:K(e[3]),format:n?"name":"hex"};if(e=X.hex3.exec(t))return{r:K(e[1]+""+e[1]),g:K(e[2]+""+e[2]),b:K(e[3]+""+e[3]),format:n?"name":"hex"};return!1}(t));"object"==(void 0===t?"undefined":i(t))&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(e=function(t,e,n){return{r:255*U(t,255),g:255*U(e,255),b:255*U(n,255)}}(t.r,t.g,t.b),r=!0,o="%"===String(t.r).substr(-1)?"prgb":"rgb"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")?(t.s=G(t.s),t.v=G(t.v),e=function(t,e,n){t=6*U(t,360),e=U(e,100),n=U(n,100);var i=b.floor(t),r=t-i,o=n*(1-e),s=n*(1-r*e),a=n*(1-(1-r)*e),l=i%6;return{r:255*[n,s,o,o,a,n][l],g:255*[a,n,n,s,o,o][l],b:255*[o,o,a,n,n,s][l]}}(t.h,t.s,t.v),r=!0,o="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=G(t.s),t.l=G(t.l),e=function(t,e,n){var i,r,o;function s(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=U(t,360),e=U(e,100),n=U(n,100),0===e)i=r=o=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=s(l,a,t+1/3),r=s(l,a,t),o=s(l,a,t-1/3)}return{r:255*i,g:255*r,b:255*o}}(t.h,t.s,t.l),r=!0,o="hsl"),t.hasOwnProperty("a")&&(n=t.a));return n=W(n),{ok:r,format:t.format||o,r:w(255,C(e.r,0)),g:w(255,C(e.g,0)),b:w(255,C(e.b,0)),a:n}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=x(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=x(this._r)),this._g<1&&(this._g=x(this._g)),this._b<1&&(this._b=x(this._b)),this._ok=r.ok,this._tc_id=y++};function T(t,e,n){t=U(t,255),e=U(e,255),n=U(n,255);var i,r,o=C(t,e,n),s=w(t,e,n),a=(o+s)/2;if(o==s)i=r=0;else{var l=o-s;switch(r=a>.5?l/(2-o-s):l/(o+s),o){case t:i=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(S(i));return o}function H(t,e){e=e||6;for(var n=S(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(S({h:i,s:r,v:o})),o=(o+a)%1;return s}S.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},setAlpha:function(t){return this._a=W(t),this._roundA=x(100*this._a)/100,this},toHsv:function(){var t=E(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=E(this._r,this._g,this._b),e=x(360*t.h),n=x(100*t.s),i=x(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=T(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=T(this._r,this._g,this._b),e=x(360*t.h),n=x(100*t.s),i=x(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return M(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return A(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:x(this._r),g:x(this._g),b:x(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+x(this._r)+", "+x(this._g)+", "+x(this._b)+")":"rgba("+x(this._r)+", "+x(this._g)+", "+x(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:x(100*U(this._r,255))+"%",g:x(100*U(this._g,255))+"%",b:x(100*U(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+x(100*U(this._r,255))+"%, "+x(100*U(this._g,255))+"%, "+x(100*U(this._b,255))+"%)":"rgba("+x(100*U(this._r,255))+"%, "+x(100*U(this._g,255))+"%, "+x(100*U(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(B[M(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+A(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";t&&(n=S(t).toHex8String());return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,i=this._a<1&&this._a>=0;return e||!i||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"name"!==t?("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(L,arguments)},brighten:function(){return this._applyModification(N,arguments)},darken:function(){return this._applyModification(D,arguments)},desaturate:function(){return this._applyModification(O,arguments)},saturate:function(){return this._applyModification(P,arguments)},greyscale:function(){return this._applyModification(_,arguments)},spin:function(){return this._applyModification(I,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(V,arguments)},complement:function(){return this._applyCombination(F,arguments)},monochromatic:function(){return this._applyCombination(H,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(R,arguments)},tetrad:function(){return this._applyCombination(j,arguments)}},S.fromRatio=function(t,e){if("object"==(void 0===t?"undefined":i(t))){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]="a"===r?t[r]:G(t[r]));t=n}return S(t,e)},S.equals=function(t,e){return!(!t||!e)&&S(t).toRgbString()==S(e).toRgbString()},S.random=function(){return S.fromRatio({r:k(),g:k(),b:k()})},S.mix=function(t,e,n){n=0===n?0:n||50;var i,r=S(t).toRgb(),o=S(e).toRgb(),s=n/100,a=2*s-1,l=o.a-r.a,c=1-(i=((i=a*l==-1?a:(a+l)/(1+a*l))+1)/2),u={r:o.r*i+r.r*c,g:o.g*i+r.g*c,b:o.b*i+r.b*c,a:o.a*s+r.a*(1-s)};return S(u)},S.readability=function(t,e){var n=S(t),i=S(e),r=n.toRgb(),o=i.toRgb(),s=n.getBrightness(),a=i.getBrightness(),l=Math.max(r.r,o.r)-Math.min(r.r,o.r)+Math.max(r.g,o.g)-Math.min(r.g,o.g)+Math.max(r.b,o.b)-Math.min(r.b,o.b);return{brightness:Math.abs(s-a),color:l}},S.isReadable=function(t,e){var n=S.readability(t,e);return n.brightness>125&&n.color>500},S.mostReadable=function(t,e){for(var n=null,i=0,r=!1,o=0;o125&&s.color>500,l=s.brightness/125*3+s.color/500;(a&&!r||a&&r&&l>i||!a&&!r&&l>i)&&(r=a,i=l,n=S(e[o]))}return n};var $=S.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},B=S.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}($);function W(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function U(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=w(e,C(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),b.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function q(t){return w(1,C(0,t))}function K(t){return parseInt(t,16)}function Y(t){return 1==t.length?"0"+t:""+t}function G(t){return t<=1&&(t=100*t+"%"),t}var X=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",n="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+n),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();window.tinycolor=S,t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.Model.extend({defaults:{index:"",value:"",values:{},active:!1,preview:!1,properties:[]},initialize:function(){var t=n(18),e=this.get("properties"),i=this.get("value");if(this.set("properties",e instanceof t?e:new t(e)),!i){var r="",o=this.get("values");for(var s in o)r+=" "+o[s];this.set("value",r.trim())}},getPropertyValue:function(t){var e="";return this.get("properties").each(function(n){n.get("property")==t&&(e=n.getFullValue())}),e},getFullValue:function(){var t=[];return this.get("properties").each(function(e){return t.push(e.getFullValue())}),t.join(" ")}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;eB",attributes:{title:"Bold"},result:function(t){return t.exec("bold")}},italic:{name:"italic",icon:"I",attributes:{title:"Italic"},result:function(t){return t.exec("italic")}},underline:{name:"underline",icon:"U",attributes:{title:"Underline"},result:function(t){return t.exec("underline")}},strikethrough:{name:"strikethrough",icon:"S",attributes:{title:"Strike-through"},result:function(t){return t.exec("strikeThrough")}},link:{icon:'',name:"link",attributes:{style:"font-size:1.4rem;padding:0 4px 2px;",title:"Link"},result:function(t){return t.insertHTML(''+t.selection()+"")}}},l=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var r=n.el;if(r[s])return r[s];r[s]=this,this.setEl(r),this.updateActiveActions=this.updateActiveActions.bind(this);var o=n.actions||[];o.forEach(function(t,e){"string"==typeof t?t=a[t]:a[t.name]&&(t=i({},a[t.name],t)),o[e]=t});var l=o.length?o:Object.keys(a).map(function(t){return a[t]});n.classes=i({actionbar:"actionbar",button:"action",active:"active"},n.classes);var c=n.classes,u=n.actionbar;if(this.actionbar=u,this.settings=n,this.classes=c,this.actions=l,!u){var h=n.actionbarContainer;(u=document.createElement("div")).className=c.actionbar,h.appendChild(u),this.actionbar=u,l.forEach(function(t){return e.addAction(t)})}return n.styleWithCSS&&this.exec("styleWithCSS"),this.syncActions(),this}return r(t,[{key:"setEl",value:function(t){this.el=t,this.doc=t.ownerDocument}},{key:"updateActiveActions",value:function(){var t=this;this.getActions().forEach(function(e){var n=e.btn,i=e.update,r=t.classes.active,o=e.name,s=t.doc;n.className=n.className.replace(r,"").trim(),s.queryCommandSupported(o)&&s.queryCommandState(o)&&(n.className+=" "+r),i&&i(t,e)})}},{key:"enable",value:function(){return this.enabled?this:(this.actionbarEl().style.display="",this.el.contentEditable=!0,(0,o.on)(this.el,"mouseup keyup",this.updateActiveActions),this.syncActions(),this.updateActiveActions(),this.el.focus(),this.enabled=1,this)}},{key:"disable",value:function(){return this.actionbarEl().style.display="none",this.el.contentEditable=!1,(0,o.off)(this.el,"mouseup keyup",this.updateActiveActions),this.enabled=0,this}},{key:"syncActions",value:function(){var t=this;this.getActions().forEach(function(e){var n=e.event||"click";e.btn["on"+n]=function(n){e.result(t,e),t.updateActiveActions()}})}},{key:"addAction",value:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).sync,n=document.createElement("span"),i=t.icon,r=t.attributes||{};for(var o in n.className=this.classes.button,t.btn=n,r)n.setAttribute(o,r[o]);"string"==typeof i?n.innerHTML=i:n.appendChild(i),this.actionbarEl().appendChild(n),e&&(this.actions.push(t),this.syncActions())}},{key:"getActions",value:function(){return this.actions}},{key:"selection",value:function(){return this.doc.getSelection()}},{key:"exec",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.doc.execCommand(t,!1,e)}},{key:"actionbarEl",value:function(){return this.actionbar}},{key:"insertHTML",value:function(t){var e=this.doc,n=e.getSelection();if(n&&n.rangeCount){var i=e.createElement("div"),r=n.getRangeAt(0);r.deleteContents(),i.innerHTML=t,Array.prototype.slice.call(i.childNodes).forEach(function(t){r.insertNode(t),t}),n.removeAllRanges(),n.addRange(r),this.el.focus()}}}]),t}();e.default=l},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(177)),r=n(2);t.exports=function(){var t={},e=n(176),o=void 0,s=void 0,a=void 0,l=function(){var t=o.style;t.top="-100px",t.left="-100px",t.display="none"};return{customRte:null,name:"RichTextEditor",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var i in t=n,e)i in t||(t[i]=e[i]);var s=t.pStylePrefix;return s&&(t.stylePrefix=s+t.stylePrefix),this.pfx=t.stylePrefix,t.actions||[],(o=document.createElement("div")).className=s+"rte-toolbar "+s+"one-bg",a=this.initRte(document.createElement("div")),(0,r.on)(o,"mousedown",function(t){return t.stopPropagation()}),this},postRender:function(t){var e=t.model.get("Canvas");o.style.pointerEvents="all",l(),e.getToolsEl().appendChild(o)},initRte:function(e){var n=this.pfx,r=o,s=this.actionbar,l=this.actions||t.actions,c={actionbar:n+"actionbar",button:n+"action",active:n+"active"},u=new i.default({el:e,classes:c,actions:l,actionbar:s,actionbarContainer:r});return a&&a.setEl(e),u.actionbar&&(this.actionbar=u.actionbar),u.actions&&(this.actions=u.actions),u},add:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.name=t,a.addAction(e,{sync:1})},get:function(t){var e=void 0;return a.getActions().forEach(function(n){n.name==t&&(e=n)}),e},getAll:function(){return a.getActions()},remove:function(t){var e=this.getAll(),n=this.get(t);if(n){var i=n.btn,r=e.indexOf(n);i.parentNode.removeChild(i),e.splice(r,1)}return n},getToolbarEl:function(){return o},udpatePosition:function(){var e=t.em.get("Canvas").getTargetToElementDim(o,s,{event:"rteToolbarPosUpdate"});if(e){t.adjustToolbar&&e.top<=e.canvasTop&&(e.top=e.elementTop+e.elementHeight);var n=o.style;n.top=e.top+"px",n.left=e.left+"px"}},enable:function(e,n){s=e.el;var i=t.em,r=e.getChildrenContainer(),a=this.customRte;if(o.style.display="",n=a?a.enable(r,n):this.initRte(r).enable(),i){setTimeout(this.udpatePosition.bind(this),0);var l="change:canvasOffset canvasScroll";i.off(l,this.udpatePosition,this),i.on(l,this.udpatePosition,this),i.trigger("rte:enable",e,n)}return n},disable:function(e,n){var i=t.em,r=this.customRte,o=e.getChildrenContainer();r?r.disable(o,n):n&&n.disable(),l(),i&&i.trigger("rte:disable",e,n)}}}},function(t,e,n){"use strict";var i=n(0),r=n(78);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"";var e=this.collection;this.listenTo(e,"add",this.addTo),this.listenTo(e,"reset",this.render),this.listenTo(e,"remove",this.onRemove),this.className=this.pfx+"panels"},onRemove:function(t){var e=t.view;e&&e.remove()},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=this.config,o=t.get("el"),s=new r({el:o,model:t,config:i}),a=s.render().el,l=t.get("appendTo");if(o);else if(l){document.querySelector(l).appendChild(a)}else n?n.appendChild(a):this.$el.append(a);return s.initResize(),a},render:function(){var t=this,e=this.$el,n=document.createDocumentFragment();return e.empty(),this.collection.each(function(e){return t.addToCollection(e,n)}),e.append(n),e.attr("class",this.className),this}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e\n \t
<%= label %>
\n \t
\n
'),initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix},render:function(){var t=this.model.toJSON();return t.pfx=this.pfx,this.$el.html(this.template(t)),this.$el.attr("class",this.pfx+"editor-c"),this.$el.find("#"+this.pfx+"code").append(this.model.get("input")),this}})},function(t,e,n){!function(t){t.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e){return/^[;{}]$/.test(e)}}),t.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e,n,i){return this.jsonMode?/^[\[,{]$/.test(e)||/^}/.test(n):(";"!=e||!i.lexical||")"!=i.lexical.type)&&/^[;{}]$/.test(e)&&!/^;/.test(n)}});var e=/^(a|abbr|acronym|area|base|bdo|big|br|button|caption|cite|code|col|colgroup|dd|del|dfn|em|frame|hr|iframe|img|input|ins|kbd|label|legend|link|map|object|optgroup|option|param|q|samp|script|select|small|span|strong|sub|sup|textarea|tt|var)$/;t.extendMode("xml",{commentStart:"\x3c!--",commentEnd:"--\x3e",newlineAfterToken:function(t,n,i,r){var o=!1;return"html"==this.configuration&&(o=!!r.context&&e.test(r.context.tagName)),!o&&("tag"==t&&/>$/.test(n)&&r.context||/^-1&&a>-1&&a>s&&(t=t.substr(0,s)+t.substring(s+o.commentStart.length,a)+t.substr(a+o.commentEnd.length)),r.replaceRange(t,n,i)}})}),t.defineExtension("autoIndentRange",function(t,e){var n=this;this.operation(function(){for(var i=t.line;i<=e.line;i++)n.indentLine(i,"smart")})}),t.defineExtension("autoFormatRange",function(e,n){var i=this,r=i.getMode(),o=i.getRange(e,n).split("\n"),s=t.copyState(r,i.getTokenAt(e).state),a=i.getOption("tabSize"),l="",c=0,u=0===e.ch;function h(){l+="\n",u=!0,++c}for(var d=0;d!?|~^@]/,f=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function p(t,e,n){return i=t,r=n,e}function g(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=function(t){return function(e,n){var i,r=!1;if(a&&"@"==e.peek()&&e.match(f))return n.tokenize=g,p("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=t||r);)r=!r&&"\\"==i;return r||(n.tokenize=g),p("string","string")}}(n),e.tokenize(t,e);if("."==n&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return p("number","number");if("."==n&&t.match(".."))return p("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return p(n);if("="==n&&t.eat(">"))return p("=>","operator");if("0"==n&&t.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return p("number","number");if(/\d/.test(n))return t.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),p("number","number");if("/"==n)return t.eat("*")?(e.tokenize=v,v(t,e)):t.eat("/")?(t.skipToEnd(),p("comment","comment")):qt(t,e,1)?(function(t){for(var e,n=!1,i=!1;null!=(e=t.next());){if(!n){if("/"==e&&!i)return;"["==e?i=!0:i&&"]"==e&&(i=!1)}n=!n&&"\\"==e}}(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),p("regexp","string-2")):(t.eat("="),p("operator","operator",t.current()));if("`"==n)return e.tokenize=m,m(t,e);if("#"==n)return t.skipToEnd(),p("error","error");if(d.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||(t.eat("=")?"!"!=n&&"="!=n||t.eat("="):/[<>*+\-]/.test(n)&&(t.eat(n),">"==n&&t.eat(n))),p("operator","operator",t.current());if(u.test(n)){t.eatWhile(u);var i=t.current();if("."!=e.lastType){if(h.propertyIsEnumerable(i)){var r=h[i];return p(r.type,r.style,i)}if("async"==i&&t.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return p("async","keyword",i)}return p("variable","variable",i)}}function v(t,e){for(var n,i=!1;n=t.next();){if("/"==n&&i){e.tokenize=g;break}i="*"==n}return p("comment","comment")}function m(t,e){for(var n,i=!1;null!=(n=t.next());){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=g;break}i=!i&&"\\"==n}return p("quasi","string-2",t.current())}var y="([{}])";function b(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(c){var i=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,n));i&&(n=i.index)}for(var r=0,o=!1,s=n-1;s>=0;--s){var a=t.string.charAt(s),l=y.indexOf(a);if(l>=0&&l<3){if(!r){++s;break}if(0==--r){"("==a&&(o=!0);break}}else if(l>=3&&l<6)++r;else if(u.test(a))o=!0;else{if(/["'\/]/.test(a))return;if(o&&!r){++s;break}}}o&&!r&&(e.fatArrowAt=s)}}var x={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function w(t,e,n,i,r,o){this.indented=t,this.column=e,this.type=n,this.prev=r,this.info=o,null!=i&&(this.align=i)}function C(t,e){for(var n=t.localVars;n;n=n.next)if(n.name==e)return!0;for(var i=t.context;i;i=i.prev)for(var n=i.vars;n;n=n.next)if(n.name==e)return!0}var k={state:null,column:null,marked:null,cc:null};function S(){for(var t=arguments.length-1;t>=0;t--)k.cc.push(arguments[t])}function T(){return S.apply(null,arguments),!0}function E(t,e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}function M(t){var e=k.state;if(k.marked="def",e.context)if("var"==e.lexical.info&&e.context&&e.context.block){var i=function t(e,n){if(n){if(n.block){var i=t(e,n.prev);return i?i==n.prev?n:new O(i,n.vars,!0):null}return E(e,n.vars)?n:new O(n.prev,new P(e,n.vars),!1)}return null}(t,e.context);if(null!=i)return void(e.context=i)}else if(!E(t,e.localVars))return void(e.localVars=new P(t,e.localVars));n.globalVars&&!E(t,e.globalVars)&&(e.globalVars=new P(t,e.globalVars))}function A(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function O(t,e,n){this.prev=t,this.vars=e,this.block=n}function P(t,e){this.name=t,this.next=e}var _=new P("this",new P("arguments",null));function L(){k.state.context=new O(k.state.context,k.state.localVars,!1),k.state.localVars=_}function N(){k.state.context=new O(k.state.context,k.state.localVars,!0),k.state.localVars=null}function D(){k.state.localVars=k.state.context.vars,k.state.context=k.state.context.prev}function I(t,e){var n=function(){var n=k.state,i=n.indented;if("stat"==n.lexical.type)i=n.lexical.indented;else for(var r=n.lexical;r&&")"==r.type&&r.align;r=r.prev)i=r.indented;n.lexical=new w(i,k.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function F(){var t=k.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function R(t){return function e(n){return n==t?T():";"==t||"}"==n||")"==n||"]"==n?S():T(e)}}function j(t,e){return"var"==t?T(I("vardef",e),yt,R(";"),F):"keyword a"==t?T(I("form"),$,j,F):"keyword b"==t?T(I("form"),j,F):"keyword d"==t?k.stream.match(/^\s*$/,!1)?T():T(I("stat"),W,R(";"),F):"debugger"==t?T(R(";")):"{"==t?T(I("}"),N,st,F,D):";"==t?T():"if"==t?("else"==k.state.lexical.info&&k.state.cc[k.state.cc.length-1]==F&&k.state.cc.pop()(),T(I("form"),$,j,F,kt)):"function"==t?T(Ot):"for"==t?T(I("form"),St,j,F):"class"==t||c&&"interface"==e?(k.marked="keyword",T(I("form"),Lt,F)):"variable"==t?c&&"declare"==e?(k.marked="keyword",T(j)):c&&("module"==e||"enum"==e||"type"==e)&&k.stream.match(/^\s*\w/,!1)?(k.marked="keyword","enum"==e?T(Wt):"type"==e?T(ut,R("operator"),ut,R(";")):T(I("form"),bt,R("{"),I("}"),st,F,F)):c&&"namespace"==e?(k.marked="keyword",T(I("form"),V,st,F)):c&&"abstract"==e?(k.marked="keyword",T(j)):T(I("stat"),Q):"switch"==t?T(I("form"),$,R("{"),I("}","switch"),N,st,F,F,D):"case"==t?T(V,R(":")):"default"==t?T(R(":")):"catch"==t?T(I("form"),L,z,j,F,D):"export"==t?T(I("stat"),Ft,F):"import"==t?T(I("stat"),jt,F):"async"==t?T(j):"@"==e?T(V,j):S(I("stat"),V,R(";"),F)}function z(t){if("("==t)return T(Pt,R(")"))}function V(t,e){return B(t,e,!1)}function H(t,e){return B(t,e,!0)}function $(t){return"("!=t?S():T(I(")"),V,R(")"),F)}function B(t,e,n){if(k.state.fatArrowAt==k.stream.start){var i=n?X:G;if("("==t)return T(L,I(")"),rt(Pt,")"),F,R("=>"),i,D);if("variable"==t)return S(L,bt,R("=>"),i,D)}var r=n?q:U;return x.hasOwnProperty(t)?T(r):"function"==t?T(Ot,r):"class"==t||c&&"interface"==e?(k.marked="keyword",T(I("form"),_t,F)):"keyword c"==t||"async"==t?T(n?H:V):"("==t?T(I(")"),W,R(")"),F,r):"operator"==t||"spread"==t?T(n?H:V):"["==t?T(I("]"),Bt,F,r):"{"==t?ot(et,"}",null,r):"quasi"==t?S(K,r):"new"==t?T(function(t){return function(e){return"."==e?T(t?Z:J):"variable"==e&&c?T(gt,t?q:U):S(t?H:V)}}(n)):"import"==t?T(V):T()}function W(t){return t.match(/[;\}\)\],]/)?S():S(V)}function U(t,e){return","==t?T(V):q(t,e,!1)}function q(t,e,n){var i=0==n?U:q,r=0==n?V:H;return"=>"==t?T(L,n?X:G,D):"operator"==t?/\+\+|--/.test(e)||c&&"!"==e?T(i):c&&"<"==e&&k.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?T(I(">"),rt(ut,">"),F,i):"?"==e?T(V,R(":"),r):T(r):"quasi"==t?S(K,i):";"!=t?"("==t?ot(H,")","call",i):"."==t?T(tt,i):"["==t?T(I("]"),W,R("]"),F,i):c&&"as"==e?(k.marked="keyword",T(ut,i)):"regexp"==t?(k.state.lastType=k.marked="operator",k.stream.backUp(k.stream.pos-k.stream.start-1),T(r)):void 0:void 0}function K(t,e){return"quasi"!=t?S():"${"!=e.slice(e.length-2)?T(K):T(V,Y)}function Y(t){if("}"==t)return k.marked="string-2",k.state.tokenize=m,T(K)}function G(t){return b(k.stream,k.state),S("{"==t?j:V)}function X(t){return b(k.stream,k.state),S("{"==t?j:H)}function J(t,e){if("target"==e)return k.marked="keyword",T(U)}function Z(t,e){if("target"==e)return k.marked="keyword",T(q)}function Q(t){return":"==t?T(F,j):S(U,R(";"),F)}function tt(t){if("variable"==t)return k.marked="property",T()}function et(t,e){if("async"==t)return k.marked="property",T(et);if("variable"==t||"keyword"==k.style){return k.marked="property","get"==e||"set"==e?T(nt):(c&&k.state.fatArrowAt==k.stream.start&&(n=k.stream.match(/^\s*:\s*/,!1))&&(k.state.fatArrowAt=k.stream.pos+n[0].length),T(it));var n}else{if("number"==t||"string"==t)return k.marked=a?"property":k.style+" property",T(it);if("jsonld-keyword"==t)return T(it);if(c&&A(e))return k.marked="keyword",T(et);if("["==t)return T(V,at,R("]"),it);if("spread"==t)return T(H,it);if("*"==e)return k.marked="keyword",T(et);if(":"==t)return S(it)}}function nt(t){return"variable"!=t?S(it):(k.marked="property",T(Ot))}function it(t){return":"==t?T(H):"("==t?S(Ot):void 0}function rt(t,e,n){function i(r,o){if(n?n.indexOf(r)>-1:","==r){var s=k.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),T(function(n,i){return n==e||i==e?S():S(t)},i)}return r==e||o==e?T():T(R(e))}return function(n,r){return n==e||r==e?T():S(t,i)}}function ot(t,e,n){for(var i=3;i"),ut):void 0}function ht(t){if("=>"==t)return T(ut)}function dt(t,e){return"variable"==t||"keyword"==k.style?(k.marked="property",T(dt)):"?"==e?T(dt):":"==t?T(ut):"["==t?T(V,at,R("]"),dt):void 0}function ft(t,e){return"variable"==t&&k.stream.match(/^\s*[?:]/,!1)||"?"==e?T(ft):":"==t?T(ut):S(ut)}function pt(t,e){return"<"==e?T(I(">"),rt(ut,">"),F,pt):"|"==e||"."==t||"&"==e?T(ut):"["==t?T(R("]"),pt):"extends"==e||"implements"==e?(k.marked="keyword",T(ut)):void 0}function gt(t,e){if("<"==e)return T(I(">"),rt(ut,">"),F,pt)}function vt(){return S(ut,mt)}function mt(t,e){if("="==e)return T(ut)}function yt(t,e){return"enum"==e?(k.marked="keyword",T(Wt)):S(bt,at,wt,Ct)}function bt(t,e){return c&&A(e)?(k.marked="keyword",T(bt)):"variable"==t?(M(e),T()):"spread"==t?T(bt):"["==t?ot(bt,"]"):"{"==t?ot(xt,"}"):void 0}function xt(t,e){return"variable"!=t||k.stream.match(/^\s*:/,!1)?("variable"==t&&(k.marked="property"),"spread"==t?T(bt):"}"==t?S():T(R(":"),bt,wt)):(M(e),T(wt))}function wt(t,e){if("="==e)return T(H)}function Ct(t){if(","==t)return T(yt)}function kt(t,e){if("keyword b"==t&&"else"==e)return T(I("form","else"),j,F)}function St(t,e){return"await"==e?T(St):"("==t?T(I(")"),Tt,R(")"),F):void 0}function Tt(t){return"var"==t?T(yt,R(";"),Mt):";"==t?T(Mt):"variable"==t?T(Et):S(V,R(";"),Mt)}function Et(t,e){return"in"==e||"of"==e?(k.marked="keyword",T(V)):T(U,Mt)}function Mt(t,e){return";"==t?T(At):"in"==e||"of"==e?(k.marked="keyword",T(V)):S(V,R(";"),At)}function At(t){")"!=t&&T(V)}function Ot(t,e){return"*"==e?(k.marked="keyword",T(Ot)):"variable"==t?(M(e),T(Ot)):"("==t?T(L,I(")"),rt(Pt,")"),F,lt,j,D):c&&"<"==e?T(I(">"),rt(vt,">"),F,Ot):void 0}function Pt(t,e){return"@"==e&&T(V,Pt),"spread"==t?T(Pt):c&&A(e)?(k.marked="keyword",T(Pt)):S(bt,at,wt)}function _t(t,e){return"variable"==t?Lt(t,e):Nt(t,e)}function Lt(t,e){if("variable"==t)return M(e),T(Nt)}function Nt(t,e){return"<"==e?T(I(">"),rt(vt,">"),F,Nt):"extends"==e||"implements"==e||c&&","==t?("implements"==e&&(k.marked="keyword"),T(c?ut:V,Nt)):"{"==t?T(I("}"),Dt,F):void 0}function Dt(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||c&&A(e))&&k.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(k.marked="keyword",T(Dt)):"variable"==t||"keyword"==k.style?(k.marked="property",T(c?It:Ot,Dt)):"["==t?T(V,at,R("]"),c?It:Ot,Dt):"*"==e?(k.marked="keyword",T(Dt)):";"==t?T(Dt):"}"==t?T():"@"==e?T(V,Dt):void 0}function It(t,e){return"?"==e?T(It):":"==t?T(ut,wt):"="==e?T(H):S(Ot)}function Ft(t,e){return"*"==e?(k.marked="keyword",T($t,R(";"))):"default"==e?(k.marked="keyword",T(V,R(";"))):"{"==t?T(rt(Rt,"}"),$t,R(";")):S(j)}function Rt(t,e){return"as"==e?(k.marked="keyword",T(R("variable"))):"variable"==t?S(H,Rt):void 0}function jt(t){return"string"==t?T():"("==t?S(V):S(zt,Vt,$t)}function zt(t,e){return"{"==t?ot(zt,"}"):("variable"==t&&M(e),"*"==e&&(k.marked="keyword"),T(Ht))}function Vt(t){if(","==t)return T(zt,Vt)}function Ht(t,e){if("as"==e)return k.marked="keyword",T(zt)}function $t(t,e){if("from"==e)return k.marked="keyword",T(V)}function Bt(t){return"]"==t?T():S(rt(H,"]"))}function Wt(){return S(I("form"),bt,R("{"),I("}"),rt(Ut,"}"),F,F)}function Ut(){return S(bt,wt)}function qt(t,e,n){return e.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}return D.lex=!0,F.lex=!0,{startState:function(t){var e={tokenize:g,lastType:"sof",cc:[],lexical:new w((t||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&new O(null,null,!1),indented:t||0};return n.globalVars&&"object"==typeof n.globalVars&&(e.globalVars=n.globalVars),e},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),b(t,e)),e.tokenize!=v&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==i?n:(e.lastType="operator"!=i||"++"!=r&&"--"!=r?i:"incdec",function(t,e,n,i,r){var o=t.cc;for(k.state=t,k.stream=r,k.marked=null,k.cc=o,k.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){var s=o.length?o.pop():l?V:j;if(s(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return k.marked?k.marked:"variable"==n&&C(t,i)?"variable-2":e}}}(e,n,i,r,t))},indent:function(e,i){if(e.tokenize==v)return t.Pass;if(e.tokenize!=g)return 0;var r,a=i&&i.charAt(0),l=e.lexical;if(!/^\s*else\b/.test(i))for(var c=e.cc.length-1;c>=0;--c){var u=e.cc[c];if(u==F)l=l.prev;else if(u!=kt)break}for(;("stat"==l.type||"form"==l.type)&&("}"==a||(r=e.cc[e.cc.length-1])&&(r==U||r==q)&&!/^[,\.=+\-*:?[\(]/.test(i));)l=l.prev;s&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var h=l.type,f=a==h;return"vardef"==h?l.indented+("operator"==e.lastType||","==e.lastType?l.info.length+1:0):"form"==h&&"{"==a?l.indented:"form"==h?l.indented+o:"stat"==h?l.indented+(function(t,e){return"operator"==t.lastType||","==t.lastType||d.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}(e,i)?s||o:0):"switch"!=l.info||f||0==n.doubleIndentSwitch?l.align?l.column+(f?0:1):l.indented+(f?0:o):l.indented+(/^(?:case|default)\b/.test(i)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:a,jsonMode:l,expressionAllowed:qt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=V&&e!=H||t.cc.pop()}}}),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(6))},function(t,e,n){!function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",function(i,r){var o,s,a=i.indentUnit,l={},c=r.htmlMode?e:n;for(var u in c)l[u]=c[u];for(var u in r)l[u]=r[u];function h(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();return"<"==i?t.eat("!")?t.eat("[")?t.match("CDATA[")?n(f("atom","]]>")):null:t.match("--")?n(f("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(function t(e){return function(n,i){for(var r;null!=(r=n.next());){if("<"==r)return i.tokenize=t(e+1),i.tokenize(n,i);if(">"==r){if(1==e){i.tokenize=h;break}return i.tokenize=t(e-1),i.tokenize(n,i)}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=f("meta","?>"),"meta"):(o=t.eat("/")?"closeTag":"openTag",e.tokenize=d,"tag bracket"):"&"==i?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function d(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=h,o=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return o="equals",null;if("<"==n){e.tokenize=h,e.state=v,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=function(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=d;break}return"string"};return e.isInAttribute=!0,e}(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=h;break}n.next()}return t}}function p(t){t.context&&(t.context=t.context.prev)}function g(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(e))return;p(t)}}function v(t,e,n){return"openTag"==t?(n.tagStart=e.column(),m):"closeTag"==t?y:v}function m(t,e,n){return"word"==t?(n.tagName=e.current(),s="tag",w):l.allowMissingTagName&&"endTag"==t?(s="tag bracket",w(t,0,n)):(s="error",m)}function y(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&p(n),n.context&&n.context.tagName==i||!1===l.matchClosing?(s="tag",b):(s="tag error",x)}return l.allowMissingTagName&&"endTag"==t?(s="tag bracket",b(t,0,n)):(s="error",x)}function b(t,e,n){return"endTag"!=t?(s="error",b):(p(n),v)}function x(t,e,n){return s="error",b(t,0,n)}function w(t,e,n){if("word"==t)return s="attribute",C;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(i)?g(n,i):(g(n,i),n.context=new function(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}(n,i,r==n.indented)),v}return s="error",w}function C(t,e,n){return"equals"==t?k:(l.allowMissing||(s="error"),w(t,0,n))}function k(t,e,n){return"string"==t?S:"word"==t&&l.allowUnquoted?(s="string",w):(s="error",w(t,0,n))}function S(t,e,n){return"string"==t?S:w(t,0,n)}return h.isInText=!0,{startState:function(t){var e={tokenize:h,state:v,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;o=null;var n=e.tokenize(t,e);return(n||o)&&"comment"!=n&&(s=null,e.state=e.state(o||n,t,e),s&&(n="error"==s?n+" error":s)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+a;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=d&&e.tokenize!=h)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+a*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==k&&(t.state=w)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(6))},function(t,e,n){!function(t){"use strict";var e={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},n={};function i(t,e){var i=t.match(function(t){var e=n[t];return e||(n[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(e));return i?/^\s*(.*?)\s*$/.exec(i[2])[1]:""}function r(t,e){return new RegExp((e?"^":"")+"","i")}function o(t,e){for(var n in t)for(var i=e[n]||(e[n]=[]),r=t[n],o=r.length-1;o>=0;o--)i.unshift(r[o])}t.defineMode("htmlmixed",function(n,s){var a=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:s.multilineTagIndentFactor,multilineTagIndentPastTag:s.multilineTagIndentPastTag}),l={},c=s&&s.tags,u=s&&s.scriptTypes;if(o(e,l),c&&o(c,l),u)for(var h=u.length-1;h>=0;h--)l.script.unshift(["type",u[h].matches,u[h].mode]);function d(e,o){var s,c=a.token(e,o.htmlState),u=/\btag\b/.test(c);if(u&&!/[<>\s\/]/.test(e.current())&&(s=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&l.hasOwnProperty(s))o.inTag=s+" ";else if(o.inTag&&u&&/>$/.test(e.current())){var h=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var f=">"==e.current()&&function(t,e){for(var n=0;n-1?t.backUp(i.length-r):i.match(/<\/?$/)&&(t.backUp(i.length),t.match(e,!1)||t.match(i)),n}(t,v,e.localMode.token(t,e.localState))},o.localMode=p,o.localState=t.startState(p,a.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=e.current(),e.eol()&&(o.inTag+=" "));return c}return{startState:function(){var e=t.startState(a);return{token:d,inTag:null,localMode:null,localState:null,htmlState:e}},copyState:function(e){var n;return e.localState&&(n=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:n,htmlState:t.copyState(a,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,i){return!e.localMode||/^\s*<\//.test(n)?a.indent(e.htmlState,n):e.localMode.indent?e.localMode.indent(e.localState,n,i):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||a}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")}(n(6),n(189),n(188),n(81))},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},i="",r=this.em,o=r&&r.getConfig("avoidInlineStyle"),s=t.styleToString(),a=t.get("classes"),l=n.wrappesIsBody,c=t.get("wrapper");if(this.ids.push("#"+t.getId()),a.each(function(t){return e.compCls.push(t.getFullName())}),(!o||c)&&s){var u="#"+t.getId();i=(u=l&&c?"body":u)+"{"+s+"}"}return t.components().each(function(t){return i+=e.buildFromModel(t,n)}),i},build:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.cssc,o=n.em||"";this.em=o,this.compCls=[],this.ids=[];var s=this.buildFromModel(t,n),a=(0,i.isUndefined)(n.clearStyles)&&o?o.getConfig("clearStyles"):n.clearStyles;return r&&function(){var t=r.getAll(),i={},l=[];for(var c in t.each(function(t){var r=t.getAtRule();if(r){var o=i[r];o?o.push(t):i[r]=[t]}else s+=e.buildFromRule(t,l,n)}),i){var u="";i[c].forEach(function(t){return u+=e.buildFromRule(t,l,n)}),u&&(s+=c+"{"+u+"}")}o&&a&&t.remove(l)}(),s},buildFromRule:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="",o=t.selectorsToString({skipAdd:1}),s=t.get("selectorsAdd"),a=t.get("singleAtRule"),l=void 0;if(t.get("selectors").each(function(t){var e=t.getFullName();(n.compCls.indexOf(e)>=0||n.ids.indexOf(e)>=0||i.keepUnusedStyles)&&(l=1)}),o&&l||s||a){var c=t.getDeclaration();c&&(r+=c)}else e.push(t);return r}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.Model.extend({build:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.get("components");return e.exportWrapper?e.wrappesIsBody?""+this.buildModels(n)+"":t.toHTML():this.buildModels(n)},buildModels:function(t){var e="";return t.each(function(t){e+=t.toHTML()}),e}})},function(t,e,n){"use strict";t.exports={stylePrefix:"cm-",inlineCss:!1}},function(t,e,n){"use strict";var i=n(1);t.exports=function(){var t={},e=n(196),r=n(195),o=n(194),s=n(193),a=n(192),l=n(191),c=n(186),u={},h={},d={},f={};return{getConfig:function(){return t},config:t,EditorView:c,name:"CodeManager",init:function(n){for(var i in t=n||{},e)i in t||(t[i]=e[i]);var c=t.pStylePrefix;return c&&(t.stylePrefix=c+t.stylePrefix),h.html=new r,h.css=new o,h.json=new s,h.js=new a,f.CodeMirror=new l,this.loadDefaultGenerators().loadDefaultViewers(),this},addGenerator:function(t,e){return u[t]=e,this},getGenerator:function(t){return u[t]||null},getGenerators:function(){return u},addViewer:function(t,e){return d[t]=e,this},getViewer:function(t){return d[t]||null},getViewers:function(){return d},createViewer:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(0,i.isUndefined)(t.type)?"CodeMirror":t.type,n=this.getViewer(e)&&this.getViewer(e).clone(),r=document.createElement("div"),o=document.createElement("textarea");return r.appendChild(o),n.set(t),n.init(o),n.setElement(r),n},updateViewer:function(t,e){t.setContent(e)},getCode:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.em=t.em;var r=this.getGenerator(n);return r?r.build(e,i):""},loadDefaultGenerators:function(){for(var t in h)this.addGenerator(t,h[t]);return this},loadDefaultViewers:function(){for(var t in f)this.addViewer(t,f[t]);return this}}}},function(t,e,n){"use strict";t.exports=n(0).View.extend({template:function(t){var e=t.pfx,n=t.ppfx,i=t.content;return'
\n
\n
'+t.title+'
\n
\n
\n
\n
'+i+'
\n
\n
\n
\n '},events:{click:"onClick","click [data-close-modal]":"hide"},initialize:function(t){var e=this.model,n=t.config||{},i=n.stylePrefix||"";this.config=n,this.pfx=i,this.ppfx=n.pStylePrefix||"",this.listenTo(e,"change:open",this.updateOpen),this.listenTo(e,"change:title",this.updateTitle),this.listenTo(e,"change:content",this.updateContent)},onClick:function(t){this.config.backdrop&&t.target===this.el&&this.hide()},getCollector:function(){return this.$collector||(this.$collector=this.$el.find("."+this.pfx+"collector")),this.$collector},getContent:function(){var t=this.pfx;return this.$content||(this.$content=this.$el.find("."+t+"content #"+t+"c")),this.$content},getTitle:function(){return this.$title||(this.$title=this.$el.find("."+this.pfx+"title")),this.$title.get(0)},updateContent:function(){var t=this.getContent(),e=t.children(),n=this.getCollector(),i=this.model.get("content");e.length&&n.append(e),t.empty().append(i)},updateTitle:function(){var t=this.getTitle();t&&(t.innerHTML=this.model.get("title"))},updateOpen:function(){this.el.style.display=this.model.get("open")?"":"none"},hide:function(){this.model.set("open",0)},show:function(){this.model.set("open",1)},render:function(){var t=this.$el,e=this.pfx,n=(this.ppfx,this.model.toJSON());return n.pfx=this.pfx,n.ppfx=this.ppfx,t.html(this.template(n)),t.attr("class",e+"container"),this.updateOpen(),this}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{title:"",content:"",open:!1}})},function(t,e,n){"use strict";t.exports={stylePrefix:"mdl-",title:"",content:"",backdrop:!0}},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(200),o=n(199),s=n(198);return{name:"Modal",init:function(n){for(var a in i=n||{},r)a in i||(i[a]=r[a]);var l=i.pStylePrefix;return l&&(i.stylePrefix=l+i.stylePrefix),t=new o(i),e=new s({model:t,config:i}),this},postRender:function(t){var e=t.model.getConfig().el||t.el;this.render().appendTo(e)},open:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.title&&this.setTitle(t.title),t.content&&this.setContent(t.content),e.show(),this},close:function(){return e.hide(),this},isOpen:function(){return!!t.get("open")},setTitle:function(e){return t.set("title",e),this},getTitle:function(){return t.get("title")},setContent:function(e){return t.set("content"," "),t.set("content",e),this},getContent:function(){return t.get("content")},getContentEl:function(){return e.getContent().get(0)},getModel:function(){return t},render:function(){return e.render().$el}}}},function(t,e,n){"use strict";var i=n(10);t.exports=n(0).View.extend({template:function(){var t=this.pfx;this.ppfx;return'\n \n '+(this.model.get("label")||"")+'\n \n ⨯\n \n '},events:{"click [data-tag-remove]":"removeTag","click [data-tag-status]":"changeStatus","dblclick [data-tag-name]":"startEditTag","focusout [data-tag-name]":"endEditTag"},initialize:function(t){this.config=t.config||{},this.coll=t.coll||null,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=this.config.em,this.listenTo(this.model,"change:active",this.updateStatus)},getInputEl:function(){return this.inputEl||(this.inputEl=this.el.querySelector("[data-tag-name]")),this.inputEl},startEditTag:function(){var t=this.getInputEl();t.contentEditable=!0,t.focus()},endEditTag:function(){var t=this.model,e=this.getInputEl(),n=e.textContent,r=i.escapeName(n),o=this.target,s=o&&o.get("SelectorManager");e.contentEditable=!1,s&&(s.get(r)?e.innerText=t.get("label"):t.set({name:r,label:n}))},changeStatus:function(){this.model.set("active",!this.model.get("active"))},removeTag:function(t){var e=this,n=this.target,i=this.model,r=this.coll,o=(this.el,n&&n.getSelected());o&&(o.get,o.get("classes").remove(i)),r&&r.remove(i),setTimeout(function(){return e.remove()},0)},updateStatus:function(){var t="fa-check-square-o";this.$chk||(this.$chk=this.$el.find("#"+this.pfx+"checkbox")),this.model.get("active")?(this.$chk.removeClass("fa-square-o").addClass(t),this.$el.removeClass("opac50")):(this.$chk.removeClass(t).addClass("fa-square-o"),this.$el.addClass("opac50"))},render:function(){var t=this.pfx,e=this.ppfx;return this.$el.html(this.template()),this.$el.attr("class",t+"tag "+e+"three-bg"),this.updateStatus(),this}})},function(t,e,n){"use strict";var i=o(n(1)),r=o(n(0));function o(t){return t&&t.__esModule?t:{default:t}}var s=n(202);t.exports=r.default.View.extend({template:i.default.template('\n
\n
<%= label %>
\n
\n \n
\n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
<%= selectedLabel %>
\n
\n
\n
'),events:{},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.className=this.pfx+"tags",this.addBtnId=this.pfx+"add-tag",this.newInputId=this.pfx+"new",this.stateInputId=this.pfx+"states",this.stateInputC=this.pfx+"input-c",this.states=this.config.states||[],this.events["click #"+this.addBtnId]="startNewTag",this.events["blur #"+this.newInputId]="endNewTag",this.events["keyup #"+this.newInputId]="onInputKeyUp",this.events["change #"+this.stateInputId]="stateChanged",this.target=this.config.em,this.em=this.target,this.listenTo(this.target,"component:toggled",this.componentChanged),this.listenTo(this.target,"component:update:classes",this.updateSelector),this.listenTo(this.collection,"add",this.addNew),this.listenTo(this.collection,"reset",this.renderClasses),this.listenTo(this.collection,"remove",this.tagRemoved),this.delegateEvents()},tagRemoved:function(t){this.updateStateVis()},getStateOptions:function(){for(var t="",e=0;e'+this.states[e].label+"";return t},addNew:function(t){this.addToClasses(t)},startNewTag:function(t){this.$addBtn.get(0).style.display="none",this.$input.show().focus()},endNewTag:function(t){this.$addBtn.get(0).style.display="",this.$input.hide().val("")},onInputKeyUp:function(t){13===t.keyCode?this.addNewTag(this.$input.val()):27===t.keyCode&&this.endNewTag()},componentChanged:function(t){this.compTarget=this.target.getSelected();var e=this.compTarget,n=[];e&&(this.getStates().val(e.get("state")),n=e.get("classes").getValid()),this.collection.reset(n),this.updateStateVis()},updateStateVis:function(){var t=this.em,e=t&&t.getConfig("avoidInlineStyle");this.collection.length||e?this.getStatesC().css("display","block"):this.getStatesC().css("display","none"),this.updateSelector()},updateSelector:function(){var t=this.target.getSelected();if(this.compTarget=t,t&&t.get){var e=t.get("state"),n=this.collection,i=n.getFullString(n.getStyleable());i=i||"#"+t.getId(),i+=e?":"+e:"";var r=this.el.querySelector("#"+this.pfx+"sel");r&&(r.innerHTML=i)}},stateChanged:function(t){this.compTarget&&(this.compTarget.set("state",this.$states.val()),this.updateSelector())},addNewTag:function(t){var e=this.target,n=this.compTarget;if(t.trim()){if(e){var i=e.get("SelectorManager").add({label:t});if(n){var r=n.get("classes");r.length;r.add(i);r.length;this.collection.add(i),this.updateStateVis()}}this.endNewTag()}},addToClasses:function(t,e){var n=e||null,i=new s({model:t,config:this.config,coll:this.collection}).render().el;return n?n.appendChild(i):this.getClasses().append(i),i},renderClasses:function(){var t=document.createDocumentFragment();return this.collection.each(function(e){this.addToClasses(e,t)},this),this.getClasses()&&this.getClasses().empty().append(t),this},getClasses:function(){return this.$classes||(this.$classes=this.$el.find("#"+this.pfx+"tags-c")),this.$classes},getStates:function(){return this.$states||(this.$states=this.$el.find("#"+this.stateInputId)),this.$states},getStatesC:function(){return this.$statesC||(this.$statesC=this.$el.find("#"+this.stateInputC)),this.$statesC},render:function(){var t=this.ppfx,e=this.config,n=this.$el;return n.html(this.template({selectedLabel:e.selectedLabel,statesLabel:e.statesLabel,label:e.label,pfx:this.pfx,ppfx:this.ppfx})),this.$input=n.find("input#"+this.newInputId),this.$addBtn=n.find("#"+this.addBtnId),this.$classes=n.find("#"+this.pfx+"tags-c"),this.$states=n.find("#"+this.stateInputId),this.$statesC=n.find("#"+this.stateInputC),this.$states.append(this.getStateOptions()),this.renderClasses(),n.attr("class",this.className+" "+t+"one-bg "+t+"two-color"),this}})},function(t,e,n){"use strict";t.exports={stylePrefix:"clm-",appendTo:"",selectors:[],label:"Classes",statesLabel:"- State -",selectedLabel:"Selected",states:[{name:"hover",label:"Hover"},{name:"active",label:"Click"},{name:"nth-of-type(2n)",label:"Even/Odd"}]}},function(t,e,n){"use strict";var i=n(1),r=function(t){return(0,i.isString)(t)&&"#"==t[0]};t.exports=function(t){var e,o,s=t||{},a=n(204),l=n(10),c=n(19),u=n(203);return{Selector:l,Selectors:c,name:"SelectorManager",getConfig:function(){return s},init:function(t){for(var n in s=t||{},a)n in s||(s[n]=a[n]);var i=s.em,r=s.pStylePrefix;return r&&(s.stylePrefix=r+s.stylePrefix),o=new u({collection:new c([],{em:i,config:s}),config:s}),(e=new c(s.selectors)).on("add",function(t){return i.trigger("selector:add",t)}),this},postRender:function(){var t=this.getConfig().appendTo;t&&((0,i.isElement)(t)?t:document.querySelector(t)).appendChild(this.render([]))},add:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.isObject)(t)?n=t:n.name=t,r(n.name)&&(n.name=n.name.substr(1),n.type=l.TYPE_ID),n.label&&!n.name&&(n.name=l.escapeName(n.label));var o=n.name,s=o?this.get(o,n.type):e.where(n)[0];return s||e.add(n)},addClass:function(t){var n=[];return(0,i.isString)(t)&&(t=t.trim().split(" ")),t.forEach(function(t){return n.push(e.add({name:t}))}),n},get:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.TYPE_CLASS;return r(t)&&(t=t.substr(1),n=l.TYPE_ID),e.where({name:t,type:n})[0]},getAll:function(){return e},render:function(t){return t?new u({collection:new c(t),config:s}).render().el:o.render().el}}}},function(t,e,n){"use strict";var i={4:"media",5:"font-face",6:"page",7:"keyframes",11:"counter-style",12:"supports",13:"document",14:"font-feature-values",15:"viewport"},r=(0,n(1).keys)(i),o=["5","6","11","15"];t.exports=function(t){return{parseSelector:function(){for(var t=[],e=[],n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(","),i=0,r=n.length;i=0;if(p)u=1,h=i[c],d=this.parseCondition(l);else if(r.indexOf(c)>=0){var g=this.parseNode(l);d=this.parseCondition(l);for(var v=0,m=g.length;v<%= deviceLabel %>\n
\n \n \n \n
\n
\n
\n
\n '),events:{change:"updateDevice"},initialize:function(t){this.config=t.config||{},this.em=this.config.em,this.ppfx=this.config.pStylePrefix||"",this.events["click ."+this.ppfx+"add-trasp"]=this.startAdd,this.listenTo(this.em,"change:device",this.updateSelect),this.delegateEvents()},startAdd:function(){},updateDevice:function(){var t=this.em;if(t){var e=this.devicesEl,n=e?e.val():"";t.set("device",n)}},updateSelect:function(){var t=this.em,e=this.devicesEl;if(t&&t.getDeviceModel&&e){var n=t.getDeviceModel(),i=n?n.get("name"):"";e.val(i)}},getOptions:function(){var t="";return this.collection.each(function(e){var n=e.get("name");t+='"}),t},render:function(){var t=this.ppfx;return this.$el.html(this.template({ppfx:t,deviceLabel:this.config.deviceLabel})),this.devicesEl=this.$el.find("."+t+"devices"),this.devicesEl.append(this.getOptions()),this.el.className=t+"devices-c",this}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.Model.extend({idAttribute:"name",defaults:{name:"",width:"",height:"",widthMedia:null},initialize:function(){null==this.get("widthMedia")&&this.set("widthMedia",this.get("width"))}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=n(210);t.exports=i.default.Collection.extend({model:r})},function(t,e,n){"use strict";t.exports={devices:[],deviceLabel:"Device"}},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(212),o=n(211),s=n(209);return{name:"DeviceManager",init:function(n){for(var a in i=n||{},r)a in i||(i[a]=r[a]);return t=new o(i.devices),e=new s({collection:t,config:i}),this},add:function(e,n,i){var r=i||{};return r.name=e,r.width=n,t.add(r)},get:function(e){return t.get(e)},getAll:function(){return t},render:function(){return e.render().el}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=this.constructor;return this.then(function(n){return e.resolve(t()).then(function(){return n})},function(n){return e.resolve(t()).then(function(){return e.reject(n)})})}},function(t,e){var n,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var l,c=[],u=!1,h=-1;function d(){u&&l&&(u=!1,l.length?c=l.concat(c):h=-1,c.length&&f())}function f(){if(!u){var t=a(d);u=!0;for(var e=c.length;e;){for(l=c,c=[];++h1)for(var n=1;n=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(216),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(11))},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t){return t&&t.__esModule?t:{default:t}}(n(214));var o=setTimeout;function s(){}function a(t){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],d(t,this)}function l(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,a._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var i;try{i=n(t._value)}catch(t){return void u(e.promise,t)}c(e.promise,i)}else(1===t._state?c:u)(e.promise,t._value)})):t._deferreds.push(e)}function c(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"===(void 0===e?"undefined":i(e))||"function"==typeof e)){var n=e.then;if(e instanceof a)return t._state=3,t._value=e,void h(t);if("function"==typeof n)return void d(function(t,e){return function(){t.apply(e,arguments)}}(n,e),t)}t._state=1,t._value=e,h(t)}catch(e){u(t,e)}}function u(t,e){t._state=2,t._value=e,h(t)}function h(t){2===t._state&&0===t._deferreds.length&&a._immediateFn(function(){t._handled||a._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e1&&void 0!==arguments[1]?arguments[1]:{},n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.get("contentTypeJson"),a=this.get("headers")||{},l=this.get("params"),c=e.body||{},u=void 0,h=void 0;for(var d in l)c[d]=l[d];if((0,r.isUndefined)(a["X-Requested-With"])&&(a["X-Requested-With"]="XMLHttpRequest"),(0,r.isUndefined)(a["Content-Type"])&&s&&(a["Content-Type"]="application/json; charset=utf-8"),s)h=JSON.stringify(c);else for(var f in h=new FormData,c)h.append(f,c[f]);"post"===(u={method:e.method||"post",credentials:"include",headers:a}).method&&(u.body=h),this.onStart(),this.fetch(t,u).then(function(t){return 1==(t.status/200|0)?t.text():t.text().then(function(t){return Promise.reject(t)})}).then(function(t){return n.onResponse(t,i)}).catch(function(t){return n.onError(t,o)})}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{checkLocal:!0},store:function(t,e){for(var n in this.checkStorageEnvironment(),t)localStorage.setItem(n,t[n]);"function"==typeof e&&e()},load:function(t,e){this.checkStorageEnvironment();for(var n={},i=0,r=t.length;it.maximumStackLength&&(t.shift(),t.pointer--)}}}a.prototype={isRegistered:function(e){return e&&e.cid?this.registeredObjects[e.cid]:t.contains(this.registeredObjects,e)},register:function(t){return!this.isRegistered(t)&&(t&&t.cid?(this.registeredObjects[t.cid]=t,this.cidIndexes.push(t.cid)):this.registeredObjects.push(t),!0)},unregister:function(e){if(this.isRegistered(e)){if(e&&e.cid)delete this.registeredObjects[e.cid],this.cidIndexes.splice(t.indexOf(this.cidIndexes,e.cid),1);else{var n=t.indexOf(this.registeredObjects,e);this.registeredObjects.splice(n,1)}return!0}return!1},get:function(){return t.map(this.cidIndexes,function(t){return this.registeredObjects[t]},this).concat(this.registeredObjects)}};var d={add:{undo:function(t,e,n,i){t.remove(n,i)},redo:function(t,e,n,i){i.index&&(i.at=i.index),t.add(n,i)},on:function(e,n,i){return{object:n,before:void 0,after:e,options:t.clone(i)}}},remove:{undo:function(t,e,n,i){"index"in i&&(i.at=i.index),t.add(e,i)},redo:function(t,e,n,i){t.remove(e,i)},on:function(e,n,i){return{object:n,before:e,after:void 0,options:t.clone(i)}}},change:{undo:function(e,n,i,r){t.isEmpty(n)?t.each(t.keys(i),e.unset,e):(e.set(n),r&&r.unsetData&&r.unsetData.before&&r.unsetData.before.length&&t.each(r.unsetData.before,e.unset,e))},redo:function(e,n,i,r){t.isEmpty(i)?t.each(t.keys(n),e.unset,e):(e.set(i),r&&r.unsetData&&r.unsetData.after&&r.unsetData.after.length&&t.each(r.unsetData.after,e.unset,e))},on:function(e,n){var i=e.changedAttributes(),r=t.keys(i),o=t.pick(e.previousAttributes(),r),s=t.keys(o),a=(n||(n={})).unsetData={after:[],before:[]};return r.length!=s.length&&(r.length>s.length?t.each(r,function(t){t in o||a.before.push(t)},this):t.each(s,function(t){t in i||a.after.push(t)})),{object:e,before:o,after:i,options:t.clone(n)}}},reset:{undo:function(t,e,n){t.reset(e)},redo:function(t,e,n){t.reset(n)},on:function(e,n){return{object:e,before:n.previousModels,after:t.clone(e.models)}}}};function f(){}function p(e,n,i,r){if("object"==typeof n)return t.each(n,function(t,n){2===e?p(e,t,i,r):p(e,n,t,i)});switch(e){case 0:o(i,"undo","redo","on")&&t.all(t.pick(i,"undo","redo","on"),t.isFunction)&&(r[n]=i);break;case 1:r[n]&&t.isObject(i)&&(r[n]=t.extend({},r[n],i));break;case 2:delete r[n]}return this}f.prototype=d;var g=e.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(t){c("undo",this.attributes)},redo:function(t){c("redo",this.attributes)}}),v=e.Collection.extend({model:g,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(t){this.maximumStackLength=t}}),m=e.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(e){this.stack=new v,this.objectRegistry=new a,this.undoTypes=new f,this.stack.setMaxLength(this.get("maximumStackLength")),this.on("change:maximumStackLength",function(t,e){this.stack.setMaxLength(e)},this),e&&e.track&&this.startTracking(),e&&e.register&&(t.isArray(e.register)||t.isArguments(e.register)?i(this.register,this,e.register):this.register(e.register))},startTracking:function(){this.set("track",!0),this.stack.track=!0},stopTracking:function(){this.set("track",!1),this.stack.track=!1},isTracking:function(){return this.get("track")},_addToStack:function(t){h(this.stack,t,r(arguments,1),this.undoTypes)},register:function(){l("on",arguments,this._addToStack,this)},unregister:function(){l("off",arguments,this._addToStack,this)},unregisterAll:function(){i(this.unregister,this,this.objectRegistry.get())},undo:function(t){u("undo",this,this.stack,t)},undoAll:function(){u("undo",this,this.stack,!1,!0)},redo:function(t){u("redo",this,this.stack,t)},redoAll:function(){u("redo",this,this.stack,!1,!0)},isAvailable:function(t){var e=this.stack,n=e.length;switch(t){case"undo":return n>0&&e.pointer>-1;case"redo":return n>0&&e.pointer0&&void 0!==arguments[0]?arguments[0]:{};n=i({},a,s),t=n.em,this.em=t,(e=new r.default({track:!0,register:[]})).changeUndoType("change",{condition:!1}),e.changeUndoType("add",{on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.avoidStore)return{object:e,before:void 0,after:t,options:i({},n)}}}),e.changeUndoType("remove",{on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.avoidStore)return{object:e,before:t,after:void 0,options:i({},n)}}});var l={on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!o&&(o=t.previousAttributes()),!n.avoidStore){var i={object:t,before:o,after:t.toJSON()};return o=null,i}},undo:function(t,e,n,i){t.set(e)},redo:function(t,e,n,i){t.set(n)}};return["style","attributes","content","src"].forEach(function(t){return e.addUndoType("change:"+t,l)}),e.on("undo redo",function(){return t.trigger("component:toggled change:canvasOffset")}),["undo","redo"].forEach(function(n){return e.on(n,function(){return t.trigger(n)})}),this},getConfig:function(){return n},add:function(t){return e.register(t),this},remove:function(t){return e.unregister(t),this},removeAll:function(){return e.unregisterAll(),this},start:function(){return e.startTracking(),this},stop:function(){return e.stopTracking(),this},undo:function(){return t.get("Canvas").isInputFocused()||e.undo(1),this},undoAll:function(){return e.undoAll(),this},redo:function(){return t.get("Canvas").isInputFocused()||e.redo(1),this},redoAll:function(){return e.redoAll(),this},hasUndo:function(){return e.isAvailable("undo")},hasRedo:function(){return e.isAvailable("redo")},getStack:function(){return e.stack},clear:function(){return e.clear(),this},getInstance:function(){return e}}}},function(t,e,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return e=r({},a,n),t=e.em,this.em=t,this},onLoad:function(){var t=e.defaults;for(var n in t){var i=t[n];this.add(n,i.keys,i.handler)}},add:function(t,e,r){var a=this.em,l=a.get("Commands"),c=a.getEditor(),u={id:t,keys:e,handler:r};return n[t]&&this.remove(t),n[t]=u,s(e,function(e,n){"object"==(void 0===(r=(0,o.isString)(r)?l.get(r):r)?"undefined":i(r))?r.run(c):r(c);var s=[t,n.shortcut,e];a.trigger.apply(a,["keymap:emit"].concat(s)),a.trigger.apply(a,["keymap:emit:"+t].concat(s))}),a.trigger("keymap:add",u),u},get:function(t){return n[t]},getAll:function(){return n},remove:function(t){var e=this.em,i=this.get(t);if(i)return delete n[t],s.unbind(i.keys),e&&e.trigger("keymap:remove",i),i}}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0)).default.$;t.exports={setKey:function(t,e){},getElementRect:function(t){var e=this.opts.posFetcher||"";return e?e(t,{avoidFrameOffset:1}):function(t,e){var n=e||window,i=t.getBoundingClientRect();return{left:i.left+n.pageXOffset,top:i.top+n.pageYOffset,width:i.width,height:i.height}}(t)},init:function(t){return this.setOptions(t),this.handleMouseDown=this.handleMouseDown.bind(this),this.drag=this.drag.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this),this.setKey("up, right, down, left",this.handleKey),this},setOptions:function(t){this.opts=t||{}},focus:function(t){if(!t||t!==this.el){this.getDocumentEl(t),this.blur(),this.el=t,this.handlers=this.opts.dragHandlers||[t];var e=this.getElementRect(t);this.elRect=e,this.startTop=e.top,this.startLeft=e.left,this.getDocumentEl().on("mousedown",this.handleMouseDown)}},blur:function(){this.getDocumentEl().off("mousedown",this.handleMouseDown),this.el=null},start:function(t){this.startPos=this.getMousePos(t);var e=this.getDocumentEl();e.on("mousemove",this.drag),e.on("mouseup",this.stop);var n=this.opts.onStart;"function"==typeof n&&n(t,{docs:e,el:this.el,start:this.startPos,elRect:this.elRect}),this.drag(t)},stop:function(t){var e=this.getDocumentEl();e.off("mousemove",this.drag),e.off("mouseup",this.stop),this.lockedAxis=null;var n=this.opts.onEnd;"function"==typeof n&&n(t,{docs:e,delta:this.delta,end:{x:this.startLeft+this.delta.x,y:this.startTop+this.delta.y}})},handleMouseDown:function(t){var e=t.target;this.isHandler(e)&&this.start(t)},isHandler:function(t){var e=this.handlers;for(var n in e)if(e[n]===t)return!0;return!1},handleKey:function(t,e){switch(e.shortcut){case"up":this.move(0,-1);break;case"right":this.move(1,0);break;case"down":this.move(0,1);break;case"left":this.move(-1,0)}},getDocumentEl:function(t){t=t||this.el;if(!this.$doc){var e=[document];t&&e.push(t.ownerDocument),this.$doc=i(e)}return this.$doc},getMousePos:function(t){var e=this.opts.mousePosFetcher;return e?e(t):{x:t.clientX,y:t.clientY}},drag:function(t){var e=this.lockedAxis,n=this.getMousePos(t),i={x:n.x-this.startPos.x,y:n.y-this.startPos.y};if(t.shiftKey){if(!e){var r=i.x,o=i.y,s=Math.abs(r),a=Math.abs(o);o>=s||o<=-s?e="x":(r>a||r<-a)&&(e="y")}}else e=null;"x"===e&&(i.x=this.startPos.x),"y"===e&&(i.y=this.startPos.y),this.lockedAxis=e,this.delta=i,this.move(i.x,i.y);var l=this.opts.onDrag;"function"==typeof l&&l(t,{delta:i,current:{x:this.startLeft+i.x,y:this.startTop+i.y},lockedAxis:e}),0===t.which&&this.stop(t)},move:function(t,e){this.moveX(t),this.moveY(e)},moveX:function(t){var e=this.el,n=(this.opts,this.startLeft+t),i=this.opts.setX;"function"==typeof i?i(n,{el:e,start:this.startLeft,delta:t}):e.style.left=n+"px"},moveY:function(t){var e=this.el,n=(this.opts,this.startTop+t),i=this.opts.setY;"function"==typeof i?i(n,{el:e,start:this.startTop,delta:t}):e.style.top=n+"px"}}},function(t,e,n){"use strict";var i=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.setOptions(e),(0,r.bindAll)(this,"handleKeyDown","handleMouseDown","move","stop"),this}return i(t,[{key:"getConfig",value:function(){return this.opts}},{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opts=(0,r.defaults)(t,s),this.setup()}},{key:"setup",value:function(){var t=this.opts,e=t.prefix||"",n=t.appendTo||document.body,i=this.container;for(i||((i=document.createElement("div")).className=e+"resizer-c",n.appendChild(i),this.container=i);i.firstChild;)i.removeChild(i.firstChild);var r={};for(var o in["tl","tc","tr","cl","cr","bl","bc","br"].forEach(function(e){return r[e]=t[e]?function(t,e){var n=e.prefix||"",i=document.createElement("i");return i.className=n+"resizer-h "+n+"resizer-h-"+t,i.setAttribute("data-"+n+"handler",t),i}(e,t):""}),r){var s=r[o];s&&i.appendChild(s)}this.handlers=r,this.mousePosFetcher=t.mousePosFetcher,this.updateTarget=t.updateTarget,this.posFetcher=t.posFetcher,this.onStart=t.onStart,this.onMove=t.onMove,this.onEnd=t.onEnd}},{key:"toggleFrames",value:function(t){if(this.opts.silentFrames){var e=document.querySelectorAll("iframe");(0,r.each)(e,function(e){return e.style.pointerEvents=t?"none":""})}}},{key:"isHandler",value:function(t){var e=this.handlers;for(var n in e)if(e[n]===t)return!0;return!1}},{key:"getFocusedEl",value:function(){return this.el}},{key:"getDocumentEl",value:function(){return[this.el.ownerDocument,document]}},{key:"getElementPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.posFetcher||"";return n?n(t,e):function(t,e){var n=e||window,i=t.getBoundingClientRect();return{left:i.left+n.pageXOffset,top:i.top+n.pageYOffset,width:i.width,height:i.height}}(t)}},{key:"focus",value:function(t){if(!t||t!==this.el){this.el=t;var e=this.opts,n=this.getElementPos(t,{target:"container"}),i=this.container.style;e.avoidContainerUpdate||(i.left=n.left+"px",i.top=n.top+"px",i.width=n.width+"px",i.height=n.height+"px",i.display="block"),(0,o.on)(this.getDocumentEl(),"mousedown",this.handleMouseDown)}}},{key:"blur",value:function(){this.container.style.display="none",this.el&&((0,o.off)(this.getDocumentEl(),"mousedown",this.handleMouseDown),this.el=null)}},{key:"start",value:function(t){if(0===t.button){t.preventDefault(),t.stopPropagation();var e=this.el,n=this.opts||{},i="data-"+n.prefix+"handler",s=this.getElementPos(e,{target:"el"});this.handlerAttr=t.target.getAttribute(i),this.clickedHandler=t.target,this.startDim={t:s.top,l:s.left,w:s.width,h:s.height},this.rectDim={t:s.top,l:s.left,w:s.width,h:s.height},this.startPos={x:t.clientX,y:t.clientY};var a=this.getDocumentEl();(0,o.on)(a,"mousemove",this.move),(0,o.on)(a,"keydown",this.handleKeyDown),(0,o.on)(a,"mouseup",this.stop),(0,r.isFunction)(this.onStart)&&this.onStart(t,{docs:a,config:n,el:e,resizer:this}),this.toggleFrames(1),this.move(t)}}},{key:"move",value:function(t){var e=this.onMove,n=this.mousePosFetcher,i=n?n(t):{x:t.clientX,y:t.clientY};this.currentPos=i,this.delta={x:i.x-this.startPos.x,y:i.y-this.startPos.y},this.keys={shift:t.shiftKey,ctrl:t.ctrlKey,alt:t.altKey},this.rectDim=this.calc(this),this.updateRect(0),e&&e(t),0===t.which&&this.stop(t)}},{key:"stop",value:function(t){var e=this.opts,n=this.getDocumentEl();(0,o.off)(n,"mousemove",this.move),(0,o.off)(n,"keydown",this.handleKeyDown),(0,o.off)(n,"mouseup",this.stop),this.updateRect(1),this.toggleFrames(),(0,r.isFunction)(this.onEnd)&&this.onEnd(t,{docs:n,config:e})}},{key:"updateRect",value:function(t){var e=this.el,n=this.opts,i=this.rectDim,o=this.container.style,s=this.updateTarget,a=this.getSelectedHandler(),l=n.unitHeight,c=n.unitWidth,u=n.keyWidth,h=n.keyHeight;if((0,r.isFunction)(s))s(e,i,{store:t,selectedHandler:a,resizer:this,config:n});else{var d=e.style;d[u]=i.w+c,d[h]=i.h+l}var f=this.getElementPos(e,{target:"container"});n.avoidContainerUpdate||(o.left=f.left+"px",o.top=f.top+"px",o.width=f.width+"px",o.height=f.height+"px")}},{key:"getSelectedHandler",value:function(){var t=this.handlers;if(this.selectedHandler)for(var e in t)if(t[e]===this.selectedHandler)return e}},{key:"handleKeyDown",value:function(t){27===t.keyCode&&(this.rectDim=this.startDim,this.stop(t))}},{key:"handleMouseDown",value:function(t){var e=t.target;this.isHandler(e)?(this.selectedHandler=e,this.start(t)):e!==this.el&&(this.selectedHandler="",this.blur())}},{key:"calc",value:function(t){var e=void 0,n=this.opts||{},i=n.step,r=this.startDim,s=n.minDim,a=n.maxDim,l=t.delta.x,c=t.delta.y,u=r.w,h=r.h,d={t:0,l:0,w:u,h:h};if(t){var f=t.handlerAttr;~f.indexOf("r")&&(e=(0,o.normalizeFloat)(u+l*i,i),e=Math.max(s,e),a&&(e=Math.min(a,e)),d.w=e),~f.indexOf("b")&&(e=(0,o.normalizeFloat)(h+c*i,i),e=Math.max(s,e),a&&(e=Math.min(a,e)),d.h=e),~f.indexOf("l")&&(e=(0,o.normalizeFloat)(u-l*i,i),e=Math.max(s,e),a&&(e=Math.min(a,e)),d.w=e),~f.indexOf("t")&&(e=(0,o.normalizeFloat)(h-c*i,i),e=Math.max(s,e),a&&(e=Math.min(a,e)),d.h=e);var p=n.ratioDefault?!t.keys.shift:t.keys.shift;if(f.indexOf("c")<0&&p){var g=r.w/r.h;d.w/d.h>g?d.h=Math.round(d.w/g):d.w=Math.round(d.h*g)}return~f.indexOf("l")&&(d.l=r.w-d.w),~f.indexOf("t")&&(d.t=r.h-d.h),d}}}]),t}();t.exports={init:function(t){return new a(t)}}},function(t,e,n){"use strict";(function(e){var i=Object.assign||function(t){for(var e=1;es+c-10||ra+l-10)return 1},getCurrentPos:function(){var t=this.eventMove;return{x:t.pageX||0,y:t.pageY||0}},getDim:function(t){var e,n,i,r;if(this.canvasRelative&&this.em){var o=this.em.get("Canvas").getElementPos(t),s=window.getComputedStyle(t),a=parseFloat(s.marginTop),l=parseFloat(s.marginBottom),c=parseFloat(s.marginRight),u=parseFloat(s.marginLeft);e=o.top-a,n=o.left-u,i=o.height+a+l,r=o.width+u+c}else{var h=this.offset(t);e=this.relative?t.offsetTop:h.top-(this.wmargin?-1:1)*this.elT,n=this.relative?t.offsetLeft:h.left-(this.wmargin?-1:1)*this.elL,i=t.offsetHeight,r=t.offsetWidth}return[e,n,i,r]},getChildrenDim:function(t){var e=[];if(!t)return e;var n=this.getTargetModel(t);n&&n.view&&!this.ignoreViewChildren&&(t=n.view.getChildrenContainer());for(var i=t.children,r=0,o=i.length;rs||s>a+c-r||l+r>o||o>l+u-r)&&(i=1),!!i},findPosition:function(t,e,n){for(var i={index:0,method:"before"},r=0,o=0,s=0,a=0,l=0,c=0,u=0,h=0,d=0,f=t.length;do||a&&c>=a||r&&s0&&void 0!==arguments[0]?arguments[0]:{};this.config=e,this.set("Config",e),this.set("modules",[]),this.set("toLoad",[]),this.set("storables",[]);var n=e.el;n&&e.fromElement&&(this.config.components=n.innerHTML),this.attrsOrig=n?(0,r.toArray)(n.attributes).reduce(function(t,e){return t[e.nodeName]=e.nodeValue,t},{}):"",s.forEach(function(e){return t.loadModule(e)}),this.on("change:componentHovered",this.componentHovered,this),this.on("change:changesCount",this.updateChanges,this),[{from:"change:selectedComponent",to:"component:toggled"}].forEach(function(e){var n=e.from,i=e.to;t.listenTo(t,n,function(){for(var e=arguments.length,r=Array(e),o=0;o0&&void 0!==arguments[0]?arguments[0]:null,n=this.get("StorageManager");this.get("toLoad").forEach(function(t){t.onLoad()});var i=function(){t.get("modules").forEach(function(e){return e.postLoad&&e.postLoad(t)}),e&&e()};n&&n.canAutoload()?this.load(i):i()},updateChanges:function(){var t=this.get("StorageManager"),e=this.get("changesCount");this.config.noticeOnUnload&&e?window.onbeforeunload=function(t){return 1}:window.onbeforeunload=null,t.isAutosave()&&e>=t.getStepsBeforeSave()&&this.store()},loadModule:function(t){var e=this.config,n=new t,r=e[n.name.charAt(0).toLowerCase()+n.name.slice(1)]||e[n.name]||{};r.pStylePrefix=e.pStylePrefix||"";var o=this.get("StorageManager");if(n.storageKey&&n.store&&n.load&&o){r.stm=o;var s=this.get("storables");s.push(n),this.set("storables",s)}return r.em=this,n.init(i({},r)),!n.private&&this.set(n.name,n),n.onLoad&&this.get("toLoad").push(n),this.get("modules").push(n),this},init:function(t){this.set("Editor",t)},getEditor:function(){return this.get("Editor")},handleUpdates:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.temporary||(c&&clearInterval(c),c=setTimeout(function(){i.avoidStore||n.set("changesCount",n.get("changesCount")+1,i)},0))},componentHovered:function(t,e,n){var i=this.previous("componentHovered");i&&this.trigger("component:unhovered",i,n),e&&this.trigger("component:hovered",e,n)},getSelected:function(){return this.get("selected").last()},getSelectedAll:function(){return this.get("selected").models},setSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,r.isArray)(t),s=i?t:[t],a=this.get("selected");i&&this.removeSelected(a.filter(function(t){return!(0,r.contains)(s,t)})),s.forEach(function(t){var r=(0,o.getModel)(t,u);r&&!r.get("selectable")||(!i&&e.removeSelected(a.filter(function(t){return t!==r})),e.addSelected(r,n))})},addSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,o.getModel)(t,u);((0,r.isArray)(i)?i:[i]).forEach(function(t){if(!t||t.get("selectable")){var i=e.get("selected");n.forceChange&&i.remove(t,n),i.push(t,n)}})},removeSelected:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.get("selected").remove((0,o.getModel)(t,u),e)},toggleSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,o.getModel)(t,u);((0,r.isArray)(i)?i:[i]).forEach(function(t){e.get("selected").contains(t)?e.removeSelected(t,n):e.addSelected(t,n)})},setHovered:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,o.getModel)(t,u);n&&!n.get("hoverable")||(e.forceChange&&this.set("componentHovered",""),this.set("componentHovered",n,e))},setComponents:function(t){return this.get("DomComponents").setComponents(t)},getComponents:function(){var t=this.get("DomComponents"),e=this.get("CodeManager");if(t&&e){var n=t.getComponents();return e.getCode(n,"json")}},setStyle:function(t){for(var e=this.get("CssComposer").getAll(),n=0,i=e.length;n"+i+"<\/script>":""},getCss:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.config,n=e.wrappesIsBody,i=t.avoidProtected,o=(0,r.isUndefined)(t.keepUnusedStyles)?e.keepUnusedStyles:t.keepUnusedStyles,s=this.get("CssComposer"),a=this.get("DomComponents").getComponent();return(i?"":e.protectedCss)+this.get("CodeManager").getCode(a,"css",{cssc:s,wrappesIsBody:n,keepUnusedStyles:o})},getJs:function(){var t=this.get("DomComponents").getWrapper();return this.get("CodeManager").getCode(t,"js").trim()},store:function(t){var e=this,n=this.get("StorageManager"),i={};if(n)return this.get("storables").forEach(function(t){var e=t.store(1);for(var n in e)i[n]=e[n]}),n.store(i,function(n){t&&t(n),e.set("changesCount",0),e.trigger("storage:store",i)}),i},load:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.getCacheLoad(1,function(n){t.get("storables").forEach(function(t){return t.load(n)}),e&&e(n)})},getCacheLoad:function(t,e){var n=this,i=t?1:0;if(this.cacheLoad&&!i)return this.cacheLoad;var r=this.get("StorageManager"),o=[];if(!r)return{};this.get("storables").forEach(function(t){var e=t.storageKey;((e="function"==typeof e?e():e)instanceof Array?e:[e]).forEach(function(t){o.push(t)})}),r.load(o,function(t){n.cacheLoad=t,e&&e(t),setTimeout(function(){return n.trigger("storage:load",t)},0)})},getDeviceModel:function(){var t=this.get("device");return this.get("DeviceManager").get(t)},runDefault:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.get("Commands").get(this.config.defaultCommand);e&&!this.defaultRunning&&(e.stop(this,this,t),e.run(this,this,t),this.defaultRunning=1)},stopDefault:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.get("Commands").get(this.config.defaultCommand);e&&(e.stop(this,this,t),this.defaultRunning=0)},refreshCanvas:function(){this.set("canvasOffset",this.get("Canvas").getOffset())},clearSelection:function(t){(t||window).getSelection().removeAllRanges()},getCurrentMedia:function(){var t=this.config,e=this.getDeviceModel(),n=t.mediaCondition,i=t.devicePreviewMode,r=e&&e.get("widthMedia");return e&&r&&!i?"("+n+": "+r+")":""},getWrapper:function(){return this.get("DomComponents").getWrapper()},getDirtyCount:function(){return this.get("changesCount")},destroyAll:function(){var t=this.attributes,e=t.DomComponents,n=t.CssComposer,i=t.UndoManager,r=t.Panels,o=t.Canvas;e.clear(),n.clear(),i.clear().removeAll(),r.getPanels().reset(),o.getCanvasView().remove(),this.view.remove(),this.stopListening(),u(this.config.el).empty().attr(this.attrsOrig)},setEditing:function(t){return this.set("editing",t),this},isEditing:function(){return!!this.get("editing")},data:function(t,e,n){if(t["_gjs-data"]||(t["_gjs-data"]={}),(0,r.isUndefined)(n))return t["_gjs-data"][e];t["_gjs-data"][e]=n}})},function(t,e,n){"use strict";t.exports={stylePrefix:"gjs-",components:"",style:"",fromElement:0,noticeOnUnload:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",baseCss:"\n * {\n box-sizing: border-box;\n }\n html, body, #wrapper {\n min-height: 100%;\n }\n body {\n margin: 0;\n height: 100%;\n background-color: #fff\n }\n #wrapper {\n overflow: auto;\n overflow-x: hidden;\n }\n\n * ::-webkit-scrollbar-track {\n background: rgba(0, 0, 0, 0.1)\n }\n\n * ::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2)\n }\n\n * ::-webkit-scrollbar {\n width: 10px\n }\n ",protectedCss:"* { box-sizing: border-box; } body {margin: 0;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:1,allowScripts:0,showDevices:1,devicePreviewMode:0,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",keepEmptyTextNodes:0,jsInHtml:!0,nativeDnD:1,multipleSelection:1,exportWrapper:0,wrappesIsBody:1,avoidInlineStyle:0,avoidDefaults:0,clearStyles:0,el:"",undoManager:{},assetManager:{},canvas:{},layers:{},storageManager:{},rte:{},domComponents:{},modal:{},codeManager:{},panels:{},commands:{},cssComposer:{},selectorManager:{},deviceManager:{devices:[{name:"Desktop",width:""},{name:"Tablet",width:"768px",widthMedia:"992px"},{name:"Mobile landscape",width:"568px",widthMedia:"768px"},{name:"Mobile portrait",width:"320px",widthMedia:"480px"}]},styleManager:{sectors:[{name:"General",open:!1,buildProps:["float","display","position","top","right","left","bottom"]},{name:"Dimension",open:!1,buildProps:["width","height","max-width","min-height","margin","padding"]},{name:"Typography",open:!1,buildProps:["font-family","font-size","font-weight","letter-spacing","color","line-height","text-align","text-shadow"],properties:[{property:"text-align",list:[{value:"left",className:"fa fa-align-left"},{value:"center",className:"fa fa-align-center"},{value:"right",className:"fa fa-align-right"},{value:"justify",className:"fa fa-align-justify"}]}]},{name:"Decorations",open:!1,buildProps:["border-radius-c","background-color","border-radius","border","box-shadow","background"]},{name:"Extra",open:!1,buildProps:["transition","perspective","transform"]}]},blockManager:{},traitManager:{},textViewCode:"Code",keepUnusedStyles:0}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(20));t.exports=function(t){var e=t||{},r=n(233),o=n(232),s=n(89);for(var a in r)a in e||(e[a]=r[a]);e.pStylePrefix=e.stylePrefix;var l=new o(e),c=new s({model:l,config:e});return{$:i.default,editor:l,DomComponents:l.get("DomComponents"),LayerManager:l.get("LayerManager"),CssComposer:l.get("CssComposer"),StorageManager:l.get("StorageManager"),AssetManager:l.get("AssetManager"),BlockManager:l.get("BlockManager"),TraitManager:l.get("TraitManager"),SelectorManager:l.get("SelectorManager"),CodeManager:l.get("CodeManager"),Commands:l.get("Commands"),Keymaps:l.get("Keymaps"),Modal:l.get("Modal"),Panels:l.get("Panels"),StyleManager:l.get("StyleManager"),Canvas:l.get("Canvas"),UndoManager:l.get("UndoManager"),DeviceManager:l.get("DeviceManager"),RichTextEditor:l.get("RichTextEditor"),Utils:l.get("Utils"),Config:l.get("Config"),init:function(){return l.init(this),this},getConfig:function(t){return l.getConfig(t)},getHtml:function(t){return l.getHtml(t)},getCss:function(t){return l.getCss(t)},getJs:function(){return l.getJs()},getComponents:function(){return l.get("DomComponents").getComponents()},setComponents:function(t){return l.setComponents(t),this},addComponents:function(t,e){return this.getComponents().add(t,e)},getStyle:function(){return l.get("CssComposer").getAll()},setStyle:function(t){return l.setStyle(t),this},getSelected:function(){return l.getSelected()},getSelectedAll:function(){return l.getSelectedAll()},getSelectedToStyle:function(){var t=l.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},select:function(t){return l.setSelected(t),this},selectAdd:function(t){return l.addSelected(t),this},selectRemove:function(t){return l.removeSelected(t),this},selectToggle:function(t){return l.toggleSelected(t),this},setDevice:function(t){return l.set("device",t),this},getDevice:function(){return l.get("device")},runCommand:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=void 0,i=l.get("Commands").get(t);return i&&(n=i.callRun(this,e)),n},stopCommand:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=void 0,i=l.get("Commands").get(t);return i&&(n=i.callStop(this,e)),n},store:function(t){return l.store(t)},load:function(t){return l.load(t)},getContainer:function(){return e.el},getDirtyCount:function(){return l.getDirtyCount()},refresh:function(){l.refreshCanvas()},setCustomRte:function(t){this.RichTextEditor.customRte=t},on:function(t,e){return l.on(t,e)},off:function(t,e){return l.off(t,e)},trigger:function(t){return l.trigger.apply(l,arguments)},destroy:function(){return l.destroyAll()},getEl:function(){return c.el},getModel:function(){return l},render:function(){var t=this;return l.on("loaded",function(){t.UndoManager.clear(),l.get("modules").forEach(function(t){t.postRender&&t.postRender(c)})}),c.render(),c.el}}}},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},a=r.container;if(!a)throw new Error("'container' is required");(r=i({},n,r)).el=(0,s.isElement)(a)?a:document.querySelector(a);var l=new o.default(r).init();return r.plugins.forEach(function(e){var n=t.get(e);n?n(l,r.pluginsOpts[e]||{}):console.warn("Plugin "+e+" not found")}),l.getModel().loadOnStart(),r.autorender&&l.render(),e.push(l),l}}}()}])}); + */r=[n(84),n(223)],void 0===(o="function"==typeof(i=function(t,e){var n=Array.prototype.slice;function i(t,e,n){return n.length<=4?t.call(e,n[0],n[1],n[2],n[3]):t.apply(e,n)}function r(t,e){return n.call(t,e)}function o(e,n){return null!=e&&(t.isArray(n)||(n=r(arguments,1)),t.all(n,function(t){return t in e}))}var s=function(){var e=!1,n=-1;return function(){return e||(n++,e=!0,t.defer(function(){e=!1})),n}}();function a(){this.registeredObjects=[],this.cidIndexes=[]}function l(e,n,i,r){for(var o,s=0,a=n.length;st.maximumStackLength&&(t.shift(),t.pointer--)}}}a.prototype={isRegistered:function(e){return e&&e.cid?this.registeredObjects[e.cid]:t.contains(this.registeredObjects,e)},register:function(t){return!this.isRegistered(t)&&(t&&t.cid?(this.registeredObjects[t.cid]=t,this.cidIndexes.push(t.cid)):this.registeredObjects.push(t),!0)},unregister:function(e){if(this.isRegistered(e)){if(e&&e.cid)delete this.registeredObjects[e.cid],this.cidIndexes.splice(t.indexOf(this.cidIndexes,e.cid),1);else{var n=t.indexOf(this.registeredObjects,e);this.registeredObjects.splice(n,1)}return!0}return!1},get:function(){return t.map(this.cidIndexes,function(t){return this.registeredObjects[t]},this).concat(this.registeredObjects)}};var d={add:{undo:function(t,e,n,i){t.remove(n,i)},redo:function(t,e,n,i){i.index&&(i.at=i.index),t.add(n,i)},on:function(e,n,i){return{object:n,before:void 0,after:e,options:t.clone(i)}}},remove:{undo:function(t,e,n,i){"index"in i&&(i.at=i.index),t.add(e,i)},redo:function(t,e,n,i){t.remove(e,i)},on:function(e,n,i){return{object:n,before:e,after:void 0,options:t.clone(i)}}},change:{undo:function(e,n,i,r){t.isEmpty(n)?t.each(t.keys(i),e.unset,e):(e.set(n),r&&r.unsetData&&r.unsetData.before&&r.unsetData.before.length&&t.each(r.unsetData.before,e.unset,e))},redo:function(e,n,i,r){t.isEmpty(i)?t.each(t.keys(n),e.unset,e):(e.set(i),r&&r.unsetData&&r.unsetData.after&&r.unsetData.after.length&&t.each(r.unsetData.after,e.unset,e))},on:function(e,n){var i=e.changedAttributes(),r=t.keys(i),o=t.pick(e.previousAttributes(),r),s=t.keys(o),a=(n||(n={})).unsetData={after:[],before:[]};return r.length!=s.length&&(r.length>s.length?t.each(r,function(t){t in o||a.before.push(t)},this):t.each(s,function(t){t in i||a.after.push(t)})),{object:e,before:o,after:i,options:t.clone(n)}}},reset:{undo:function(t,e,n){t.reset(e)},redo:function(t,e,n){t.reset(n)},on:function(e,n){return{object:e,before:n.previousModels,after:t.clone(e.models)}}}};function f(){}function p(e,n,i,r){if("object"==typeof n)return t.each(n,function(t,n){2===e?p(e,t,i,r):p(e,n,t,i)});switch(e){case 0:o(i,"undo","redo","on")&&t.all(t.pick(i,"undo","redo","on"),t.isFunction)&&(r[n]=i);break;case 1:r[n]&&t.isObject(i)&&(r[n]=t.extend({},r[n],i));break;case 2:delete r[n]}return this}f.prototype=d;var g=e.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(t){c("undo",this.attributes)},redo:function(t){c("redo",this.attributes)}}),v=e.Collection.extend({model:g,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(t){this.maximumStackLength=t}}),m=e.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(e){this.stack=new v,this.objectRegistry=new a,this.undoTypes=new f,this.stack.setMaxLength(this.get("maximumStackLength")),this.on("change:maximumStackLength",function(t,e){this.stack.setMaxLength(e)},this),e&&e.track&&this.startTracking(),e&&e.register&&(t.isArray(e.register)||t.isArguments(e.register)?i(this.register,this,e.register):this.register(e.register))},startTracking:function(){this.set("track",!0),this.stack.track=!0},stopTracking:function(){this.set("track",!1),this.stack.track=!1},isTracking:function(){return this.get("track")},_addToStack:function(t){h(this.stack,t,r(arguments,1),this.undoTypes)},register:function(){l("on",arguments,this._addToStack,this)},unregister:function(){l("off",arguments,this._addToStack,this)},unregisterAll:function(){i(this.unregister,this,this.objectRegistry.get())},undo:function(t){u("undo",this,this.stack,t)},undoAll:function(){u("undo",this,this.stack,!1,!0)},redo:function(t){u("redo",this,this.stack,t)},redoAll:function(){u("redo",this,this.stack,!1,!0)},isAvailable:function(t){var e=this.stack,n=e.length;switch(t){case"undo":return n>0&&e.pointer>-1;case"redo":return n>0&&e.pointer0&&void 0!==arguments[0]?arguments[0]:{};n=i({},a,s),t=n.em,this.em=t,(e=new r.default({track:!0,register:[]})).changeUndoType("change",{condition:!1}),e.changeUndoType("add",{on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.avoidStore)return{object:e,before:void 0,after:t,options:i({},n)}}}),e.changeUndoType("remove",{on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.avoidStore)return{object:e,before:t,after:void 0,options:i({},n)}}});var l={on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!o&&(o=t.previousAttributes()),!n.avoidStore){var i={object:t,before:o,after:t.toJSON()};return o=null,i}},undo:function(t,e,n,i){t.set(e)},redo:function(t,e,n,i){t.set(n)}};return["style","attributes","content","src"].forEach(function(t){return e.addUndoType("change:"+t,l)}),e.on("undo redo",function(){return t.trigger("component:toggled change:canvasOffset")}),["undo","redo"].forEach(function(n){return e.on(n,function(){return t.trigger(n)})}),this},getConfig:function(){return n},add:function(t){return e.register(t),this},remove:function(t){return e.unregister(t),this},removeAll:function(){return e.unregisterAll(),this},start:function(){return e.startTracking(),this},stop:function(){return e.stopTracking(),this},undo:function(){return t.get("Canvas").isInputFocused()||e.undo(1),this},undoAll:function(){return e.undoAll(),this},redo:function(){return t.get("Canvas").isInputFocused()||e.redo(1),this},redoAll:function(){return e.redoAll(),this},hasUndo:function(){return e.isAvailable("undo")},hasRedo:function(){return e.isAvailable("redo")},getStack:function(){return e.stack},clear:function(){return e.clear(),this},getInstance:function(){return e}}}},function(t,e,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return e=r({},a,n),t=e.em,this.em=t,this},onLoad:function(){var t=e.defaults;for(var n in t){var i=t[n];this.add(n,i.keys,i.handler)}},add:function(t,e,r){var a=this.em,l=a.get("Commands"),c=a.getEditor(),u={id:t,keys:e,handler:r};return n[t]&&this.remove(t),n[t]=u,s(e,function(e,n){"object"==(void 0===(r=(0,o.isString)(r)?l.get(r):r)?"undefined":i(r))?r.run(c):r(c);var s=[t,n.shortcut,e];a.trigger.apply(a,["keymap:emit"].concat(s)),a.trigger.apply(a,["keymap:emit:"+t].concat(s))}),a.trigger("keymap:add",u),u},get:function(t){return n[t]},getAll:function(){return n},remove:function(t){var e=this.em,i=this.get(t);if(i)return delete n[t],s.unbind(i.keys),e&&e.trigger("keymap:remove",i),i}}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0)).default.$;t.exports={setKey:function(t,e){},getElementRect:function(t){var e=this.opts.posFetcher||"";return e?e(t,{avoidFrameOffset:1}):function(t,e){var n=e||window,i=t.getBoundingClientRect();return{left:i.left+n.pageXOffset,top:i.top+n.pageYOffset,width:i.width,height:i.height}}(t)},init:function(t){return this.setOptions(t),this.handleMouseDown=this.handleMouseDown.bind(this),this.drag=this.drag.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this),this.setKey("up, right, down, left",this.handleKey),this},setOptions:function(t){this.opts=t||{}},focus:function(t){if(!t||t!==this.el){this.getDocumentEl(t),this.blur(),this.el=t,this.handlers=this.opts.dragHandlers||[t];var e=this.getElementRect(t);this.elRect=e,this.startTop=e.top,this.startLeft=e.left,this.getDocumentEl().on("mousedown",this.handleMouseDown)}},blur:function(){this.getDocumentEl().off("mousedown",this.handleMouseDown),this.el=null},start:function(t){this.startPos=this.getMousePos(t);var e=this.getDocumentEl();e.on("mousemove",this.drag),e.on("mouseup",this.stop);var n=this.opts.onStart;"function"==typeof n&&n(t,{docs:e,el:this.el,start:this.startPos,elRect:this.elRect}),this.drag(t)},stop:function(t){var e=this.getDocumentEl();e.off("mousemove",this.drag),e.off("mouseup",this.stop),this.lockedAxis=null;var n=this.opts.onEnd;"function"==typeof n&&n(t,{docs:e,delta:this.delta,end:{x:this.startLeft+this.delta.x,y:this.startTop+this.delta.y}})},handleMouseDown:function(t){var e=t.target;this.isHandler(e)&&this.start(t)},isHandler:function(t){var e=this.handlers;for(var n in e)if(e[n]===t)return!0;return!1},handleKey:function(t,e){switch(e.shortcut){case"up":this.move(0,-1);break;case"right":this.move(1,0);break;case"down":this.move(0,1);break;case"left":this.move(-1,0)}},getDocumentEl:function(t){t=t||this.el;if(!this.$doc){var e=[document];t&&e.push(t.ownerDocument),this.$doc=i(e)}return this.$doc},getMousePos:function(t){var e=this.opts.mousePosFetcher;return e?e(t):{x:t.clientX,y:t.clientY}},drag:function(t){var e=this.lockedAxis,n=this.getMousePos(t),i={x:n.x-this.startPos.x,y:n.y-this.startPos.y};if(t.shiftKey){if(!e){var r=i.x,o=i.y,s=Math.abs(r),a=Math.abs(o);o>=s||o<=-s?e="x":(r>a||r<-a)&&(e="y")}}else e=null;"x"===e&&(i.x=this.startPos.x),"y"===e&&(i.y=this.startPos.y),this.lockedAxis=e,this.delta=i,this.move(i.x,i.y);var l=this.opts.onDrag;"function"==typeof l&&l(t,{delta:i,current:{x:this.startLeft+i.x,y:this.startTop+i.y},lockedAxis:e}),0===t.which&&this.stop(t)},move:function(t,e){this.moveX(t),this.moveY(e)},moveX:function(t){var e=this.el,n=(this.opts,this.startLeft+t),i=this.opts.setX;"function"==typeof i?i(n,{el:e,start:this.startLeft,delta:t}):e.style.left=n+"px"},moveY:function(t){var e=this.el,n=(this.opts,this.startTop+t),i=this.opts.setY;"function"==typeof i?i(n,{el:e,start:this.startTop,delta:t}):e.style.top=n+"px"}}},function(t,e,n){"use strict";var i=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.setOptions(e),(0,r.bindAll)(this,"handleKeyDown","handleMouseDown","move","stop"),this}return i(t,[{key:"getConfig",value:function(){return this.opts}},{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opts=(0,r.defaults)(t,s),this.setup()}},{key:"setup",value:function(){var t=this.opts,e=t.prefix||"",n=t.appendTo||document.body,i=this.container;for(i||((i=document.createElement("div")).className=e+"resizer-c",n.appendChild(i),this.container=i);i.firstChild;)i.removeChild(i.firstChild);var r={};for(var o in["tl","tc","tr","cl","cr","bl","bc","br"].forEach(function(e){return r[e]=t[e]?function(t,e){var n=e.prefix||"",i=document.createElement("i");return i.className=n+"resizer-h "+n+"resizer-h-"+t,i.setAttribute("data-"+n+"handler",t),i}(e,t):""}),r){var s=r[o];s&&i.appendChild(s)}this.handlers=r,this.mousePosFetcher=t.mousePosFetcher,this.updateTarget=t.updateTarget,this.posFetcher=t.posFetcher,this.onStart=t.onStart,this.onMove=t.onMove,this.onEnd=t.onEnd}},{key:"toggleFrames",value:function(t){if(this.opts.silentFrames){var e=document.querySelectorAll("iframe");(0,r.each)(e,function(e){return e.style.pointerEvents=t?"none":""})}}},{key:"isHandler",value:function(t){var e=this.handlers;for(var n in e)if(e[n]===t)return!0;return!1}},{key:"getFocusedEl",value:function(){return this.el}},{key:"getDocumentEl",value:function(){return[this.el.ownerDocument,document]}},{key:"getElementPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.posFetcher||"";return n?n(t,e):function(t,e){var n=e||window,i=t.getBoundingClientRect();return{left:i.left+n.pageXOffset,top:i.top+n.pageYOffset,width:i.width,height:i.height}}(t)}},{key:"focus",value:function(t){if(!t||t!==this.el){this.el=t;var e=this.opts,n=this.getElementPos(t,{target:"container"}),i=this.container.style;e.avoidContainerUpdate||(i.left=n.left+"px",i.top=n.top+"px",i.width=n.width+"px",i.height=n.height+"px",i.display="block"),(0,o.on)(this.getDocumentEl(),"mousedown",this.handleMouseDown)}}},{key:"blur",value:function(){this.container.style.display="none",this.el&&((0,o.off)(this.getDocumentEl(),"mousedown",this.handleMouseDown),this.el=null)}},{key:"start",value:function(t){if(0===t.button){t.preventDefault(),t.stopPropagation();var e=this.el,n=this.opts||{},i="data-"+n.prefix+"handler",s=this.getElementPos(e,{target:"el"});this.handlerAttr=t.target.getAttribute(i),this.clickedHandler=t.target,this.startDim={t:s.top,l:s.left,w:s.width,h:s.height},this.rectDim={t:s.top,l:s.left,w:s.width,h:s.height},this.startPos={x:t.clientX,y:t.clientY};var a=this.getDocumentEl();(0,o.on)(a,"mousemove",this.move),(0,o.on)(a,"keydown",this.handleKeyDown),(0,o.on)(a,"mouseup",this.stop),(0,r.isFunction)(this.onStart)&&this.onStart(t,{docs:a,config:n,el:e,resizer:this}),this.toggleFrames(1),this.move(t)}}},{key:"move",value:function(t){var e=this.onMove,n=this.mousePosFetcher,i=n?n(t):{x:t.clientX,y:t.clientY};this.currentPos=i,this.delta={x:i.x-this.startPos.x,y:i.y-this.startPos.y},this.keys={shift:t.shiftKey,ctrl:t.ctrlKey,alt:t.altKey},this.rectDim=this.calc(this),this.updateRect(0),e&&e(t),0===t.which&&this.stop(t)}},{key:"stop",value:function(t){var e=this.opts,n=this.getDocumentEl();(0,o.off)(n,"mousemove",this.move),(0,o.off)(n,"keydown",this.handleKeyDown),(0,o.off)(n,"mouseup",this.stop),this.updateRect(1),this.toggleFrames(),(0,r.isFunction)(this.onEnd)&&this.onEnd(t,{docs:n,config:e})}},{key:"updateRect",value:function(t){var e=this.el,n=this.opts,i=this.rectDim,o=this.container.style,s=this.updateTarget,a=this.getSelectedHandler(),l=n.unitHeight,c=n.unitWidth,u=n.keyWidth,h=n.keyHeight;if((0,r.isFunction)(s))s(e,i,{store:t,selectedHandler:a,resizer:this,config:n});else{var d=e.style;d[u]=i.w+c,d[h]=i.h+l}var f=this.getElementPos(e,{target:"container"});n.avoidContainerUpdate||(o.left=f.left+"px",o.top=f.top+"px",o.width=f.width+"px",o.height=f.height+"px")}},{key:"getSelectedHandler",value:function(){var t=this.handlers;if(this.selectedHandler)for(var e in t)if(t[e]===this.selectedHandler)return e}},{key:"handleKeyDown",value:function(t){27===t.keyCode&&(this.rectDim=this.startDim,this.stop(t))}},{key:"handleMouseDown",value:function(t){var e=t.target;this.isHandler(e)?(this.selectedHandler=e,this.start(t)):e!==this.el&&(this.selectedHandler="",this.blur())}},{key:"calc",value:function(t){var e=void 0,n=this.opts||{},i=n.step,r=this.startDim,s=n.minDim,a=n.maxDim,l=t.delta.x,c=t.delta.y,u=r.w,h=r.h,d={t:0,l:0,w:u,h:h};if(t){var f=t.handlerAttr;~f.indexOf("r")&&(e=(0,o.normalizeFloat)(u+l*i,i),e=Math.max(s,e),a&&(e=Math.min(a,e)),d.w=e),~f.indexOf("b")&&(e=(0,o.normalizeFloat)(h+c*i,i),e=Math.max(s,e),a&&(e=Math.min(a,e)),d.h=e),~f.indexOf("l")&&(e=(0,o.normalizeFloat)(u-l*i,i),e=Math.max(s,e),a&&(e=Math.min(a,e)),d.w=e),~f.indexOf("t")&&(e=(0,o.normalizeFloat)(h-c*i,i),e=Math.max(s,e),a&&(e=Math.min(a,e)),d.h=e);var p=n.ratioDefault?!t.keys.shift:t.keys.shift;if(f.indexOf("c")<0&&p){var g=r.w/r.h;d.w/d.h>g?d.h=Math.round(d.w/g):d.w=Math.round(d.h*g)}return~f.indexOf("l")&&(d.l=r.w-d.w),~f.indexOf("t")&&(d.t=r.h-d.h),d}}}]),t}();t.exports={init:function(t){return new a(t)}}},function(t,e,n){"use strict";(function(e){var i=Object.assign||function(t){for(var e=1;es+c-10||ra+l-10)return 1},getCurrentPos:function(){var t=this.eventMove;return{x:t.pageX||0,y:t.pageY||0}},getDim:function(t){var e,n,i,r;if(this.canvasRelative&&this.em){var o=this.em.get("Canvas").getElementPos(t),s=window.getComputedStyle(t),a=parseFloat(s.marginTop),l=parseFloat(s.marginBottom),c=parseFloat(s.marginRight),u=parseFloat(s.marginLeft);e=o.top-a,n=o.left-u,i=o.height+a+l,r=o.width+u+c}else{var h=this.offset(t);e=this.relative?t.offsetTop:h.top-(this.wmargin?-1:1)*this.elT,n=this.relative?t.offsetLeft:h.left-(this.wmargin?-1:1)*this.elL,i=t.offsetHeight,r=t.offsetWidth}return[e,n,i,r]},getChildrenDim:function(t){var e=[];if(!t)return e;var n=this.getTargetModel(t);n&&n.view&&!this.ignoreViewChildren&&(t=n.view.getChildrenContainer());for(var i=t.children,r=0,o=i.length;rs||s>a+c-r||l+r>o||o>l+u-r)&&(i=1),!!i},findPosition:function(t,e,n){for(var i={index:0,method:"before"},r=0,o=0,s=0,a=0,l=0,c=0,u=0,h=0,d=0,f=t.length;do||a&&c>=a||r&&s0&&void 0!==arguments[0]?arguments[0]:{};this.config=e,this.set("Config",e),this.set("modules",[]),this.set("toLoad",[]),this.set("storables",[]);var n=e.el;n&&e.fromElement&&(this.config.components=n.innerHTML),this.attrsOrig=n?(0,r.toArray)(n.attributes).reduce(function(t,e){return t[e.nodeName]=e.nodeValue,t},{}):"",s.forEach(function(e){return t.loadModule(e)}),this.on("change:componentHovered",this.componentHovered,this),this.on("change:changesCount",this.updateChanges,this),[{from:"change:selectedComponent",to:"component:toggled"}].forEach(function(e){var n=e.from,i=e.to;t.listenTo(t,n,function(){for(var e=arguments.length,r=Array(e),o=0;o0&&void 0!==arguments[0]?arguments[0]:null,n=this.get("StorageManager");this.get("toLoad").forEach(function(t){t.onLoad()});var i=function(){t.get("modules").forEach(function(e){return e.postLoad&&e.postLoad(t)}),e&&e()};n&&n.canAutoload()?this.load(i):i()},updateChanges:function(){var t=this.get("StorageManager"),e=this.get("changesCount");this.config.noticeOnUnload&&e?window.onbeforeunload=function(t){return 1}:window.onbeforeunload=null,t.isAutosave()&&e>=t.getStepsBeforeSave()&&this.store()},loadModule:function(t){var e=this.config,n=new t,r=e[n.name.charAt(0).toLowerCase()+n.name.slice(1)]||e[n.name]||{};r.pStylePrefix=e.pStylePrefix||"";var o=this.get("StorageManager");if(n.storageKey&&n.store&&n.load&&o){r.stm=o;var s=this.get("storables");s.push(n),this.set("storables",s)}return r.em=this,n.init(i({},r)),!n.private&&this.set(n.name,n),n.onLoad&&this.get("toLoad").push(n),this.get("modules").push(n),this},init:function(t){this.set("Editor",t)},getEditor:function(){return this.get("Editor")},handleUpdates:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.temporary||(c&&clearInterval(c),c=setTimeout(function(){i.avoidStore||n.set("changesCount",n.get("changesCount")+1,i)},0))},componentHovered:function(t,e,n){var i=this.previous("componentHovered");i&&this.trigger("component:unhovered",i,n),e&&this.trigger("component:hovered",e,n)},getSelected:function(){return this.get("selected").last()},getSelectedAll:function(){return this.get("selected").models},setSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,r.isArray)(t),s=i?t:[t],a=this.get("selected");i&&this.removeSelected(a.filter(function(t){return!(0,r.contains)(s,t)})),s.forEach(function(t){var r=(0,o.getModel)(t,u);r&&!r.get("selectable")||(!i&&e.removeSelected(a.filter(function(t){return t!==r})),e.addSelected(r,n))})},addSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,o.getModel)(t,u);((0,r.isArray)(i)?i:[i]).forEach(function(t){if(!t||t.get("selectable")){var i=e.get("selected");n.forceChange&&i.remove(t,n),i.push(t,n)}})},removeSelected:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.get("selected").remove((0,o.getModel)(t,u),e)},toggleSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,o.getModel)(t,u);((0,r.isArray)(i)?i:[i]).forEach(function(t){e.get("selected").contains(t)?e.removeSelected(t,n):e.addSelected(t,n)})},setHovered:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,o.getModel)(t,u);n&&!n.get("hoverable")||(e.forceChange&&this.set("componentHovered",""),this.set("componentHovered",n,e))},setComponents:function(t){return this.get("DomComponents").setComponents(t)},getComponents:function(){var t=this.get("DomComponents"),e=this.get("CodeManager");if(t&&e){var n=t.getComponents();return e.getCode(n,"json")}},setStyle:function(t){for(var e=this.get("CssComposer").getAll(),n=0,i=e.length;n"+i+"<\/script>":""},getCss:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.config,n=e.wrappesIsBody,i=t.avoidProtected,o=(0,r.isUndefined)(t.keepUnusedStyles)?e.keepUnusedStyles:t.keepUnusedStyles,s=this.get("CssComposer"),a=this.get("DomComponents").getComponent();return(i?"":e.protectedCss)+this.get("CodeManager").getCode(a,"css",{cssc:s,wrappesIsBody:n,keepUnusedStyles:o})},getJs:function(){var t=this.get("DomComponents").getWrapper();return this.get("CodeManager").getCode(t,"js").trim()},store:function(t){var e=this,n=this.get("StorageManager"),i={};if(n)return this.get("storables").forEach(function(t){var e=t.store(1);for(var n in e)i[n]=e[n]}),n.store(i,function(n){t&&t(n),e.set("changesCount",0),e.trigger("storage:store",i)}),i},load:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.getCacheLoad(1,function(n){t.get("storables").forEach(function(t){return t.load(n)}),e&&e(n)})},getCacheLoad:function(t,e){var n=this,i=t?1:0;if(this.cacheLoad&&!i)return this.cacheLoad;var r=this.get("StorageManager"),o=[];if(!r)return{};this.get("storables").forEach(function(t){var e=t.storageKey;((e="function"==typeof e?e():e)instanceof Array?e:[e]).forEach(function(t){o.push(t)})}),r.load(o,function(t){n.cacheLoad=t,e&&e(t),setTimeout(function(){return n.trigger("storage:load",t)},0)})},getDeviceModel:function(){var t=this.get("device");return this.get("DeviceManager").get(t)},runDefault:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.get("Commands").get(this.config.defaultCommand);e&&!this.defaultRunning&&(e.stop(this,this,t),e.run(this,this,t),this.defaultRunning=1)},stopDefault:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.get("Commands").get(this.config.defaultCommand);e&&(e.stop(this,this,t),this.defaultRunning=0)},refreshCanvas:function(){this.set("canvasOffset",this.get("Canvas").getOffset())},clearSelection:function(t){(t||window).getSelection().removeAllRanges()},getCurrentMedia:function(){var t=this.config,e=this.getDeviceModel(),n=t.mediaCondition,i=t.devicePreviewMode,r=e&&e.get("widthMedia");return e&&r&&!i?"("+n+": "+r+")":""},getWrapper:function(){return this.get("DomComponents").getWrapper()},getDirtyCount:function(){return this.get("changesCount")},destroyAll:function(){var t=this.attributes,e=t.DomComponents,n=t.CssComposer,i=t.UndoManager,r=t.Panels,o=t.Canvas;e.clear(),n.clear(),i.clear().removeAll(),r.getPanels().reset(),o.getCanvasView().remove(),this.view.remove(),this.stopListening(),u(this.config.el).empty().attr(this.attrsOrig)},setEditing:function(t){return this.set("editing",t),this},isEditing:function(){return!!this.get("editing")},data:function(t,e,n){if(t["_gjs-data"]||(t["_gjs-data"]={}),(0,r.isUndefined)(n))return t["_gjs-data"][e];t["_gjs-data"][e]=n}})},function(t,e,n){"use strict";t.exports={stylePrefix:"gjs-",components:"",style:"",fromElement:0,noticeOnUnload:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",baseCss:"\n * {\n box-sizing: border-box;\n }\n html, body, #wrapper {\n min-height: 100%;\n }\n body {\n margin: 0;\n height: 100%;\n background-color: #fff\n }\n #wrapper {\n overflow: auto;\n overflow-x: hidden;\n }\n\n * ::-webkit-scrollbar-track {\n background: rgba(0, 0, 0, 0.1)\n }\n\n * ::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2)\n }\n\n * ::-webkit-scrollbar {\n width: 10px\n }\n ",protectedCss:"* { box-sizing: border-box; } body {margin: 0;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:1,allowScripts:0,showDevices:1,devicePreviewMode:0,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",keepEmptyTextNodes:0,jsInHtml:!0,nativeDnD:1,multipleSelection:1,exportWrapper:0,wrappesIsBody:1,avoidInlineStyle:0,avoidDefaults:0,clearStyles:0,el:"",undoManager:{},assetManager:{},canvas:{},layers:{},storageManager:{},rte:{},domComponents:{},modal:{},codeManager:{},panels:{},commands:{},cssComposer:{},selectorManager:{},deviceManager:{devices:[{name:"Desktop",width:""},{name:"Tablet",width:"768px",widthMedia:"992px"},{name:"Mobile landscape",width:"568px",widthMedia:"768px"},{name:"Mobile portrait",width:"320px",widthMedia:"480px"}]},styleManager:{sectors:[{name:"General",open:!1,buildProps:["float","display","position","top","right","left","bottom"]},{name:"Dimension",open:!1,buildProps:["width","height","max-width","min-height","margin","padding"]},{name:"Typography",open:!1,buildProps:["font-family","font-size","font-weight","letter-spacing","color","line-height","text-align","text-shadow"],properties:[{property:"text-align",list:[{value:"left",className:"fa fa-align-left"},{value:"center",className:"fa fa-align-center"},{value:"right",className:"fa fa-align-right"},{value:"justify",className:"fa fa-align-justify"}]}]},{name:"Decorations",open:!1,buildProps:["border-radius-c","background-color","border-radius","border","box-shadow","background"]},{name:"Extra",open:!1,buildProps:["transition","perspective","transform"]}]},blockManager:{},traitManager:{},textViewCode:"Code",keepUnusedStyles:0}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(20));t.exports=function(t){var e=t||{},r=n(233),o=n(232),s=n(89);for(var a in r)a in e||(e[a]=r[a]);e.pStylePrefix=e.stylePrefix;var l=new o(e),c=new s({model:l,config:e});return{$:i.default,editor:l,DomComponents:l.get("DomComponents"),LayerManager:l.get("LayerManager"),CssComposer:l.get("CssComposer"),StorageManager:l.get("StorageManager"),AssetManager:l.get("AssetManager"),BlockManager:l.get("BlockManager"),TraitManager:l.get("TraitManager"),SelectorManager:l.get("SelectorManager"),CodeManager:l.get("CodeManager"),Commands:l.get("Commands"),Keymaps:l.get("Keymaps"),Modal:l.get("Modal"),Panels:l.get("Panels"),StyleManager:l.get("StyleManager"),Canvas:l.get("Canvas"),UndoManager:l.get("UndoManager"),DeviceManager:l.get("DeviceManager"),RichTextEditor:l.get("RichTextEditor"),Utils:l.get("Utils"),Config:l.get("Config"),init:function(){return l.init(this),this},getConfig:function(t){return l.getConfig(t)},getHtml:function(t){return l.getHtml(t)},getCss:function(t){return l.getCss(t)},getJs:function(){return l.getJs()},getComponents:function(){return l.get("DomComponents").getComponents()},setComponents:function(t){return l.setComponents(t),this},addComponents:function(t,e){return this.getComponents().add(t,e)},getStyle:function(){return l.get("CssComposer").getAll()},setStyle:function(t){return l.setStyle(t),this},getSelected:function(){return l.getSelected()},getSelectedAll:function(){return l.getSelectedAll()},getSelectedToStyle:function(){var t=l.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},select:function(t){return l.setSelected(t),this},selectAdd:function(t){return l.addSelected(t),this},selectRemove:function(t){return l.removeSelected(t),this},selectToggle:function(t){return l.toggleSelected(t),this},setDevice:function(t){return l.set("device",t),this},getDevice:function(){return l.get("device")},runCommand:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=void 0,i=l.get("Commands").get(t);return i&&(n=i.callRun(this,e)),n},stopCommand:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=void 0,i=l.get("Commands").get(t);return i&&(n=i.callStop(this,e)),n},store:function(t){return l.store(t)},load:function(t){return l.load(t)},getContainer:function(){return e.el},getDirtyCount:function(){return l.getDirtyCount()},refresh:function(){l.refreshCanvas()},setCustomRte:function(t){this.RichTextEditor.customRte=t},on:function(t,e){return l.on(t,e)},off:function(t,e){return l.off(t,e)},trigger:function(t){return l.trigger.apply(l,arguments)},destroy:function(){return l.destroyAll()},getEl:function(){return c.el},getModel:function(){return l},render:function(){var t=this;return l.on("loaded",function(){t.UndoManager.clear(),l.get("modules").forEach(function(t){t.postRender&&t.postRender(c)})}),c.render(),c.el}}}},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},a=r.container;if(!a)throw new Error("'container' is required");(r=i({},n,r)).el=(0,s.isElement)(a)?a:document.querySelector(a);var l=new o.default(r).init();return r.plugins.forEach(function(e){var n=t.get(e);n?n(l,r.pluginsOpts[e]||{}):console.warn("Plugin "+e+" not found")}),l.getModel().loadOnStart(),r.autorender&&l.render(),e.push(l),l}}}()}])}); //# sourceMappingURL=grapes.min.js.map \ No newline at end of file diff --git a/dist/grapes.min.js.map b/dist/grapes.min.js.map index af1b0374c3..ee2235dd46 100644 --- a/dist/grapes.min.js.map +++ b/dist/grapes.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://grapesjs/webpack/universalModuleDefinition","webpack://grapesjs/webpack/bootstrap","webpack://grapesjs/./node_modules/backbone/backbone.js","webpack://grapesjs/./node_modules/underscore/underscore.js","webpack://grapesjs/./src/utils/mixins.js","webpack://grapesjs/./src/dom_components/view/ComponentView.js","webpack://grapesjs/./src/dom_components/model/Component.js","webpack://grapesjs/./src/style_manager/view/PropertyView.js","webpack://grapesjs/./node_modules/codemirror/lib/codemirror.js","webpack://grapesjs/./src/commands/view/CreateComponent.js","webpack://grapesjs/./src/commands/view/SelectComponent.js","webpack://grapesjs/./src/trait_manager/view/TraitView.js","webpack://grapesjs/./src/selector_manager/model/Selector.js","webpack://grapesjs/(webpack)/buildin/global.js","webpack://grapesjs/./src/commands/view/InsertCustom.js","webpack://grapesjs/./src/commands/view/SelectPosition.js","webpack://grapesjs/./src/dom_components/view/ComponentImageView.js","webpack://grapesjs/./src/style_manager/view/PropertyIntegerView.js","webpack://grapesjs/./src/style_manager/view/PropertiesView.js","webpack://grapesjs/./src/style_manager/model/Property.js","webpack://grapesjs/./src/style_manager/model/Properties.js","webpack://grapesjs/./src/selector_manager/model/Selectors.js","webpack://grapesjs/./node_modules/cash-dom/dist/cash.js","webpack://grapesjs/./src/commands/view/Drag.js","webpack://grapesjs/./src/commands/view/Resize.js","webpack://grapesjs/./src/commands/view/Preview.js","webpack://grapesjs/./src/commands/view/Fullscreen.js","webpack://grapesjs/./src/commands/view/SelectParent.js","webpack://grapesjs/./src/commands/view/ShowOffset.js","webpack://grapesjs/./src/commands/view/OpenAssets.js","webpack://grapesjs/./src/commands/view/OpenBlocks.js","webpack://grapesjs/./src/commands/view/OpenTraitManager.js","webpack://grapesjs/./src/commands/view/OpenStyleManager.js","webpack://grapesjs/./src/commands/view/OpenLayers.js","webpack://grapesjs/./src/commands/view/SwitchVisibility.js","webpack://grapesjs/./src/commands/view/TextComponent.js","webpack://grapesjs/./src/commands/view/MoveComponent.js","webpack://grapesjs/./src/commands/view/ImageComponent.js","webpack://grapesjs/./src/commands/view/DeleteComponent.js","webpack://grapesjs/./src/commands/view/ExportTemplate.js","webpack://grapesjs/./src/commands/view/CommandAbstract.js","webpack://grapesjs/./src/dom_components/model/ComponentText.js","webpack://grapesjs/./src/dom_components/model/ComponentImage.js","webpack://grapesjs/./src/dom_components/model/ComponentTableBody.js","webpack://grapesjs/./src/domain_abstract/ui/InputNumber.js","webpack://grapesjs/./src/style_manager/view/PropertyCompositeView.js","webpack://grapesjs/./src/block_manager/model/Category.js","webpack://grapesjs/./src/commands/view/PasteComponent.js","webpack://grapesjs/./src/commands/view/CopyComponent.js","webpack://grapesjs/./src/commands/view/ComponentPrev.js","webpack://grapesjs/./src/commands/view/ComponentNext.js","webpack://grapesjs/./src/commands/view/ComponentExit.js","webpack://grapesjs/./src/commands/view/ComponentEnter.js","webpack://grapesjs/./src/commands/view/ComponentDelete.js","webpack://grapesjs/./src/commands/view/CanvasClear.js","webpack://grapesjs/./src/navigator/view/ItemView.js","webpack://grapesjs/./src/navigator/index.js","webpack://grapesjs/./src/dom_components/view/ComponentTextView.js","webpack://grapesjs/./src/dom_components/view/ComponentLinkView.js","webpack://grapesjs/./src/dom_components/view/ComponentsView.js","webpack://grapesjs/./src/dom_components/model/Components.js","webpack://grapesjs/./src/domain_abstract/view/DomainViews.js","webpack://grapesjs/./src/css_composer/view/CssRuleView.js","webpack://grapesjs/./src/domain_abstract/model/Styleable.js","webpack://grapesjs/./src/css_composer/model/CssRule.js","webpack://grapesjs/./src/asset_manager/view/FileUploader.js","webpack://grapesjs/./src/asset_manager/view/AssetView.js","webpack://grapesjs/./src/asset_manager/view/AssetImageView.js","webpack://grapesjs/./src/style_manager/model/PropertyInteger.js","webpack://grapesjs/./src/style_manager/model/PropertyRadio.js","webpack://grapesjs/./src/style_manager/view/PropertyFileView.js","webpack://grapesjs/./src/domain_abstract/ui/InputColor.js","webpack://grapesjs/./src/style_manager/view/PropertyColorView.js","webpack://grapesjs/./src/style_manager/view/PropertySelectView.js","webpack://grapesjs/./src/style_manager/view/PropertyRadioView.js","webpack://grapesjs/./src/domain_abstract/ui/Input.js","webpack://grapesjs/./src/style_manager/view/PropertyStackView.js","webpack://grapesjs/./src/style_manager/model/PropertyComposite.js","webpack://grapesjs/./src/domain_abstract/model/TypeableCollection.js","webpack://grapesjs/./src/style_manager/index.js","webpack://grapesjs/./src/panels/view/PanelView.js","webpack://grapesjs/./src/panels/model/Buttons.js","webpack://grapesjs/./src/panels/model/Panel.js","webpack://grapesjs/./node_modules/codemirror/mode/css/css.js","webpack://grapesjs/./src/parser/model/ParserHtml.js","webpack://grapesjs/./src/utils/fetch.js","webpack://grapesjs/./node_modules/backbone-undo/node_modules/underscore/underscore.js","webpack://grapesjs/./node_modules/keymaster/keymaster.js","webpack://grapesjs/./src/plugin_manager/config/config.js","webpack://grapesjs/./src/plugin_manager/index.js","webpack://grapesjs/./src/utils/polyfills.js","webpack://grapesjs/./src/editor/view/EditorView.js","webpack://grapesjs/./src/utils/extender.js","webpack://grapesjs/./src/block_manager/view/CategoryView.js","webpack://grapesjs/./src/block_manager/view/BlockView.js","webpack://grapesjs/./src/block_manager/view/BlocksView.js","webpack://grapesjs/./src/block_manager/model/Categories.js","webpack://grapesjs/./src/block_manager/model/Block.js","webpack://grapesjs/./src/block_manager/model/Blocks.js","webpack://grapesjs/./src/block_manager/config/config.js","webpack://grapesjs/./src/block_manager/index.js","webpack://grapesjs/./src/commands/view sync ^\\.\\/.*$","webpack://grapesjs/./src/dom_components/model/ToolbarButton.js","webpack://grapesjs/./src/dom_components/model/Toolbar.js","webpack://grapesjs/./src/dom_components/view/ToolbarButtonView.js","webpack://grapesjs/./src/dom_components/view/ToolbarView.js","webpack://grapesjs/./src/commands/config/config.js","webpack://grapesjs/./src/commands/index.js","webpack://grapesjs/./src/canvas/view/FrameView.js","webpack://grapesjs/./src/canvas/view/CanvasView.js","webpack://grapesjs/./src/canvas/model/Frame.js","webpack://grapesjs/./src/canvas/model/Canvas.js","webpack://grapesjs/./src/canvas/config/config.js","webpack://grapesjs/./src/utils/Droppable.js","webpack://grapesjs/./src/canvas/index.js","webpack://grapesjs/./src/navigator/view/ItemsView.js","webpack://grapesjs/./src/navigator/config/config.js","webpack://grapesjs/./src/dom_components/view/ComponentTextNodeView.js","webpack://grapesjs/./src/dom_components/model/ComponentTextNode.js","webpack://grapesjs/./src/dom_components/view/ComponentSvgView.js","webpack://grapesjs/./src/dom_components/model/ComponentSvg.js","webpack://grapesjs/./src/dom_components/view/ComponentScriptView.js","webpack://grapesjs/./src/dom_components/model/ComponentScript.js","webpack://grapesjs/./src/dom_components/view/ComponentVideoView.js","webpack://grapesjs/./src/dom_components/model/ComponentVideo.js","webpack://grapesjs/./src/dom_components/view/ComponentLabelView.js","webpack://grapesjs/./src/dom_components/model/ComponentLabel.js","webpack://grapesjs/./src/dom_components/model/ComponentLink.js","webpack://grapesjs/./src/dom_components/view/ComponentMapView.js","webpack://grapesjs/./src/dom_components/model/ComponentMap.js","webpack://grapesjs/./src/dom_components/view/ComponentTableFootView.js","webpack://grapesjs/./src/dom_components/model/ComponentTableFoot.js","webpack://grapesjs/./src/dom_components/view/ComponentTableBodyView.js","webpack://grapesjs/./src/dom_components/view/ComponentTableHeadView.js","webpack://grapesjs/./src/dom_components/model/ComponentTableHead.js","webpack://grapesjs/./src/dom_components/view/ComponentTableView.js","webpack://grapesjs/./src/dom_components/model/ComponentTable.js","webpack://grapesjs/./src/dom_components/view/ComponentTableRowView.js","webpack://grapesjs/./src/dom_components/model/ComponentTableRow.js","webpack://grapesjs/./src/dom_components/view/ComponentTableCellView.js","webpack://grapesjs/./src/dom_components/model/ComponentTableCell.js","webpack://grapesjs/./src/trait_manager/model/TraitFactory.js","webpack://grapesjs/./src/trait_manager/model/Trait.js","webpack://grapesjs/./src/trait_manager/model/Traits.js","webpack://grapesjs/./src/dom_components/config/config.js","webpack://grapesjs/./src/dom_components/index.js","webpack://grapesjs/./src/trait_manager/view/TraitColorView.js","webpack://grapesjs/./src/trait_manager/view/TraitNumberView.js","webpack://grapesjs/./src/trait_manager/view/TraitCheckboxView.js","webpack://grapesjs/./src/trait_manager/view/TraitSelectView.js","webpack://grapesjs/./src/trait_manager/view/TraitsView.js","webpack://grapesjs/./src/trait_manager/config/config.js","webpack://grapesjs/./src/trait_manager/index.js","webpack://grapesjs/./src/css_composer/view/CssGroupRuleView.js","webpack://grapesjs/./src/css_composer/view/CssRulesView.js","webpack://grapesjs/./src/css_composer/model/CssRules.js","webpack://grapesjs/./src/css_composer/config/config.js","webpack://grapesjs/./src/css_composer/index.js","webpack://grapesjs/./src/asset_manager/view/AssetsView.js","webpack://grapesjs/./src/asset_manager/model/Asset.js","webpack://grapesjs/./src/asset_manager/model/AssetImage.js","webpack://grapesjs/./src/asset_manager/model/Assets.js","webpack://grapesjs/./src/asset_manager/config/config.js","webpack://grapesjs/./src/asset_manager/index.js","webpack://grapesjs/./src/style_manager/view/SectorView.js","webpack://grapesjs/./src/style_manager/view/SectorsView.js","webpack://grapesjs/./src/style_manager/model/PropertyFactory.js","webpack://grapesjs/./src/style_manager/view/PropertySliderView.js","webpack://grapesjs/./src/style_manager/model/PropertySlider.js","webpack://grapesjs/./src/style_manager/view/LayerView.js","webpack://grapesjs/./src/style_manager/view/LayersView.js","webpack://grapesjs/./src/utils/ColorPicker.js","webpack://grapesjs/./src/style_manager/model/Layer.js","webpack://grapesjs/./src/style_manager/model/Layers.js","webpack://grapesjs/./src/style_manager/model/PropertyStack.js","webpack://grapesjs/./src/style_manager/model/Sector.js","webpack://grapesjs/./src/style_manager/model/Sectors.js","webpack://grapesjs/./src/style_manager/config/config.js","webpack://grapesjs/./src/rich_text_editor/config/config.js","webpack://grapesjs/./src/rich_text_editor/model/RichTextEditor.js","webpack://grapesjs/./src/rich_text_editor/index.js","webpack://grapesjs/./src/panels/view/PanelsView.js","webpack://grapesjs/./src/panels/view/ButtonView.js","webpack://grapesjs/./src/panels/view/ButtonsView.js","webpack://grapesjs/./src/panels/model/Panels.js","webpack://grapesjs/./src/panels/model/Button.js","webpack://grapesjs/./src/panels/config/config.js","webpack://grapesjs/./src/panels/index.js","webpack://grapesjs/./src/code_manager/view/EditorView.js","webpack://grapesjs/./node_modules/codemirror-formatting/formatting.js","webpack://grapesjs/./node_modules/codemirror/mode/javascript/javascript.js","webpack://grapesjs/./node_modules/codemirror/mode/xml/xml.js","webpack://grapesjs/./node_modules/codemirror/mode/htmlmixed/htmlmixed.js","webpack://grapesjs/./src/code_manager/model/CodeMirrorEditor.js","webpack://grapesjs/./src/code_manager/model/JsGenerator.js","webpack://grapesjs/./src/code_manager/model/JsonGenerator.js","webpack://grapesjs/./src/code_manager/model/CssGenerator.js","webpack://grapesjs/./src/code_manager/model/HtmlGenerator.js","webpack://grapesjs/./src/code_manager/config/config.js","webpack://grapesjs/./src/code_manager/index.js","webpack://grapesjs/./src/modal_dialog/view/ModalView.js","webpack://grapesjs/./src/modal_dialog/model/Modal.js","webpack://grapesjs/./src/modal_dialog/config/config.js","webpack://grapesjs/./src/modal_dialog/index.js","webpack://grapesjs/./src/selector_manager/view/ClassTagView.js","webpack://grapesjs/./src/selector_manager/view/ClassTagsView.js","webpack://grapesjs/./src/selector_manager/config/config.js","webpack://grapesjs/./src/selector_manager/index.js","webpack://grapesjs/./src/parser/model/ParserCss.js","webpack://grapesjs/./src/parser/config/config.js","webpack://grapesjs/./src/parser/index.js","webpack://grapesjs/./src/device_manager/view/DevicesView.js","webpack://grapesjs/./src/device_manager/model/Device.js","webpack://grapesjs/./src/device_manager/model/Devices.js","webpack://grapesjs/./src/device_manager/config/config.js","webpack://grapesjs/./src/device_manager/index.js","webpack://grapesjs/./node_modules/promise-polyfill/src/finally.js","webpack://grapesjs/./node_modules/process/browser.js","webpack://grapesjs/./node_modules/setimmediate/setImmediate.js","webpack://grapesjs/./node_modules/timers-browserify/main.js","webpack://grapesjs/./node_modules/promise-polyfill/src/index.js","webpack://grapesjs/./src/storage_manager/model/RemoteStorage.js","webpack://grapesjs/./src/storage_manager/model/LocalStorage.js","webpack://grapesjs/./src/storage_manager/config/config.js","webpack://grapesjs/./src/storage_manager/index.js","webpack://grapesjs/./node_modules/backbone-undo/node_modules/backbone/backbone.js","webpack://grapesjs/./node_modules/backbone-undo/Backbone.Undo.js","webpack://grapesjs/./src/undo_manager/index.js","webpack://grapesjs/./src/keymaps/index.js","webpack://grapesjs/./src/utils/Dragger.js","webpack://grapesjs/./src/utils/Resizer.js","webpack://grapesjs/./src/utils/Sorter.js","webpack://grapesjs/./src/utils/index.js","webpack://grapesjs/(webpack)/buildin/module.js","webpack://grapesjs/./src/editor/model/Editor.js","webpack://grapesjs/./src/editor/config/config.js","webpack://grapesjs/./src/editor/index.js","webpack://grapesjs/./src/index.js"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","self","global","undefined","_","$","Backbone","previousBackbone","slice","Array","VERSION","noConflict","this","emulateHTTP","emulateJSON","addUnderscoreMethods","Class","methods","attribute","each","length","method","iteratee","context","cb","defaultVal","args","arguments","unshift","apply","addMethod","instance","isFunction","isObject","_isModel","modelMatcher","isString","model","attrs","matcher","matches","attributes","Events","eventSplitter","eventsApi","events","callback","opts","names","keys","test","split","on","internalOn","obj","listening","_events","onApi","ctx","listeners","_listeners","id","listenTo","_listenId","uniqueId","listeningTo","_listeningTo","thisId","objId","count","options","handlers","push","off","offApi","stopListening","ids","remaining","j","handler","_callback","once","onceMap","listenToOnce","map","offer","trigger","Math","max","triggerApi","objEvents","allEvents","all","triggerEvents","concat","ev","a1","a2","a3","unbind","extend","Model","cid","cidPrefix","collection","parse","defaults","result","set","changed","initialize","validationError","idAttribute","toJSON","clone","sync","attr","escape","has","val","_validate","unset","silent","changes","changing","_changing","_previousAttributes","current","prev","isEqual","_pending","clear","hasChanged","isEmpty","changedAttributes","diff","old","size","previous","previousAttributes","fetch","success","resp","serverAttrs","wrapError","save","wait","validate","isNew","patch","xhr","destroy","defer","url","base","urlError","replace","encodeURIComponent","constructor","isValid","error","values","pairs","invert","pick","omit","chain","Collection","models","comparator","_reset","reset","setOptions","add","remove","merge","addOptions","splice","array","insert","at","min","tail","singular","isArray","removed","_removeModels","added","merged","toAdd","toMerge","toRemove","modelMap","sort","sortable","sortAttr","existing","_prepareModel","_addReference","orderChanged","some","index","_removeReference","previousModels","pop","shift","_byId","modelId","where","first","findWhere","Error","sortBy","pluck","callbackOpts","indexOf","_onModelEvent","event","prevId","forEach","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","any","include","includes","contains","invoke","toArray","head","take","initial","rest","drop","last","without","difference","shuffle","lastIndexOf","sample","partition","groupBy","countBy","indexBy","findIndex","findLastIndex","View","viewOptions","_ensureElement","delegateEventSplitter","tagName","selector","$el","render","_removeElement","setElement","element","undelegateEvents","_setElement","delegateEvents","el","match","delegate","eventName","listener","undelegate","_createElement","document","createElement","className","_setAttributes","type","methodMap","params","dataType","data","contentType","JSON","stringify","_method","beforeSend","setRequestHeader","processData","textStatus","errorThrown","ajax","update","delete","read","Router","routes","_bindRoutes","optionalParam","namedParam","splatParam","escapeRegExp","route","isRegExp","_routeToRegExp","router","history","fragment","_extractParameters","execute","navigate","optional","RegExp","exec","param","decodeURIComponent","History","checkUrl","location","routeStripper","rootStripper","pathStripper","started","interval","atRoot","path","pathname","getSearch","matchRoot","decodeFragment","rootPath","decodeURI","href","getHash","getPath","charAt","getFragment","_usePushState","_wantsHashChange","start","hashChange","_hasHashChange","documentMode","_useHashChange","_wantsPushState","pushState","_hasPushState","iframe","src","style","display","tabIndex","body","iWindow","insertBefore","firstChild","contentWindow","open","close","hash","addEventListener","attachEvent","_checkUrlInterval","setInterval","loadUrl","stop","removeEventListener","detachEvent","removeChild","clearInterval","e","title","assign","_updateHash","protoProps","staticProps","child","parent","__super__","previousUnderscore","ArrayProto","ObjProto","SymbolProto","toString","nativeIsArray","nativeKeys","nativeCreate","Ctor","_wrapped","nodeType","builtinIteratee","optimizeCb","func","argCount","accumulator","identity","Infinity","restArguments","startIndex","baseCreate","shallowProperty","deepGet","MAX_ARRAY_INDEX","pow","getLength","isArrayLike","results","currentKey","createReduce","dir","memo","reducer","predicate","findKey","list","negate","item","fromIndex","guard","contextPath","computed","lastComputed","v","random","rand","temp","criteria","left","right","a","b","group","behavior","reStrSymbol","pass","compact","Boolean","flatten","input","shallow","strict","output","idx","isArguments","len","otherArrays","uniq","unique","isSorted","isBoolean","seen","union","arrays","intersection","argsLength","unzip","zip","createPredicateIndexFinder","sortedIndex","low","high","mid","floor","createIndexFinder","predicateFind","isNaN","range","step","ceil","chunk","executeBound","sourceFunc","boundFunc","callingContext","TypeError","bound","callArgs","partial","boundArgs","placeholder","position","bindAll","memoize","hasher","cache","address","delay","setTimeout","throttle","timeout","later","leading","now","throttled","clearTimeout","trailing","cancel","debounce","immediate","debounced","callNow","wrap","wrapper","compose","after","times","before","hasEnumBug","propertyIsEnumerable","nonEnumerableProps","collectNonEnumProps","nonEnumIdx","proto","prop","allKeys","mapObject","functions","createAssigner","keysFunc","source","extendOwn","eq","deepEq","keyInObj","String","props","tap","interceptor","isMatch","aStack","bStack","valueOf","areArrays","aCtor","bCtor","isElement","nodelist","childNodes","Int8Array","isFinite","isSymbol","parseFloat","isNumber","isNull","isUndefined","constant","noop","propertyOf","accum","Date","getTime","escapeMap","&","<",">","\"","'","`","unescapeMap","createEscaper","escaper","join","testRegexp","replaceRegexp","string","unescape","fallback","idCounter","prefix","templateSettings","evaluate","interpolate","noMatch","escapes","\\","\r","\n","
","
","escapeChar","template","text","settings","oldSettings","offset","variable","Function","argument","_chain","chainResult","mixin","_underscore","elProt","Element","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","upFirst","toUpperCase","toLowerCase","fn","_loop","elem","_loop2","hasDnd","em","nativeDnD","getModel","camelCase","getElement","getEl","shallowDiff","objOrig","objNew","keysNew","origValue","newValue","normalizeFloat","valueDef","stepDecimals","side","toFixed","getUnitFromValue","ComponentsView","getClasses","opt","config","pfx","stylePrefix","ppfx","pStylePrefix","classe","class","classes","updateStyle","updateAttributes","updateHighlight","updateStatus","updateState","updateContent","handleChange","updateClasses","view","importClasses","init","emitUpdate","clm","cl","addClass","removeClass","status","selectedCls","selectedParentCls","freezedCls","hoveredCls","actualCls","getAttribute","cls","avoidHover","trim","setAttribute","hl","getId","getStyle","setStyle","styleToString","str","removeAttr","data-gjs-type","getChildrenContainer","innerHTML","prevDef","preventDefault","updateScript","getCanvasView","container","getChildrenSelector","querySelector","getTemplate","renderChildren","componentTypes","childrenView","appendChild","disableNode","children","renderAttributes","onRender","_mixins","Components","Selector","Selectors","Traits","componentList","componentIndex","Component","Styleable","removable","draggable","droppable","badgable","stylable","stylable-require","unstylable","highlightable","copyable","resizable","editable","layerable","selectable","hoverable","void","state","content","icon","script","traits","propagate","toolbar","_this","parentAttr","newAttr","toPropagate","voidElements","ccid","createId","scriptUpdated","traitsUpdated","tagUpdated","attrUpdated","initClasses","loadTraits","initComponents","initToolbar","is","query","$els","closest","coll","replaceWith","_this2","attrPrev","attrCurrent","pr","setAttributes","setClass","addAttributes","newAttrs","getAttributes","getConfig","rule","getIdRule","_this3","parseStyle","cc","propOrig","setIdRule","_extends","sm","hasStyle","avoidInline","TYPE_ID","selectors","TYPE_CLASS","normalizeClasses","comps","avoidChildren","append","components","found","trait","getInitValue","tb","command","trt","setTarget","arr","res","md","getName","customName","tag","getIcon","toHTML","sTag","customAttr","getAttrToHTML","code","comp","_len","_key","setId","getScriptString","_this4","scr","scrStr","tagVarStart","tagVarEnd","reg","onAll","clb","resetId","oldId","newId","isComponent","ilen","nextId","getList","templateLabel","templateInput","getDefaultValue","change","target","propTarget","onChange","onInputRender","customValue","inputHolderId","sector","targetUpdated","modelValueChanged","updateVisibility","updatedCls","computedCls","labelEl","clearStyle","getClearEl","clearProperties","stopPropagation","clearValue","clearEl","getTarget","getTargetModel","getHelperModel","helper","inputValueChanged","setValue","getInputValue","fromInput","elementUpdated","setStatus","checkVisibility","targetValue","getTargetValue","ignoreDefault","defaultValue","computedValue","getComputedValue","highlightChanged","showComputed","highlightComputed","fromTarget","hideNotStylable","isTargetStylable","isComponentStylable","show","hide","customFetchValue","ignoreCustomValue","computedDef","computedDefault","avoid","avoidComputed","notToSkip","getInputEl","getFullValue","fromParent","updateTargetStyle","trg","toRequire","stylableReq","component","getSelected","setRawValue","parseValue","cleanValue","targetUpdate","userAgent","navigator","platform","gecko","ie_upto10","ie_11up","edge","ie","ie_version","webkit","qtwebkit","chrome","presto","safari","vendor","mac_geMountainLion","phantom","ios","android","mobile","mac","chromeOS","windows","presto_version","Number","flipCtrlCmd","captureRightClick","classTest","rmClass","node","removeChildren","removeChildrenAndAdd","elt","cssText","createTextNode","eltP","parentNode","host","activeElt","activeElement","shadowRoot","joinClasses","as","createRange","end","endNode","setEnd","setStart","createTextRange","moveToElementText","collapse","moveEnd","moveStart","selectInput","f","copyObj","overwrite","countColumn","tabSize","startValue","search","nextTab","selectionStart","selectionEnd","_e","Delayed","ms","scrollerGap","Pass","sel_dontScroll","scroll","sel_mouse","origin","sel_move","findColumn","goal","pos","col","skipped","spaceStrs","spaceStr","lst","out","nothing","createObj","inst","nonASCIISingleCaseWordChar","isWordCharBasic","ch","isWordChar","extendingChars","isExtendingChar","charCodeAt","skipExtendingChars","findFirst","pred","from","to","midF","getLine","doc","lines","sz","chunkSize","getBetween","line","iter","getLines","updateLineHeight","height","lineNo","cur","no","lineAtHeight","h","outer","i$1","lh","isLine","lineNumberFor","lineNumberFormatter","firstLineNumber","Pos","sticky","cmp","equalCursorPos","copyPos","x","maxPos","minPos","clipLine","clipPos","linelen","clipToLen","clipPosArray","sawReadOnlySpans","sawCollapsedSpans","MarkedSpan","marker","getMarkedSpanFor","spans","span","removeMarkedSpan","stretchSpansOverChange","full","oldFirst","markedSpans","oldLast","startCh","endCh","isInsert","nw","startsBefore","inclusiveLeft","insertLeft","endsAfter","inclusiveRight","markedSpansBefore","markedSpansAfter","sameLine","span$1","found$1","clearEmptySpans","newMarkers","gapMarkers","gap","i$2","i$3","clearWhenEmpty","detachMarkedSpans","detachLine","attachMarkedSpans","attachLine","extraLeft","extraRight","compareCollapsedMarkers","lenDiff","aPos","bPos","fromCmp","toCmp","collapsedSpanAtSide","sps","sp","collapsed","collapsedSpanAtStart","collapsedSpanAtEnd","collapsedSpanAround","conflictingCollapsedRange","lineNo$$1","visualLine","visualLineNo","lineN","vis","visualLineEndNo","lastLine","lineIsHidden","widgetNode","lineIsHiddenInner","heightAtLine","lineObj","lineLength","findMaxLine","cm","maxLine","maxLineLength","maxLineChanged","bidiOther","getBidiPartAt","order","bidiOrdering","lowTypes","arabicTypes","charType","bidiRE","isNeutral","isStrong","countsAsLeft","countsAsNum","BidiSpan","level","direction","outerType","types","type$1","prev$1","type$2","i$4","type$3","i$5","cur$1","type$4","i$6","end$1","replace$1","j$1","i$7","j$2","nstart","reverse","getOrder","noHandlers","emitter","map$$1","_handlers","getHandlers","signal","signalDOMEvent","override","defaultPrevented","e_defaultPrevented","codemirrorIgnore","signalCursorActivity","cursorActivity","curOp","cursorActivityHandlers","hasHandler","eventMixin","ctor","e_preventDefault","returnValue","e_stopPropagation","cancelBubble","e_stop","e_target","srcElement","e_button","which","button","ctrlKey","zwspSupported","badBidiRects","dragAndDrop","div","zeroWidthElement","measure","offsetHeight","offsetWidth","hasBadBidiRects","txt","r0","getBoundingClientRect","r1","splitLinesAuto","nl","rt","hasSelection","getSelection","te","range$$1","ownerDocument","selection","parentElement","compareEndPoints","hasCopyEvent","oncopy","badZoomedRects","modes","mimeModes","resolveMode","spec","getMode","mfactory","modeObj","modeExtensions","exts","helperType","modeProps","prop$1","extendMode","properties","copyState","nstate","innerMode","info","startState","StringStream","lineOracle","lastColumnPos","lastColumnValue","lineStart","eol","sol","peek","next","eat","eatWhile","eatSpace","skipToEnd","skipTo","backUp","column","indentation","pattern","consume","caseInsensitive","cased","substr","hideFirstChars","inner","lookAhead","oracle","baseToken","SavedContext","Context","maxLookAhead","baseTokens","baseTokenPos","highlightLine","forceToEnd","st","modeGen","lineClasses","runMode","loop","overlay","overlays","i_end","opaque","styles","bgClass","textClass","getLineStyles","updateFrontier","getContextBefore","resetState","maxHighlightLength","stateAfter","styleClasses","highlightFrontier","modeFrontier","precise","minindent","minline","lim","indented","findStartLine","saved","fromSaved","processLine","viewFrom","viewTo","nextLine","startAt","stream","callBlankLine","readToken","blankLine","token","copy","Token","takeToken","asArray","tokens","extractLineClasses","lineClass","flattenSpans","curStart","curStyle","addModeClass","mName","Line","estimateHeight","cleanUpLine","styleToClassCache","styleToClassCacheWithMode","interpretTokenStyle","buildLineContent","lineView","builder","pre","trailingSpace","splitSpaces","getOption","addToken","buildToken","buildTokenBadBidi","allowFrontierUpdate","externalMeasured","insertLineContent","maps","caches","lastChild","defaultSpecialCharPlaceholder","startStyle","endStyle","css","displayText","trailingBefore","spaceBefore","special","specialChars","mustWrap","createDocumentFragment","lastIndex","txt$1","tabWidth","specialCharPlaceholder","fullStyle","part","buildCollapsedSpan","ignoreWidget","widget","needsContentAttribute","setUneditable","allText","spanStyle","spanEndStyle","spanStartStyle","nextChange","foundBookmarks","endStyles","upto","tokenText","LineView","visualLineContinued","hidden","buildViewArray","nextPos","operationGroup","orphanDelayedCallbacks","signalLater","delayedCallbacks","fireOrphanDelayed","delayed","updateLineForChanges","dims","updateLineText","updateLineGutter","updateLineClasses","updateLineWidgets","ensureLineWrapped","replaceChild","zIndex","getLineContent","ext","built","background","updateLineBackground","wrapClass","gutter","gutterBackground","gutterClass","fixedGutter","fixedPos","gutterTotalWidth","markers","gutterMarkers","lineNumbers","wrap$1","gutterWrap","lineNumber","gutterLeft","k","gutters","gutterWidth","alignable","nextSibling","insertLineWidgets","buildLineElement","insertLineWidgetsFor","allowAbove","widgets","ws","handleMouseEvents","positionLineWidget","above","noHScroll","width","wrapperWidth","coverGutter","paddingLeft","marginLeft","widgetHeight","parentStyle","clientWidth","eventInWidget","sizer","mover","paddingTop","lineSpace","offsetTop","paddingVert","paddingH","cachedPaddingH","getComputedStyle","currentStyle","parseInt","paddingRight","scrollGap","nativeBarWidth","displayWidth","scroller","barWidth","displayHeight","clientHeight","barHeight","mapFromLineView","measureChar","bias","measureCharPrepared","prepareMeasureForLine","findViewForLine","findViewIndex","getDimensions","forceUpdate","lineMeasure","updateExternalMeasurement","rect","hasHeights","prepared","varHeight","wrapping","lineWrapping","curWidth","heights","rects","getClientRects","abs","bottom","top","ensureLineHeights","place","nodeAndOffsetInLineMap","coverStart","coverEnd","getUsefulRect","screen","logicalXDPI","deviceXDPI","normal","fromRange","hasBadZoomedRects","scaleX","scaleY","logicalYDPI","deviceYDPI","maybeUpdateRectForZooming","rSpan","charWidth","nullRect","rtop","rbot","bot","bogus","singleCursorHeightPerLine","rbottom","measureCharInner","measureText","mStart","mEnd","clearLineMeasurementCacheFor","clearLineMeasurementCache","externalMeasure","clearCaches","cachedCharWidth","cachedTextHeight","lineNumChars","pageScrollX","pageXOffset","documentElement","scrollLeft","pageScrollY","marginTop","pageYOffset","scrollTop","widgetTopHeight","intoCoordSystem","includeWidgets","yOff","viewOffset","lOff","xOff","fromCoordSystem","coords","localBox","lineSpaceBox","charCoords","cursorCoords","preparedMeasure","getBidi","partPos","other","estimateCoords","PosWithInfo","outside","xRel","coordsChar","y","coordsCharInner","rangeEnd","wrappedLineExtent","begin","wrappedLineExtentChar","targetTop","boxIsAfter","box","widgetHeight$$1","ltr","_lineNo","ref","closestDist","endX","dist","baseX","chAround","boxAround","atLeft","atStart","textHeight","anchor","clientLeft","offsetLeft","compensateForHScroll","th","perLine","widgetsHeight","estimateLineHeights","est","estHeight","posFromMouse","liberal","forRect","space","clientX","clientY","colDiff","round","updateSelection","showSelection","prepareSelection","primary","curFragment","cursors","selFragment","sel","ranges","primIndex","empty","showCursorWhenSelecting","drawSelectionCursor","drawSelectionRange","cursor","cursorHeight","otherCursor","cmpCoords","padding","leftSide","rightSide","sizerWidth","docLTR","drawForLine","fromArg","toArg","lineLen","wrapX","extent","iterateBidiSections","fromPos","toPos","openStart","openEnd","openLeft","openRight","topLeft","topRight","botLeft","botRight","sFrom","sTo","fromLine","toLine","singleVLine","leftEnd","rightStart","restartBlink","focused","blinker","cursorDiv","visibility","cursorBlinkRate","ensureFocus","focus","onFocus","delayBlurEvent","delayingBlurEvent","onBlur","readOnly","selForContextMenu","receivedFocus","updateHeightsInViewport","prevBottom","lineDiv","updateWidgetHeight","w","visibleLines","viewport","ensure","ensureFrom","ensureTo","alignHorizontally","alignWidgets","gutterW","align","maybeUpdateLineNumberWidth","innerW","lineGutter","lineNumInnerWidth","lineNumWidth","updateGutterSpace","calculateScrollPos","snapMargin","screentop","docBottom","atTop","atBottom","newTop","screenleft","screenw","tooWide","addToScrollTop","resolveScrollToPos","ensureCursorVisible","getCursor","scrollToPos","margin","cursorScrollMargin","scrollToCoords","scrollToCoordsRange","sPos","updateScrollTop","updateDisplaySimple","setScrollTop","startWorker","forceScroll","scrollHeight","scrollbars","setScrollLeft","isScroller","scrollWidth","measureForScrollbars","docH","viewHeight","viewWidth","barLeft","docHeight","NativeScrollbars","vert","horiz","checkedZeroWidth","minHeight","minWidth","needsH","needsV","sWidth","totalHeight","totalWidth","zeroWidthHack","disableHoriz","enableZeroWidthBar","disableVert","pointerEvents","bar","maybeDisable","elt$$1","elementFromPoint","NullScrollbars","updateScrollbars","startWidth","startHeight","updateScrollbarsInner","sizes","paddingBottom","heightForcer","borderBottom","scrollbarFiller","coverGutterNextToScrollbar","gutterFiller","scrollbarModel","native","null","initScrollbars","scrollbarStyle","axis","nextOpId","startOperation","viewChanged","updateInput","typing","changeObjs","cursorActivityCalled","selectionChanged","updateMaxLine","op","ops","ownsGroup","pushOperation","endOperation","endCb","callbacks","fireCallbacksForOps","finishOperation","endOperation_R1","endOperation_W1","endOperation_R2","endOperation_W2","endOperation_finish","endOperations","scrollbarsClipped","marginBottom","borderRightWidth","maybeClipScrollbars","mustUpdate","DisplayUpdate","updatedDisplay","updateDisplayIfNeeded","barMeasure","adjustWidthTo","maxScrollLeft","preparedSelection","takeFocus","setDocumentHeight","postUpdateDisplay","wheelStartX","wheelStartY","limit","endCoords","scrollPos","startTop","startLeft","scrollPosIntoView","doScroll","innerHeight","scrollNode","scrollIntoView","maybeScrollWindow","maybeHiddenMarkers","unhidden","maybeUnhiddenMarkers","finish","runInOp","operation","methodOp","docMethodOp","regChange","lendiff","updateLineNumbers","resetView","cut","viewCuttingPoint","cut$1","cutTop","cutBot","regLineChange","oldN","newN","countDirtyView","dirty","time","highlight","highlightWorker","workTime","changedLines","oldStyles","highlighted","oldCls","newCls","ischange","workDelay","force","visible","editorIsHidden","wrapperHeight","oldDisplayWidth","renderedView","viewportMargin","different","lastWrapHeight","lastWrapWidth","adjustView","toUpdate","selSnapshot","hasFocus","active","anchorNode","anchorOffset","focusNode","focusOffset","selectionSnapshot","updateNumbersFrom","rm","currentWheelTarget","updateNumber","patchDisplay","snapshot","removeAllRanges","addRange","restoreSelection","selectionDiv","reportedViewFrom","reportedViewTo","updateGutters","specs","gElt","setGuttersForLineNumbers","wheelSamples","wheelPixelsPerUnit","wheelEventDelta","dx","wheelDeltaX","dy","wheelDeltaY","detail","HORIZONTAL_AXIS","VERTICAL_AXIS","wheelDelta","wheelEventPixels","delta","onScrollWheel","canScrollX","canScrollY","pixels","wheelDX","wheelDY","movedX","movedY","Selection","equals","here","there","deepCopy","Range","somethingSelected","normalizeSelection","prim","inv","simpleSelection","changeEnd","adjustForChange","computeSelAfterChange","offsetPos","loadMode","modeOption","resetModeState","isWholeLineUpdate","wholeLineUpdateBefore","updateDoc","estimateHeight$$1","spansFor","updateLine","linesFor","firstLine","lastText","lastSpans","nlines","added$1","added$2","linkedDocs","sharedHistOnly","skip","sharedHist","linked","rel","shared","attachDoc","setDirectionClass","startGen","done","undone","undoDepth","lastModTime","lastSelTime","lastOp","lastSelOp","lastOrigin","lastSelOrigin","generation","maxGeneration","historyChangeFromChange","histChange","attachLocalSpans","clearSelectionEvents","addChangeToHistory","selAfter","opId","hist","historyEventDelay","lastChangeEvent","pushSelectionToHistory","addSelectionToHistory","selectionEventCanBeMerged","clearRedo","dest","removeClearedSpans","explicitlyCleared","mergeOldSpans","getOldSpans","stretched","oldCur","stretchCur","copyHistoryArray","newGroup","instantiateSel","newChanges","extendRange","posBefore","extendSelection","setSelection","extendSelections","heads","newSel","replaceOneSelection","setSimpleSelection","setSelectionReplaceHistory","setSelectionNoUndo","NaN","filterSelectionChange","setSelectionInner","skipAtomicInSelection","reCheckSelection","mayClear","newAnchor","skipAtomic","newHead","skipAtomicInner","oldPos","atomic","near","movePos","far","cantEdit","selectAll","filterChange","canceled","makeChange","ignoreReadOnly","suppressEdits","mark","parts","mk","newParts","dfrom","dto","removeReadOnlyRanges","makeChangeInner","makeChangeSingleDoc","rebased","rebaseHist","makeChangeFromHistory","allowSelectionOnly","suppress","antiChanges","returned","shiftDoc","distance","recomputeMaxLength","checkWidthStart","retreatFrontier","changesHandler","changeHandler","makeChangeSingleDocInEditor","replaceRange","splitLines","rebaseHistSelSingle","rebaseHistArray","sub","ok","copied","changeLine","handle","changeType","LeafChunk","BranchChunk","removeInner","insertInner","iterN","oldHeight","leaf","maybeSpill","me","spilled","sibling","myIndex","used","LineWidget","adjustScrollWhenAboveVisible","this$1","oldH","nextMarkerId","TextMarker","markText","cloneNode","isParent","SharedTextMarker","markTextShared","replacedWith","addToHistory","curLine","addMarkedSpan","clearOnEnter","clearHistory","withOp","visual","dHeight","findSharedMarkers","findMarks","detachSharedMarkers","subMarker","nextDocId","Doc","lineSep","cleanGeneration","getValue","lineSeparator","getRange","getLineHandle","getLineNumber","getLineHandleVisualStart","lineCount","listSelections","setCursor","extendSelectionsBy","setSelections","addSelection","getSelections","replaceSelection","dup","replaceSelections","hint","oldPrev","newPrev","computeReplacedSel","undo","redo","undoSelection","redoSelection","setExtending","getExtending","historySize","markClean","changeGeneration","forceSplit","isClean","gen","getHistory","setHistory","histData","setGutterMarker","gutterID","clearGutter","lineInfo","addLineClass","removeLineClass","addLineWidget","insertAt","aboveVisible","removeLineWidget","setBookmark","realOpts","findMarksAt","getAllMarks","posFromIndex","sepSize","indexFromPos","copyHistory","linkedDoc","mFrom","mTo","subMark","copySharedMarkers","unlinkDoc","CodeMirror$1","link","splitIds","iterLinkedDocs","getEditor","setDirection","directionChanged","eachLine","lastDrop","onDrop","clearDragCursor","files","dataTransfer","isReadOnly","FileReader","File","loadFile","file","allowDropFileTypes","reader","onload","readAsText","draggingText","text$1","getData","selected","dragCursor","forEachCodeMirror","getElementsByClassName","byClass","CodeMirror","globalsRegistered","ensureGlobalHandlers","resizeTimer","onResize","registerGlobalHandlers","setSize","keyNames","3","8","9","13","16","17","18","19","20","27","32","33","34","35","36","37","38","39","40","44","45","46","59","61","91","92","93","106","107","109","110","111","127","145","173","186","187","188","189","190","191","192","219","220","221","222","63232","63233","63234","63235","63272","63273","63275","63276","63277","63302","fromCharCode","keyMap","normalizeKeyName","alt","ctrl","cmd","mod","normalizeKeyMap","keymap","keyname","lookupKey","getKeyMap","fallthrough","isModifierKey","keyCode","addModifierNames","noShift","altKey","metaKey","shiftKey","keyName","altGraphKey","deleteNearSelection","compute","kill","toKill","replaced","moveCharLogically","moveLogically","endOfLine","visually","moveInStorageOrder","prep","basic","Left","Right","Up","Down","End","Home","PageUp","PageDown","Delete","Backspace","Shift-Backspace","Tab","Shift-Tab","Enter","Insert","Esc","pcDefault","Ctrl-A","Ctrl-D","Ctrl-Z","Shift-Ctrl-Z","Ctrl-Y","Ctrl-Home","Ctrl-End","Ctrl-Up","Ctrl-Down","Ctrl-Left","Ctrl-Right","Alt-Left","Alt-Right","Ctrl-Backspace","Ctrl-Delete","Ctrl-S","Ctrl-F","Ctrl-G","Shift-Ctrl-G","Shift-Ctrl-F","Shift-Ctrl-R","Ctrl-[","Ctrl-]","Ctrl-U","Shift-Ctrl-U","Alt-U","emacsy","Ctrl-B","Ctrl-P","Ctrl-N","Alt-F","Alt-B","Ctrl-E","Ctrl-V","Shift-Ctrl-V","Ctrl-H","Alt-D","Alt-Backspace","Ctrl-K","Ctrl-T","Ctrl-O","macDefault","Cmd-A","Cmd-D","Cmd-Z","Shift-Cmd-Z","Cmd-Y","Cmd-Home","Cmd-Up","Cmd-End","Cmd-Down","Cmd-Left","Cmd-Right","Ctrl-Alt-Backspace","Alt-Delete","Cmd-S","Cmd-F","Cmd-G","Shift-Cmd-G","Cmd-Alt-F","Shift-Cmd-Alt-F","Cmd-[","Cmd-]","Cmd-Backspace","Cmd-Delete","Cmd-U","Shift-Cmd-U","commands","singleSelection","killLine","deleteLine","delLineLeft","delWrappedLineLeft","leftPos","delWrappedLineRight","rightPos","goDocStart","goDocEnd","goLineStart","goLineStartSmart","lineStartSmart","goLineEnd","visualLineEnd","lineEnd","goLineRight","goLineLeft","goLineLeftSmart","goLineUp","moveV","goLineDown","goPageUp","goPageDown","goCharLeft","moveH","goCharRight","goColumnLeft","goColumnRight","goWordLeft","goGroupRight","goGroupLeft","goWordRight","delCharBefore","deleteH","delCharAfter","delWordBefore","delWordAfter","delGroupBefore","delGroupAfter","indentAuto","indentSelection","indentMore","indentLess","insertTab","insertSoftTab","spaces","defaultTab","execCommand","transposeChars","newlineAndIndent","sels","indentLine","openLine","toggleOverwrite","firstNonWS","inWS","doHandleBinding","dropShift","ensurePolled","prevShift","stopSeq","dispatchKey","seq","keySeq","dispatchKeyInner","keyMaps","extraKeys","lookupKeyForEditor","handleKeyBinding","motion","lastStoppedKey","onKeyDown","handled","up","showCrossHair","onKeyUp","onKeyPress","charCode","handleCharBinding","lastClick","lastDoubleClick","PastClick","onMouseDown","activeTouch","supportsTouch","clickInGutter","repeat","compare","clickRepeat","selectingText","handleMappedButton","contained","option","unit","addNew","moveOnDrag","configureMouse","dragDrop","moved","dragEnd","mouseMove","dragStart","e2","leftButtonStartDrag","ourRange","ourIndex","startSel","rangeForUnit","lastPos","extendTo","startCol","posCol","oldRange","ranges$1","anchorLine","boundary","headIndex","usePart","bidiSimplify","editorSize","counter","move","buttons","curCount","leftButtonSelect","leftButtonDown","onContextMenu","findWordAt","gutterEvent","prevent","mX","mY","touches","lineBox","g","contextMenuInGutter","themeChanged","theme","Init","optionHandlers","guttersChanged","dragDropChanged","wasOn","funcs","dragFunctions","toggle","enter","over","leave","wrappingChanged","inputStyles","inputStyle","pasteIncoming","cutIncoming","autofocus","word","touchFinished","prevTouch","finishTouch","farAway","touch","radiusX","radiusY","isMouseLikeTouchEvent","pageX","pageY","frag","onDragOver","setData","effectAllowed","setDragImage","img","_top","onDragStart","inp","getField","registerEventHandlers","finishInit","initHooks","textRendering","how","aggressive","indent","curSpace","curSpaceString","indentUnit","indentString","indentWithTabs","pos$1","defineInitHook","lastCopied","setLastCopied","newLastCopied","applyTextInput","inserted","deleted","paste","textLines","multiPaste","pasteLinesPerSelection","lineWise","changeEvent","triggerElectric","handlePaste","pasted","clipboardData","disableInput","electricChars","smartIndent","getModeAt","electricInput","copyableRanges","lineRange","disableBrowserMagic","field","spellcheck","hiddenTextarea","border","findPosH","origDir","moveOnce","boundToLine","bidi","mv","getWrappedLineExtent","searchInVisualLine","getRes","nextCh","moveVisually","findNextLine","sawType","getHelper","hitSide","findPosV","pageSize","moveAmount","ContentEditableInput","lastAnchorNode","lastAnchorOffset","lastFocusNode","lastFocusOffset","polling","composing","gracePeriod","readDOMTimeout","posToDOM","badPos","bad","domToPos","lineNode","locateNodeInLineView","textNode","topNode","nodeValue","curNode","textContent","previousSibling","dist$1","onCopyCut","lineWiseCopyCut","clearData","kludge","hadFocus","showPrimarySelection","updateFromDOM","readFromDOMSoon","forceCompositionEnd","showMultipleSelections","curAnchor","curFocus","rng","rangeCount","getRangeAt","startGracePeriod","rememberSelection","selectionInEditor","commonAncestorContainer","blur","pollSelection","pollInterval","poll","scan","isInGutter","triggerOnKeyDown","pollContent","fromNode","toNode","toIndex","newText","closing","extraLinebreak","addText","walk","cmText","markerID","recognizeMarker","isBlock","nodeName","domTextBetween","oldText","cutFront","cutEnd","oldTop","maxCutFront","newBot","oldBot","maxCutEnd","chFrom","chTo","contentEditable","readOnlyChanged","resetPosition","TextareaInput","prevInput","pollingFast","createField","textarea","prepareCopyCut","fastPoll","_display","moveInputWithCursor","headPos","wrapOff","lineOff","teTop","teLeft","drawn","contextMenuPending","slowPoll","missed","same","resetSelectionOnContextMenu","oldCSS","oldWrapperCSS","oldScrollY","wrapperBox","scrollY","scrollTo","detectingSelectAll","prepareSelectAllHack","mouseup","rehide","extval","disabled","deflt","notOnInit","defineOption","newBreaks","refresh","getInputField","detach","attach","integer","defineOptions","helpers","setOption","getDoc","addKeyMap","removeKeyMap","addOverlay","score","priority","insertSorted","modeSpec","removeOverlay","newRanges","getTokenAt","getLineTokens","getTokenTypeAt","getHelpers","help","_global","getStateAfter","defaultTextHeight","defaultCharWidth","getViewport","addWidget","vspace","hspace","triggerOnKeyPress","triggerOnKeyUp","triggerOnMouseDown","amount","rtlMoveVisually","goalColumn","goals","startChar","check","getScrollInfo","scrollToRange","interpret","swapDoc","getWrapperElement","getScrollerElement","getGutterElement","registerHelper","registerGlobalHelper","addEditorMethods","dontDelegate","contenteditable","defineMode","dependencies","defineMIME","mime","defineExtension","defineDocExtension","fromTextArea","tabindex","realSubmit","form","leaveSubmitMethodAlone","submit","wrappedSubmit","getTextArea","toTextArea","cmpPos","addLegacyProps","version","SelectPosition","hType","newFixedH","allowDraw","enable","$wr","startDraw","ghost","canvas","getGhostEl","stopSelectPosition","frameOff","getOffsetDim","startPos","isDragged","tempComponent","beforeDraw","updateSize","toggleEvents","draw","endDraw","$canvas","rollback","updateComponentSize","setRequirements","lp","sorter","prevTarget","startSelectPosition","afterDraw","$trg","trgModel","trgCollection","console","warn","compStl","minComponentW","minComponentH","overflow","absoluteMode","nearFloat","lastDims","float","firstCentered","getCanvasWrapper","u","ghStl","ESCAPE_KEY","run","editor","sender","$wrapper","ToolbarView","Toolbar","showOffsets","canvasOff","adjScroll","startSelectComponent","updateAttached","toggleSelectComponent","stopSelectComponent","getCanvasBody","win","getContentWindow","onHover","onOut","onClick","onFrameScroll","onSelect","onHovered","setHovered","forceChange","getElementPos","updateBadge","updateHighlighter","showElementOffset","hideBadge","hideHighlighter","hideElementOffset","runCommand","elPos","stopCommand","showFixedElementOffset","hideFixedElementOffset","getHighlighter","multiple","selectToggle","clearSelection","Canvas","getWindow","getSelectedAll","selColl","selIndex","selectAdd","initResize","customeLabel","customBadgeLabel","cacheEl","badge","getBadge","badgeLabel","bStyle","canvasPos","getPosition","badgeH","badgeW","hlStyle","updateToolbar","resizeClass","modelToStyle","toggleBodyClass","docs","onStart","resizer","keyHeight","keyWidth","currentUnit","getModelToStyle","computedStyle","modelStyle","currentWidth","currentHeight","startDim","unitHeight","unitWidth","onMove","onEnd","updateTarget","store","selectedHandler","onlyHeight","onlyWidth","avoidStore","updateEvent","_typeof","toolbarEl","getToolbarEl","toolbarStyle","showToolbar","opacity","toolbarView","updateToolbarPos","origDisp","getTargetToElementDim","elementWidth","targetWidth","getCanvasPosition","clean","selEl","hoverClass","getBadgeEl","updated","cleanPrevious","frameEl","preserveSelected","setSelected","labelClass","fieldClass","inputhClass","onValueChange","tmpl","getValueForTarget","setInputValue","setTargetValue","renderLabel","label","getLabel","html","$input","plh","getModelValue","renderField","inputWrap","private","protected","escapeName","getFullName","eval","CreateComponent","_len2","_key2","insertComponent","buildContent","beforeInsert","terminateAfterInsert","afterInsert","isPointed","utils","editorModel","Sorter","placer","getPlacerEl","containerSel","itemSel","wmargin","nested","canvasRelative","startSort","getFrameEl","posTargetCollection","posIndex","posMethod","cDim","endMove","posIsLastEl","posTargetEl","outsideElem","posTargetModel","isLast","ComponentView","dblclick","click","updateSrc","openModal","classEmpty","modal","am","fetchFile","FileUploader","uploadFile","accept","Modal","AssetManager","actCls","PropertyView","parsed","inputInst","inputEl","unitEl","$unit","addTo","typeView","functionName","fixedValues","important","complete","setValueFromInput","imp","valueStr","substring","Property","TypeableCollection","isType","deepClone","cloned","getStyleable","getValid","getFullString","__WEBPACK_AMD_DEFINE_FACTORY__","idMatch","classMatch","htmlMatch","singlet","elems","getElementsByTagName","querySelectorAll","parseHTML","implementation","createHTMLDocument","onReady","readyState","cash","getElementById","oMatchesSelector","getCompareFunction","second","isNumeric","uid","getDataCache","dataset","removeData","notWhiteMatch","hasClass","classList","removeAttribute","removeProp","toggleClass","camelRegex","whiteSpace","letter","getPrefixedProp","ucProp","removeEvent","eventCache","encode","selectedIndex","getSelectSingle_","getSelectMultiple_","insertContent","prepend","insertAdjacentHTML","insertElement","prefixedProp","lower","margins","runOnce","originalCallback","finalCallback","registerEvent","one","ready","evt","createEvent","initEvent","dispatchEvent","serialize","elements","insertAfter","appendTo","outerHTML","prependTo","docEl","clientTop","offsetParent","nextElementSibling","not","parents","previousElementSibling","siblings","dragger","canvasView","mousePosFetcher","getMouseRelativePos","posFetcher","Utils","Dragger","canvasResizer","ratioDefault","getResizerEl","forceNew","Resizer","getPanels","panels","Panels","getPanelsEl","tglPointers","elP","getBody","stopDefault","editorEl","Config","onclick","canvasS","runDefault","isEnabled","fullscreenElement","webkitFullscreenElement","mozFullScreenElement","requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen","disable","exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen","fsChanged","getContainer","getOffsetMethod","showOffsetsSelected","stateVar","offsetViewer","marginT","marginB","marginL","marginR","padT","padB","padL","padR","stateLow","marginName","paddingName","marginV","paddingV","fullMargName","fullPadName","marginLeftSt","marginTopSt","marginBottomSt","mtStyle","mbStyle","mlStyle","mrStyle","ptStyle","pbStyle","plStyle","prStyle","posLeft","marginSideH","marginSideT","marginRight","padTop","padBot","padSideH","padSideT","padRight","amContainer","modalTitle","onDblClick","rendered","assets","getAll","uploadEl","setTitle","setContent","bm","BlockManager","pn","blocks","getPanel","addPanel","tm","TraitManager","$cn","tmView","getTraitsViewer","confTm","$cn2","$header","textNoElement","labelContainer","toggleTm","dvm","DeviceManager","showDevices","SelectorManager","StyleManager","smConfig","panel","toggleSm","lm","LayerManager","layers","ed","SelectComponent","badgeClass","noSelClass","getHighlighterEl","wp","initSorter","toggleClipboard","drag","contentDocument","onEndMove","initSorterFromModel","onEndMoveFromModel","initSorterFromModels","lastModel","toMove","$badge","$hl","InsertCustom","onmousedown","mouseover","startDelete","mouseout","stopDelete","onDelete","$this","attachBadge","removeBadge","updateBadgeLabel","CodeManager","$editors","oHtmlEd","buildEditor","oCsslEd","htmlEditor","cssEditor","textViewCode","getHtml","getCss","codeName","codeMirror","getViewer","EditorView","plhClass","freezClass","getCanvas","canvasTool","getCanvasTools","bodyEl","getWrapperEl","getToolsEl","callRun","abort","callStop","hasButtonBool","parseUri","uri","qrs","pair","hostname","protocol","port","columns","rows","rowsToAdd","columnsToAdd","Input","change input","change select","click [data-arrow-up]","click [data-arrow-down]","mousedown [data-arrows]","inputClass","contClass","handleModelChange","valid","validateInputValue","deepCheck","validObj","handleUnitChange","getUnitEl","units","upArrowClick","normalizeValue","downArrowClick","downIncrement","moveIncrement","upIncrement","prValue","defValue","fixed","regFixed","valCopy","uN","propView","$props","propsView","getPropsConfig","that","mIndex","valueOnIndex","clp","isEditing","cop","toSelect","_toConsumableArray","DomComponents","CssComposer","ItemsView","mousedown [data-toggle-move]","click [data-toggle-visible]","click [data-toggle-select]","mouseover [data-toggle-select]","click [data-toggle-open]","dblclick [data-name]","focusout [data-name]","hidable","countChildren","clsNoChild","clsTitle","clsTitleC","clsCaret","clsInput","inputNameCls","gut","isVisible","clsCount","clsMove","clsChildren","checkChildren","updateOpening","viewLayer","getVisibilityEl","eyeEl","hClass","toggleVisibility","handleEdit","getInputName","handleEditEnd","inputName","opened","getCaret","toggleOpening","handleSelect","fromLayers","scrollCanvas","handleHover","showHover","freeze","unfreeze","highlightHover","noChildCls","cnt","isCountable","hideTextnode","caret","setRoot","getWrapper","showWrapper","onLoad","ItemView","componentChanged","postRender","elTo","getRoot","scrollLayers","disableEditing","enableEditing","rte","rteEnabled","activeRte","err","customRte","onInput","disablePropagation","mixins","setEditing","elDocs","resetChildren","addToCollection","temporary","fragmentEl","compView","viewObject","dt","it","parentEl","onAdd","df","cssc","parseHtml","avoidUpdateStyle","addCollection","setClassRule","itemView","itemsView","itemType","typeField","toCSS","default","extendStyle","propNew","addStyle","removeStyle","selectorsAdd","mediaText","atRuleType","singleAtRule","slct","getAtRule","condition","typeStr","selectorsToString","addSelector","stateStr","skipAdd","getDeclaration","atRule","block","ruleProps","wd","re","globalCollection","uploadId","disableUpload","upload","embedAsBase64","onUploadStart","onUploadEnd","onUploadError","onUploadResponse","json","autoAdd","FormData","uploadName","headers","_fetch2","credentials","then","Promise","catch","initDrop","uploadForm","ondragover","ondragleave","ondrop","initDropzone","addedCls","edEl","dropzoneCls","cleanEditorElCls","onDragLeave","openAssetsOnDrop","dropzoneContent","uploadText","response","promises","mimeTypeMatcher","promise","resolve","image","Image","readAsDataURL","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","iterator","return","getPreview","getInfo","click [data-toggle=asset-remove]","dim","getFilename","onRemove","stopImmediatePropagation","InputNumber","_input$validateInputV","onOptionChange","getOptions","_attributes","addOption","assetsLabel","$preview","$previewBox","componentValue","setPreviewView","setPreview","pv","spreadUrl","preview","removeFile","openAssetManager","_ColorPicker2","holderClass","def","colorEl","getColorEl","valueClr","backgroundColor","spectrum","noneColor","cpStyle","elToAppend","colorPickerConfig","getColor","color","getAlpha","toHexString","toRgbString","previousColor","containerClassName","maxSelectionSize","showPalette","showAlpha","chooseText","cancelText","palette","InputColor","$color","updateOptions","optionsStr","styleAttr","inputH","itemCls","inputStr","labelTxt","titleAttr","inputHld","inputChk","getCheckedEl","inputIn","checked","PropertyCompositeView","LayersView","indexChanged","refreshLayers","getLayers","addLayer","layer","getLayerValues","layersObj","getLayersFromStyle","getLayersFromValue","stackIndex","fieldEl","PropertiesView","propsConfig","subModel","subProp","getPropertyValues","stackModel","detached","separator","Properties","updateValues","defaultProps","baseType","getBaseType","getType","typeFound","recognizeType","getTypes","addType","definition","ModelInst","ViewInst","sectors","SectView","Sectors","SectorsView","addSector","getSector","removeSector","getSectors","addProperty","sectorId","getProperty","removeProperty","getProperties","um","cssC","devicePreviewMode","hasClasses","deviceW","getCurrentMedia","avoidInlineStyle","createType","_ref","_ref$model","_ref$view","ButtonsView","appendContent","tc","cr","bc","resz","resLen","tl","tr","bl","br","silentFrames","avoidContainerUpdate","forContainer","styleWidth","styleHeight","Button","deactivateAllExceptOne","except","deactivateAll","disableAllButtons","disableAllButtonsExceptOne","Buttons","btn","keySet","parserConfig","inline","propertyKeywords","tokenHooks","documentTypes","mediaTypes","mediaFeatures","mediaValueKeywords","nonStandardPropertyKeywords","fontProperties","counterDescriptors","colorKeywords","valueKeywords","allowNested","lineComment","supportsAtComponent","ret","tp","tokenString","quote","escaped","tokenize","tokenParenthesized","pushContext","popContext","states","popAndPass","wordAsValue","stateArg","maybeprop","propBlock","_stream","parens","pseudo","atBlock","atComponentBlock","atBlock_parens","restricted_atBlock_before","restricted_atBlock","keyframes","interpolation","textAfter","cx","blockCommentStart","blockCommentEnd","blockCommentContinue","fold","documentTypes_","mediaTypes_","mediaFeatures_","mediaValueKeywords_","propertyKeywords_","nonStandardPropertyKeywords_","colorKeywords_","valueKeywords_","allWords","tokenCComment","maybeEnd","/",":","#","@","compTypes","decls","decl","parseClass","parseNode","nodes","attrsLen","nodePrev","nodeChild","ct","modelAttrStart","modelAttr","valueLen","firstChar","lastChar","keepEmptyTextNodes","allTxt","foundTextNode","ci","cType","textTags","parserCss","scripts","allowScripts","styleStr","rej","req","XMLHttpRequest","withCredentials","statusText","responseText","onerror","onProgress","onprogress","send","FuncProto","nativeBind","undefinedOnly","isFunc","shuffled","fail","timestamp","oiteratee","_mods","_scope","_MODIFIERS","⇧","⌥","⌃","control","⌘","_MAP","backspace","tab","esc","down","del","home","pageup","pagedown",",",".","-","=",";","[","]","_downKeys","compareArray","modifierMap","updateModifierKey","assignKey","scope","mods","getKeys","getMods","shortcut","getScope","mi","addEvent","modifiersMatch","dispatch","previousKey","setScope","deleteScope","isPressed","getPressedKeyCodes","multipleKeys","plugins","plugin","agent","rules","isIE","originalCreateHTMLDocument","DOMImplementation","conf","disableButtons","contEl","ViewProt","eventNsMap","vid","eventMap","_ref2","_ref3","getEvents","getNamespaces","namespaces","_this5","Event","bval","baseVal","keydown","defaultView","Window","items","ar","inArray","isDefaultPrevented","caretR","caretD","iconClass","activeClass","getIconEl","getBlocksEl","iconEl","blocksEl","mousedown","dragstart","dragend","endDrag","startDrag","getSorter","refreshCanvas","setDragHelper","setDropContent","handleDragStart","isObj","handleDrag","handleDragEnd","oldActive","dragResult","dragContent","BlockView","CategoryView","categories","renderedCategories","noCatClass","blockContClass","catsClass","tac","grabbingCls","onDrag","category","catModel","catId","catView","getCategoriesEl","catsEl","Category","activate","Block","blocksVisible","blocksView","Blocks","BlockCategories","BlocksView","getAllVisible","getCategories","toRender","./CanvasClear","./CanvasClear.js","./CommandAbstract","./CommandAbstract.js","./ComponentDelete","./ComponentDelete.js","./ComponentEnter","./ComponentEnter.js","./ComponentExit","./ComponentExit.js","./ComponentNext","./ComponentNext.js","./ComponentPrev","./ComponentPrev.js","./CopyComponent","./CopyComponent.js","./CreateComponent","./CreateComponent.js","./DeleteComponent","./DeleteComponent.js","./Drag","./Drag.js","./ExportTemplate","./ExportTemplate.js","./Fullscreen","./Fullscreen.js","./ImageComponent","./ImageComponent.js","./InsertCustom","./InsertCustom.js","./MoveComponent","./MoveComponent.js","./OpenAssets","./OpenAssets.js","./OpenBlocks","./OpenBlocks.js","./OpenLayers","./OpenLayers.js","./OpenStyleManager","./OpenStyleManager.js","./OpenTraitManager","./OpenTraitManager.js","./PasteComponent","./PasteComponent.js","./Preview","./Preview.js","./Resize","./Resize.js","./SelectComponent","./SelectComponent.js","./SelectParent","./SelectParent.js","./SelectPosition","./SelectPosition.js","./ShowOffset","./ShowOffset.js","./SwitchVisibility","./SwitchVisibility.js","./TextComponent","./TextComponent.js","webpackContext","webpackContextResolve","ToolbarButton","handleClick","DomainViews","ToolbarButtonView","defaultCommands","CommandAbstract","ViewCode","fullscreen","resize","selAll","nativeDrag","defComOptions","hideTlb","log","elRect","cmdMove","Commands","UndoManager","loadDefaultCommands","motionsEv","allowfullscreen","updateDim","device","getDeviceModel","currW","currH","newW","newH","noChanges","udpateOffset","getOffset","contents","FrameView","clearOff","frame","isElInViewport","frameRect","getFrameOffset","rTop","rLeft","toolsEl","renderScripts","appendScript","renderBody","confCanvas","protCss","protectedCss","externalStyles","frameCss","baseCss","canvasCss","getJsContainer","onscroll","fdoc","oEvent","keyCodeVal","createCustomEvent","docBody","frmOff","cvsOff","getCanvasOffset","eo","frmTop","avoidFrameOffset","frmLeft","bEl","fo","co","scriptContainer","jsContainer","hlEl","badgeEl","placerEl","ghostEl","resizerEl","offsetEl","fixedOffsetEl","Frame","rulers","Droppable","_classCallCheck","handleDragEnter","handleDragOver","handleDrop","handleDragLeave","updateCounter","endDrop","eventMoving","getContentByData","CanvasView","setWrapper","startAutoscroll","stopAutoscroll","autoscroll","wrp","getDocument","getOffsetViewerEl","getFixedOffsetViewerEl","setCustomBadgeLabel","toRight","targetHeight","eventToTrigger","elTop","elLeft","topPos","elementTop","elementLeft","elementHeight","canvasTop","canvasLeft","addTop","addLeft","subWinOffset","parentWindow","frameElement","yOffset","xOffset","getMouseRelativeCanvas","isInputFocused","dragging","toListen","getScrollListeners","frameWindow","nextTop","limitBottom","getFrameWrapperEl","sortContainer","ignoreViewChildren","created","srcModel","getSourceModel","avoidSelectOnEnd","createElementNS","SVGElement","scriptCount","svar","svarNext","OComponentView","updateVideo","updateProvider","prov","renderByProvider","getYoutubeSrc","getYoutubeNoCookieSrc","getVimeoSrc","videoEl","autoplay","controls","renderYoutube","renderYoutubeNoCookie","renderVimeo","renderSource","initVideoEl","frameBorder","OComponent","yt","vi","ytnc","videoId","provider","ytUrl","ytncUrl","viUrl","muted","modestbranding","sources","getYoutubeTraits","getVimeoTraits","getSourceTraits","parseFromSrc","updateTraits","qr","getProviderTrait","changeProp","getAutoplayTrait","getLoopTrait","getControlsTrait","isYtProv","isYtncProv","isViProv","isExtProv","getIframe","ifrm","mapUrl","mapType","zoom","frameborder","getMapUrl","addr","q","z","ComponentTableBody","cells","build","objs","labelPlhText","labelPlhHref","optionsTarget","targetEvent","final","toSet","Trait","TraitFactory","handleAdd","tmOpts","tf","wrapperId","wrapperName","imageCompClass","oAssetsOnCreate","storeWrapper","componentView","storageKey","smc","stm","storeHtml","storeComponents","componentHovered","selectRemove","setComponents","postLoad","handleChanges","handleUpdates","handleRemoves","els","load","getCacheLoad","getComponents","noStore","toStore","getComponent","addComponent","compType","TraitView","inputNumber","iconCls","TraitSelectView","TraitCheckboxView","TraitNumberView","TraitColorView","number","checkbox","updatedCollection","defaultOpts","TraitsView","TraitsViewer","CssRuleView","CssGroupRuleView","getBlockId","widthMedia","atRules","renderStarted","atRuleEl","styleEl","appendData","clsName","defaultBlockId","blockId","getMediaWidth","contRules","MAX_VALUE","CssRule","parseCss","staticRules","rulesView","CssRules","CssRulesView","storeCss","storeStyles","elStyle","sl","newSels","le","selec","modelExists","styleUpdate","media","getClassRule","inputPlaceholder","addBtnText","renderAssets","addToAsset","removedAsset","deselectAll","handleSubmit","getAddInput","getAssetsEl","inputUrl","toggleNoAssets","addAsset","assetsEl","noAssets","fuRendered","fu","getExtension","Asset","unitDim","dropzone","Assets","AssetsView","FileUpload","asset","editorView","click [data-sector-title]","updateOpen","getPropertiesEl","$caret","renderProperties","SectorView","dummy","pt","helperRule","appendStateRule","ss","fonts","font","change [type=range]","input [type=range]","getSliderEl","slider","inputValueChangedSoft","showInput","click [data-close-layer]","mousedown [data-move-layer]","customPreview","onPreview","updatePreview","valueInt","previewEl","getPreviewEl","getPropertiesWrapper","propsWrapEl","wrapEl","LayerView","beforeShow","flat","allowEmpty","showButtons","clickoutFiresChange","showInitial","showPaletteOnly","hideAfterPaletteSelect","togglePaletteOnly","showSelectionPalette","localStorageKey","togglePaletteMoreText","togglePaletteLessText","clearText","noColorSelectedText","preferredFormat","replacerClassName","selectionPalette","spectrums","IE","rgbaSupport","replaceInput","markup","gradientFix","paletteTemplate","tiny","tinycolor","toHsl","formattedString","swatchStyle","toFilter","callbackContext","instanceOptions","reflow","isDragging","dragWidth","dragHeight","dragHelperHeight","slideHeight","alphaWidth","alphaSlideHelperWidth","slideHelperHeight","currentHue","currentSaturation","currentValue","currentAlpha","paletteArray","paletteLookup","draggingClass","shiftMovementDirection","boundElement","pickerContainer","dragHelper","slideHelper","alphaSliderInner","alphaSlider","alphaSlideHelper","textInput","paletteContainer","initialColorContainer","cancelButton","clearButton","chooseButton","toggleButton","isInput","isInputTypeColor","inputTypeColorSupport","shouldReplace","replacer","offsetElement","previewElement","initialColor","colorOnShow","currentPreferredFormat","applyOptions","rgb","updateSelectionPaletteFromStorage","localStorage","oldPalette","addColorToSelectionPalette","drawPalette","currentColor","getUniqueSelectionPalette","drawInitial","dragStop","setFromTextInput","updateOriginalInput","hideAll","$doc","onkeydown","clickout","updateUI","revert","ignoreFormatChange","newColor","newHsv","toHsv","getFormat","fromRatio","format","updateHelperLocations","flatColor","realColor","displayColor","realHex","realRgb","alpha","toRgb","realAlpha","gradient","gradientType","dragX","dragY","alphaX","slideY","fireCallback","picker","dpWidth","outerWidth","dpHeight","outerHeight","inputHeight","docElem","cW","cH","scL","scT","paletteElementClick","ignore","oldDragX","oldDragY","furtherFromX","paletteEvent","spect","optionName","optionValue","coord","onmove","onstart","onstop","maxHeight","maxWidth","hasTouch","duringDragEvents","t0","originalEvent","extra","loadOpts","_cachedResult","colorInput","localization","palettes","processNativeColorInputs","colorInputs","trimLeft","trimRight","tinyCounter","math","mathRound","mathMin","mathMax","mathRandom","named","matchers","rgba","hsl","hsla","hsv","hsva","hex8","parseIntFromHex","convertHexToDecimal","hex6","hex3","stringInputToObject","bound01","rgbToRgb","convertToPercentage","hsvToRgb","hue2rgb","hslToRgb","boundAlpha","inputToRGB","_originalInput","_r","_g","_b","_a","_roundA","_format","_gradientType","_ok","_tc_id","rgbToHsl","rgbToHsv","rgbToHex","allow3Char","hex","pad2","rgbaToHex","convertDecimalToHex","desaturate","clamp01","saturate","greyscale","lighten","brighten","darken","spin","hue","complement","triad","tetrad","splitcomplement","analogous","slices","monochromatic","modification","isDark","getBrightness","isLight","getOriginalInput","setAlpha","toHsvString","toHslString","toHex","toHex8","toHex8String","toPercentageRgb","toPercentageRgbString","toName","hexNames","secondColor","hex8String","secondHex8String","formatSet","hasAlpha","_applyModification","_applyCombination","color1","color2","mix","w1","rgb1","rgb2","w2","readability","c1","c2","brightnessA","brightnessB","colorDiff","brightness","isReadable","mostReadable","baseColor","colorList","bestColor","bestScore","bestIsReadable","readable","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","burntsienna","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","flipped","flip","isOnePointZero","processPercent","isPercentage","CSS_UNIT","PERMISSIVE_MATCH3","PERMISSIVE_MATCH4","getPropertyValue","Layer","onReset","noIncrement","cleaned","layerValue","styleObj","propModel","propertyObj","layerProprs","propertyName","Layers","layersColl","PropertyFactory","buildProps","extendBuilded","builded","buildProperties","extendProperties","propsModel","moProps","ex","pLen","mProps","isolated","mProp","mPProps","buildP","propFactory","Sector","adjustToolbar","actions","RTE_KEY","defActions","bold","italic","underline","strikethrough","insertHTML","RichTextEditor","setEl","updateActiveActions","settAct","action","actionbar","actionbarCont","actionbarContainer","addAction","styleWithCSS","syncActions","getActions","queryCommandSupported","queryCommandState","enabled","actionbarEl","deleteContents","nd","insertNode","lastEl","globalRte","hideToolbar","initRte","udpatePosition","PanelView","activeCls","disableCls","btnsVisCls","updateActive","checkActive","updateBtnsVis","updateClassName","updateDisable","$buttons","commandName","cmdIsFunc","clicked","toogleActive","_model$attributes","togglable","ButtonView","parentM","Panel","runDefaultCommand","stopDefaultCommand","swv","expt","ola","obl","ful","prv","delayBtnsShow","PanelsViewObj","PanelsView","removePanel","addButton","panelId","removeButton","getButton","commentStart","commentEnd","newlineAfterToken","_type","jsonMode","lexical","inlineElements","configuration","isComment","curMode","selText","endIndex","cmInstance","atSol","newline","statementIndent","jsonldMode","jsonld","isTS","typescript","wordRE","wordCharacters","keywords","kw","A","B","C","D","operator","atom","if","while","with","else","do","try","finally","break","continue","new","throw","debugger","var","const","let","function","for","switch","case","in","typeof","instanceof","true","false","super","yield","export","import","extends","await","isOperatorChar","isJsonldKeyword","cont","tokenBase","tokenComment","expressionAllowed","inSet","readRegexp","tokenQuasi","lastType","brackets","findFatArrow","fatArrowAt","arrow","depth","sawSomething","bracket","atomicTypes","regexp","jsonld-keyword","JSLexical","inScope","varname","localVars","vars","marked","inList","register","newContext","registerVarScoped","Var","globalVars","isModifier","defaultVars","pushcontext","pushblockcontext","popcontext","pushlex","lex","poplex","expect","wanted","exp","statement","vardef","parenExpr","maybeexpression","maybeelse","functiondef","forspec","enumdef","typeexpr","expression","maybelabel","maybeCatchBinding","afterExport","afterImport","funarg","expressionInner","expressionNoComma","noComma","arrowBodyNoComma","arrowBody","commasep","maybeop","maybeoperatorNoComma","maybeoperatorComma","classExpression","arrayLiteral","contCommasep","objprop","quasi","targetNoComma","maybeTypeArgs","maybeTarget","expr","continueQuasi","getterSetter","afterprop","maybetype","what","sep","proceed","mayberettype","isKW","afterType","typeprop","typearg","maybeReturnType","typeparam","maybeTypeDefault","maybeAssign","vardefCont","proppattern","forspec1","forspec2","formaybeinof","forspec3","classNameAfter","classBody","classfield","maybeFrom","exportField","importSpec","maybeMoreImports","maybeAs","enummember","basecolumn","combinator","parseJS","isContinuedStatement","doubleIndentSwitch","closeBrackets","skipExpression","htmlConfig","autoSelfClosers","area","embed","hr","keygen","meta","track","wbr","menuitem","implicitlyClosed","dd","li","optgroup","rp","tbody","td","tfoot","contextGrabbers","article","aside","blockquote","dl","fieldset","footer","h1","h2","h3","h4","h5","h6","header","hgroup","menu","nav","ol","section","table","ul","thead","doNotIndent","allowUnquoted","allowMissing","caseFold","xmlConfig","allowMissingTagName","editorConf","config_","htmlMode","inText","parser","inBlock","doctype","inTag","baseState","tagStart","closure","isInAttribute","inAttribute","stringStartCol","terminator","maybePopContext","nextTagName","parentTagName","tagNameState","closeTagNameState","attrState","matchClosing","closeState","closeStateErr","attrEqState","startOfLine","noIndent","attrValueState","attrContinuedState","isInText","baseIndent","fullLine","multilineTagIndentPastTag","multilineTagIndentFactor","alignCDATA","tagAfter","grabbers","skipAttribute","defaultTags","attrRegexpCache","getAttrValue","getAttrRegexp","getTagRegexp","anchored","addTags","tags","configTags","configScript","scriptTypes","htmlState","tagInfo","tagText","findMatchingMode","endTagA","endTag","localState","localMode","pat","maybeBackup","local","autoFormatRange","mapModel","mapJs","beforeEach","compCls","buildFromModel","wrappesIsBody","isWrapper","clearStyles","dump","mRules","buildFromRule","rulesStr","selectorStrNoAdd","keepUnusedStyles","exportWrapper","buildModels","inlineCss","gHtml","gCss","gJson","gJs","eCM","generators","defGenerators","viewers","defViewers","js","loadDefaultGenerators","loadDefaultViewers","addGenerator","generator","getGenerator","getGenerators","addViewer","viewer","getViewers","updateViewer","getCode","genId","click [data-close-modal]","updateTitle","backdrop","getCollector","$collector","getContent","$content","getTitle","$title","ModalM","ModalView","isOpen","getContentEl","click [data-tag-remove]","click [data-tag-status]","dblclick [data-tag-name]","focusout [data-tag-name]","startEditTag","endEditTag","innerText","changeStatus","removeTag","chkOn","$chk","ClassTagView","addBtnId","newInputId","stateInputId","stateInputC","updateSelector","renderClasses","tagRemoved","updateStateVis","getStateOptions","strInput","addToClasses","startNewTag","$addBtn","endNewTag","onInputKeyUp","addNewTag","compTarget","validSelectors","getStates","getStatesC","stateChanged","$states","$classes","$statesC","selectedLabel","statesLabel","isId","selectorTags","ClassTagsView","cname","4","5","6","7","11","12","14","15","atRuleKeys","singleAtRules","parseSelector","stl","propName","propValue","getPropertyPriority","parseCondition","conditionText","selectorText","cssRules","keyText","isSingleAtRule","subRules","lens","subRule","selsParsed","selsAdd","lastRule","len3","selArr","stateArr","selsAddStr","sheet","pHtml","pCss","parserHtml","startAdd","updateSelect","updateDevice","devEl","devicesEl","deviceLabel","Device","devices","Devices","DevicesView","reason","cachedSetTimeout","cachedClearTimeout","process","defaultSetTimout","defaultClearTimeout","runTimeout","fun","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","runClearTimeout","Item","nextTick","browser","env","argv","versions","addListener","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","binding","cwd","chdir","umask","setImmediate","registerImmediate","nextHandle","tasksByHandle","currentlyRunningATask","attachTo","getPrototypeOf","runIfPresent","postMessage","importScripts","postMessageIsAsynchronous","oldOnMessage","onmessage","canUsePostMessage","messagePrefix","onGlobalMessage","installPostMessageImplementation","MessageChannel","channel","port1","port2","installMessageChannelImplementation","onreadystatechange","installReadyStateChangeImplementation","task","clearImmediate","Timeout","clearFn","_id","_clearFn","unref","enroll","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","_onTimeout","setTimeoutFunc","_state","_handled","_value","_deferreds","doResolve","deferred","_immediateFn","onFulfilled","onRejected","finale","thisArg","_unhandledRejectionFn","prom","promiseFinally","race","urlStore","urlLoad","onComplete","contentTypeJson","onError","clbErr","onResponse","request","typeJson","bodyObj","fetchOptions","bodyKey","checkLocal","checkStorageEnvironment","setItem","getItem","removeItem","autosave","autoload","stepsBeforeSave","jqXHR","LocalStorage","RemoteStorage","storages","defaultStorages","remote","currentStorage","loadDefaultProviders","setCurrent","isAutosave","setAutosave","getStepsBeforeSave","setStepsBeforeSave","storage","getStorages","getCurrent","keysF","itemKey","itemKeyR","getCurrentStorage","eventStart","eventEnd","eventError","canAutoload","orderedModels","addOpts","Surrogate","core_slice","hasKeys","getMagicFusionIndex","callstackWasIndexed","magicFusionIndex","ObjectRegistry","registeredObjects","cidIndexes","onoff","objects","objectRegistry","unregister","actionUndoRedo","undoTypes","managerUndoRedo","manager","stack","magic","everything","isCurrentlyUndoRedoing","pointer","isUndo","addToStack","undoTypesType","validateUndoActionCreation","maximumStackLength","isRegistered","UndoTypes","unsetData","afterAttributes","keysAfter","keysPrevious","OwnedUndoTypes","manipulateUndoType","manipType","undoType","fns","undoTypesInstance","Action","UndoStack","setMaxLength","startTracking","stopTracking","isTracking","_addToStack","unregisterAll","undoAll","redoAll","isAvailable","undoManager","addUndoType","changeUndoType","removeUndoType","defaultAttributes","beforeCache","configDef","customUndoType","bf","af","entity","removeAll","hasUndo","hasRedo","getStack","getInstance","keymaster","keymaps","core:undo","core:redo","core:copy","core:paste","core:component-next","core:component-prev","core:component-enter","core:component-exit","core:component-delete","defKeys","setKey","getElementRect","getBoundingRect","handleMouseDown","handleKey","getDocumentEl","dragHandlers","getMousePos","lockedAxis","isHandler","mouseFetch","currentPos","relX","relY","absX","absY","moveX","moveY","xPos","setX","yPos","setY","minDim","maxDim","setup","hdl","createHandler","frames","contStyle","attrName","handlerAttr","clickedHandler","rectDim","handleKeyDown","toggleFrames","calc","updateRect","conStyle","getSelectedHandler","rectEl","deltaX","deltaY","startW","startH","ratioActive","ratio","elT","elL","borderOffset","freezeClass","onMoveClb","relative","ignoreModels","offTop","offLeft","$document","dropContent","selectOnEnd","getContainerEl","getDocuments","canvasDoc","toggleSortCursor","clonedEl","moveDragHelper","posY","posX","dragHelperStyle","useBody","createPlaceholder","ins","contSel","dropModel","eV","tempModel","selectTargetModel","prevModel","targetModel","dsp","eO","rY","rX","mousePos","eventMove","dimsFromTarget","findPosition","movePlaceholder","prevTargetDim","$plh","isInFlow","styleInFlow","validTarget","dropInfo","dragInfo","targetP","validResult","getDim","cacheDimsP","getChildrenDim","cacheDims","nearBorders","targetParent","getTargetFromEl","targetPrev","nearElBorders","_getCurrentPos","getCurrentPos","leftLimit","xLimit","dimRight","yLimit","xCenter","yCenter","dimDown","trgDim","un","elDim","borderColor","borderWidth","brd","marg","brdCol","margI","dst","srcEl","modelToDrop","modelTemp","warns","targetCollection","webpackPolyfill","deprecate","paths","deps","timedInterval","editing","clipboard","designerMode","previousModel","changesCount","storables","toLoad","fromElement","attrsOrig","loadModule","updateChanges","eventFrom","eventTo","loadOnStart","noticeOnUnload","onbeforeunload","moduleName","Mod","cfg","removeSelected","addSelected","toggleSelected","_this6","jsInHtml","getJs","avoidProt","avoidProtected","_this7","_this8","_this9","cacheLoad","defaultCommand","defaultRunning","mediaCondition","getDirtyCount","destroyAll","forceClass","multipleSelection","avoidDefaults","assetManager","storageManager","domComponents","codeManager","cssComposer","selectorManager","deviceManager","styleManager","blockManager","traitManager","EditorModel","StorageManager","Keymaps","addComponents","getSelectedToStyle","setDevice","getDevice","setCustomRte","_polyfills2","PluginManager","editors","defaultConfig","autorender","pluginsOpts","Editor","pluginId"],"mappings":";CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,UAAAH,GACA,iBAAAC,QACAA,QAAA,SAAAD,IAEAD,EAAA,SAAAC,IARA,CASCK,OAAA,WACD,mBCTA,IAAAC,KAGA,SAAAC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,6DACA,qEACA,qEACA,wDACA,gDACA,wDACA,qEACA,mEACA,mEACA,8EACA,qFACA,4DACA,wEACA,wEACA,sEACA,mEACA,wEACA,+EACA,8DACA,gEACA,4FACA,gEACA,4DACA,oEACA,0DACA,2CACA,kEACA,sEACA,+DACA,sCACA,iEACA,sEACA,wEACA,kEACA,iEACA,+GACA,sEACA,8DACA,yEACA,iEACA,kFACA,yDACA,wEACA,8DACA,mEACA,sEACA,8DACA,6DACA,0EACA,oFACA,mEACA,sDACA,kEACA,6EACA,uEACA,kFACA,qCAEA,0EACA,8EACA,oDACA,sEACA,6EACA,0EACA,qEACA,oEACA,2DACAjD,EAAAH,EAAAoD,GAEAC,GACA,6EACA,4EACA,kEACA,kFACA,yCACA5C,EAAAT,EAAAqD,GAKA3C,EAAAV,GAFA,2EACA,4CAMAW,EAAAX,GAFA,gEACA,yCAGAsD,GACA,+DACA,8DACA,0EACA,kEACA,kEACA,gEACA,6DACA,4DACA,+DACA,kEACA,0DACA,oEACA,wEACA,8DACA,oEACA,uEACA,yEACA,oEACA,wEACA,qEACA,2DACA,qEACA,wEACA,+DACA,+DACA,qCACA1C,EAAAZ,EAAAsD,GAEAC,GACA,oEACA,gFACA,kEACA,oGACA,oFACA,6EACA,mFACA,8EACA,mEACA,uEACA,mEACA,qFACA,qDACA,qFACA,kFACA,6EACA,gFACA,kEACA,0BACA,8EACA,2EACA,yEACA,mDACA,oDACA,kDACA,qDACA,4EACA,kFACA,mGACA,6EACA,+EACA,4DACA,4EACA,oEACA,uEACA,gGACA,mEACA,+CACA,qEACA,sEACA,mFACA,gEACA,kEACA,qFACA,yDACA,kEACA,wDACA,oEACA,yEACA,oEACA,oDACA,uEACA,gFACA,gEACA,mEACA,mGACA,8DACA,uEACA,+EACA,yEACA,+DACA,8DACA,gDACA,oEACA,qEACA,4EACA,2FACA,iEACA,qDACA,sFACA,oEACA,uDACA,sEACA,yEACA,6EACA,gIACA,uEACA,oFACA,iEACA,wEACA,QACA,uEACA,iEACA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K,UACL,IAAK,cACL,IAAK,cACL,IAAK,eACL,IAAK,kBACL,IAAK,oBACL,IAAK,sBACL,IAAK,wBACL,IAAK,kBACL,IAAK,sBACL,IAAK,6BACL,IAAK,SACL,IAAK,WACHlO,EAAIkO,KAAO,SACX,MACF,IAAK,MACL,IAAK,QACL,IAAK,SACL,IAAK,OACL,IAAK,aACL,IAAK,eACL,IAAK,gBACL,IAAK,cACL,IAAK,cACL,IAAK,gBACL,IAAK,iBACL,IAAK,eACL,IAAK,aACL,IAAK,YACL,IAAK,aACL,IAAK,YACL,IAAK,QACL,IAAK,SACL,IAAK,YACL,IAAK,iBACL,IAAK,cACL,IAAK,gBACL,IAAK,gBACL,IAAK,mBACL,IAAK,kBACL,IAAK,yBACL,IAAK,0BACL,IAAK,4BACL,IAAK,6BACL,IAAK,eACL,IAAK,eACL,IAAK,eACL,IAAK,kBACL,IAAK,oBACL,IAAK,sBACL,IAAK,cACL,IAAK,qBACL,IAAK,qBACL,IAAK,qBACL,IAAK,oBACL,IAAK,oBACL,IAAK,oBACHlO,EAAIkO,KAAO,UACX,MACF,IAAK,SACL,IAAK,UACL,IAAK,gBACL,IAAK,SACL,IAAK,YACHlO,EAAIkO,KAAO,YACX,MACF,IAAK,QACL,IAAK,oBACL,IAAK,mBACL,IAAK,eACL,IAAK,mBACHlO,EAAIkO,KAAO,QACX,MACF,IAAK,cACL,IAAK,aACL,IAAK,aACL,IAAK,aACHlO,EAAIkO,KAAO,QACX,MACF,IAAK,mBACHlO,EAAIkO,KAAO,OAKf,OAAQ4O,GACN,IAAK,QACL,IAAK,mBACL,IAAK,mBACL,IAAK,cACH9c,EAAIoD,SAAW,OACf,MACF,IAAK,UACHpD,EAAIoD,SAAW,QACf,MACF,IAAK,WACHpD,EAAIoD,SAAW,SACf,MACF,IAAK,MACL,IAAK,QACL,IAAK,SACL,IAAK,OACL,IAAK,aACL,IAAK,eACL,IAAK,gBACL,IAAK,cACL,IAAK,cACL,IAAK,gBACL,IAAK,iBACL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,IAAIxyH,MAAM,4BAC1Bka,OAAc8yJ,EAAkB9yJ,IACzBxW,IAAK,EAAAqU,EAAAxD,WAAUi+G,GAAOA,EAAMvuH,SAASoZ,cAAcm1G,GAC1D,IAAMxyC,EAAS,IAAImtF,UAAOjzJ,GAAQkB,OAoBlC,OAjBAlB,EAAOuhG,QAAQj7G,QAAQ,SAAA4sK,GACrB,IAAM1xD,EAASD,EAAQhqH,IAAI27K,GAEvB1xD,EACFA,EAAO17B,EAAQ9lE,EAAOgzJ,YAAYE,QAElCpuF,QAAQC,KAAR,UAAuBmuF,EAAvB,gBAOJptF,EAAOjnE,WAAWkxJ,cAClB/vJ,EAAO+yJ,YAAcjtF,EAAO78E,SAC5B4pK,EAAQ11K,KAAK2oF,GAENA,IAhEK","file":"dist/grapes.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"grapesjs\"] = factory();\n\telse\n\t\troot[\"grapesjs\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 235);\n","// Backbone.js 1.3.3\n\n// (c) 2010-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n// Backbone may be freely distributed under the MIT license.\n// For all details and documentation:\n// http://backbonejs.org\n\n(function(factory) {\n\n // Establish the root object, `window` (`self`) in the browser, or `global` on the server.\n // We use `self` instead of `window` for `WebWorker` support.\n var root = (typeof self == 'object' && self.self === self && self) ||\n (typeof global == 'object' && global.global === global && global);\n\n // Set up Backbone appropriately for the environment. Start with AMD.\n if (typeof define === 'function' && define.amd) {\n define(['underscore', 'jquery', 'exports'], function(_, $, exports) {\n // Export global even in AMD case in case this script is loaded with\n // others that may still expect a global Backbone.\n root.Backbone = factory(root, exports, _, $);\n });\n\n // Next for Node.js or CommonJS. jQuery may not be needed as a module.\n } else if (typeof exports !== 'undefined') {\n var _ = require('underscore'), $;\n try { $ = require('jquery'); } catch (e) {}\n factory(root, exports, _, $);\n\n // Finally, as a browser global.\n } else {\n root.Backbone = factory(root, {}, root._, (root.jQuery || root.Zepto || root.ender || root.$));\n }\n\n})(function(root, Backbone, _, $) {\n\n // Initial Setup\n // -------------\n\n // Save the previous value of the `Backbone` variable, so that it can be\n // restored later on, if `noConflict` is used.\n var previousBackbone = root.Backbone;\n\n // Create a local reference to a common array method we'll want to use later.\n var slice = Array.prototype.slice;\n\n // Current version of the library. Keep in sync with `package.json`.\n Backbone.VERSION = '1.3.3';\n\n // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns\n // the `$` variable.\n Backbone.$ = $;\n\n // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable\n // to its previous owner. Returns a reference to this Backbone object.\n Backbone.noConflict = function() {\n root.Backbone = previousBackbone;\n return this;\n };\n\n // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option\n // will fake `\"PATCH\"`, `\"PUT\"` and `\"DELETE\"` requests via the `_method` parameter and\n // set a `X-Http-Method-Override` header.\n Backbone.emulateHTTP = false;\n\n // Turn on `emulateJSON` to support legacy servers that can't deal with direct\n // `application/json` requests ... this will encode the body as\n // `application/x-www-form-urlencoded` instead and will send the model in a\n // form param named `model`.\n Backbone.emulateJSON = false;\n\n // Proxy Backbone class methods to Underscore functions, wrapping the model's\n // `attributes` object or collection's `models` array behind the scenes.\n //\n // collection.filter(function(model) { return model.get('age') > 10 });\n // collection.each(this.addView);\n //\n // `Function#apply` can be slow so we use the method's arg count, if we know it.\n var addMethod = function(length, method, attribute) {\n switch (length) {\n case 1: return function() {\n return _[method](this[attribute]);\n };\n case 2: return function(value) {\n return _[method](this[attribute], value);\n };\n case 3: return function(iteratee, context) {\n return _[method](this[attribute], cb(iteratee, this), context);\n };\n case 4: return function(iteratee, defaultVal, context) {\n return _[method](this[attribute], cb(iteratee, this), defaultVal, context);\n };\n default: return function() {\n var args = slice.call(arguments);\n args.unshift(this[attribute]);\n return _[method].apply(_, args);\n };\n }\n };\n var addUnderscoreMethods = function(Class, methods, attribute) {\n _.each(methods, function(length, method) {\n if (_[method]) Class.prototype[method] = addMethod(length, method, attribute);\n });\n };\n\n // Support `collection.sortBy('attr')` and `collection.findWhere({id: 1})`.\n var cb = function(iteratee, instance) {\n if (_.isFunction(iteratee)) return iteratee;\n if (_.isObject(iteratee) && !instance._isModel(iteratee)) return modelMatcher(iteratee);\n if (_.isString(iteratee)) return function(model) { return model.get(iteratee); };\n return iteratee;\n };\n var modelMatcher = function(attrs) {\n var matcher = _.matches(attrs);\n return function(model) {\n return matcher(model.attributes);\n };\n };\n\n // Backbone.Events\n // ---------------\n\n // A module that can be mixed in to *any object* in order to provide it with\n // a custom event channel. You may bind a callback to an event with `on` or\n // remove with `off`; `trigger`-ing an event fires all callbacks in\n // succession.\n //\n // var object = {};\n // _.extend(object, Backbone.Events);\n // object.on('expand', function(){ alert('expanded'); });\n // object.trigger('expand');\n //\n var Events = Backbone.Events = {};\n\n // Regular expression used to split event strings.\n var eventSplitter = /\\s+/;\n\n // Iterates over the standard `event, callback` (as well as the fancy multiple\n // space-separated events `\"change blur\", callback` and jQuery-style event\n // maps `{event: callback}`).\n var eventsApi = function(iteratee, events, name, callback, opts) {\n var i = 0, names;\n if (name && typeof name === 'object') {\n // Handle event maps.\n if (callback !== void 0 && 'context' in opts && opts.context === void 0) opts.context = callback;\n for (names = _.keys(name); i < names.length ; i++) {\n events = eventsApi(iteratee, events, names[i], name[names[i]], opts);\n }\n } else if (name && eventSplitter.test(name)) {\n // Handle space-separated event names by delegating them individually.\n for (names = name.split(eventSplitter); i < names.length; i++) {\n events = iteratee(events, names[i], callback, opts);\n }\n } else {\n // Finally, standard events.\n events = iteratee(events, name, callback, opts);\n }\n return events;\n };\n\n // Bind an event to a `callback` function. Passing `\"all\"` will bind\n // the callback to all events fired.\n Events.on = function(name, callback, context) {\n return internalOn(this, name, callback, context);\n };\n\n // Guard the `listening` argument from the public API.\n var internalOn = function(obj, name, callback, context, listening) {\n obj._events = eventsApi(onApi, obj._events || {}, name, callback, {\n context: context,\n ctx: obj,\n listening: listening\n });\n\n if (listening) {\n var listeners = obj._listeners || (obj._listeners = {});\n listeners[listening.id] = listening;\n }\n\n return obj;\n };\n\n // Inversion-of-control versions of `on`. Tell *this* object to listen to\n // an event in another object... keeping track of what it's listening to\n // for easier unbinding later.\n Events.listenTo = function(obj, name, callback) {\n if (!obj) return this;\n var id = obj._listenId || (obj._listenId = _.uniqueId('l'));\n var listeningTo = this._listeningTo || (this._listeningTo = {});\n var listening = listeningTo[id];\n\n // This object is not listening to any other events on `obj` yet.\n // Setup the necessary references to track the listening callbacks.\n if (!listening) {\n var thisId = this._listenId || (this._listenId = _.uniqueId('l'));\n listening = listeningTo[id] = {obj: obj, objId: id, id: thisId, listeningTo: listeningTo, count: 0};\n }\n\n // Bind callbacks on obj, and keep track of them on listening.\n internalOn(obj, name, callback, this, listening);\n return this;\n };\n\n // The reducing API that adds a callback to the `events` object.\n var onApi = function(events, name, callback, options) {\n if (callback) {\n var handlers = events[name] || (events[name] = []);\n var context = options.context, ctx = options.ctx, listening = options.listening;\n if (listening) listening.count++;\n\n handlers.push({callback: callback, context: context, ctx: context || ctx, listening: listening});\n }\n return events;\n };\n\n // Remove one or many callbacks. If `context` is null, removes all\n // callbacks with that function. If `callback` is null, removes all\n // callbacks for the event. If `name` is null, removes all bound\n // callbacks for all events.\n Events.off = function(name, callback, context) {\n if (!this._events) return this;\n this._events = eventsApi(offApi, this._events, name, callback, {\n context: context,\n listeners: this._listeners\n });\n return this;\n };\n\n // Tell this object to stop listening to either specific events ... or\n // to every object it's currently listening to.\n Events.stopListening = function(obj, name, callback) {\n var listeningTo = this._listeningTo;\n if (!listeningTo) return this;\n\n var ids = obj ? [obj._listenId] : _.keys(listeningTo);\n\n for (var i = 0; i < ids.length; i++) {\n var listening = listeningTo[ids[i]];\n\n // If listening doesn't exist, this object is not currently\n // listening to obj. Break out early.\n if (!listening) break;\n\n listening.obj.off(name, callback, this);\n }\n\n return this;\n };\n\n // The reducing API that removes a callback from the `events` object.\n var offApi = function(events, name, callback, options) {\n if (!events) return;\n\n var i = 0, listening;\n var context = options.context, listeners = options.listeners;\n\n // Delete all events listeners and \"drop\" events.\n if (!name && !callback && !context) {\n var ids = _.keys(listeners);\n for (; i < ids.length; i++) {\n listening = listeners[ids[i]];\n delete listeners[listening.id];\n delete listening.listeningTo[listening.objId];\n }\n return;\n }\n\n var names = name ? [name] : _.keys(events);\n for (; i < names.length; i++) {\n name = names[i];\n var handlers = events[name];\n\n // Bail out if there are no events stored.\n if (!handlers) break;\n\n // Replace events if there are any remaining. Otherwise, clean up.\n var remaining = [];\n for (var j = 0; j < handlers.length; j++) {\n var handler = handlers[j];\n if (\n callback && callback !== handler.callback &&\n callback !== handler.callback._callback ||\n context && context !== handler.context\n ) {\n remaining.push(handler);\n } else {\n listening = handler.listening;\n if (listening && --listening.count === 0) {\n delete listeners[listening.id];\n delete listening.listeningTo[listening.objId];\n }\n }\n }\n\n // Update tail event if the list has any events. Otherwise, clean up.\n if (remaining.length) {\n events[name] = remaining;\n } else {\n delete events[name];\n }\n }\n return events;\n };\n\n // Bind an event to only be triggered a single time. After the first time\n // the callback is invoked, its listener will be removed. If multiple events\n // are passed in using the space-separated syntax, the handler will fire\n // once for each event, not once for a combination of all events.\n Events.once = function(name, callback, context) {\n // Map the event into a `{event: once}` object.\n var events = eventsApi(onceMap, {}, name, callback, _.bind(this.off, this));\n if (typeof name === 'string' && context == null) callback = void 0;\n return this.on(events, callback, context);\n };\n\n // Inversion-of-control versions of `once`.\n Events.listenToOnce = function(obj, name, callback) {\n // Map the event into a `{event: once}` object.\n var events = eventsApi(onceMap, {}, name, callback, _.bind(this.stopListening, this, obj));\n return this.listenTo(obj, events);\n };\n\n // Reduces the event callbacks into a map of `{event: onceWrapper}`.\n // `offer` unbinds the `onceWrapper` after it has been called.\n var onceMap = function(map, name, callback, offer) {\n if (callback) {\n var once = map[name] = _.once(function() {\n offer(name, once);\n callback.apply(this, arguments);\n });\n once._callback = callback;\n }\n return map;\n };\n\n // Trigger one or many events, firing all bound callbacks. Callbacks are\n // passed the same arguments as `trigger` is, apart from the event name\n // (unless you're listening on `\"all\"`, which will cause your callback to\n // receive the true name of the event as the first argument).\n Events.trigger = function(name) {\n if (!this._events) return this;\n\n var length = Math.max(0, arguments.length - 1);\n var args = Array(length);\n for (var i = 0; i < length; i++) args[i] = arguments[i + 1];\n\n eventsApi(triggerApi, this._events, name, void 0, args);\n return this;\n };\n\n // Handles triggering the appropriate event callbacks.\n var triggerApi = function(objEvents, name, callback, args) {\n if (objEvents) {\n var events = objEvents[name];\n var allEvents = objEvents.all;\n if (events && allEvents) allEvents = allEvents.slice();\n if (events) triggerEvents(events, args);\n if (allEvents) triggerEvents(allEvents, [name].concat(args));\n }\n return objEvents;\n };\n\n // A difficult-to-believe, but optimized internal dispatch function for\n // triggering events. Tries to keep the usual cases speedy (most internal\n // Backbone events have 3 arguments).\n var triggerEvents = function(events, args) {\n var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2];\n switch (args.length) {\n case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return;\n case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return;\n case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return;\n case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return;\n default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args); return;\n }\n };\n\n // Aliases for backwards compatibility.\n Events.bind = Events.on;\n Events.unbind = Events.off;\n\n // Allow the `Backbone` object to serve as a global event bus, for folks who\n // want global \"pubsub\" in a convenient place.\n _.extend(Backbone, Events);\n\n // Backbone.Model\n // --------------\n\n // Backbone **Models** are the basic data object in the framework --\n // frequently representing a row in a table in a database on your server.\n // A discrete chunk of data and a bunch of useful, related methods for\n // performing computations and transformations on that data.\n\n // Create a new model with the specified attributes. A client id (`cid`)\n // is automatically generated and assigned for you.\n var Model = Backbone.Model = function(attributes, options) {\n var attrs = attributes || {};\n options || (options = {});\n this.cid = _.uniqueId(this.cidPrefix);\n this.attributes = {};\n if (options.collection) this.collection = options.collection;\n if (options.parse) attrs = this.parse(attrs, options) || {};\n var defaults = _.result(this, 'defaults');\n attrs = _.defaults(_.extend({}, defaults, attrs), defaults);\n this.set(attrs, options);\n this.changed = {};\n this.initialize.apply(this, arguments);\n };\n\n // Attach all inheritable methods to the Model prototype.\n _.extend(Model.prototype, Events, {\n\n // A hash of attributes whose current and previous value differ.\n changed: null,\n\n // The value returned during the last failed validation.\n validationError: null,\n\n // The default name for the JSON `id` attribute is `\"id\"`. MongoDB and\n // CouchDB users may want to set this to `\"_id\"`.\n idAttribute: 'id',\n\n // The prefix is used to create the client id which is used to identify models locally.\n // You may want to override this if you're experiencing name clashes with model ids.\n cidPrefix: 'c',\n\n // Initialize is an empty function by default. Override it with your own\n // initialization logic.\n initialize: function(){},\n\n // Return a copy of the model's `attributes` object.\n toJSON: function(options) {\n return _.clone(this.attributes);\n },\n\n // Proxy `Backbone.sync` by default -- but override this if you need\n // custom syncing semantics for *this* particular model.\n sync: function() {\n return Backbone.sync.apply(this, arguments);\n },\n\n // Get the value of an attribute.\n get: function(attr) {\n return this.attributes[attr];\n },\n\n // Get the HTML-escaped value of an attribute.\n escape: function(attr) {\n return _.escape(this.get(attr));\n },\n\n // Returns `true` if the attribute contains a value that is not null\n // or undefined.\n has: function(attr) {\n return this.get(attr) != null;\n },\n\n // Special-cased proxy to underscore's `_.matches` method.\n matches: function(attrs) {\n return !!_.iteratee(attrs, this)(this.attributes);\n },\n\n // Set a hash of model attributes on the object, firing `\"change\"`. This is\n // the core primitive operation of a model, updating the data and notifying\n // anyone who needs to know about the change in state. The heart of the beast.\n set: function(key, val, options) {\n if (key == null) return this;\n\n // Handle both `\"key\", value` and `{key: value}` -style arguments.\n var attrs;\n if (typeof key === 'object') {\n attrs = key;\n options = val;\n } else {\n (attrs = {})[key] = val;\n }\n\n options || (options = {});\n\n // Run validation.\n if (!this._validate(attrs, options)) return false;\n\n // Extract attributes and options.\n var unset = options.unset;\n var silent = options.silent;\n var changes = [];\n var changing = this._changing;\n this._changing = true;\n\n if (!changing) {\n this._previousAttributes = _.clone(this.attributes);\n this.changed = {};\n }\n\n var current = this.attributes;\n var changed = this.changed;\n var prev = this._previousAttributes;\n\n // For each `set` attribute, update or delete the current value.\n for (var attr in attrs) {\n val = attrs[attr];\n if (!_.isEqual(current[attr], val)) changes.push(attr);\n if (!_.isEqual(prev[attr], val)) {\n changed[attr] = val;\n } else {\n delete changed[attr];\n }\n unset ? delete current[attr] : current[attr] = val;\n }\n\n // Update the `id`.\n if (this.idAttribute in attrs) this.id = this.get(this.idAttribute);\n\n // Trigger all relevant attribute changes.\n if (!silent) {\n if (changes.length) this._pending = options;\n for (var i = 0; i < changes.length; i++) {\n this.trigger('change:' + changes[i], this, current[changes[i]], options);\n }\n }\n\n // You might be wondering why there's a `while` loop here. Changes can\n // be recursively nested within `\"change\"` events.\n if (changing) return this;\n if (!silent) {\n while (this._pending) {\n options = this._pending;\n this._pending = false;\n this.trigger('change', this, options);\n }\n }\n this._pending = false;\n this._changing = false;\n return this;\n },\n\n // Remove an attribute from the model, firing `\"change\"`. `unset` is a noop\n // if the attribute doesn't exist.\n unset: function(attr, options) {\n return this.set(attr, void 0, _.extend({}, options, {unset: true}));\n },\n\n // Clear all attributes on the model, firing `\"change\"`.\n clear: function(options) {\n var attrs = {};\n for (var key in this.attributes) attrs[key] = void 0;\n return this.set(attrs, _.extend({}, options, {unset: true}));\n },\n\n // Determine if the model has changed since the last `\"change\"` event.\n // If you specify an attribute name, determine if that attribute has changed.\n hasChanged: function(attr) {\n if (attr == null) return !_.isEmpty(this.changed);\n return _.has(this.changed, attr);\n },\n\n // Return an object containing all the attributes that have changed, or\n // false if there are no changed attributes. Useful for determining what\n // parts of a view need to be updated and/or what attributes need to be\n // persisted to the server. Unset attributes will be set to undefined.\n // You can also pass an attributes object to diff against the model,\n // determining if there *would be* a change.\n changedAttributes: function(diff) {\n if (!diff) return this.hasChanged() ? _.clone(this.changed) : false;\n var old = this._changing ? this._previousAttributes : this.attributes;\n var changed = {};\n for (var attr in diff) {\n var val = diff[attr];\n if (_.isEqual(old[attr], val)) continue;\n changed[attr] = val;\n }\n return _.size(changed) ? changed : false;\n },\n\n // Get the previous value of an attribute, recorded at the time the last\n // `\"change\"` event was fired.\n previous: function(attr) {\n if (attr == null || !this._previousAttributes) return null;\n return this._previousAttributes[attr];\n },\n\n // Get all of the attributes of the model at the time of the previous\n // `\"change\"` event.\n previousAttributes: function() {\n return _.clone(this._previousAttributes);\n },\n\n // Fetch the model from the server, merging the response with the model's\n // local attributes. Any changed attributes will trigger a \"change\" event.\n fetch: function(options) {\n options = _.extend({parse: true}, options);\n var model = this;\n var success = options.success;\n options.success = function(resp) {\n var serverAttrs = options.parse ? model.parse(resp, options) : resp;\n if (!model.set(serverAttrs, options)) return false;\n if (success) success.call(options.context, model, resp, options);\n model.trigger('sync', model, resp, options);\n };\n wrapError(this, options);\n return this.sync('read', this, options);\n },\n\n // Set a hash of model attributes, and sync the model to the server.\n // If the server returns an attributes hash that differs, the model's\n // state will be `set` again.\n save: function(key, val, options) {\n // Handle both `\"key\", value` and `{key: value}` -style arguments.\n var attrs;\n if (key == null || typeof key === 'object') {\n attrs = key;\n options = val;\n } else {\n (attrs = {})[key] = val;\n }\n\n options = _.extend({validate: true, parse: true}, options);\n var wait = options.wait;\n\n // If we're not waiting and attributes exist, save acts as\n // `set(attr).save(null, opts)` with validation. Otherwise, check if\n // the model will be valid when the attributes, if any, are set.\n if (attrs && !wait) {\n if (!this.set(attrs, options)) return false;\n } else if (!this._validate(attrs, options)) {\n return false;\n }\n\n // After a successful server-side save, the client is (optionally)\n // updated with the server-side state.\n var model = this;\n var success = options.success;\n var attributes = this.attributes;\n options.success = function(resp) {\n // Ensure attributes are restored during synchronous saves.\n model.attributes = attributes;\n var serverAttrs = options.parse ? model.parse(resp, options) : resp;\n if (wait) serverAttrs = _.extend({}, attrs, serverAttrs);\n if (serverAttrs && !model.set(serverAttrs, options)) return false;\n if (success) success.call(options.context, model, resp, options);\n model.trigger('sync', model, resp, options);\n };\n wrapError(this, options);\n\n // Set temporary attributes if `{wait: true}` to properly find new ids.\n if (attrs && wait) this.attributes = _.extend({}, attributes, attrs);\n\n var method = this.isNew() ? 'create' : (options.patch ? 'patch' : 'update');\n if (method === 'patch' && !options.attrs) options.attrs = attrs;\n var xhr = this.sync(method, this, options);\n\n // Restore attributes.\n this.attributes = attributes;\n\n return xhr;\n },\n\n // Destroy this model on the server if it was already persisted.\n // Optimistically removes the model from its collection, if it has one.\n // If `wait: true` is passed, waits for the server to respond before removal.\n destroy: function(options) {\n options = options ? _.clone(options) : {};\n var model = this;\n var success = options.success;\n var wait = options.wait;\n\n var destroy = function() {\n model.stopListening();\n model.trigger('destroy', model, model.collection, options);\n };\n\n options.success = function(resp) {\n if (wait) destroy();\n if (success) success.call(options.context, model, resp, options);\n if (!model.isNew()) model.trigger('sync', model, resp, options);\n };\n\n var xhr = false;\n if (this.isNew()) {\n _.defer(options.success);\n } else {\n wrapError(this, options);\n xhr = this.sync('delete', this, options);\n }\n if (!wait) destroy();\n return xhr;\n },\n\n // Default URL for the model's representation on the server -- if you're\n // using Backbone's restful methods, override this to change the endpoint\n // that will be called.\n url: function() {\n var base =\n _.result(this, 'urlRoot') ||\n _.result(this.collection, 'url') ||\n urlError();\n if (this.isNew()) return base;\n var id = this.get(this.idAttribute);\n return base.replace(/[^\\/]$/, '$&/') + encodeURIComponent(id);\n },\n\n // **parse** converts a response into the hash of attributes to be `set` on\n // the model. The default implementation is just to pass the response along.\n parse: function(resp, options) {\n return resp;\n },\n\n // Create a new model with identical attributes to this one.\n clone: function() {\n return new this.constructor(this.attributes);\n },\n\n // A model is new if it has never been saved to the server, and lacks an id.\n isNew: function() {\n return !this.has(this.idAttribute);\n },\n\n // Check if the model is currently in a valid state.\n isValid: function(options) {\n return this._validate({}, _.extend({}, options, {validate: true}));\n },\n\n // Run validation against the next complete set of model attributes,\n // returning `true` if all is well. Otherwise, fire an `\"invalid\"` event.\n _validate: function(attrs, options) {\n if (!options.validate || !this.validate) return true;\n attrs = _.extend({}, this.attributes, attrs);\n var error = this.validationError = this.validate(attrs, options) || null;\n if (!error) return true;\n this.trigger('invalid', this, error, _.extend(options, {validationError: error}));\n return false;\n }\n\n });\n\n // Underscore methods that we want to implement on the Model, mapped to the\n // number of arguments they take.\n var modelMethods = {keys: 1, values: 1, pairs: 1, invert: 1, pick: 0,\n omit: 0, chain: 1, isEmpty: 1};\n\n // Mix in each Underscore method as a proxy to `Model#attributes`.\n addUnderscoreMethods(Model, modelMethods, 'attributes');\n\n // Backbone.Collection\n // -------------------\n\n // If models tend to represent a single row of data, a Backbone Collection is\n // more analogous to a table full of data ... or a small slice or page of that\n // table, or a collection of rows that belong together for a particular reason\n // -- all of the messages in this particular folder, all of the documents\n // belonging to this particular author, and so on. Collections maintain\n // indexes of their models, both in order, and for lookup by `id`.\n\n // Create a new **Collection**, perhaps to contain a specific type of `model`.\n // If a `comparator` is specified, the Collection will maintain\n // its models in sort order, as they're added and removed.\n var Collection = Backbone.Collection = function(models, options) {\n options || (options = {});\n if (options.model) this.model = options.model;\n if (options.comparator !== void 0) this.comparator = options.comparator;\n this._reset();\n this.initialize.apply(this, arguments);\n if (models) this.reset(models, _.extend({silent: true}, options));\n };\n\n // Default options for `Collection#set`.\n var setOptions = {add: true, remove: true, merge: true};\n var addOptions = {add: true, remove: false};\n\n // Splices `insert` into `array` at index `at`.\n var splice = function(array, insert, at) {\n at = Math.min(Math.max(at, 0), array.length);\n var tail = Array(array.length - at);\n var length = insert.length;\n var i;\n for (i = 0; i < tail.length; i++) tail[i] = array[i + at];\n for (i = 0; i < length; i++) array[i + at] = insert[i];\n for (i = 0; i < tail.length; i++) array[i + length + at] = tail[i];\n };\n\n // Define the Collection's inheritable methods.\n _.extend(Collection.prototype, Events, {\n\n // The default model for a collection is just a **Backbone.Model**.\n // This should be overridden in most cases.\n model: Model,\n\n // Initialize is an empty function by default. Override it with your own\n // initialization logic.\n initialize: function(){},\n\n // The JSON representation of a Collection is an array of the\n // models' attributes.\n toJSON: function(options) {\n return this.map(function(model) { return model.toJSON(options); });\n },\n\n // Proxy `Backbone.sync` by default.\n sync: function() {\n return Backbone.sync.apply(this, arguments);\n },\n\n // Add a model, or list of models to the set. `models` may be Backbone\n // Models or raw JavaScript objects to be converted to Models, or any\n // combination of the two.\n add: function(models, options) {\n return this.set(models, _.extend({merge: false}, options, addOptions));\n },\n\n // Remove a model, or a list of models from the set.\n remove: function(models, options) {\n options = _.extend({}, options);\n var singular = !_.isArray(models);\n models = singular ? [models] : models.slice();\n var removed = this._removeModels(models, options);\n if (!options.silent && removed.length) {\n options.changes = {added: [], merged: [], removed: removed};\n this.trigger('update', this, options);\n }\n return singular ? removed[0] : removed;\n },\n\n // Update a collection by `set`-ing a new list of models, adding new ones,\n // removing models that are no longer present, and merging models that\n // already exist in the collection, as necessary. Similar to **Model#set**,\n // the core operation for updating the data contained by the collection.\n set: function(models, options) {\n if (models == null) return;\n\n options = _.extend({}, setOptions, options);\n if (options.parse && !this._isModel(models)) {\n models = this.parse(models, options) || [];\n }\n\n var singular = !_.isArray(models);\n models = singular ? [models] : models.slice();\n\n var at = options.at;\n if (at != null) at = +at;\n if (at > this.length) at = this.length;\n if (at < 0) at += this.length + 1;\n\n var set = [];\n var toAdd = [];\n var toMerge = [];\n var toRemove = [];\n var modelMap = {};\n\n var add = options.add;\n var merge = options.merge;\n var remove = options.remove;\n\n var sort = false;\n var sortable = this.comparator && at == null && options.sort !== false;\n var sortAttr = _.isString(this.comparator) ? this.comparator : null;\n\n // Turn bare objects into model references, and prevent invalid models\n // from being added.\n var model, i;\n for (i = 0; i < models.length; i++) {\n model = models[i];\n\n // If a duplicate is found, prevent it from being added and\n // optionally merge it into the existing model.\n var existing = this.get(model);\n if (existing) {\n if (merge && model !== existing) {\n var attrs = this._isModel(model) ? model.attributes : model;\n if (options.parse) attrs = existing.parse(attrs, options);\n existing.set(attrs, options);\n toMerge.push(existing);\n if (sortable && !sort) sort = existing.hasChanged(sortAttr);\n }\n if (!modelMap[existing.cid]) {\n modelMap[existing.cid] = true;\n set.push(existing);\n }\n models[i] = existing;\n\n // If this is a new, valid model, push it to the `toAdd` list.\n } else if (add) {\n model = models[i] = this._prepareModel(model, options);\n if (model) {\n toAdd.push(model);\n this._addReference(model, options);\n modelMap[model.cid] = true;\n set.push(model);\n }\n }\n }\n\n // Remove stale models.\n if (remove) {\n for (i = 0; i < this.length; i++) {\n model = this.models[i];\n if (!modelMap[model.cid]) toRemove.push(model);\n }\n if (toRemove.length) this._removeModels(toRemove, options);\n }\n\n // See if sorting is needed, update `length` and splice in new models.\n var orderChanged = false;\n var replace = !sortable && add && remove;\n if (set.length && replace) {\n orderChanged = this.length !== set.length || _.some(this.models, function(m, index) {\n return m !== set[index];\n });\n this.models.length = 0;\n splice(this.models, set, 0);\n this.length = this.models.length;\n } else if (toAdd.length) {\n if (sortable) sort = true;\n splice(this.models, toAdd, at == null ? this.length : at);\n this.length = this.models.length;\n }\n\n // Silently sort the collection if appropriate.\n if (sort) this.sort({silent: true});\n\n // Unless silenced, it's time to fire all appropriate add/sort/update events.\n if (!options.silent) {\n for (i = 0; i < toAdd.length; i++) {\n if (at != null) options.index = at + i;\n model = toAdd[i];\n model.trigger('add', model, this, options);\n }\n if (sort || orderChanged) this.trigger('sort', this, options);\n if (toAdd.length || toRemove.length || toMerge.length) {\n options.changes = {\n added: toAdd,\n removed: toRemove,\n merged: toMerge\n };\n this.trigger('update', this, options);\n }\n }\n\n // Return the added (or merged) model (or models).\n return singular ? models[0] : models;\n },\n\n // When you have more items than you want to add or remove individually,\n // you can reset the entire set with a new list of models, without firing\n // any granular `add` or `remove` events. Fires `reset` when finished.\n // Useful for bulk operations and optimizations.\n reset: function(models, options) {\n options = options ? _.clone(options) : {};\n for (var i = 0; i < this.models.length; i++) {\n this._removeReference(this.models[i], options);\n }\n options.previousModels = this.models;\n this._reset();\n models = this.add(models, _.extend({silent: true}, options));\n if (!options.silent) this.trigger('reset', this, options);\n return models;\n },\n\n // Add a model to the end of the collection.\n push: function(model, options) {\n return this.add(model, _.extend({at: this.length}, options));\n },\n\n // Remove a model from the end of the collection.\n pop: function(options) {\n var model = this.at(this.length - 1);\n return this.remove(model, options);\n },\n\n // Add a model to the beginning of the collection.\n unshift: function(model, options) {\n return this.add(model, _.extend({at: 0}, options));\n },\n\n // Remove a model from the beginning of the collection.\n shift: function(options) {\n var model = this.at(0);\n return this.remove(model, options);\n },\n\n // Slice out a sub-array of models from the collection.\n slice: function() {\n return slice.apply(this.models, arguments);\n },\n\n // Get a model from the set by id, cid, model object with id or cid\n // properties, or an attributes object that is transformed through modelId.\n get: function(obj) {\n if (obj == null) return void 0;\n return this._byId[obj] ||\n this._byId[this.modelId(obj.attributes || obj)] ||\n obj.cid && this._byId[obj.cid];\n },\n\n // Returns `true` if the model is in the collection.\n has: function(obj) {\n return this.get(obj) != null;\n },\n\n // Get the model at the given index.\n at: function(index) {\n if (index < 0) index += this.length;\n return this.models[index];\n },\n\n // Return models with matching attributes. Useful for simple cases of\n // `filter`.\n where: function(attrs, first) {\n return this[first ? 'find' : 'filter'](attrs);\n },\n\n // Return the first model with matching attributes. Useful for simple cases\n // of `find`.\n findWhere: function(attrs) {\n return this.where(attrs, true);\n },\n\n // Force the collection to re-sort itself. You don't need to call this under\n // normal circumstances, as the set will maintain sort order as each item\n // is added.\n sort: function(options) {\n var comparator = this.comparator;\n if (!comparator) throw new Error('Cannot sort a set without a comparator');\n options || (options = {});\n\n var length = comparator.length;\n if (_.isFunction(comparator)) comparator = _.bind(comparator, this);\n\n // Run sort based on type of `comparator`.\n if (length === 1 || _.isString(comparator)) {\n this.models = this.sortBy(comparator);\n } else {\n this.models.sort(comparator);\n }\n if (!options.silent) this.trigger('sort', this, options);\n return this;\n },\n\n // Pluck an attribute from each model in the collection.\n pluck: function(attr) {\n return this.map(attr + '');\n },\n\n // Fetch the default set of models for this collection, resetting the\n // collection when they arrive. If `reset: true` is passed, the response\n // data will be passed through the `reset` method instead of `set`.\n fetch: function(options) {\n options = _.extend({parse: true}, options);\n var success = options.success;\n var collection = this;\n options.success = function(resp) {\n var method = options.reset ? 'reset' : 'set';\n collection[method](resp, options);\n if (success) success.call(options.context, collection, resp, options);\n collection.trigger('sync', collection, resp, options);\n };\n wrapError(this, options);\n return this.sync('read', this, options);\n },\n\n // Create a new instance of a model in this collection. Add the model to the\n // collection immediately, unless `wait: true` is passed, in which case we\n // wait for the server to agree.\n create: function(model, options) {\n options = options ? _.clone(options) : {};\n var wait = options.wait;\n model = this._prepareModel(model, options);\n if (!model) return false;\n if (!wait) this.add(model, options);\n var collection = this;\n var success = options.success;\n options.success = function(m, resp, callbackOpts) {\n if (wait) collection.add(m, callbackOpts);\n if (success) success.call(callbackOpts.context, m, resp, callbackOpts);\n };\n model.save(null, options);\n return model;\n },\n\n // **parse** converts a response into a list of models to be added to the\n // collection. The default implementation is just to pass it through.\n parse: function(resp, options) {\n return resp;\n },\n\n // Create a new collection with an identical list of models as this one.\n clone: function() {\n return new this.constructor(this.models, {\n model: this.model,\n comparator: this.comparator\n });\n },\n\n // Define how to uniquely identify models in the collection.\n modelId: function(attrs) {\n return attrs[this.model.prototype.idAttribute || 'id'];\n },\n\n // Private method to reset all internal state. Called when the collection\n // is first initialized or reset.\n _reset: function() {\n this.length = 0;\n this.models = [];\n this._byId = {};\n },\n\n // Prepare a hash of attributes (or other model) to be added to this\n // collection.\n _prepareModel: function(attrs, options) {\n if (this._isModel(attrs)) {\n if (!attrs.collection) attrs.collection = this;\n return attrs;\n }\n options = options ? _.clone(options) : {};\n options.collection = this;\n var model = new this.model(attrs, options);\n if (!model.validationError) return model;\n this.trigger('invalid', this, model.validationError, options);\n return false;\n },\n\n // Internal method called by both remove and set.\n _removeModels: function(models, options) {\n var removed = [];\n for (var i = 0; i < models.length; i++) {\n var model = this.get(models[i]);\n if (!model) continue;\n\n var index = this.indexOf(model);\n this.models.splice(index, 1);\n this.length--;\n\n // Remove references before triggering 'remove' event to prevent an\n // infinite loop. #3693\n delete this._byId[model.cid];\n var id = this.modelId(model.attributes);\n if (id != null) delete this._byId[id];\n\n if (!options.silent) {\n options.index = index;\n model.trigger('remove', model, this, options);\n }\n\n removed.push(model);\n this._removeReference(model, options);\n }\n return removed;\n },\n\n // Method for checking whether an object should be considered a model for\n // the purposes of adding to the collection.\n _isModel: function(model) {\n return model instanceof Model;\n },\n\n // Internal method to create a model's ties to a collection.\n _addReference: function(model, options) {\n this._byId[model.cid] = model;\n var id = this.modelId(model.attributes);\n if (id != null) this._byId[id] = model;\n model.on('all', this._onModelEvent, this);\n },\n\n // Internal method to sever a model's ties to a collection.\n _removeReference: function(model, options) {\n delete this._byId[model.cid];\n var id = this.modelId(model.attributes);\n if (id != null) delete this._byId[id];\n if (this === model.collection) delete model.collection;\n model.off('all', this._onModelEvent, this);\n },\n\n // Internal method called every time a model in the set fires an event.\n // Sets need to update their indexes when models change ids. All other\n // events simply proxy through. \"add\" and \"remove\" events that originate\n // in other collections are ignored.\n _onModelEvent: function(event, model, collection, options) {\n if (model) {\n if ((event === 'add' || event === 'remove') && collection !== this) return;\n if (event === 'destroy') this.remove(model, options);\n if (event === 'change') {\n var prevId = this.modelId(model.previousAttributes());\n var id = this.modelId(model.attributes);\n if (prevId !== id) {\n if (prevId != null) delete this._byId[prevId];\n if (id != null) this._byId[id] = model;\n }\n }\n }\n this.trigger.apply(this, arguments);\n }\n\n });\n\n // Underscore methods that we want to implement on the Collection.\n // 90% of the core usefulness of Backbone Collections is actually implemented\n // right here:\n var collectionMethods = {forEach: 3, each: 3, map: 3, collect: 3, reduce: 0,\n foldl: 0, inject: 0, reduceRight: 0, foldr: 0, find: 3, detect: 3, filter: 3,\n select: 3, reject: 3, every: 3, all: 3, some: 3, any: 3, include: 3, includes: 3,\n contains: 3, invoke: 0, max: 3, min: 3, toArray: 1, size: 1, first: 3,\n head: 3, take: 3, initial: 3, rest: 3, tail: 3, drop: 3, last: 3,\n without: 0, difference: 0, indexOf: 3, shuffle: 1, lastIndexOf: 3,\n isEmpty: 1, chain: 1, sample: 3, partition: 3, groupBy: 3, countBy: 3,\n sortBy: 3, indexBy: 3, findIndex: 3, findLastIndex: 3};\n\n // Mix in each Underscore method as a proxy to `Collection#models`.\n addUnderscoreMethods(Collection, collectionMethods, 'models');\n\n // Backbone.View\n // -------------\n\n // Backbone Views are almost more convention than they are actual code. A View\n // is simply a JavaScript object that represents a logical chunk of UI in the\n // DOM. This might be a single item, an entire list, a sidebar or panel, or\n // even the surrounding frame which wraps your whole app. Defining a chunk of\n // UI as a **View** allows you to define your DOM events declaratively, without\n // having to worry about render order ... and makes it easy for the view to\n // react to specific changes in the state of your models.\n\n // Creating a Backbone.View creates its initial element outside of the DOM,\n // if an existing element is not provided...\n var View = Backbone.View = function(options) {\n this.cid = _.uniqueId('view');\n _.extend(this, _.pick(options, viewOptions));\n this._ensureElement();\n this.initialize.apply(this, arguments);\n };\n\n // Cached regex to split keys for `delegate`.\n var delegateEventSplitter = /^(\\S+)\\s*(.*)$/;\n\n // List of view options to be set as properties.\n var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events'];\n\n // Set up all inheritable **Backbone.View** properties and methods.\n _.extend(View.prototype, Events, {\n\n // The default `tagName` of a View's element is `\"div\"`.\n tagName: 'div',\n\n // jQuery delegate for element lookup, scoped to DOM elements within the\n // current view. This should be preferred to global lookups where possible.\n $: function(selector) {\n return this.$el.find(selector);\n },\n\n // Initialize is an empty function by default. Override it with your own\n // initialization logic.\n initialize: function(){},\n\n // **render** is the core function that your view should override, in order\n // to populate its element (`this.el`), with the appropriate HTML. The\n // convention is for **render** to always return `this`.\n render: function() {\n return this;\n },\n\n // Remove this view by taking the element out of the DOM, and removing any\n // applicable Backbone.Events listeners.\n remove: function() {\n this._removeElement();\n this.stopListening();\n return this;\n },\n\n // Remove this view's element from the document and all event listeners\n // attached to it. Exposed for subclasses using an alternative DOM\n // manipulation API.\n _removeElement: function() {\n this.$el.remove();\n },\n\n // Change the view's element (`this.el` property) and re-delegate the\n // view's events on the new element.\n setElement: function(element) {\n this.undelegateEvents();\n this._setElement(element);\n this.delegateEvents();\n return this;\n },\n\n // Creates the `this.el` and `this.$el` references for this view using the\n // given `el`. `el` can be a CSS selector or an HTML string, a jQuery\n // context or an element. Subclasses can override this to utilize an\n // alternative DOM manipulation API and are only required to set the\n // `this.el` property.\n _setElement: function(el) {\n this.$el = el instanceof Backbone.$ ? el : Backbone.$(el);\n this.el = this.$el[0];\n },\n\n // Set callbacks, where `this.events` is a hash of\n //\n // *{\"event selector\": \"callback\"}*\n //\n // {\n // 'mousedown .title': 'edit',\n // 'click .button': 'save',\n // 'click .open': function(e) { ... }\n // }\n //\n // pairs. Callbacks will be bound to the view, with `this` set properly.\n // Uses event delegation for efficiency.\n // Omitting the selector binds the event to `this.el`.\n delegateEvents: function(events) {\n events || (events = _.result(this, 'events'));\n if (!events) return this;\n this.undelegateEvents();\n for (var key in events) {\n var method = events[key];\n if (!_.isFunction(method)) method = this[method];\n if (!method) continue;\n var match = key.match(delegateEventSplitter);\n this.delegate(match[1], match[2], _.bind(method, this));\n }\n return this;\n },\n\n // Add a single event listener to the view's element (or a child element\n // using `selector`). This only works for delegate-able events: not `focus`,\n // `blur`, and not `change`, `submit`, and `reset` in Internet Explorer.\n delegate: function(eventName, selector, listener) {\n this.$el.on(eventName + '.delegateEvents' + this.cid, selector, listener);\n return this;\n },\n\n // Clears all callbacks previously bound to the view by `delegateEvents`.\n // You usually don't need to use this, but may wish to if you have multiple\n // Backbone views attached to the same DOM element.\n undelegateEvents: function() {\n if (this.$el) this.$el.off('.delegateEvents' + this.cid);\n return this;\n },\n\n // A finer-grained `undelegateEvents` for removing a single delegated event.\n // `selector` and `listener` are both optional.\n undelegate: function(eventName, selector, listener) {\n this.$el.off(eventName + '.delegateEvents' + this.cid, selector, listener);\n return this;\n },\n\n // Produces a DOM element to be assigned to your view. Exposed for\n // subclasses using an alternative DOM manipulation API.\n _createElement: function(tagName) {\n return document.createElement(tagName);\n },\n\n // Ensure that the View has a DOM element to render into.\n // If `this.el` is a string, pass it through `$()`, take the first\n // matching element, and re-assign it to `el`. Otherwise, create\n // an element from the `id`, `className` and `tagName` properties.\n _ensureElement: function() {\n if (!this.el) {\n var attrs = _.extend({}, _.result(this, 'attributes'));\n if (this.id) attrs.id = _.result(this, 'id');\n if (this.className) attrs['class'] = _.result(this, 'className');\n this.setElement(this._createElement(_.result(this, 'tagName')));\n this._setAttributes(attrs);\n } else {\n this.setElement(_.result(this, 'el'));\n }\n },\n\n // Set attributes from a hash on this view's element. Exposed for\n // subclasses using an alternative DOM manipulation API.\n _setAttributes: function(attributes) {\n this.$el.attr(attributes);\n }\n\n });\n\n // Backbone.sync\n // -------------\n\n // Override this function to change the manner in which Backbone persists\n // models to the server. You will be passed the type of request, and the\n // model in question. By default, makes a RESTful Ajax request\n // to the model's `url()`. Some possible customizations could be:\n //\n // * Use `setTimeout` to batch rapid-fire updates into a single request.\n // * Send up the models as XML instead of JSON.\n // * Persist models via WebSockets instead of Ajax.\n //\n // Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests\n // as `POST`, with a `_method` parameter containing the true HTTP method,\n // as well as all requests with the body as `application/x-www-form-urlencoded`\n // instead of `application/json` with the model in a param named `model`.\n // Useful when interfacing with server-side languages like **PHP** that make\n // it difficult to read the body of `PUT` requests.\n Backbone.sync = function(method, model, options) {\n var type = methodMap[method];\n\n // Default options, unless specified.\n _.defaults(options || (options = {}), {\n emulateHTTP: Backbone.emulateHTTP,\n emulateJSON: Backbone.emulateJSON\n });\n\n // Default JSON-request options.\n var params = {type: type, dataType: 'json'};\n\n // Ensure that we have a URL.\n if (!options.url) {\n params.url = _.result(model, 'url') || urlError();\n }\n\n // Ensure that we have the appropriate request data.\n if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) {\n params.contentType = 'application/json';\n params.data = JSON.stringify(options.attrs || model.toJSON(options));\n }\n\n // For older servers, emulate JSON by encoding the request into an HTML-form.\n if (options.emulateJSON) {\n params.contentType = 'application/x-www-form-urlencoded';\n params.data = params.data ? {model: params.data} : {};\n }\n\n // For older servers, emulate HTTP by mimicking the HTTP method with `_method`\n // And an `X-HTTP-Method-Override` header.\n if (options.emulateHTTP && (type === 'PUT' || type === 'DELETE' || type === 'PATCH')) {\n params.type = 'POST';\n if (options.emulateJSON) params.data._method = type;\n var beforeSend = options.beforeSend;\n options.beforeSend = function(xhr) {\n xhr.setRequestHeader('X-HTTP-Method-Override', type);\n if (beforeSend) return beforeSend.apply(this, arguments);\n };\n }\n\n // Don't process data on a non-GET request.\n if (params.type !== 'GET' && !options.emulateJSON) {\n params.processData = false;\n }\n\n // Pass along `textStatus` and `errorThrown` from jQuery.\n var error = options.error;\n options.error = function(xhr, textStatus, errorThrown) {\n options.textStatus = textStatus;\n options.errorThrown = errorThrown;\n if (error) error.call(options.context, xhr, textStatus, errorThrown);\n };\n\n // Make the request, allowing the user to override any Ajax options.\n var xhr = options.xhr = Backbone.ajax(_.extend(params, options));\n model.trigger('request', model, xhr, options);\n return xhr;\n };\n\n // Map from CRUD to HTTP for our default `Backbone.sync` implementation.\n var methodMap = {\n 'create': 'POST',\n 'update': 'PUT',\n 'patch': 'PATCH',\n 'delete': 'DELETE',\n 'read': 'GET'\n };\n\n // Set the default implementation of `Backbone.ajax` to proxy through to `$`.\n // Override this if you'd like to use a different library.\n Backbone.ajax = function() {\n return Backbone.$.ajax.apply(Backbone.$, arguments);\n };\n\n // Backbone.Router\n // ---------------\n\n // Routers map faux-URLs to actions, and fire events when routes are\n // matched. Creating a new one sets its `routes` hash, if not set statically.\n var Router = Backbone.Router = function(options) {\n options || (options = {});\n if (options.routes) this.routes = options.routes;\n this._bindRoutes();\n this.initialize.apply(this, arguments);\n };\n\n // Cached regular expressions for matching named param parts and splatted\n // parts of route strings.\n var optionalParam = /\\((.*?)\\)/g;\n var namedParam = /(\\(\\?)?:\\w+/g;\n var splatParam = /\\*\\w+/g;\n var escapeRegExp = /[\\-{}\\[\\]+?.,\\\\\\^$|#\\s]/g;\n\n // Set up all inheritable **Backbone.Router** properties and methods.\n _.extend(Router.prototype, Events, {\n\n // Initialize is an empty function by default. Override it with your own\n // initialization logic.\n initialize: function(){},\n\n // Manually bind a single named route to a callback. For example:\n //\n // this.route('search/:query/p:num', 'search', function(query, num) {\n // ...\n // });\n //\n route: function(route, name, callback) {\n if (!_.isRegExp(route)) route = this._routeToRegExp(route);\n if (_.isFunction(name)) {\n callback = name;\n name = '';\n }\n if (!callback) callback = this[name];\n var router = this;\n Backbone.history.route(route, function(fragment) {\n var args = router._extractParameters(route, fragment);\n if (router.execute(callback, args, name) !== false) {\n router.trigger.apply(router, ['route:' + name].concat(args));\n router.trigger('route', name, args);\n Backbone.history.trigger('route', router, name, args);\n }\n });\n return this;\n },\n\n // Execute a route handler with the provided parameters. This is an\n // excellent place to do pre-route setup or post-route cleanup.\n execute: function(callback, args, name) {\n if (callback) callback.apply(this, args);\n },\n\n // Simple proxy to `Backbone.history` to save a fragment into the history.\n navigate: function(fragment, options) {\n Backbone.history.navigate(fragment, options);\n return this;\n },\n\n // Bind all defined routes to `Backbone.history`. We have to reverse the\n // order of the routes here to support behavior where the most general\n // routes can be defined at the bottom of the route map.\n _bindRoutes: function() {\n if (!this.routes) return;\n this.routes = _.result(this, 'routes');\n var route, routes = _.keys(this.routes);\n while ((route = routes.pop()) != null) {\n this.route(route, this.routes[route]);\n }\n },\n\n // Convert a route string into a regular expression, suitable for matching\n // against the current location hash.\n _routeToRegExp: function(route) {\n route = route.replace(escapeRegExp, '\\\\$&')\n .replace(optionalParam, '(?:$1)?')\n .replace(namedParam, function(match, optional) {\n return optional ? match : '([^/?]+)';\n })\n .replace(splatParam, '([^?]*?)');\n return new RegExp('^' + route + '(?:\\\\?([\\\\s\\\\S]*))?$');\n },\n\n // Given a route, and a URL fragment that it matches, return the array of\n // extracted decoded parameters. Empty or unmatched parameters will be\n // treated as `null` to normalize cross-browser behavior.\n _extractParameters: function(route, fragment) {\n var params = route.exec(fragment).slice(1);\n return _.map(params, function(param, i) {\n // Don't decode the search params.\n if (i === params.length - 1) return param || null;\n return param ? decodeURIComponent(param) : null;\n });\n }\n\n });\n\n // Backbone.History\n // ----------------\n\n // Handles cross-browser history management, based on either\n // [pushState](http://diveintohtml5.info/history.html) and real URLs, or\n // [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange)\n // and URL fragments. If the browser supports neither (old IE, natch),\n // falls back to polling.\n var History = Backbone.History = function() {\n this.handlers = [];\n this.checkUrl = _.bind(this.checkUrl, this);\n\n // Ensure that `History` can be used outside of the browser.\n if (typeof window !== 'undefined') {\n this.location = window.location;\n this.history = window.history;\n }\n };\n\n // Cached regex for stripping a leading hash/slash and trailing space.\n var routeStripper = /^[#\\/]|\\s+$/g;\n\n // Cached regex for stripping leading and trailing slashes.\n var rootStripper = /^\\/+|\\/+$/g;\n\n // Cached regex for stripping urls of hash.\n var pathStripper = /#.*$/;\n\n // Has the history handling already been started?\n History.started = false;\n\n // Set up all inheritable **Backbone.History** properties and methods.\n _.extend(History.prototype, Events, {\n\n // The default interval to poll for hash changes, if necessary, is\n // twenty times a second.\n interval: 50,\n\n // Are we at the app root?\n atRoot: function() {\n var path = this.location.pathname.replace(/[^\\/]$/, '$&/');\n return path === this.root && !this.getSearch();\n },\n\n // Does the pathname match the root?\n matchRoot: function() {\n var path = this.decodeFragment(this.location.pathname);\n var rootPath = path.slice(0, this.root.length - 1) + '/';\n return rootPath === this.root;\n },\n\n // Unicode characters in `location.pathname` are percent encoded so they're\n // decoded for comparison. `%25` should not be decoded since it may be part\n // of an encoded parameter.\n decodeFragment: function(fragment) {\n return decodeURI(fragment.replace(/%25/g, '%2525'));\n },\n\n // In IE6, the hash fragment and search params are incorrect if the\n // fragment contains `?`.\n getSearch: function() {\n var match = this.location.href.replace(/#.*/, '').match(/\\?.+/);\n return match ? match[0] : '';\n },\n\n // Gets the true hash value. Cannot use location.hash directly due to bug\n // in Firefox where location.hash will always be decoded.\n getHash: function(window) {\n var match = (window || this).location.href.match(/#(.*)$/);\n return match ? match[1] : '';\n },\n\n // Get the pathname and search params, without the root.\n getPath: function() {\n var path = this.decodeFragment(\n this.location.pathname + this.getSearch()\n ).slice(this.root.length - 1);\n return path.charAt(0) === '/' ? path.slice(1) : path;\n },\n\n // Get the cross-browser normalized URL fragment from the path or hash.\n getFragment: function(fragment) {\n if (fragment == null) {\n if (this._usePushState || !this._wantsHashChange) {\n fragment = this.getPath();\n } else {\n fragment = this.getHash();\n }\n }\n return fragment.replace(routeStripper, '');\n },\n\n // Start the hash change handling, returning `true` if the current URL matches\n // an existing route, and `false` otherwise.\n start: function(options) {\n if (History.started) throw new Error('Backbone.history has already been started');\n History.started = true;\n\n // Figure out the initial configuration. Do we need an iframe?\n // Is pushState desired ... is it available?\n this.options = _.extend({root: '/'}, this.options, options);\n this.root = this.options.root;\n this._wantsHashChange = this.options.hashChange !== false;\n this._hasHashChange = 'onhashchange' in window && (document.documentMode === void 0 || document.documentMode > 7);\n this._useHashChange = this._wantsHashChange && this._hasHashChange;\n this._wantsPushState = !!this.options.pushState;\n this._hasPushState = !!(this.history && this.history.pushState);\n this._usePushState = this._wantsPushState && this._hasPushState;\n this.fragment = this.getFragment();\n\n // Normalize root to always include a leading and trailing slash.\n this.root = ('/' + this.root + '/').replace(rootStripper, '/');\n\n // Transition from hashChange to pushState or vice versa if both are\n // requested.\n if (this._wantsHashChange && this._wantsPushState) {\n\n // If we've started off with a route from a `pushState`-enabled\n // browser, but we're currently in a browser that doesn't support it...\n if (!this._hasPushState && !this.atRoot()) {\n var rootPath = this.root.slice(0, -1) || '/';\n this.location.replace(rootPath + '#' + this.getPath());\n // Return immediately as browser will do redirect to new url\n return true;\n\n // Or if we've started out with a hash-based route, but we're currently\n // in a browser where it could be `pushState`-based instead...\n } else if (this._hasPushState && this.atRoot()) {\n this.navigate(this.getHash(), {replace: true});\n }\n\n }\n\n // Proxy an iframe to handle location events if the browser doesn't\n // support the `hashchange` event, HTML5 history, or the user wants\n // `hashChange` but not `pushState`.\n if (!this._hasHashChange && this._wantsHashChange && !this._usePushState) {\n this.iframe = document.createElement('iframe');\n this.iframe.src = 'javascript:0';\n this.iframe.style.display = 'none';\n this.iframe.tabIndex = -1;\n var body = document.body;\n // Using `appendChild` will throw on IE < 9 if the document is not ready.\n var iWindow = body.insertBefore(this.iframe, body.firstChild).contentWindow;\n iWindow.document.open();\n iWindow.document.close();\n iWindow.location.hash = '#' + this.fragment;\n }\n\n // Add a cross-platform `addEventListener` shim for older browsers.\n var addEventListener = window.addEventListener || function(eventName, listener) {\n return attachEvent('on' + eventName, listener);\n };\n\n // Depending on whether we're using pushState or hashes, and whether\n // 'onhashchange' is supported, determine how we check the URL state.\n if (this._usePushState) {\n addEventListener('popstate', this.checkUrl, false);\n } else if (this._useHashChange && !this.iframe) {\n addEventListener('hashchange', this.checkUrl, false);\n } else if (this._wantsHashChange) {\n this._checkUrlInterval = setInterval(this.checkUrl, this.interval);\n }\n\n if (!this.options.silent) return this.loadUrl();\n },\n\n // Disable Backbone.history, perhaps temporarily. Not useful in a real app,\n // but possibly useful for unit testing Routers.\n stop: function() {\n // Add a cross-platform `removeEventListener` shim for older browsers.\n var removeEventListener = window.removeEventListener || function(eventName, listener) {\n return detachEvent('on' + eventName, listener);\n };\n\n // Remove window listeners.\n if (this._usePushState) {\n removeEventListener('popstate', this.checkUrl, false);\n } else if (this._useHashChange && !this.iframe) {\n removeEventListener('hashchange', this.checkUrl, false);\n }\n\n // Clean up the iframe if necessary.\n if (this.iframe) {\n document.body.removeChild(this.iframe);\n this.iframe = null;\n }\n\n // Some environments will throw when clearing an undefined interval.\n if (this._checkUrlInterval) clearInterval(this._checkUrlInterval);\n History.started = false;\n },\n\n // Add a route to be tested when the fragment changes. Routes added later\n // may override previous routes.\n route: function(route, callback) {\n this.handlers.unshift({route: route, callback: callback});\n },\n\n // Checks the current URL to see if it has changed, and if it has,\n // calls `loadUrl`, normalizing across the hidden iframe.\n checkUrl: function(e) {\n var current = this.getFragment();\n\n // If the user pressed the back button, the iframe's hash will have\n // changed and we should use that for comparison.\n if (current === this.fragment && this.iframe) {\n current = this.getHash(this.iframe.contentWindow);\n }\n\n if (current === this.fragment) return false;\n if (this.iframe) this.navigate(current);\n this.loadUrl();\n },\n\n // Attempt to load the current URL fragment. If a route succeeds with a\n // match, returns `true`. If no defined routes matches the fragment,\n // returns `false`.\n loadUrl: function(fragment) {\n // If the root doesn't match, no routes can match either.\n if (!this.matchRoot()) return false;\n fragment = this.fragment = this.getFragment(fragment);\n return _.some(this.handlers, function(handler) {\n if (handler.route.test(fragment)) {\n handler.callback(fragment);\n return true;\n }\n });\n },\n\n // Save a fragment into the hash history, or replace the URL state if the\n // 'replace' option is passed. You are responsible for properly URL-encoding\n // the fragment in advance.\n //\n // The options object can contain `trigger: true` if you wish to have the\n // route callback be fired (not usually desirable), or `replace: true`, if\n // you wish to modify the current URL without adding an entry to the history.\n navigate: function(fragment, options) {\n if (!History.started) return false;\n if (!options || options === true) options = {trigger: !!options};\n\n // Normalize the fragment.\n fragment = this.getFragment(fragment || '');\n\n // Don't include a trailing slash on the root.\n var rootPath = this.root;\n if (fragment === '' || fragment.charAt(0) === '?') {\n rootPath = rootPath.slice(0, -1) || '/';\n }\n var url = rootPath + fragment;\n\n // Strip the hash and decode for matching.\n fragment = this.decodeFragment(fragment.replace(pathStripper, ''));\n\n if (this.fragment === fragment) return;\n this.fragment = fragment;\n\n // If pushState is available, we use it to set the fragment as a real URL.\n if (this._usePushState) {\n this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);\n\n // If hash changes haven't been explicitly disabled, update the hash\n // fragment to store history.\n } else if (this._wantsHashChange) {\n this._updateHash(this.location, fragment, options.replace);\n if (this.iframe && fragment !== this.getHash(this.iframe.contentWindow)) {\n var iWindow = this.iframe.contentWindow;\n\n // Opening and closing the iframe tricks IE7 and earlier to push a\n // history entry on hash-tag change. When replace is true, we don't\n // want this.\n if (!options.replace) {\n iWindow.document.open();\n iWindow.document.close();\n }\n\n this._updateHash(iWindow.location, fragment, options.replace);\n }\n\n // If you've told us that you explicitly don't want fallback hashchange-\n // based history, then `navigate` becomes a page refresh.\n } else {\n return this.location.assign(url);\n }\n if (options.trigger) return this.loadUrl(fragment);\n },\n\n // Update the hash location, either replacing the current entry, or adding\n // a new one to the browser history.\n _updateHash: function(location, fragment, replace) {\n if (replace) {\n var href = location.href.replace(/(javascript:|#).*$/, '');\n location.replace(href + '#' + fragment);\n } else {\n // Some browsers require that `hash` contains a leading #.\n location.hash = '#' + fragment;\n }\n }\n\n });\n\n // Create the default Backbone.history.\n Backbone.history = new History;\n\n // Helpers\n // -------\n\n // Helper function to correctly set up the prototype chain for subclasses.\n // Similar to `goog.inherits`, but uses a hash of prototype properties and\n // class properties to be extended.\n var extend = function(protoProps, staticProps) {\n var parent = this;\n var child;\n\n // The constructor function for the new subclass is either defined by you\n // (the \"constructor\" property in your `extend` definition), or defaulted\n // by us to simply call the parent constructor.\n if (protoProps && _.has(protoProps, 'constructor')) {\n child = protoProps.constructor;\n } else {\n child = function(){ return parent.apply(this, arguments); };\n }\n\n // Add static properties to the constructor function, if supplied.\n _.extend(child, parent, staticProps);\n\n // Set the prototype chain to inherit from `parent`, without calling\n // `parent`'s constructor function and add the prototype properties.\n child.prototype = _.create(parent.prototype, protoProps);\n child.prototype.constructor = child;\n\n // Set a convenience property in case the parent's prototype is needed\n // later.\n child.__super__ = parent.prototype;\n\n return child;\n };\n\n // Set up inheritance for the model, collection, router, view and history.\n Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend;\n\n // Throw an error when a URL is needed, and none is supplied.\n var urlError = function() {\n throw new Error('A \"url\" property or function must be specified');\n };\n\n // Wrap an optional error callback with a fallback error event.\n var wrapError = function(model, options) {\n var error = options.error;\n options.error = function(resp) {\n if (error) error.call(options.context, model, resp, options);\n model.trigger('error', model, resp, options);\n };\n };\n\n return Backbone;\n});\n","// Underscore.js 1.9.1\n// http://underscorejs.org\n// (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n// Underscore may be freely distributed under the MIT license.\n\n(function() {\n\n // Baseline setup\n // --------------\n\n // Establish the root object, `window` (`self`) in the browser, `global`\n // on the server, or `this` in some virtual machines. We use `self`\n // instead of `window` for `WebWorker` support.\n var root = typeof self == 'object' && self.self === self && self ||\n typeof global == 'object' && global.global === global && global ||\n this ||\n {};\n\n // Save the previous value of the `_` variable.\n var previousUnderscore = root._;\n\n // Save bytes in the minified (but not gzipped) version:\n var ArrayProto = Array.prototype, ObjProto = Object.prototype;\n var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;\n\n // Create quick reference variables for speed access to core prototypes.\n var push = ArrayProto.push,\n slice = ArrayProto.slice,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n // All **ECMAScript 5** native function implementations that we hope to use\n // are declared here.\n var nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeCreate = Object.create;\n\n // Naked function reference for surrogate-prototype-swapping.\n var Ctor = function(){};\n\n // Create a safe reference to the Underscore object for use below.\n var _ = function(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n };\n\n // Export the Underscore object for **Node.js**, with\n // backwards-compatibility for their old module API. If we're in\n // the browser, add `_` as a global object.\n // (`nodeType` is checked to ensure that `module`\n // and `exports` are not HTML elements.)\n if (typeof exports != 'undefined' && !exports.nodeType) {\n if (typeof module != 'undefined' && !module.nodeType && module.exports) {\n exports = module.exports = _;\n }\n exports._ = _;\n } else {\n root._ = _;\n }\n\n // Current version.\n _.VERSION = '1.9.1';\n\n // Internal function that returns an efficient (for current engines) version\n // of the passed-in callback, to be repeatedly applied in other Underscore\n // functions.\n var optimizeCb = function(func, context, argCount) {\n if (context === void 0) return func;\n switch (argCount == null ? 3 : argCount) {\n case 1: return function(value) {\n return func.call(context, value);\n };\n // The 2-argument case is omitted because we’re not using it.\n case 3: return function(value, index, collection) {\n return func.call(context, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(context, accumulator, value, index, collection);\n };\n }\n return function() {\n return func.apply(context, arguments);\n };\n };\n\n var builtinIteratee;\n\n // An internal function to generate callbacks that can be applied to each\n // element in a collection, returning the desired result — either `identity`,\n // an arbitrary callback, a property matcher, or a property accessor.\n var cb = function(value, context, argCount) {\n if (_.iteratee !== builtinIteratee) return _.iteratee(value, context);\n if (value == null) return _.identity;\n if (_.isFunction(value)) return optimizeCb(value, context, argCount);\n if (_.isObject(value) && !_.isArray(value)) return _.matcher(value);\n return _.property(value);\n };\n\n // External wrapper for our callback generator. Users may customize\n // `_.iteratee` if they want additional predicate/iteratee shorthand styles.\n // This abstraction hides the internal-only argCount argument.\n _.iteratee = builtinIteratee = function(value, context) {\n return cb(value, context, Infinity);\n };\n\n // Some functions take a variable number of arguments, or a few expected\n // arguments at the beginning and then a variable number of values to operate\n // on. This helper accumulates all remaining arguments past the function’s\n // argument length (or an explicit `startIndex`), into an array that becomes\n // the last argument. Similar to ES6’s \"rest parameter\".\n var restArguments = function(func, startIndex) {\n startIndex = startIndex == null ? func.length - 1 : +startIndex;\n return function() {\n var length = Math.max(arguments.length - startIndex, 0),\n rest = Array(length),\n index = 0;\n for (; index < length; index++) {\n rest[index] = arguments[index + startIndex];\n }\n switch (startIndex) {\n case 0: return func.call(this, rest);\n case 1: return func.call(this, arguments[0], rest);\n case 2: return func.call(this, arguments[0], arguments[1], rest);\n }\n var args = Array(startIndex + 1);\n for (index = 0; index < startIndex; index++) {\n args[index] = arguments[index];\n }\n args[startIndex] = rest;\n return func.apply(this, args);\n };\n };\n\n // An internal function for creating a new object that inherits from another.\n var baseCreate = function(prototype) {\n if (!_.isObject(prototype)) return {};\n if (nativeCreate) return nativeCreate(prototype);\n Ctor.prototype = prototype;\n var result = new Ctor;\n Ctor.prototype = null;\n return result;\n };\n\n var shallowProperty = function(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n };\n\n var has = function(obj, path) {\n return obj != null && hasOwnProperty.call(obj, path);\n }\n\n var deepGet = function(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n };\n\n // Helper for collection methods to determine whether a collection\n // should be iterated as an array or as an object.\n // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\n var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\n var getLength = shallowProperty('length');\n var isArrayLike = function(collection) {\n var length = getLength(collection);\n return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;\n };\n\n // Collection Functions\n // --------------------\n\n // The cornerstone, an `each` implementation, aka `forEach`.\n // Handles raw objects in addition to array-likes. Treats all\n // sparse array-likes as if they were dense.\n _.each = _.forEach = function(obj, iteratee, context) {\n iteratee = optimizeCb(iteratee, context);\n var i, length;\n if (isArrayLike(obj)) {\n for (i = 0, length = obj.length; i < length; i++) {\n iteratee(obj[i], i, obj);\n }\n } else {\n var keys = _.keys(obj);\n for (i = 0, length = keys.length; i < length; i++) {\n iteratee(obj[keys[i]], keys[i], obj);\n }\n }\n return obj;\n };\n\n // Return the results of applying the iteratee to each element.\n _.map = _.collect = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n results = Array(length);\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n results[index] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Create a reducing function iterating left or right.\n var createReduce = function(dir) {\n // Wrap code that reassigns argument variables in a separate function than\n // the one that accesses `arguments.length` to avoid a perf hit. (#1991)\n var reducer = function(obj, iteratee, memo, initial) {\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n index = dir > 0 ? 0 : length - 1;\n if (!initial) {\n memo = obj[keys ? keys[index] : index];\n index += dir;\n }\n for (; index >= 0 && index < length; index += dir) {\n var currentKey = keys ? keys[index] : index;\n memo = iteratee(memo, obj[currentKey], currentKey, obj);\n }\n return memo;\n };\n\n return function(obj, iteratee, memo, context) {\n var initial = arguments.length >= 3;\n return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);\n };\n };\n\n // **Reduce** builds up a single result from a list of values, aka `inject`,\n // or `foldl`.\n _.reduce = _.foldl = _.inject = createReduce(1);\n\n // The right-associative version of reduce, also known as `foldr`.\n _.reduceRight = _.foldr = createReduce(-1);\n\n // Return the first value which passes a truth test. Aliased as `detect`.\n _.find = _.detect = function(obj, predicate, context) {\n var keyFinder = isArrayLike(obj) ? _.findIndex : _.findKey;\n var key = keyFinder(obj, predicate, context);\n if (key !== void 0 && key !== -1) return obj[key];\n };\n\n // Return all the elements that pass a truth test.\n // Aliased as `select`.\n _.filter = _.select = function(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n _.each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n };\n\n // Return all the elements for which a truth test fails.\n _.reject = function(obj, predicate, context) {\n return _.filter(obj, _.negate(cb(predicate)), context);\n };\n\n // Determine whether all of the elements match a truth test.\n // Aliased as `all`.\n _.every = _.all = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (!predicate(obj[currentKey], currentKey, obj)) return false;\n }\n return true;\n };\n\n // Determine if at least one element in the object matches a truth test.\n // Aliased as `any`.\n _.some = _.any = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (predicate(obj[currentKey], currentKey, obj)) return true;\n }\n return false;\n };\n\n // Determine if the array or object contains a given item (using `===`).\n // Aliased as `includes` and `include`.\n _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n return _.indexOf(obj, item, fromIndex) >= 0;\n };\n\n // Invoke a method (with arguments) on every item in a collection.\n _.invoke = restArguments(function(obj, path, args) {\n var contextPath, func;\n if (_.isFunction(path)) {\n func = path;\n } else if (_.isArray(path)) {\n contextPath = path.slice(0, -1);\n path = path[path.length - 1];\n }\n return _.map(obj, function(context) {\n var method = func;\n if (!method) {\n if (contextPath && contextPath.length) {\n context = deepGet(context, contextPath);\n }\n if (context == null) return void 0;\n method = context[path];\n }\n return method == null ? method : method.apply(context, args);\n });\n });\n\n // Convenience version of a common use case of `map`: fetching a property.\n _.pluck = function(obj, key) {\n return _.map(obj, _.property(key));\n };\n\n // Convenience version of a common use case of `filter`: selecting only objects\n // containing specific `key:value` pairs.\n _.where = function(obj, attrs) {\n return _.filter(obj, _.matcher(attrs));\n };\n\n // Convenience version of a common use case of `find`: getting the first object\n // containing specific `key:value` pairs.\n _.findWhere = function(obj, attrs) {\n return _.find(obj, _.matcher(attrs));\n };\n\n // Return the maximum element (or element-based computation).\n _.max = function(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Return the minimum element (or element-based computation).\n _.min = function(obj, iteratee, context) {\n var result = Infinity, lastComputed = Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value < result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed < lastComputed || computed === Infinity && result === Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Shuffle a collection.\n _.shuffle = function(obj) {\n return _.sample(obj, Infinity);\n };\n\n // Sample **n** random values from a collection using the modern version of the\n // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n // If **n** is not specified, returns a single random element.\n // The internal `guard` argument allows it to work with `map`.\n _.sample = function(obj, n, guard) {\n if (n == null || guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n return obj[_.random(obj.length - 1)];\n }\n var sample = isArrayLike(obj) ? _.clone(obj) : _.values(obj);\n var length = getLength(sample);\n n = Math.max(Math.min(n, length), 0);\n var last = length - 1;\n for (var index = 0; index < n; index++) {\n var rand = _.random(index, last);\n var temp = sample[index];\n sample[index] = sample[rand];\n sample[rand] = temp;\n }\n return sample.slice(0, n);\n };\n\n // Sort the object's values by a criterion produced by an iteratee.\n _.sortBy = function(obj, iteratee, context) {\n var index = 0;\n iteratee = cb(iteratee, context);\n return _.pluck(_.map(obj, function(value, key, list) {\n return {\n value: value,\n index: index++,\n criteria: iteratee(value, key, list)\n };\n }).sort(function(left, right) {\n var a = left.criteria;\n var b = right.criteria;\n if (a !== b) {\n if (a > b || a === void 0) return 1;\n if (a < b || b === void 0) return -1;\n }\n return left.index - right.index;\n }), 'value');\n };\n\n // An internal function used for aggregate \"group by\" operations.\n var group = function(behavior, partition) {\n return function(obj, iteratee, context) {\n var result = partition ? [[], []] : {};\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index) {\n var key = iteratee(value, index, obj);\n behavior(result, value, key);\n });\n return result;\n };\n };\n\n // Groups the object's values by a criterion. Pass either a string attribute\n // to group by, or a function that returns the criterion.\n _.groupBy = group(function(result, value, key) {\n if (has(result, key)) result[key].push(value); else result[key] = [value];\n });\n\n // Indexes the object's values by a criterion, similar to `groupBy`, but for\n // when you know that your index values will be unique.\n _.indexBy = group(function(result, value, key) {\n result[key] = value;\n });\n\n // Counts instances of an object that group by a certain criterion. Pass\n // either a string attribute to count by, or a function that returns the\n // criterion.\n _.countBy = group(function(result, value, key) {\n if (has(result, key)) result[key]++; else result[key] = 1;\n });\n\n var reStrSymbol = /[^\\ud800-\\udfff]|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff]/g;\n // Safely create a real, live array from anything iterable.\n _.toArray = function(obj) {\n if (!obj) return [];\n if (_.isArray(obj)) return slice.call(obj);\n if (_.isString(obj)) {\n // Keep surrogate pair characters together\n return obj.match(reStrSymbol);\n }\n if (isArrayLike(obj)) return _.map(obj, _.identity);\n return _.values(obj);\n };\n\n // Return the number of elements in an object.\n _.size = function(obj) {\n if (obj == null) return 0;\n return isArrayLike(obj) ? obj.length : _.keys(obj).length;\n };\n\n // Split a collection into two arrays: one whose elements all satisfy the given\n // predicate, and one whose elements all do not satisfy the predicate.\n _.partition = group(function(result, value, pass) {\n result[pass ? 0 : 1].push(value);\n }, true);\n\n // Array Functions\n // ---------------\n\n // Get the first element of an array. Passing **n** will return the first N\n // values in the array. Aliased as `head` and `take`. The **guard** check\n // allows it to work with `_.map`.\n _.first = _.head = _.take = function(array, n, guard) {\n if (array == null || array.length < 1) return n == null ? void 0 : [];\n if (n == null || guard) return array[0];\n return _.initial(array, array.length - n);\n };\n\n // Returns everything but the last entry of the array. Especially useful on\n // the arguments object. Passing **n** will return all the values in\n // the array, excluding the last N.\n _.initial = function(array, n, guard) {\n return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n };\n\n // Get the last element of an array. Passing **n** will return the last N\n // values in the array.\n _.last = function(array, n, guard) {\n if (array == null || array.length < 1) return n == null ? void 0 : [];\n if (n == null || guard) return array[array.length - 1];\n return _.rest(array, Math.max(0, array.length - n));\n };\n\n // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.\n // Especially useful on the arguments object. Passing an **n** will return\n // the rest N values in the array.\n _.rest = _.tail = _.drop = function(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n };\n\n // Trim out all falsy values from an array.\n _.compact = function(array) {\n return _.filter(array, Boolean);\n };\n\n // Internal implementation of a recursive `flatten` function.\n var flatten = function(input, shallow, strict, output) {\n output = output || [];\n var idx = output.length;\n for (var i = 0, length = getLength(input); i < length; i++) {\n var value = input[i];\n if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {\n // Flatten current level of array or arguments object.\n if (shallow) {\n var j = 0, len = value.length;\n while (j < len) output[idx++] = value[j++];\n } else {\n flatten(value, shallow, strict, output);\n idx = output.length;\n }\n } else if (!strict) {\n output[idx++] = value;\n }\n }\n return output;\n };\n\n // Flatten out an array, either recursively (by default), or just one level.\n _.flatten = function(array, shallow) {\n return flatten(array, shallow, false);\n };\n\n // Return a version of the array that does not contain the specified value(s).\n _.without = restArguments(function(array, otherArrays) {\n return _.difference(array, otherArrays);\n });\n\n // Produce a duplicate-free version of the array. If the array has already\n // been sorted, you have the option of using a faster algorithm.\n // The faster algorithm will not work with an iteratee if the iteratee\n // is not a one-to-one function, so providing an iteratee will disable\n // the faster algorithm.\n // Aliased as `unique`.\n _.uniq = _.unique = function(array, isSorted, iteratee, context) {\n if (!_.isBoolean(isSorted)) {\n context = iteratee;\n iteratee = isSorted;\n isSorted = false;\n }\n if (iteratee != null) iteratee = cb(iteratee, context);\n var result = [];\n var seen = [];\n for (var i = 0, length = getLength(array); i < length; i++) {\n var value = array[i],\n computed = iteratee ? iteratee(value, i, array) : value;\n if (isSorted && !iteratee) {\n if (!i || seen !== computed) result.push(value);\n seen = computed;\n } else if (iteratee) {\n if (!_.contains(seen, computed)) {\n seen.push(computed);\n result.push(value);\n }\n } else if (!_.contains(result, value)) {\n result.push(value);\n }\n }\n return result;\n };\n\n // Produce an array that contains the union: each distinct element from all of\n // the passed-in arrays.\n _.union = restArguments(function(arrays) {\n return _.uniq(flatten(arrays, true, true));\n });\n\n // Produce an array that contains every item shared between all the\n // passed-in arrays.\n _.intersection = function(array) {\n var result = [];\n var argsLength = arguments.length;\n for (var i = 0, length = getLength(array); i < length; i++) {\n var item = array[i];\n if (_.contains(result, item)) continue;\n var j;\n for (j = 1; j < argsLength; j++) {\n if (!_.contains(arguments[j], item)) break;\n }\n if (j === argsLength) result.push(item);\n }\n return result;\n };\n\n // Take the difference between one array and a number of other arrays.\n // Only the elements present in just the first array will remain.\n _.difference = restArguments(function(array, rest) {\n rest = flatten(rest, true, true);\n return _.filter(array, function(value){\n return !_.contains(rest, value);\n });\n });\n\n // Complement of _.zip. Unzip accepts an array of arrays and groups\n // each array's elements on shared indices.\n _.unzip = function(array) {\n var length = array && _.max(array, getLength).length || 0;\n var result = Array(length);\n\n for (var index = 0; index < length; index++) {\n result[index] = _.pluck(array, index);\n }\n return result;\n };\n\n // Zip together multiple lists into a single array -- elements that share\n // an index go together.\n _.zip = restArguments(_.unzip);\n\n // Converts lists into objects. Pass either a single array of `[key, value]`\n // pairs, or two parallel arrays of the same length -- one of keys, and one of\n // the corresponding values. Passing by pairs is the reverse of _.pairs.\n _.object = function(list, values) {\n var result = {};\n for (var i = 0, length = getLength(list); i < length; i++) {\n if (values) {\n result[list[i]] = values[i];\n } else {\n result[list[i][0]] = list[i][1];\n }\n }\n return result;\n };\n\n // Generator function to create the findIndex and findLastIndex functions.\n var createPredicateIndexFinder = function(dir) {\n return function(array, predicate, context) {\n predicate = cb(predicate, context);\n var length = getLength(array);\n var index = dir > 0 ? 0 : length - 1;\n for (; index >= 0 && index < length; index += dir) {\n if (predicate(array[index], index, array)) return index;\n }\n return -1;\n };\n };\n\n // Returns the first index on an array-like that passes a predicate test.\n _.findIndex = createPredicateIndexFinder(1);\n _.findLastIndex = createPredicateIndexFinder(-1);\n\n // Use a comparator function to figure out the smallest index at which\n // an object should be inserted so as to maintain order. Uses binary search.\n _.sortedIndex = function(array, obj, iteratee, context) {\n iteratee = cb(iteratee, context, 1);\n var value = iteratee(obj);\n var low = 0, high = getLength(array);\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n }\n return low;\n };\n\n // Generator function to create the indexOf and lastIndexOf functions.\n var createIndexFinder = function(dir, predicateFind, sortedIndex) {\n return function(array, item, idx) {\n var i = 0, length = getLength(array);\n if (typeof idx == 'number') {\n if (dir > 0) {\n i = idx >= 0 ? idx : Math.max(idx + length, i);\n } else {\n length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n }\n } else if (sortedIndex && idx && length) {\n idx = sortedIndex(array, item);\n return array[idx] === item ? idx : -1;\n }\n if (item !== item) {\n idx = predicateFind(slice.call(array, i, length), _.isNaN);\n return idx >= 0 ? idx + i : -1;\n }\n for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n if (array[idx] === item) return idx;\n }\n return -1;\n };\n };\n\n // Return the position of the first occurrence of an item in an array,\n // or -1 if the item is not included in the array.\n // If the array is large and already in sort order, pass `true`\n // for **isSorted** to use binary search.\n _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex);\n _.lastIndexOf = createIndexFinder(-1, _.findLastIndex);\n\n // Generate an integer Array containing an arithmetic progression. A port of\n // the native Python `range()` function. See\n // [the Python documentation](http://docs.python.org/library/functions.html#range).\n _.range = function(start, stop, step) {\n if (stop == null) {\n stop = start || 0;\n start = 0;\n }\n if (!step) {\n step = stop < start ? -1 : 1;\n }\n\n var length = Math.max(Math.ceil((stop - start) / step), 0);\n var range = Array(length);\n\n for (var idx = 0; idx < length; idx++, start += step) {\n range[idx] = start;\n }\n\n return range;\n };\n\n // Chunk a single array into multiple arrays, each containing `count` or fewer\n // items.\n _.chunk = function(array, count) {\n if (count == null || count < 1) return [];\n var result = [];\n var i = 0, length = array.length;\n while (i < length) {\n result.push(slice.call(array, i, i += count));\n }\n return result;\n };\n\n // Function (ahem) Functions\n // ------------------\n\n // Determines whether to execute a function as a constructor\n // or a normal function with the provided arguments.\n var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {\n if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n var self = baseCreate(sourceFunc.prototype);\n var result = sourceFunc.apply(self, args);\n if (_.isObject(result)) return result;\n return self;\n };\n\n // Create a function bound to a given object (assigning `this`, and arguments,\n // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\n // available.\n _.bind = restArguments(function(func, context, args) {\n if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');\n var bound = restArguments(function(callArgs) {\n return executeBound(func, bound, context, this, args.concat(callArgs));\n });\n return bound;\n });\n\n // Partially apply a function by creating a version that has had some of its\n // arguments pre-filled, without changing its dynamic `this` context. _ acts\n // as a placeholder by default, allowing any combination of arguments to be\n // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.\n _.partial = restArguments(function(func, boundArgs) {\n var placeholder = _.partial.placeholder;\n var bound = function() {\n var position = 0, length = boundArgs.length;\n var args = Array(length);\n for (var i = 0; i < length; i++) {\n args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];\n }\n while (position < arguments.length) args.push(arguments[position++]);\n return executeBound(func, bound, this, this, args);\n };\n return bound;\n });\n\n _.partial.placeholder = _;\n\n // Bind a number of an object's methods to that object. Remaining arguments\n // are the method names to be bound. Useful for ensuring that all callbacks\n // defined on an object belong to it.\n _.bindAll = restArguments(function(obj, keys) {\n keys = flatten(keys, false, false);\n var index = keys.length;\n if (index < 1) throw new Error('bindAll must be passed function names');\n while (index--) {\n var key = keys[index];\n obj[key] = _.bind(obj[key], obj);\n }\n });\n\n // Memoize an expensive function by storing its results.\n _.memoize = function(func, hasher) {\n var memoize = function(key) {\n var cache = memoize.cache;\n var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n if (!has(cache, address)) cache[address] = func.apply(this, arguments);\n return cache[address];\n };\n memoize.cache = {};\n return memoize;\n };\n\n // Delays a function for the given number of milliseconds, and then calls\n // it with the arguments supplied.\n _.delay = restArguments(function(func, wait, args) {\n return setTimeout(function() {\n return func.apply(null, args);\n }, wait);\n });\n\n // Defers a function, scheduling it to run after the current call stack has\n // cleared.\n _.defer = _.partial(_.delay, _, 1);\n\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time. Normally, the throttled function will run\n // as much as it can, without ever going more than once per `wait` duration;\n // but if you'd like to disable the execution on the leading edge, pass\n // `{leading: false}`. To disable execution on the trailing edge, ditto.\n _.throttle = function(func, wait, options) {\n var timeout, context, args, result;\n var previous = 0;\n if (!options) options = {};\n\n var later = function() {\n previous = options.leading === false ? 0 : _.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n\n var throttled = function() {\n var now = _.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n\n throttled.cancel = function() {\n clearTimeout(timeout);\n previous = 0;\n timeout = context = args = null;\n };\n\n return throttled;\n };\n\n // Returns a function, that, as long as it continues to be invoked, will not\n // be triggered. The function will be called after it stops being called for\n // N milliseconds. If `immediate` is passed, trigger the function on the\n // leading edge, instead of the trailing.\n _.debounce = function(func, wait, immediate) {\n var timeout, result;\n\n var later = function(context, args) {\n timeout = null;\n if (args) result = func.apply(context, args);\n };\n\n var debounced = restArguments(function(args) {\n if (timeout) clearTimeout(timeout);\n if (immediate) {\n var callNow = !timeout;\n timeout = setTimeout(later, wait);\n if (callNow) result = func.apply(this, args);\n } else {\n timeout = _.delay(later, wait, this, args);\n }\n\n return result;\n });\n\n debounced.cancel = function() {\n clearTimeout(timeout);\n timeout = null;\n };\n\n return debounced;\n };\n\n // Returns the first function passed as an argument to the second,\n // allowing you to adjust arguments, run code before and after, and\n // conditionally execute the original function.\n _.wrap = function(func, wrapper) {\n return _.partial(wrapper, func);\n };\n\n // Returns a negated version of the passed-in predicate.\n _.negate = function(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n };\n };\n\n // Returns a function that is the composition of a list of functions, each\n // consuming the return value of the function that follows.\n _.compose = function() {\n var args = arguments;\n var start = args.length - 1;\n return function() {\n var i = start;\n var result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n };\n\n // Returns a function that will only be executed on and after the Nth call.\n _.after = function(times, func) {\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n };\n\n // Returns a function that will only be executed up to (but not including) the Nth call.\n _.before = function(times, func) {\n var memo;\n return function() {\n if (--times > 0) {\n memo = func.apply(this, arguments);\n }\n if (times <= 1) func = null;\n return memo;\n };\n };\n\n // Returns a function that will be executed at most one time, no matter how\n // often you call it. Useful for lazy initialization.\n _.once = _.partial(_.before, 2);\n\n _.restArguments = restArguments;\n\n // Object Functions\n // ----------------\n\n // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\n var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\n var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\n var collectNonEnumProps = function(obj, keys) {\n var nonEnumIdx = nonEnumerableProps.length;\n var constructor = obj.constructor;\n var proto = _.isFunction(constructor) && constructor.prototype || ObjProto;\n\n // Constructor is a special case.\n var prop = 'constructor';\n if (has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);\n\n while (nonEnumIdx--) {\n prop = nonEnumerableProps[nonEnumIdx];\n if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {\n keys.push(prop);\n }\n }\n };\n\n // Retrieve the names of an object's own properties.\n // Delegates to **ECMAScript 5**'s native `Object.keys`.\n _.keys = function(obj) {\n if (!_.isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var keys = [];\n for (var key in obj) if (has(obj, key)) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve all the property names of an object.\n _.allKeys = function(obj) {\n if (!_.isObject(obj)) return [];\n var keys = [];\n for (var key in obj) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve the values of an object's properties.\n _.values = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[keys[i]];\n }\n return values;\n };\n\n // Returns the results of applying the iteratee to each element of the object.\n // In contrast to _.map it returns an object.\n _.mapObject = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = _.keys(obj),\n length = keys.length,\n results = {};\n for (var index = 0; index < length; index++) {\n var currentKey = keys[index];\n results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Convert an object into a list of `[key, value]` pairs.\n // The opposite of _.object.\n _.pairs = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var pairs = Array(length);\n for (var i = 0; i < length; i++) {\n pairs[i] = [keys[i], obj[keys[i]]];\n }\n return pairs;\n };\n\n // Invert the keys and values of an object. The values must be serializable.\n _.invert = function(obj) {\n var result = {};\n var keys = _.keys(obj);\n for (var i = 0, length = keys.length; i < length; i++) {\n result[obj[keys[i]]] = keys[i];\n }\n return result;\n };\n\n // Return a sorted list of the function names available on the object.\n // Aliased as `methods`.\n _.functions = _.methods = function(obj) {\n var names = [];\n for (var key in obj) {\n if (_.isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n };\n\n // An internal function for creating assigner functions.\n var createAssigner = function(keysFunc, defaults) {\n return function(obj) {\n var length = arguments.length;\n if (defaults) obj = Object(obj);\n if (length < 2 || obj == null) return obj;\n for (var index = 1; index < length; index++) {\n var source = arguments[index],\n keys = keysFunc(source),\n l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (!defaults || obj[key] === void 0) obj[key] = source[key];\n }\n }\n return obj;\n };\n };\n\n // Extend a given object with all the properties in passed-in object(s).\n _.extend = createAssigner(_.allKeys);\n\n // Assigns a given object with all the own properties in the passed-in object(s).\n // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\n _.extendOwn = _.assign = createAssigner(_.keys);\n\n // Returns the first key on an object that passes a predicate test.\n _.findKey = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = _.keys(obj), key;\n for (var i = 0, length = keys.length; i < length; i++) {\n key = keys[i];\n if (predicate(obj[key], key, obj)) return key;\n }\n };\n\n // Internal pick helper function to determine if `obj` has key `key`.\n var keyInObj = function(value, key, obj) {\n return key in obj;\n };\n\n // Return a copy of the object only containing the whitelisted properties.\n _.pick = restArguments(function(obj, keys) {\n var result = {}, iteratee = keys[0];\n if (obj == null) return result;\n if (_.isFunction(iteratee)) {\n if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);\n keys = _.allKeys(obj);\n } else {\n iteratee = keyInObj;\n keys = flatten(keys, false, false);\n obj = Object(obj);\n }\n for (var i = 0, length = keys.length; i < length; i++) {\n var key = keys[i];\n var value = obj[key];\n if (iteratee(value, key, obj)) result[key] = value;\n }\n return result;\n });\n\n // Return a copy of the object without the blacklisted properties.\n _.omit = restArguments(function(obj, keys) {\n var iteratee = keys[0], context;\n if (_.isFunction(iteratee)) {\n iteratee = _.negate(iteratee);\n if (keys.length > 1) context = keys[1];\n } else {\n keys = _.map(flatten(keys, false, false), String);\n iteratee = function(value, key) {\n return !_.contains(keys, key);\n };\n }\n return _.pick(obj, iteratee, context);\n });\n\n // Fill in a given object with default properties.\n _.defaults = createAssigner(_.allKeys, true);\n\n // Creates an object that inherits from the given prototype object.\n // If additional properties are provided then they will be added to the\n // created object.\n _.create = function(prototype, props) {\n var result = baseCreate(prototype);\n if (props) _.extendOwn(result, props);\n return result;\n };\n\n // Create a (shallow-cloned) duplicate of an object.\n _.clone = function(obj) {\n if (!_.isObject(obj)) return obj;\n return _.isArray(obj) ? obj.slice() : _.extend({}, obj);\n };\n\n // Invokes interceptor with the obj, and then returns obj.\n // The primary purpose of this method is to \"tap into\" a method chain, in\n // order to perform operations on intermediate results within the chain.\n _.tap = function(obj, interceptor) {\n interceptor(obj);\n return obj;\n };\n\n // Returns whether an object has a given set of `key:value` pairs.\n _.isMatch = function(object, attrs) {\n var keys = _.keys(attrs), length = keys.length;\n if (object == null) return !length;\n var obj = Object(object);\n for (var i = 0; i < length; i++) {\n var key = keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) return false;\n }\n return true;\n };\n\n\n // Internal recursive comparison function for `isEqual`.\n var eq, deepEq;\n eq = function(a, b, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n // `null` or `undefined` only equal to itself (strict comparison).\n if (a == null || b == null) return false;\n // `NaN`s are equivalent, but non-reflexive.\n if (a !== a) return b !== b;\n // Exhaust primitive checks\n var type = typeof a;\n if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;\n return deepEq(a, b, aStack, bStack);\n };\n\n // Internal recursive comparison function for `isEqual`.\n deepEq = function(a, b, aStack, bStack) {\n // Unwrap any wrapped objects.\n if (a instanceof _) a = a._wrapped;\n if (b instanceof _) b = b._wrapped;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n case '[object RegExp]':\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return '' + a === '' + b;\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN.\n if (+a !== +a) return +b !== +b;\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n case '[object Symbol]':\n return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);\n }\n\n var areArrays = className === '[object Array]';\n if (!areArrays) {\n if (typeof a != 'object' || typeof b != 'object') return false;\n\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&\n _.isFunction(bCtor) && bCtor instanceof bCtor)\n && ('constructor' in a && 'constructor' in b)) {\n return false;\n }\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n }\n\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false;\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var keys = _.keys(a), key;\n length = keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (_.keys(b).length !== length) return false;\n while (length--) {\n // Deep compare each member\n key = keys[length];\n if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n };\n\n // Perform a deep comparison to check if two objects are equal.\n _.isEqual = function(a, b) {\n return eq(a, b);\n };\n\n // Is a given array, string, or object empty?\n // An \"empty\" object has no enumerable own-properties.\n _.isEmpty = function(obj) {\n if (obj == null) return true;\n if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;\n return _.keys(obj).length === 0;\n };\n\n // Is a given value a DOM element?\n _.isElement = function(obj) {\n return !!(obj && obj.nodeType === 1);\n };\n\n // Is a given value an array?\n // Delegates to ECMA5's native Array.isArray\n _.isArray = nativeIsArray || function(obj) {\n return toString.call(obj) === '[object Array]';\n };\n\n // Is a given variable an object?\n _.isObject = function(obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object' && !!obj;\n };\n\n // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isMap, isWeakMap, isSet, isWeakSet.\n _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error', 'Symbol', 'Map', 'WeakMap', 'Set', 'WeakSet'], function(name) {\n _['is' + name] = function(obj) {\n return toString.call(obj) === '[object ' + name + ']';\n };\n });\n\n // Define a fallback version of the method in browsers (ahem, IE < 9), where\n // there isn't any inspectable \"Arguments\" type.\n if (!_.isArguments(arguments)) {\n _.isArguments = function(obj) {\n return has(obj, 'callee');\n };\n }\n\n // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,\n // IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).\n var nodelist = root.document && root.document.childNodes;\n if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {\n _.isFunction = function(obj) {\n return typeof obj == 'function' || false;\n };\n }\n\n // Is a given object a finite number?\n _.isFinite = function(obj) {\n return !_.isSymbol(obj) && isFinite(obj) && !isNaN(parseFloat(obj));\n };\n\n // Is the given value `NaN`?\n _.isNaN = function(obj) {\n return _.isNumber(obj) && isNaN(obj);\n };\n\n // Is a given value a boolean?\n _.isBoolean = function(obj) {\n return obj === true || obj === false || toString.call(obj) === '[object Boolean]';\n };\n\n // Is a given value equal to null?\n _.isNull = function(obj) {\n return obj === null;\n };\n\n // Is a given variable undefined?\n _.isUndefined = function(obj) {\n return obj === void 0;\n };\n\n // Shortcut function for checking if an object has a given property directly\n // on itself (in other words, not on a prototype).\n _.has = function(obj, path) {\n if (!_.isArray(path)) {\n return has(obj, path);\n }\n var length = path.length;\n for (var i = 0; i < length; i++) {\n var key = path[i];\n if (obj == null || !hasOwnProperty.call(obj, key)) {\n return false;\n }\n obj = obj[key];\n }\n return !!length;\n };\n\n // Utility Functions\n // -----------------\n\n // Run Underscore.js in *noConflict* mode, returning the `_` variable to its\n // previous owner. Returns a reference to the Underscore object.\n _.noConflict = function() {\n root._ = previousUnderscore;\n return this;\n };\n\n // Keep the identity function around for default iteratees.\n _.identity = function(value) {\n return value;\n };\n\n // Predicate-generating functions. Often useful outside of Underscore.\n _.constant = function(value) {\n return function() {\n return value;\n };\n };\n\n _.noop = function(){};\n\n // Creates a function that, when passed an object, will traverse that object’s\n // properties down the given `path`, specified as an array of keys or indexes.\n _.property = function(path) {\n if (!_.isArray(path)) {\n return shallowProperty(path);\n }\n return function(obj) {\n return deepGet(obj, path);\n };\n };\n\n // Generates a function for a given object that returns a given property.\n _.propertyOf = function(obj) {\n if (obj == null) {\n return function(){};\n }\n return function(path) {\n return !_.isArray(path) ? obj[path] : deepGet(obj, path);\n };\n };\n\n // Returns a predicate for checking whether an object has a given set of\n // `key:value` pairs.\n _.matcher = _.matches = function(attrs) {\n attrs = _.extendOwn({}, attrs);\n return function(obj) {\n return _.isMatch(obj, attrs);\n };\n };\n\n // Run a function **n** times.\n _.times = function(n, iteratee, context) {\n var accum = Array(Math.max(0, n));\n iteratee = optimizeCb(iteratee, context, 1);\n for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n return accum;\n };\n\n // Return a random integer between min and max (inclusive).\n _.random = function(min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n return min + Math.floor(Math.random() * (max - min + 1));\n };\n\n // A (possibly faster) way to get the current timestamp as an integer.\n _.now = Date.now || function() {\n return new Date().getTime();\n };\n\n // List of HTML entities for escaping.\n var escapeMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n };\n var unescapeMap = _.invert(escapeMap);\n\n // Functions for escaping and unescaping strings to/from HTML interpolation.\n var createEscaper = function(map) {\n var escaper = function(match) {\n return map[match];\n };\n // Regexes for identifying a key that needs to be escaped.\n var source = '(?:' + _.keys(map).join('|') + ')';\n var testRegexp = RegExp(source);\n var replaceRegexp = RegExp(source, 'g');\n return function(string) {\n string = string == null ? '' : '' + string;\n return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n };\n };\n _.escape = createEscaper(escapeMap);\n _.unescape = createEscaper(unescapeMap);\n\n // Traverses the children of `obj` along `path`. If a child is a function, it\n // is invoked with its parent as context. Returns the value of the final\n // child, or `fallback` if any child is undefined.\n _.result = function(obj, path, fallback) {\n if (!_.isArray(path)) path = [path];\n var length = path.length;\n if (!length) {\n return _.isFunction(fallback) ? fallback.call(obj) : fallback;\n }\n for (var i = 0; i < length; i++) {\n var prop = obj == null ? void 0 : obj[path[i]];\n if (prop === void 0) {\n prop = fallback;\n i = length; // Ensure we don't continue iterating.\n }\n obj = _.isFunction(prop) ? prop.call(obj) : prop;\n }\n return obj;\n };\n\n // Generate a unique integer id (unique within the entire client session).\n // Useful for temporary DOM ids.\n var idCounter = 0;\n _.uniqueId = function(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n };\n\n // By default, Underscore uses ERB-style template delimiters, change the\n // following template settings to use alternative delimiters.\n _.templateSettings = {\n evaluate: /<%([\\s\\S]+?)%>/g,\n interpolate: /<%=([\\s\\S]+?)%>/g,\n escape: /<%-([\\s\\S]+?)%>/g\n };\n\n // When customizing `templateSettings`, if you don't want to define an\n // interpolation, evaluation or escaping regex, we need one that is\n // guaranteed not to match.\n var noMatch = /(.)^/;\n\n // Certain characters need to be escaped so that they can be put into a\n // string literal.\n var escapes = {\n \"'\": \"'\",\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n var escapeRegExp = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\n var escapeChar = function(match) {\n return '\\\\' + escapes[match];\n };\n\n // JavaScript micro-templating, similar to John Resig's implementation.\n // Underscore templating handles arbitrary delimiters, preserves whitespace,\n // and correctly escapes quotes within interpolated code.\n // NB: `oldSettings` only exists for backwards compatibility.\n _.template = function(text, settings, oldSettings) {\n if (!settings && oldSettings) settings = oldSettings;\n settings = _.defaults({}, settings, _.templateSettings);\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g');\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0;\n var source = \"__p+='\";\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset).replace(escapeRegExp, escapeChar);\n index = offset + match.length;\n\n if (escape) {\n source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n } else if (interpolate) {\n source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n } else if (evaluate) {\n source += \"';\\n\" + evaluate + \"\\n__p+='\";\n }\n\n // Adobe VMs need the match returned to produce the correct offset.\n return match;\n });\n source += \"';\\n\";\n\n // If a variable is not specified, place data values in local scope.\n if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\n source = \"var __t,__p='',__j=Array.prototype.join,\" +\n \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n source + 'return __p;\\n';\n\n var render;\n try {\n render = new Function(settings.variable || 'obj', '_', source);\n } catch (e) {\n e.source = source;\n throw e;\n }\n\n var template = function(data) {\n return render.call(this, data, _);\n };\n\n // Provide the compiled source as a convenience for precompilation.\n var argument = settings.variable || 'obj';\n template.source = 'function(' + argument + '){\\n' + source + '}';\n\n return template;\n };\n\n // Add a \"chain\" function. Start chaining a wrapped Underscore object.\n _.chain = function(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n };\n\n // OOP\n // ---------------\n // If Underscore is called as a function, it returns a wrapped object that\n // can be used OO-style. This wrapper holds altered versions of all the\n // underscore functions. Wrapped objects may be chained.\n\n // Helper function to continue chaining intermediate results.\n var chainResult = function(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n };\n\n // Add your own custom functions to the Underscore object.\n _.mixin = function(obj) {\n _.each(_.functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n };\n\n // Add all of the Underscore functions to the wrapper object.\n _.mixin(_);\n\n // Add all mutator Array functions to the wrapper.\n _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n method.apply(obj, arguments);\n if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];\n return chainResult(this, obj);\n };\n });\n\n // Add all accessor Array functions to the wrapper.\n _.each(['concat', 'join', 'slice'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n return chainResult(this, method.apply(this._wrapped, arguments));\n };\n });\n\n // Extracts the result from a wrapped and chained object.\n _.prototype.value = function() {\n return this._wrapped;\n };\n\n // Provide unwrapping proxy for some methods used in engine operations\n // such as arithmetic and JSON stringification.\n _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;\n\n _.prototype.toString = function() {\n return String(this._wrapped);\n };\n\n // AMD registration happens at the end for compatibility with AMD loaders\n // that may not enforce next-turn semantics on modules. Even though general\n // practice for AMD registration is to be anonymous, underscore registers\n // as a named module because, like jQuery, it is a base library that is\n // popular enough to be bundled in a third party lib, but not be part of\n // an AMD load request. Those cases could generate an error when an\n // anonymous define() is called outside of a loader request.\n if (typeof define == 'function' && define.amd) {\n define('underscore', [], function() {\n return _;\n });\n }\n}());\n","import { omit, keys, isUndefined, isElement } from 'underscore';\n\nconst elProt = window.Element.prototype;\nconst matches =\n elProt.matches ||\n elProt.webkitMatchesSelector ||\n elProt.mozMatchesSelector ||\n elProt.msMatchesSelector;\n\n/**\n * Returns shallow diff between 2 objects\n * @param {Object} objOrig\n * @param {Objec} objNew\n * @return {Object}\n * @example\n * var a = {foo: 'bar', baz: 1, faz: 'sop'};\n * var b = {foo: 'bar', baz: 2, bar: ''};\n * shallowDiff(a, b);\n * // -> {baz: 2, faz: null, bar: ''};\n */\nconst shallowDiff = (objOrig, objNew) => {\n const result = {};\n const keysNew = keys(objNew);\n\n for (let prop in objOrig) {\n if (objOrig.hasOwnProperty(prop)) {\n const origValue = objOrig[prop];\n const newValue = objNew[prop];\n\n if (keysNew.indexOf(prop) >= 0) {\n if (origValue !== newValue) {\n result[prop] = newValue;\n }\n } else {\n result[prop] = null;\n }\n }\n }\n\n for (let prop in objNew) {\n if (objNew.hasOwnProperty(prop)) {\n if (isUndefined(objOrig[prop])) {\n result[prop] = objNew[prop];\n }\n }\n }\n\n return result;\n};\n\nconst on = (el, ev, fn) => {\n ev = ev.split(/\\s+/);\n el = el instanceof Array ? el : [el];\n\n for (let i = 0; i < ev.length; ++i) {\n el.forEach(elem => elem.addEventListener(ev[i], fn));\n }\n};\n\nconst off = (el, ev, fn) => {\n ev = ev.split(/\\s+/);\n el = el instanceof Array ? el : [el];\n\n for (let i = 0; i < ev.length; ++i) {\n el.forEach(elem => elem.removeEventListener(ev[i], fn));\n }\n};\n\nconst getUnitFromValue = value => {\n return value.replace(parseFloat(value), '');\n};\n\nconst upFirst = value => value[0].toUpperCase() + value.toLowerCase().slice(1);\n\nconst camelCase = value => {\n const values = value.split('-');\n return values[0].toLowerCase() + values.slice(1).map(upFirst);\n};\n\nconst normalizeFloat = (value, step = 1, valueDef = 0) => {\n let stepDecimals = 0;\n if (isNaN(value)) return valueDef;\n value = parseFloat(value);\n\n if (Math.floor(value) !== value) {\n const side = step.toString().split('.')[1];\n stepDecimals = side ? side.length : 0;\n }\n\n return stepDecimals ? parseFloat(value.toFixed(stepDecimals)) : value;\n};\n\nconst hasDnd = em => {\n return (\n 'draggable' in document.createElement('i') &&\n (em ? em.get('Config').nativeDnD : 1)\n );\n};\n\n/**\n * Ensure to fetch the element from the input argument\n * @param {HTMLElement|Component} el Component or HTML element\n * @return {HTMLElement}\n */\nconst getElement = el => {\n if (isElement(el)) {\n return el;\n } else if (el && el.getEl) {\n return el.getEl();\n }\n};\n\n/**\n * Ensure to fetch the model from the input argument\n * @param {HTMLElement|Component} el Component or HTML element\n * @return {Component}\n */\nconst getModel = (el, $) => {\n let model = el;\n isElement(el) && (model = $(el).data('model'));\n return model;\n};\n\nexport {\n on,\n off,\n hasDnd,\n upFirst,\n matches,\n getModel,\n camelCase,\n getElement,\n shallowDiff,\n normalizeFloat,\n getUnitFromValue\n};\n","import Backbone from 'backbone';\nimport { isArray, isEmpty } from 'underscore';\n\nconst ComponentsView = require('./ComponentsView');\n\nmodule.exports = Backbone.View.extend({\n className() {\n return this.getClasses();\n },\n\n tagName() {\n return this.model.get('tagName');\n },\n\n initialize(opt = {}) {\n const model = this.model;\n const config = opt.config || {};\n this.opts = opt;\n this.config = config;\n this.em = config.em || '';\n this.pfx = config.stylePrefix || '';\n this.ppfx = config.pStylePrefix || '';\n this.attr = model.get('attributes');\n this.classe = this.attr.class || [];\n const $el = this.$el;\n const classes = model.get('classes');\n this.listenTo(model, 'change:style', this.updateStyle);\n this.listenTo(model, 'change:attributes', this.updateAttributes);\n this.listenTo(model, 'change:highlightable', this.updateHighlight);\n this.listenTo(model, 'change:status', this.updateStatus);\n this.listenTo(model, 'change:state', this.updateState);\n this.listenTo(model, 'change:script', this.render);\n this.listenTo(model, 'change:content', this.updateContent);\n this.listenTo(model, 'change', this.handleChange);\n this.listenTo(classes, 'add remove change', this.updateClasses);\n $el.data('model', model);\n $el.data('collection', model.get('components'));\n model.view = this;\n classes.length && this.importClasses();\n this.init();\n },\n\n /**\n * Initialize callback\n */\n init() {},\n\n /**\n * Handle any property change\n * @private\n */\n handleChange() {\n const model = this.model;\n model.emitUpdate();\n\n for (let prop in model.changed) {\n model.emitUpdate(prop);\n }\n },\n\n /**\n * Import, if possible, classes inside main container\n * @private\n * */\n importClasses() {\n var clm = this.config.em.get('SelectorManager');\n\n if (clm) {\n this.model.get('classes').each(m => {\n clm.add(m.get('name'));\n });\n }\n },\n\n /**\n * Fires on state update. If the state is not empty will add a helper class\n * @param {Event} e\n * @private\n * */\n updateState(e) {\n var cl = 'hc-state';\n var state = this.model.get('state');\n\n if (state) {\n this.$el.addClass(cl);\n } else {\n this.$el.removeClass(cl);\n }\n },\n\n /**\n * Update item on status change\n * @param {Event} e\n * @private\n * */\n updateStatus(opts = {}) {\n const em = this.em;\n const el = this.el;\n const status = this.model.get('status');\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const selectedCls = `${pfx}selected`;\n const selectedParentCls = `${selectedCls}-parent`;\n const freezedCls = `${ppfx}freezed`;\n const hoveredCls = `${ppfx}hovered`;\n const toRemove = [selectedCls, selectedParentCls, freezedCls, hoveredCls];\n this.$el.removeClass(toRemove.join(' '));\n var actualCls = el.getAttribute('class') || '';\n var cls = '';\n\n switch (status) {\n case 'selected':\n cls = `${actualCls} ${selectedCls}`;\n break;\n case 'selected-parent':\n cls = `${actualCls} ${selectedParentCls}`;\n break;\n case 'freezed':\n cls = `${actualCls} ${freezedCls}`;\n break;\n case 'freezed-selected':\n cls = `${actualCls} ${freezedCls} ${selectedCls}`;\n break;\n case 'hovered':\n cls = !opts.avoidHover ? `${actualCls} ${hoveredCls}` : '';\n break;\n }\n\n cls = cls.trim();\n cls && el.setAttribute('class', cls);\n },\n\n /**\n * Update highlight attribute\n * @private\n * */\n updateHighlight() {\n const hl = this.model.get('highlightable');\n this.setAttribute('data-highlightable', hl ? 1 : '');\n },\n\n /**\n * Update style attribute\n * @private\n * */\n updateStyle() {\n const em = this.em;\n const model = this.model;\n\n if (em && em.get('avoidInlineStyle')) {\n this.el.id = model.getId();\n const style = model.getStyle();\n !isEmpty(style) && model.setStyle(style);\n } else {\n this.setAttribute('style', model.styleToString());\n }\n },\n\n /**\n * Update classe attribute\n * @private\n * */\n updateClasses() {\n const str = this.model\n .get('classes')\n .pluck('name')\n .join(' ');\n this.setAttribute('class', str);\n\n // Regenerate status class\n this.updateStatus();\n },\n\n /**\n * Update single attribute\n * @param {[type]} name [description]\n * @param {[type]} value [description]\n */\n setAttribute(name, value) {\n const el = this.$el;\n value ? el.attr(name, value) : el.removeAttr(name);\n },\n\n /**\n * Get classes from attributes.\n * This method is called before initialize\n *\n * @return {Array}|null\n * @private\n * */\n getClasses() {\n var attr = this.model.get('attributes'),\n classes = attr['class'] || [];\n classes = isArray(classes) ? classes : [classes];\n\n if (classes.length) {\n return classes.join(' ');\n } else {\n return null;\n }\n },\n\n /**\n * Update attributes\n * @private\n * */\n updateAttributes() {\n const model = this.model;\n const attrs = { 'data-gjs-type': model.get('type') || 'default' };\n const attr = model.get('attributes');\n const src = model.get('src');\n\n for (let key in attr) {\n attrs[key] = attr[key];\n }\n\n src && (attrs.src = src);\n this.$el.attr(attrs);\n this.updateHighlight();\n this.updateStyle();\n },\n\n /**\n * Update component content\n * @private\n * */\n updateContent() {\n this.getChildrenContainer().innerHTML = this.model.get('content');\n },\n\n /**\n * Prevent default helper\n * @param {Event} e\n * @private\n */\n prevDef(e) {\n e.preventDefault();\n },\n\n /**\n * Render component's script\n * @private\n */\n updateScript() {\n if (!this.model.get('script')) {\n return;\n }\n\n var em = this.em;\n if (em) {\n var canvas = em.get('Canvas');\n canvas.getCanvasView().updateScript(this);\n }\n },\n\n /**\n * Return children container\n * Differently from a simple component where children container is the\n * component itself\n * \n * \n * \n * You could have the children container more deeper\n * \n *
\n *
\n *
\n *
\n * \n *
\n *
\n *
\n * @return HTMLElement\n * @private\n */\n getChildrenContainer() {\n var container = this.el;\n\n if (typeof this.getChildrenSelector == 'function') {\n container = this.el.querySelector(this.getChildrenSelector());\n } else if (typeof this.getTemplate == 'function') {\n // Need to find deepest first child\n }\n\n return container;\n },\n\n /**\n * Render children components\n * @private\n */\n renderChildren() {\n const container = this.getChildrenContainer();\n const view = new ComponentsView({\n collection: this.model.get('components'),\n config: this.config,\n componentTypes: this.opts.componentTypes\n });\n\n view.render(container);\n this.childrenView = view;\n const childNodes = Array.prototype.slice.call(view.el.childNodes);\n\n for (var i = 0, len = childNodes.length; i < len; i++) {\n container.appendChild(childNodes.shift());\n }\n\n // If the children container is not the same as the component\n // (so likely fetched with getChildrenSelector()) is necessary\n // to disable pointer-events for all nested components as they\n // might prevent the component to be selected\n if (container !== this.el) {\n var disableNode = el => {\n var children = Array.prototype.slice.call(el.children);\n children.forEach(el => {\n el.style['pointer-events'] = 'none';\n if (container !== el) {\n disableNode(el);\n }\n });\n };\n disableNode(this.el);\n }\n },\n\n renderAttributes() {\n this.updateAttributes();\n this.updateClasses();\n },\n\n render() {\n this.renderAttributes();\n this.updateContent();\n this.renderChildren();\n this.updateScript();\n this.onRender();\n return this;\n },\n\n onRender() {}\n});\n","import {\n isUndefined,\n isFunction,\n isObject,\n isArray,\n isEmpty,\n isBoolean,\n has,\n clone,\n isString,\n forEach,\n result,\n keys\n} from 'underscore';\nimport { shallowDiff, hasDnd } from 'utils/mixins';\nimport Styleable from 'domain_abstract/model/Styleable';\n\nconst Backbone = require('backbone');\nconst Components = require('./Components');\nconst Selector = require('selector_manager/model/Selector');\nconst Selectors = require('selector_manager/model/Selectors');\nconst Traits = require('trait_manager/model/Traits');\nconst componentList = {};\nlet componentIndex = 0;\n\nconst escapeRegExp = str => {\n return str.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n};\n\nconst avoidInline = em => em && em.getConfig('avoidInlineStyle');\n\nconst Component = Backbone.Model.extend(Styleable).extend(\n {\n defaults: {\n // HTML tag of the component\n tagName: 'div',\n\n // Component type, eg. 'text', 'image', 'video', etc.\n type: '',\n\n // Name of the component. Will be used, for example, in layers and badges\n name: '',\n\n // True if the component is removable from the canvas\n removable: true,\n\n // Indicates if it's possible to drag the component inside others\n // Tip: Indicate an array of selectors where it could be dropped inside\n draggable: true,\n\n // Indicates if it's possible to drop other components inside\n // Tip: Indicate an array of selectors which could be dropped inside\n droppable: true,\n\n // Set false if don't want to see the badge (with the name) over the component\n badgable: true,\n\n // True if it's possible to style it\n // Tip:\n // Indicate an array of CSS properties which is possible to style, eg. ['color', 'width']\n // All other properties will be hidden from the style manager\n stylable: true,\n\n // Indicate an array of style properties to show up which has been marked as `toRequire`\n 'stylable-require': '',\n\n // Indicate an array of style properties which should be hidden from the style manager\n unstylable: '',\n\n // Highlightable with 'dotted' style if true\n highlightable: true,\n\n // True if it's possible to clone the component\n copyable: true,\n\n // Indicates if it's possible to resize the component (at the moment implemented only on Image Components)\n // It's also possible to pass an object as options for the Resizer\n resizable: false,\n\n // Allow to edit the content of the component (used on Text components)\n editable: false,\n\n // Hide the component inside Layers\n layerable: true,\n\n // Allow component to be selected when clicked\n selectable: true,\n\n // Shows a highlight outline when hovering on the element if true\n hoverable: true,\n\n // This property is used by the HTML exporter as void elements do not\n // have closing tag, eg.
,
, etc.\n void: false,\n\n // Indicates if the component is in some CSS state like ':hover', ':active', etc.\n state: '',\n\n // State, eg. 'selected'\n status: '',\n\n // Content of the component (not escaped) which will be appended before children rendering\n content: '',\n\n // Component icon, this string will be inserted before the name, eg. ''\n icon: '',\n\n // Component related style\n style: '',\n\n // Key-value object of the component's attributes\n attributes: '',\n\n // Array of classes\n classes: '',\n\n // Component's javascript\n script: '',\n\n // Traits\n traits: ['id', 'title'],\n\n // Indicates an array of properties which will be inhereted by\n // all NEW appended children\n //\n // If you create a model likes this\n // removable: false,\n // draggable: false,\n // propagate: ['removable', 'draggable']\n // When you append some new component inside, the new added model\n // will get the exact same properties indicated in `propagate` array\n // (as the `propagate` property itself)\n //\n propagate: '',\n\n /**\n * Set an array of items to show up inside the toolbar (eg. move, clone, delete)\n * when the component is selected\n * toolbar: [{\n * attributes: {class: 'fa fa-arrows'},\n * command: 'tlb-move',\n * },{\n * attributes: {class: 'fa fa-clone'},\n * command: 'tlb-clone',\n * }]\n */\n toolbar: null\n },\n\n initialize(props = {}, opt = {}) {\n const em = opt.em;\n\n // Propagate properties from parent if indicated\n const parent = this.parent();\n const parentAttr = parent && parent.attributes;\n\n if (parentAttr && parentAttr.propagate) {\n let newAttr = {};\n const toPropagate = parentAttr.propagate;\n toPropagate.forEach(prop => (newAttr[prop] = parent.get(prop)));\n newAttr.propagate = toPropagate;\n newAttr = { ...newAttr, ...props };\n this.set(newAttr);\n }\n\n const propagate = this.get('propagate');\n propagate &&\n this.set('propagate', isArray(propagate) ? propagate : [propagate]);\n\n // Check void elements\n if (\n opt &&\n opt.config &&\n opt.config.voidElements.indexOf(this.get('tagName')) >= 0\n ) {\n this.set('void', true);\n }\n\n opt.em = em;\n this.opt = opt;\n this.em = em;\n this.config = opt.config || {};\n this.ccid = Component.createId(this);\n this.set('attributes', this.get('attributes') || {});\n this.listenTo(this, 'change:script', this.scriptUpdated);\n this.listenTo(this, 'change:traits', this.traitsUpdated);\n this.listenTo(this, 'change:tagName', this.tagUpdated);\n this.listenTo(this, 'change:attributes', this.attrUpdated);\n this.initClasses();\n this.loadTraits();\n this.initComponents();\n this.initToolbar();\n this.set('status', '');\n\n // Register global updates for collection properties\n ['classes', 'traits'].forEach(name =>\n this.listenTo(this.get(name), 'add remove change', () =>\n this.emitUpdate(name)\n )\n );\n this.init();\n },\n\n /**\n * Check component's type\n * @param {string} type Component type\n * @return {Boolean}\n * @example\n * model.is('image')\n * // -> false\n */\n is(type) {\n return !!(this.get('type') == type);\n },\n\n /**\n * Find inner models by query string\n * ATTENTION: this method works only with alredy rendered component\n * @param {string} query Query string\n * @return {Array} Array of models\n * @example\n * model.find('div > .class');\n * // -> [Component, Component, ...]\n */\n find(query) {\n const result = [];\n\n this.view.$el.find(query).each((el, i, $els) => {\n const $el = $els.eq(i);\n const model = $el.data('model');\n model && result.push(model);\n });\n\n return result;\n },\n\n /**\n * Find closest model by query string\n * ATTENTION: this method works only with alredy rendered component\n * @param {string} query Query string\n * @return {Component}\n * @example\n * model.closest('div');\n */\n closest(query) {\n const result = this.view.$el.closest(query);\n return result.length && result.data('model');\n },\n\n /**\n * Once the tag is updated I have to remove the node and replace it\n */\n tagUpdated() {\n const coll = this.collection;\n const at = coll.indexOf(this);\n coll.remove(this);\n coll.add(this, { at });\n },\n\n /**\n * Replace a component with another one\n * @param {String|Component} el Component or HTML string\n * @return {Array|Component} New added component/s\n * @private\n */\n replaceWith(el) {\n const coll = this.collection;\n const at = coll.indexOf(this);\n coll.remove(this);\n return coll.add(el, { at });\n },\n\n /**\n * Emit changes for each updated attribute\n */\n attrUpdated() {\n const attrPrev = { ...this.previous('attributes') };\n const attrCurrent = { ...this.get('attributes') };\n const diff = shallowDiff(attrPrev, attrCurrent);\n keys(diff).forEach(pr => this.trigger(`change:attributes:${pr}`));\n },\n\n /**\n * Update attributes of the model\n * @param {Object} attrs Key value attributes\n * @example\n * model.setAttributes({id: 'test', 'data-key': 'value'});\n */\n setAttributes(attrs) {\n attrs = { ...attrs };\n\n // Handle classes\n const classes = attrs.class;\n classes && this.setClass(classes);\n delete attrs.class;\n\n // Handle style\n const style = attrs.style;\n style && this.setStyle(style);\n delete attrs.style;\n\n this.set('attributes', attrs);\n },\n\n /**\n * Add attributes to the model\n * @param {Object} attrs Key value attributes\n * @example\n * model.addAttributes({id: 'test'});\n */\n addAttributes(attrs) {\n const newAttrs = { ...this.getAttributes(), ...attrs };\n this.setAttributes(newAttrs);\n },\n\n getStyle() {\n const em = this.em;\n\n if (em && em.getConfig('avoidInlineStyle')) {\n const state = this.get('state');\n const cc = em.get('CssComposer');\n const rule = cc.getIdRule(this.getId(), { state });\n this.rule = rule;\n\n if (rule) {\n return rule.getStyle();\n }\n }\n\n return Styleable.getStyle.call(this);\n },\n\n setStyle(prop = {}, opts = {}) {\n const em = this.em;\n\n if (em && em.getConfig('avoidInlineStyle')) {\n prop = isString(prop) ? this.parseStyle(prop) : prop;\n prop = { ...prop, ...this.get('style') };\n const state = this.get('state');\n const cc = em.get('CssComposer');\n const propOrig = this.getStyle();\n this.rule = cc.setIdRule(this.getId(), prop, { ...opts, state });\n const diff = shallowDiff(propOrig, prop);\n this.set('style', {}, { silent: 1 });\n keys(diff).forEach(pr => this.trigger(`change:style:${pr}`));\n } else {\n prop = Styleable.setStyle.apply(this, arguments);\n }\n\n return prop;\n },\n\n /**\n * Return attributes\n * @return {Object}\n */\n getAttributes() {\n const { em } = this;\n const classes = [];\n const attributes = { ...this.get('attributes') };\n const sm = em && em.get('SelectorManager');\n const id = this.getId();\n\n // Add classes\n this.get('classes').each(cls => classes.push(cls.get('name')));\n classes.length && (attributes.class = classes.join(' '));\n\n // Check if we need an ID on the component\n if (!has(attributes, 'id')) {\n let hasStyle;\n\n // If we don't rely on inline styling we have to check\n // for the ID selector\n if (avoidInline(em)) {\n hasStyle = sm && sm.get(id, sm.Selector.TYPE_ID);\n } else if (!isEmpty(this.getStyle())) {\n hasStyle = 1;\n }\n\n if (hasStyle) {\n attributes.id = this.getId();\n }\n }\n\n return attributes;\n },\n\n /**\n * Add classes\n * @param {Array|string} classes Array or string of classes\n * @return {Array} Array of added selectors\n * @example\n * model.addClass('class1');\n * model.addClass('class1 class2');\n * model.addClass(['class1', 'class2']);\n * // -> [SelectorObject, ...]\n */\n addClass(classes) {\n const added = this.em.get('SelectorManager').addClass(classes);\n return this.get('classes').add(added);\n },\n\n /**\n * Set classes (resets current collection)\n * @param {Array|string} classes Array or string of classes\n * @return {Array} Array of added selectors\n * @example\n * model.setClass('class1');\n * model.setClass('class1 class2');\n * model.setClass(['class1', 'class2']);\n * // -> [SelectorObject, ...]\n */\n setClass(classes) {\n this.get('classes').reset();\n return this.addClass(classes);\n },\n\n /**\n * Remove classes\n * @param {Array|string} classes Array or string of classes\n * @return {Array} Array of removed selectors\n * @example\n * model.removeClass('class1');\n * model.removeClass('class1 class2');\n * model.removeClass(['class1', 'class2']);\n * // -> [SelectorObject, ...]\n */\n removeClass(classes) {\n const removed = [];\n classes = isArray(classes) ? classes : [classes];\n const selectors = this.get('classes');\n const type = Selector.TYPE_CLASS;\n\n classes.forEach(classe => {\n const classes = classe.split(' ');\n classes.forEach(name => {\n const selector = selectors.where({ name, type })[0];\n selector && removed.push(selectors.remove(selector));\n });\n });\n\n return removed;\n },\n\n initClasses() {\n const classes = this.normalizeClasses(this.get('classes') || []);\n this.set('classes', new Selectors(classes));\n return this;\n },\n\n initComponents() {\n // Have to add components after the init, otherwise the parent\n // is not visible\n const comps = new Components(null, this.opt);\n comps.parent = this;\n !this.opt.avoidChildren && comps.reset(this.get('components'));\n this.set('components', comps);\n return this;\n },\n\n /**\n * Initialize callback\n */\n init() {},\n\n /**\n * Add new component children\n * @param {Component|string} components Component to add\n * @param {Object} [opts={}] Options, same as in `model.add()`(from backbone)\n * @return {Array} Array of appended components\n * @example\n * someModel.get('components').length // -> 0\n * const videoComponent = someModel.append('
')[0];\n * // This will add 2 components (`video` and `div`) to your `someModel`\n * someModel.get('components').length // -> 2\n * // You can pass components directly\n * otherModel.append(otherModel2);\n * otherModel.append([otherModel3, otherModel4]);\n */\n append(components, opts = {}) {\n const result = this.components().add(components, opts);\n return isArray(result) ? result : [result];\n },\n\n /**\n * Set new collection if `components` are provided, otherwise the\n * current collection is returned\n * @param {Component|string} [components] Components to set\n * @return {Collection|undefined}\n * @example\n * // Get current collection\n * const collection = model.components();\n * // Set new collection\n * model.components('
');\n */\n components(components) {\n const coll = this.get('components');\n\n if (isUndefined(components)) {\n return coll;\n } else {\n coll.reset();\n components && this.append(components);\n }\n },\n\n /**\n * Get parent model\n * @return {Component}\n */\n parent() {\n const coll = this.collection;\n return coll && coll.parent;\n },\n\n /**\n * Script updated\n */\n scriptUpdated() {\n this.set('scriptUpdated', 1);\n },\n\n /**\n * Once traits are updated I have to populates model's attributes\n */\n traitsUpdated() {\n let found = 0;\n const attrs = { ...this.get('attributes') };\n const traits = this.get('traits');\n\n if (!(traits instanceof Traits)) {\n this.loadTraits();\n return;\n }\n\n traits.each(trait => {\n found = 1;\n if (!trait.get('changeProp')) {\n const name = trait.get('name');\n const value = trait.getInitValue();\n if (name && value) {\n attrs[name] = value;\n }\n }\n });\n\n found && this.set('attributes', attrs);\n },\n\n /**\n * Init toolbar\n */\n initToolbar() {\n var model = this;\n if (!model.get('toolbar')) {\n var tb = [];\n if (model.collection) {\n tb.push({\n attributes: { class: 'fa fa-arrow-up' },\n command: 'select-parent'\n });\n }\n if (model.get('draggable')) {\n tb.push({\n attributes: { class: 'fa fa-arrows', draggable: true },\n //events: hasDnd(this.em) ? { dragstart: 'execCommand' } : '',\n command: 'tlb-move'\n });\n }\n if (model.get('copyable')) {\n tb.push({\n attributes: { class: 'fa fa-clone' },\n command: 'tlb-clone'\n });\n }\n if (model.get('removable')) {\n tb.push({\n attributes: { class: 'fa fa-trash-o' },\n command: 'tlb-delete'\n });\n }\n model.set('toolbar', tb);\n }\n },\n\n /**\n * Load traits\n * @param {Array} traits\n * @private\n */\n loadTraits(traits, opts = {}) {\n var trt = new Traits([], this.opt);\n trt.setTarget(this);\n traits = traits || this.get('traits');\n\n if (traits.length) {\n trt.add(traits);\n }\n\n this.set('traits', trt, opts);\n return this;\n },\n\n /**\n * Normalize input classes from array to array of objects\n * @param {Array} arr\n * @return {Array}\n * @private\n */\n normalizeClasses(arr) {\n var res = [];\n const em = this.em;\n\n if (!em) return;\n\n var clm = em.get('SelectorManager');\n if (!clm) return;\n\n arr.forEach(val => {\n var name = '';\n\n if (typeof val === 'string') name = val;\n else name = val.name;\n\n var model = clm.add(name);\n res.push(model);\n });\n return res;\n },\n\n /**\n * Override original clone method\n * @private\n */\n clone() {\n const em = this.em;\n const style = this.getStyle();\n const attr = { ...this.attributes };\n const opts = { ...this.opt };\n attr.attributes = { ...attr.attributes };\n delete attr.attributes.id;\n attr.components = [];\n attr.classes = [];\n attr.traits = [];\n\n this.get('components').each((md, i) => {\n attr.components[i] = md.clone();\n });\n this.get('traits').each((md, i) => {\n attr.traits[i] = md.clone();\n });\n this.get('classes').each((md, i) => {\n attr.classes[i] = md.get('name');\n });\n\n attr.status = '';\n attr.view = '';\n opts.collection = null;\n\n if (em && em.getConfig('avoidInlineStyle') && !isEmpty(style)) {\n attr.style = style;\n }\n\n return new this.constructor(\n attr,\n opts\n );\n },\n\n /**\n * Get the name of the component\n * @return {string}\n * */\n getName() {\n let customName = this.get('name') || this.get('custom-name');\n let tag = this.get('tagName');\n tag = tag == 'div' ? 'box' : tag;\n let name = this.get('type') || tag;\n name = name.charAt(0).toUpperCase() + name.slice(1);\n return customName || name;\n },\n\n /**\n * Get the icon string\n * @return {string}\n */\n getIcon() {\n let icon = this.get('icon');\n return icon ? icon + ' ' : '';\n },\n\n /**\n * Return HTML string of the component\n * @param {Object} opts Options\n * @return {string} HTML string\n * @private\n */\n toHTML(opts = {}) {\n const model = this;\n const attrs = [];\n const classes = [];\n const tag = model.get('tagName');\n const sTag = model.get('void');\n const customAttr = opts.attributes;\n let attributes = this.getAttrToHTML();\n\n // Get custom attributes if requested\n if (customAttr) {\n if (isFunction(customAttr)) {\n attributes = customAttr(model, attributes) || {};\n } else if (isObject(customAttr)) {\n attributes = customAttr;\n }\n }\n\n for (let attr in attributes) {\n const val = attributes[attr];\n const value = isString(val) ? val.replace(/\"/g, '"') : val;\n\n if (!isUndefined(value)) {\n if (isBoolean(value)) {\n value && attrs.push(attr);\n } else {\n attrs.push(`${attr}=\"${value}\"`);\n }\n }\n }\n\n let attrString = attrs.length ? ` ${attrs.join(' ')}` : '';\n let code = `<${tag}${attrString}${sTag ? '/' : ''}>${model.get(\n 'content'\n )}`;\n model.get('components').each(comp => (code += comp.toHTML(opts)));\n !sTag && (code += ``);\n\n return code;\n },\n\n /**\n * Returns object of attributes for HTML\n * @return {Object}\n * @private\n */\n getAttrToHTML() {\n var attr = this.getAttributes();\n delete attr.style;\n return attr;\n },\n\n /**\n * Return a shallow copy of the model's attributes for JSON\n * stringification.\n * @return {Object}\n * @private\n */\n toJSON(...args) {\n const obj = Backbone.Model.prototype.toJSON.apply(this, args);\n obj.attributes = this.getAttributes();\n delete obj.attributes.class;\n delete obj.toolbar;\n\n if (this.em.getConfig('avoidDefaults')) {\n const defaults = result(this, 'defaults');\n\n forEach(defaults, (value, key) => {\n if (['type', 'content'].indexOf(key) === -1 && obj[key] === value) {\n delete obj[key];\n }\n });\n\n if (isEmpty(obj.type)) {\n delete obj.type;\n }\n\n forEach(['attributes', 'style'], prop => {\n if (isEmpty(defaults[prop]) && isEmpty(obj[prop])) {\n delete obj[prop];\n }\n });\n\n forEach(['classes', 'components'], prop => {\n if (isEmpty(defaults[prop]) && !obj[prop].length) {\n delete obj[prop];\n }\n });\n }\n\n return obj;\n },\n\n /**\n * Return model id\n * @return {string}\n */\n getId() {\n let attrs = this.get('attributes') || {};\n return attrs.id || this.ccid || this.cid;\n },\n\n /**\n * Return model id\n * @param {String} id\n * @return {self}\n */\n setId(id) {\n const attrs = { ...this.get('attributes') };\n attrs.id = id;\n this.set('attributes', attrs);\n return this;\n },\n\n /**\n * Get the DOM element of the model. This works only of the\n * model is alredy rendered\n * @return {HTMLElement}\n */\n getEl() {\n return this.view && this.view.el;\n },\n\n /**\n * Return script in string format, cleans 'function() {..' from scripts\n * if it's a function\n * @param {string|Function} script\n * @return {string}\n * @private\n */\n getScriptString(script) {\n var scr = script || this.get('script');\n\n if (!scr) {\n return scr;\n }\n\n // Need to convert script functions to strings\n if (typeof scr == 'function') {\n var scrStr = scr.toString().trim();\n scrStr = scrStr\n .replace(/^function[\\s\\w]*\\(\\)\\s?\\{/, '')\n .replace(/\\}$/, '');\n scr = scrStr.trim();\n }\n\n var config = this.em.getConfig();\n var tagVarStart = escapeRegExp(config.tagVarStart || '{[ ');\n var tagVarEnd = escapeRegExp(config.tagVarEnd || ' ]}');\n var reg = new RegExp(`${tagVarStart}([\\\\w\\\\d-]*)${tagVarEnd}`, 'g');\n scr = scr.replace(reg, (match, v) => {\n // If at least one match is found I have to track this change for a\n // better optimization inside JS generator\n this.scriptUpdated();\n return this.attributes[v] || '';\n });\n\n return scr;\n },\n\n emitUpdate(property) {\n const em = this.em;\n const event = 'component:update' + (property ? `:${property}` : '');\n em && em.trigger(event, this);\n },\n\n /**\n * Execute callback function on all components\n * @param {Function} clb Callback function, the model is passed as an argument\n * @return {self}\n */\n onAll(clb) {\n if (isFunction(clb)) {\n clb(this);\n this.components().forEach(model => model.onAll(clb));\n }\n return this;\n },\n\n /**\n * Reset id of the component and any of its style rule\n * @param {Object} [opts={}] Options\n * @return {self}\n */\n resetId(opts = {}) {\n const { em } = this;\n const oldId = this.getId();\n if (!oldId) return;\n const newId = Component.createId(this);\n this.setId(newId);\n const rule = em && em.get('CssComposer').getIdRule(oldId);\n const selector = rule && rule.get('selectors').at(0);\n selector && selector.set('name', newId);\n return this;\n }\n },\n {\n /**\n * Detect if the passed element is a valid component.\n * In case the element is valid an object abstracted\n * from the element will be returned\n * @param {HTMLElement}\n * @return {Object}\n * @private\n */\n isComponent(el) {\n return { tagName: el.tagName ? el.tagName.toLowerCase() : '' };\n },\n\n /**\n * Relying simply on the number of components becomes a problem when you\n * store and load them back, you might hit collisions with new components\n * @param {Model} model\n * @return {string}\n */\n createId(model) {\n componentIndex++;\n // Testing 1000000 components with `+ 2` returns 0 collisions\n const ilen = componentIndex.toString().length + 2;\n const uid = (Math.random() + 1.1).toString(36).slice(-ilen);\n const nextId = 'i' + uid;\n componentList[nextId] = model;\n return nextId;\n },\n\n getList() {\n return componentList;\n }\n }\n);\n\nmodule.exports = Component;\n","import Backbone from 'backbone';\nimport { bindAll, isArray, isUndefined } from 'underscore';\nimport { camelCase } from 'utils/mixins';\n\nconst clearProp = 'data-clear-style';\n\nmodule.exports = Backbone.View.extend({\n template(model) {\n const pfx = this.pfx;\n return `\n
\n ${this.templateLabel(model)}\n
\n
\n ${this.templateInput(model)}\n
\n `;\n },\n\n templateLabel(model) {\n const pfx = this.pfx;\n const icon = model.get('icon');\n const info = model.get('info');\n return `\n \n ${model.get('name')}\n \n \n `;\n },\n\n templateInput(model) {\n return `\n
\n \n
\n `;\n },\n\n events: {\n change: 'inputValueChanged',\n [`click [${clearProp}]`]: 'clear'\n },\n\n initialize(o = {}) {\n bindAll(this, 'targetUpdated');\n this.config = o.config || {};\n const em = this.config.em;\n this.em = em;\n this.pfx = this.config.stylePrefix || '';\n this.ppfx = this.config.pStylePrefix || '';\n this.target = o.target || {};\n this.propTarget = o.propTarget || {};\n this.onChange = o.onChange;\n this.onInputRender = o.onInputRender || {};\n this.customValue = o.customValue || {};\n const model = this.model;\n this.property = model.get('property');\n this.input = null;\n const pfx = this.pfx;\n this.inputHolderId = '#' + pfx + 'input-holder';\n this.sector = model.collection && model.collection.sector;\n model.view = this;\n\n if (!model.get('value')) {\n model.set('value', model.getDefaultValue());\n }\n\n em && em.on(`update:component:style:${this.property}`, this.targetUpdated);\n //em && em.on(`styleable:change:${this.property}`, this.targetUpdated);\n this.listenTo(this.propTarget, 'update', this.targetUpdated);\n this.listenTo(model, 'destroy remove', this.remove);\n this.listenTo(model, 'change:value', this.modelValueChanged);\n this.listenTo(model, 'targetUpdated', this.targetUpdated);\n this.listenTo(model, 'change:visible', this.updateVisibility);\n this.listenTo(model, 'change:status', this.updateStatus);\n\n const init = this.init && this.init.bind(this);\n init && init();\n },\n\n /**\n * Triggers when the status changes. The status indicates if the value of\n * the proprerty is changed or inherited\n * @private\n */\n updateStatus() {\n const status = this.model.get('status');\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const config = this.config;\n const updatedCls = `${ppfx}four-color`;\n const computedCls = `${ppfx}color-warn`;\n const labelEl = this.$el.children(`.${pfx}label`);\n const clearStyle = this.getClearEl().style;\n labelEl.removeClass(`${updatedCls} ${computedCls}`);\n clearStyle.display = 'none';\n\n switch (status) {\n case 'updated':\n labelEl.addClass(updatedCls);\n\n if (config.clearProperties) {\n clearStyle.display = 'inline';\n }\n break;\n case 'computed':\n labelEl.addClass(computedCls);\n break;\n }\n },\n\n /**\n * Clear the property from the target\n */\n clear(e) {\n e && e.stopPropagation();\n this.model.clearValue();\n this.targetUpdated();\n },\n\n /**\n * Get clear element\n * @return {HTMLElement}\n */\n getClearEl() {\n if (!this.clearEl) {\n this.clearEl = this.el.querySelector(`[${clearProp}]`);\n }\n\n return this.clearEl;\n },\n\n /**\n * Returns selected target which should have 'style' property\n * @return {Model|null}\n */\n getTarget() {\n return this.getTargetModel();\n },\n\n /**\n * Returns Styleable model\n * @return {Model|null}\n */\n getTargetModel() {\n return this.propTarget && this.propTarget.model;\n },\n\n /**\n * Returns helper Styleable model\n * @return {Model|null}\n */\n getHelperModel() {\n return this.propTarget && this.propTarget.helper;\n },\n\n /**\n * Triggers when the value of element input/s is changed, so have to update\n * the value of the model which will propogate those changes to the target\n */\n inputValueChanged(e) {\n e && e.stopPropagation();\n this.model.setValue(this.getInputValue(), 1, { fromInput: 1 });\n this.elementUpdated();\n },\n\n /**\n * Fired when the element of the property is updated\n */\n elementUpdated() {\n this.setStatus('updated');\n },\n\n setStatus(value) {\n this.model.set('status', value);\n const parent = this.model.parent;\n parent && parent.set('status', value);\n },\n\n /**\n * Fired when the target is changed\n * */\n targetUpdated() {\n if (!this.checkVisibility()) {\n return;\n }\n\n const config = this.config;\n const em = config.em;\n const model = this.model;\n let value = '';\n let status = '';\n let targetValue = this.getTargetValue({ ignoreDefault: 1 });\n let defaultValue = model.getDefaultValue();\n let computedValue = this.getComputedValue();\n\n if (targetValue) {\n value = targetValue;\n\n if (config.highlightChanged) {\n status = 'updated';\n }\n } else if (\n computedValue &&\n config.showComputed &&\n computedValue != defaultValue\n ) {\n value = computedValue;\n\n if (config.highlightComputed) {\n status = 'computed';\n }\n } else {\n value = defaultValue;\n status = '';\n }\n\n model.setValue(value, 0, { fromTarget: 1 });\n this.setStatus(status);\n\n if (em) {\n em.trigger('styleManager:change', this);\n em.trigger(`styleManager:change:${model.get('property')}`, this);\n }\n },\n\n checkVisibility() {\n var result = 1;\n\n // Check if need to hide the property\n if (this.config.hideNotStylable) {\n if (!this.isTargetStylable() || !this.isComponentStylable()) {\n this.hide();\n result = 0;\n } else {\n this.show();\n }\n // Sector is not passed to Composite and Stack types\n if (this.sector) {\n this.sector.trigger('updateVisibility');\n }\n }\n\n return result;\n },\n\n /**\n * Get the value of this property from the target (eg, Component, CSSRule)\n * @param {Object} [opts] Options\n * @param {Boolean} [options.fetchFromFunction]\n * @param {Boolean} [options.ignoreDefault]\n * @return string\n * @private\n */\n getTargetValue(opts = {}) {\n var result;\n var model = this.model;\n var target = this.getTargetModel();\n var customFetchValue = this.customValue;\n\n if (!target) {\n return result;\n }\n\n result = target.getStyle()[model.get('property')];\n\n if (!result && !opts.ignoreDefault) {\n result = model.getDefaultValue();\n }\n\n if (typeof customFetchValue == 'function' && !opts.ignoreCustomValue) {\n let index = model.collection.indexOf(model);\n let customValue = customFetchValue(this, index);\n\n if (customValue) {\n result = customValue;\n }\n }\n\n return result;\n },\n\n /**\n * Returns computed value\n * @return {String}\n * @private\n */\n getComputedValue() {\n const target = this.propTarget;\n const computed = target.computed || {};\n const computedDef = target.computedDefault || {};\n const avoid = this.config.avoidComputed || [];\n const property = this.model.get('property');\n const notToSkip = avoid.indexOf(property) < 0;\n const value = computed[property];\n const valueDef = computedDef[camelCase(property)];\n return computed && notToSkip && valueDef !== value && value;\n },\n\n /**\n * Returns value from input\n * @return {string}\n */\n getInputValue() {\n const input = this.getInputEl();\n return input ? input.value : '';\n },\n\n /**\n * Triggers when the `value` of the model changes, so the target and\n * the input element should be updated\n * @param {Object} e Event\n * @param {Mixed} val Value\n * @param {Object} opt Options\n * */\n modelValueChanged(e, val, opt = {}) {\n const em = this.config.em;\n const model = this.model;\n const value = model.getFullValue();\n const target = this.getTarget();\n const onChange = this.onChange;\n\n // Avoid element update if the change comes from it\n if (!opt.fromInput) {\n this.setValue(value);\n }\n\n // Check if component is allowed to be styled\n if (!target || !this.isTargetStylable() || !this.isComponentStylable()) {\n return;\n }\n\n // Avoid target update if the changes comes from it\n if (!opt.fromTarget) {\n // The onChange is used by Composite/Stack properties, so I'd avoid sending\n // it back if the change comes from one of those\n if (onChange && !opt.fromParent) {\n onChange(target, this, opt);\n } else {\n this.updateTargetStyle(value, null, opt);\n }\n }\n\n if (em) {\n em.trigger('component:update', target);\n em.trigger('component:styleUpdate', target);\n em.trigger('component:styleUpdate:' + model.get('property'), target);\n }\n },\n\n /**\n * Update target style\n * @param {string} value\n * @param {string} name\n * @param {Object} opts\n */\n updateTargetStyle(value, name = '', opts = {}) {\n const property = name || this.model.get('property');\n const target = this.getTarget();\n const style = target.getStyle();\n\n if (value) {\n style[property] = value;\n } else {\n delete style[property];\n }\n\n target.setStyle(style, opts);\n\n // Helper is used by `states` like ':hover' to show its preview\n const helper = this.getHelperModel();\n helper && helper.setStyle(style, opts);\n },\n\n /**\n * Check if target is stylable with this property\n * The target could be the Component as the CSS Rule\n * @return {Boolean}\n */\n isTargetStylable(target) {\n const trg = target || this.getTarget();\n const model = this.model;\n const property = model.get('property');\n const toRequire = model.get('toRequire');\n const unstylable = trg.get('unstylable');\n const stylableReq = trg.get('stylable-require');\n let stylable = trg.get('stylable');\n\n // Stylable could also be an array indicating with which property\n // the target could be styled\n if (isArray(stylable)) {\n stylable = stylable.indexOf(property) >= 0;\n }\n\n // Check if the property was signed as unstylable\n if (isArray(unstylable)) {\n stylable = unstylable.indexOf(property) < 0;\n }\n\n // Check if the property is available only if requested\n if (toRequire) {\n stylable = (stylableReq && stylableReq.indexOf(property) >= 0) || !target;\n }\n\n return stylable;\n },\n\n /**\n * Check if the selected component is stylable with this property\n * The target could be the Component as the CSS Rule\n * @return {Boolean}\n */\n isComponentStylable() {\n const em = this.em;\n const component = em && em.getSelected();\n\n if (!component) {\n return true;\n }\n\n return this.isTargetStylable(component);\n },\n\n /**\n * Passed a raw value you have to update the input element, generally\n * is the value fetched from targets, so you can receive values with\n * functions, units, etc. (eg. `rotateY(45deg)`)\n * get also\n * @param {string} value\n * @private\n */\n setRawValue(value) {\n this.setValue(this.model.parseValue(value));\n },\n\n /**\n * Update the element input.\n * Usually the value is a result of `model.getFullValue()`\n * @param {String} value The value from the model\n * */\n setValue(value) {\n const model = this.model;\n let val = isUndefined(value) ? model.getDefaultValue() : value;\n const input = this.getInputEl();\n input && (input.value = val);\n },\n\n getInputEl() {\n if (!this.input) {\n this.input = this.el.querySelector('input');\n }\n\n return this.input;\n },\n\n updateVisibility() {\n this.el.style.display = this.model.get('visible') ? 'block' : 'none';\n },\n\n show() {\n this.model.set('visible', 1);\n },\n\n hide() {\n this.model.set('visible', 0);\n },\n\n /**\n * Clean input\n * */\n cleanValue() {\n this.setValue('');\n },\n\n render() {\n const pfx = this.pfx;\n const model = this.model;\n const el = this.el;\n el.innerHTML = this.template(model);\n el.className = `${pfx}property ${pfx}${model.get('type')}`;\n this.updateStatus();\n\n const onRender = this.onRender && this.onRender.bind(this);\n onRender && onRender();\n this.setValue(model.get('value'), { targetUpdate: 1 });\n }\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// This is CodeMirror (http://codemirror.net), a code editor\n// implemented in JavaScript on top of the browser's DOM.\n//\n// You can find some technical background for some of the code below\n// at http://marijnhaverbeke.nl/blog/#cm-internals .\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.CodeMirror = factory());\n}(this, (function () { 'use strict';\n\n// Kludges for bugs and behavior differences that can't be feature\n// detected are enabled based on userAgent etc sniffing.\nvar userAgent = navigator.userAgent;\nvar platform = navigator.platform;\n\nvar gecko = /gecko\\/\\d/i.test(userAgent);\nvar ie_upto10 = /MSIE \\d/.test(userAgent);\nvar ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(userAgent);\nvar edge = /Edge\\/(\\d+)/.exec(userAgent);\nvar ie = ie_upto10 || ie_11up || edge;\nvar ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);\nvar webkit = !edge && /WebKit\\//.test(userAgent);\nvar qtwebkit = webkit && /Qt\\/\\d+\\.\\d+/.test(userAgent);\nvar chrome = !edge && /Chrome\\//.test(userAgent);\nvar presto = /Opera\\//.test(userAgent);\nvar safari = /Apple Computer/.test(navigator.vendor);\nvar mac_geMountainLion = /Mac OS X 1\\d\\D([8-9]|\\d\\d)\\D/.test(userAgent);\nvar phantom = /PhantomJS/.test(userAgent);\n\nvar ios = !edge && /AppleWebKit/.test(userAgent) && /Mobile\\/\\w+/.test(userAgent);\nvar android = /Android/.test(userAgent);\n// This is woefully incomplete. Suggestions for alternative methods welcome.\nvar mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);\nvar mac = ios || /Mac/.test(platform);\nvar chromeOS = /\\bCrOS\\b/.test(userAgent);\nvar windows = /win/i.test(platform);\n\nvar presto_version = presto && userAgent.match(/Version\\/(\\d*\\.\\d*)/);\nif (presto_version) { presto_version = Number(presto_version[1]); }\nif (presto_version && presto_version >= 15) { presto = false; webkit = true; }\n// Some browsers use the wrong event properties to signal cmd/ctrl on OS X\nvar flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));\nvar captureRightClick = gecko || (ie && ie_version >= 9);\n\nfunction classTest(cls) { return new RegExp(\"(^|\\\\s)\" + cls + \"(?:$|\\\\s)\\\\s*\") }\n\nvar rmClass = function(node, cls) {\n var current = node.className;\n var match = classTest(cls).exec(current);\n if (match) {\n var after = current.slice(match.index + match[0].length);\n node.className = current.slice(0, match.index) + (after ? match[1] + after : \"\");\n }\n};\n\nfunction removeChildren(e) {\n for (var count = e.childNodes.length; count > 0; --count)\n { e.removeChild(e.firstChild); }\n return e\n}\n\nfunction removeChildrenAndAdd(parent, e) {\n return removeChildren(parent).appendChild(e)\n}\n\nfunction elt(tag, content, className, style) {\n var e = document.createElement(tag);\n if (className) { e.className = className; }\n if (style) { e.style.cssText = style; }\n if (typeof content == \"string\") { e.appendChild(document.createTextNode(content)); }\n else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]); } }\n return e\n}\n// wrapper for elt, which removes the elt from the accessibility tree\nfunction eltP(tag, content, className, style) {\n var e = elt(tag, content, className, style);\n e.setAttribute(\"role\", \"presentation\");\n return e\n}\n\nvar range;\nif (document.createRange) { range = function(node, start, end, endNode) {\n var r = document.createRange();\n r.setEnd(endNode || node, end);\n r.setStart(node, start);\n return r\n}; }\nelse { range = function(node, start, end) {\n var r = document.body.createTextRange();\n try { r.moveToElementText(node.parentNode); }\n catch(e) { return r }\n r.collapse(true);\n r.moveEnd(\"character\", end);\n r.moveStart(\"character\", start);\n return r\n}; }\n\nfunction contains(parent, child) {\n if (child.nodeType == 3) // Android browser always returns false when child is a textnode\n { child = child.parentNode; }\n if (parent.contains)\n { return parent.contains(child) }\n do {\n if (child.nodeType == 11) { child = child.host; }\n if (child == parent) { return true }\n } while (child = child.parentNode)\n}\n\nfunction activeElt() {\n // IE and Edge may throw an \"Unspecified Error\" when accessing document.activeElement.\n // IE < 10 will throw when accessed while the page is loading or in an iframe.\n // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.\n var activeElement;\n try {\n activeElement = document.activeElement;\n } catch(e) {\n activeElement = document.body || null;\n }\n while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement)\n { activeElement = activeElement.shadowRoot.activeElement; }\n return activeElement\n}\n\nfunction addClass(node, cls) {\n var current = node.className;\n if (!classTest(cls).test(current)) { node.className += (current ? \" \" : \"\") + cls; }\n}\nfunction joinClasses(a, b) {\n var as = a.split(\" \");\n for (var i = 0; i < as.length; i++)\n { if (as[i] && !classTest(as[i]).test(b)) { b += \" \" + as[i]; } }\n return b\n}\n\nvar selectInput = function(node) { node.select(); };\nif (ios) // Mobile Safari apparently has a bug where select() is broken.\n { selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; }\nelse if (ie) // Suppress mysterious IE10 errors\n { selectInput = function(node) { try { node.select(); } catch(_e) {} }; }\n\nfunction bind(f) {\n var args = Array.prototype.slice.call(arguments, 1);\n return function(){return f.apply(null, args)}\n}\n\nfunction copyObj(obj, target, overwrite) {\n if (!target) { target = {}; }\n for (var prop in obj)\n { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))\n { target[prop] = obj[prop]; } }\n return target\n}\n\n// Counts the column offset in a string, taking tabs into account.\n// Used mostly to find indentation.\nfunction countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) { end = string.length; }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i);\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n}\n\nvar Delayed = function() {this.id = null;};\nDelayed.prototype.set = function (ms, f) {\n clearTimeout(this.id);\n this.id = setTimeout(f, ms);\n};\n\nfunction indexOf(array, elt) {\n for (var i = 0; i < array.length; ++i)\n { if (array[i] == elt) { return i } }\n return -1\n}\n\n// Number of pixels added to scroller and sizer to hide scrollbar\nvar scrollerGap = 30;\n\n// Returned or thrown by various protocols to signal 'I'm not\n// handling this'.\nvar Pass = {toString: function(){return \"CodeMirror.Pass\"}};\n\n// Reused option objects for setSelection & friends\nvar sel_dontScroll = {scroll: false};\nvar sel_mouse = {origin: \"*mouse\"};\nvar sel_move = {origin: \"+move\"};\n\n// The inverse of countColumn -- find the offset that corresponds to\n// a particular column.\nfunction findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}\n\nvar spaceStrs = [\"\"];\nfunction spaceStr(n) {\n while (spaceStrs.length <= n)\n { spaceStrs.push(lst(spaceStrs) + \" \"); }\n return spaceStrs[n]\n}\n\nfunction lst(arr) { return arr[arr.length-1] }\n\nfunction map(array, f) {\n var out = [];\n for (var i = 0; i < array.length; i++) { out[i] = f(array[i], i); }\n return out\n}\n\nfunction insertSorted(array, value, score) {\n var pos = 0, priority = score(value);\n while (pos < array.length && score(array[pos]) <= priority) { pos++; }\n array.splice(pos, 0, value);\n}\n\nfunction nothing() {}\n\nfunction createObj(base, props) {\n var inst;\n if (Object.create) {\n inst = Object.create(base);\n } else {\n nothing.prototype = base;\n inst = new nothing();\n }\n if (props) { copyObj(props, inst); }\n return inst\n}\n\nvar nonASCIISingleCaseWordChar = /[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/;\nfunction isWordCharBasic(ch) {\n return /\\w/.test(ch) || ch > \"\\x80\" &&\n (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch))\n}\nfunction isWordChar(ch, helper) {\n if (!helper) { return isWordCharBasic(ch) }\n if (helper.source.indexOf(\"\\\\w\") > -1 && isWordCharBasic(ch)) { return true }\n return helper.test(ch)\n}\n\nfunction isEmpty(obj) {\n for (var n in obj) { if (obj.hasOwnProperty(n) && obj[n]) { return false } }\n return true\n}\n\n// Extending unicode characters. A series of a non-extending char +\n// any number of extending chars is treated as a single unit as far\n// as editing and measuring is concerned. This is not fully correct,\n// since some scripts/fonts/browsers also treat other configurations\n// of code points as a group.\nvar extendingChars = /[\\u0300-\\u036f\\u0483-\\u0489\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u065e\\u0670\\u06d6-\\u06dc\\u06de-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07eb-\\u07f3\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0900-\\u0902\\u093c\\u0941-\\u0948\\u094d\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09bc\\u09be\\u09c1-\\u09c4\\u09cd\\u09d7\\u09e2\\u09e3\\u0a01\\u0a02\\u0a3c\\u0a41\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a70\\u0a71\\u0a75\\u0a81\\u0a82\\u0abc\\u0ac1-\\u0ac5\\u0ac7\\u0ac8\\u0acd\\u0ae2\\u0ae3\\u0b01\\u0b3c\\u0b3e\\u0b3f\\u0b41-\\u0b44\\u0b4d\\u0b56\\u0b57\\u0b62\\u0b63\\u0b82\\u0bbe\\u0bc0\\u0bcd\\u0bd7\\u0c3e-\\u0c40\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0cbc\\u0cbf\\u0cc2\\u0cc6\\u0ccc\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0d3e\\u0d41-\\u0d44\\u0d4d\\u0d57\\u0d62\\u0d63\\u0dca\\u0dcf\\u0dd2-\\u0dd4\\u0dd6\\u0ddf\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0eb1\\u0eb4-\\u0eb9\\u0ebb\\u0ebc\\u0ec8-\\u0ecd\\u0f18\\u0f19\\u0f35\\u0f37\\u0f39\\u0f71-\\u0f7e\\u0f80-\\u0f84\\u0f86\\u0f87\\u0f90-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102d-\\u1030\\u1032-\\u1037\\u1039\\u103a\\u103d\\u103e\\u1058\\u1059\\u105e-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108d\\u109d\\u135f\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b7-\\u17bd\\u17c6\\u17c9-\\u17d3\\u17dd\\u180b-\\u180d\\u18a9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193b\\u1a17\\u1a18\\u1a56\\u1a58-\\u1a5e\\u1a60\\u1a62\\u1a65-\\u1a6c\\u1a73-\\u1a7c\\u1a7f\\u1b00-\\u1b03\\u1b34\\u1b36-\\u1b3a\\u1b3c\\u1b42\\u1b6b-\\u1b73\\u1b80\\u1b81\\u1ba2-\\u1ba5\\u1ba8\\u1ba9\\u1c2c-\\u1c33\\u1c36\\u1c37\\u1cd0-\\u1cd2\\u1cd4-\\u1ce0\\u1ce2-\\u1ce8\\u1ced\\u1dc0-\\u1de6\\u1dfd-\\u1dff\\u200c\\u200d\\u20d0-\\u20f0\\u2cef-\\u2cf1\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua66f-\\ua672\\ua67c\\ua67d\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua825\\ua826\\ua8c4\\ua8e0-\\ua8f1\\ua926-\\ua92d\\ua947-\\ua951\\ua980-\\ua982\\ua9b3\\ua9b6-\\ua9b9\\ua9bc\\uaa29-\\uaa2e\\uaa31\\uaa32\\uaa35\\uaa36\\uaa43\\uaa4c\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uabe5\\uabe8\\uabed\\udc00-\\udfff\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe26\\uff9e\\uff9f]/;\nfunction isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) }\n\n// Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range.\nfunction skipExtendingChars(str, pos, dir) {\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n return pos\n}\n\n// Returns the value from the range [`from`; `to`] that satisfies\n// `pred` and is closest to `from`. Assumes that at least `to`\n// satisfies `pred`. Supports `from` being greater than `to`.\nfunction findFirst(pred, from, to) {\n // At any point we are certain `to` satisfies `pred`, don't know\n // whether `from` does.\n var dir = from > to ? -1 : 1;\n for (;;) {\n if (from == to) { return from }\n var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n if (mid == from) { return pred(mid) ? from : to }\n if (pred(mid)) { to = mid; }\n else { from = mid + dir; }\n }\n}\n\n// The display handles the DOM integration, both for input reading\n// and content drawing. It holds references to DOM nodes and\n// display-related state.\n\nfunction Display(place, doc, input) {\n var d = this;\n this.input = input;\n\n // Covers bottom-right square when both scrollbars are present.\n d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n d.scrollbarFiller.setAttribute(\"cm-not-content\", \"true\");\n // Covers bottom of gutter when coverGutterNextToScrollbar is on\n // and h scrollbar is present.\n d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n d.gutterFiller.setAttribute(\"cm-not-content\", \"true\");\n // Will contain the actual code, positioned to cover the viewport.\n d.lineDiv = eltP(\"div\", null, \"CodeMirror-code\");\n // Elements are added to these to represent selection and cursors.\n d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n // A visibility: hidden element used to find the size of things.\n d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n // When lines outside of the viewport are measured, they are drawn in this.\n d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n // Wraps everything that needs to exist inside the vertically-padded coordinate system\n d.lineSpace = eltP(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n null, \"position: relative; outline: none\");\n var lines = eltP(\"div\", [d.lineSpace], \"CodeMirror-lines\");\n // Moved around its parent to cover visible view.\n d.mover = elt(\"div\", [lines], null, \"position: relative\");\n // Set to the height of the document, allowing scrolling.\n d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n d.sizerWidth = null;\n // Behavior of elts with overflow: auto and padding is\n // inconsistent across browsers. This is used to ensure the\n // scrollable area is big enough.\n d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerGap + \"px; width: 1px;\");\n // Will contain the gutters, if any.\n d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n d.lineGutter = null;\n // Actual scrollable element.\n d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n d.scroller.setAttribute(\"tabIndex\", \"-1\");\n // The element in which the editor lives.\n d.wrapper = elt(\"div\", [d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n\n // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; }\n\n if (place) {\n if (place.appendChild) { place.appendChild(d.wrapper); }\n else { place(d.wrapper); }\n }\n\n // Current rendered range (may be bigger than the view window).\n d.viewFrom = d.viewTo = doc.first;\n d.reportedViewFrom = d.reportedViewTo = doc.first;\n // Information about the rendered lines.\n d.view = [];\n d.renderedView = null;\n // Holds info about a single rendered line when it was rendered\n // for measurement, while not in view.\n d.externalMeasured = null;\n // Empty space (in pixels) above the view\n d.viewOffset = 0;\n d.lastWrapHeight = d.lastWrapWidth = 0;\n d.updateLineNumbers = null;\n\n d.nativeBarWidth = d.barHeight = d.barWidth = 0;\n d.scrollbarsClipped = false;\n\n // Used to only resize the line number gutter when necessary (when\n // the amount of lines crosses a boundary that makes its width change)\n d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n // Set to true when a non-horizontal-scrolling line widget is\n // added. As an optimization, line widget aligning is skipped when\n // this is false.\n d.alignWidgets = false;\n\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n // Tracks the maximum line length so that the horizontal scrollbar\n // can be kept static when scrolling.\n d.maxLine = null;\n d.maxLineLength = 0;\n d.maxLineChanged = false;\n\n // Used for measuring wheel scrolling granularity\n d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n // True when shift is held down.\n d.shift = false;\n\n // Used to track whether anything happened since the context menu\n // was opened.\n d.selForContextMenu = null;\n\n d.activeTouch = null;\n\n input.init(d);\n}\n\n// Find the line object corresponding to the given line number.\nfunction getLine(doc, n) {\n n -= doc.first;\n if (n < 0 || n >= doc.size) { throw new Error(\"There is no line \" + (n + doc.first) + \" in the document.\") }\n var chunk = doc;\n while (!chunk.lines) {\n for (var i = 0;; ++i) {\n var child = chunk.children[i], sz = child.chunkSize();\n if (n < sz) { chunk = child; break }\n n -= sz;\n }\n }\n return chunk.lines[n]\n}\n\n// Get the part of a document between two positions, as an array of\n// strings.\nfunction getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}\n// Get the lines between from and to, as array of strings.\nfunction getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}\n\n// Update the height of a line, propagating the height change\n// upwards to parent nodes.\nfunction updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n}\n\n// Given a line object, find its line number by walking up through\n// its parent links.\nfunction lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first\n}\n\n// Find the line at the given vertical position, using the height\n// information in the document tree.\nfunction lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n}\n\nfunction isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size}\n\nfunction lineNumberFor(options, i) {\n return String(options.lineNumberFormatter(i + options.firstLineNumber))\n}\n\n// A Pos instance represents a position within the text.\nfunction Pos(line, ch, sticky) {\n if ( sticky === void 0 ) sticky = null;\n\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n this.line = line;\n this.ch = ch;\n this.sticky = sticky;\n}\n\n// Compare two positions, return 0 if they are the same, a negative\n// number when a is less, and a positive number otherwise.\nfunction cmp(a, b) { return a.line - b.line || a.ch - b.ch }\n\nfunction equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b) == 0 }\n\nfunction copyPos(x) {return Pos(x.line, x.ch)}\nfunction maxPos(a, b) { return cmp(a, b) < 0 ? b : a }\nfunction minPos(a, b) { return cmp(a, b) < 0 ? a : b }\n\n// Most of the external API clips given positions to make sure they\n// actually exist within the document.\nfunction clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))}\nfunction clipPos(doc, pos) {\n if (pos.line < doc.first) { return Pos(doc.first, 0) }\n var last = doc.first + doc.size - 1;\n if (pos.line > last) { return Pos(last, getLine(doc, last).text.length) }\n return clipToLen(pos, getLine(doc, pos.line).text.length)\n}\nfunction clipToLen(pos, linelen) {\n var ch = pos.ch;\n if (ch == null || ch > linelen) { return Pos(pos.line, linelen) }\n else if (ch < 0) { return Pos(pos.line, 0) }\n else { return pos }\n}\nfunction clipPosArray(doc, array) {\n var out = [];\n for (var i = 0; i < array.length; i++) { out[i] = clipPos(doc, array[i]); }\n return out\n}\n\n// Optimize some code when these features are not used.\nvar sawReadOnlySpans = false;\nvar sawCollapsedSpans = false;\n\nfunction seeReadOnlySpans() {\n sawReadOnlySpans = true;\n}\n\nfunction seeCollapsedSpans() {\n sawCollapsedSpans = true;\n}\n\n// TEXTMARKER SPANS\n\nfunction MarkedSpan(marker, from, to) {\n this.marker = marker;\n this.from = from; this.to = to;\n}\n\n// Search an array of spans for a span matching the given marker.\nfunction getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n}\n// Remove a span from an array, returning undefined if no spans are\n// left (we don't store arrays for lines without spans).\nfunction removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n}\n// Add a span to a line.\nfunction addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}\n\n// Used for the algorithm that adjusts markers for a change in the\n// document. These functions cut an array of spans at a given\n// character position, returning an array of remaining chunks (or\n// undefined if nothing remains).\nfunction markedSpansBefore(old, startCh, isInsert) {\n var nw;\n if (old) { for (var i = 0; i < old.length; ++i) {\n var span = old[i], marker = span.marker;\n var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);\n if (startsBefore || span.from == startCh && marker.type == \"bookmark\" && (!isInsert || !span.marker.insertLeft)) {\n var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh);(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));\n }\n } }\n return nw\n}\nfunction markedSpansAfter(old, endCh, isInsert) {\n var nw;\n if (old) { for (var i = 0; i < old.length; ++i) {\n var span = old[i], marker = span.marker;\n var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);\n if (endsAfter || span.from == endCh && marker.type == \"bookmark\" && (!isInsert || span.marker.insertLeft)) {\n var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh);(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,\n span.to == null ? null : span.to - endCh));\n }\n } }\n return nw\n}\n\n// Given a change object, compute the new set of marker spans that\n// cover the line in which the change took place. Removes spans\n// entirely within the change, reconnects spans belonging to the\n// same marker that appear on both sides of the change, and cuts off\n// spans partially within the change. Returns an array of span\n// arrays with one element for each line in (after) the change.\nfunction stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) { span.to = startCh; }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n if (span$1.to != null) { span$1.to += offset; }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n if (!found$1) {\n span$1.from = offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n } else {\n span$1.from += offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first); }\n if (last && last != first) { last = clearEmptySpans(last); }\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers); }\n newMarkers.push(last);\n }\n return newMarkers\n}\n\n// Remove spans that are empty and don't have a clearWhenEmpty\n// option of false.\nfunction clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n}\n\n// Used to 'clip' out readOnly ranges when making a change.\nfunction removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark); }\n } }\n });\n if (!markers) { return null }\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}); }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}); }\n parts.splice.apply(parts, newParts);\n j += newParts.length - 3;\n }\n }\n return parts\n}\n\n// Connect or disconnect spans from a line.\nfunction detachMarkedSpans(line) {\n var spans = line.markedSpans;\n if (!spans) { return }\n for (var i = 0; i < spans.length; ++i)\n { spans[i].marker.detachLine(line); }\n line.markedSpans = null;\n}\nfunction attachMarkedSpans(line, spans) {\n if (!spans) { return }\n for (var i = 0; i < spans.length; ++i)\n { spans[i].marker.attachLine(line); }\n line.markedSpans = spans;\n}\n\n// Helpers used when computing which overlapping collapsed span\n// counts as the larger one.\nfunction extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 }\nfunction extraRight(marker) { return marker.inclusiveRight ? 1 : 0 }\n\n// Returns a number indicating which of two overlapping collapsed\n// spans is larger (and thus includes the other). Falls back to\n// comparing ids when the spans cover exactly the same range.\nfunction compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}\n\n// Find out whether a line ends or starts in a collapsed span. If\n// so, return the marker for that span.\nfunction collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}\nfunction collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }\nfunction collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }\n\nfunction collapsedSpanAround(line, ch) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; }\n } }\n return found\n}\n\n// Test whether there exists a collapsed span that partially\n// overlaps (covers the start or end, but not both) of a new span.\n// Such overlap is not allowed.\nfunction conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}\n\n// A visual line is a line as drawn on the screen. Folding, for\n// example, can cause multiple logical lines to appear on the same\n// visual line. This finds the start of the visual line that the\n// given line is part of (usually that is the line itself).\nfunction visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}\n\nfunction visualLineEnd(line) {\n var merged;\n while (merged = collapsedSpanAtEnd(line))\n { line = merged.find(1, true).line; }\n return line\n}\n\n// Returns an array of logical lines that continue the visual line\n// started by the argument, or undefined if there are no such lines.\nfunction visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}\n\n// Get the line number of the start of the visual line that the\n// given line number is part of.\nfunction visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}\n\n// Get the line number of the start of the next visual line after\n// the given line.\nfunction visualLineEndNo(doc, lineN) {\n if (lineN > doc.lastLine()) { return lineN }\n var line = getLine(doc, lineN), merged;\n if (!lineIsHidden(doc, line)) { return lineN }\n while (merged = collapsedSpanAtEnd(line))\n { line = merged.find(1, true).line; }\n return lineNo(line) + 1\n}\n\n// Compute whether a line is hidden. Lines count as hidden when they\n// are part of a visual line that starts with another line, or when\n// they are entirely covered by collapsed, non-widget span.\nfunction lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n}\nfunction lineIsHiddenInner(doc, line, span) {\n if (span.to == null) {\n var end = span.marker.find(1, true);\n return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker))\n }\n if (span.marker.inclusiveRight && span.to == line.text.length)\n { return true }\n for (var sp = (void 0), i = 0; i < line.markedSpans.length; ++i) {\n sp = line.markedSpans[i];\n if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&\n (sp.to == null || sp.to != span.from) &&\n (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&\n lineIsHiddenInner(doc, line, sp)) { return true }\n }\n}\n\n// Find the height above the given line.\nfunction heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}\n\n// Compute the character length of a line, taking into account\n// collapsed ranges (see markText) that might hide parts, and join\n// other lines onto it.\nfunction lineLength(line) {\n if (line.height == 0) { return 0 }\n var len = line.text.length, merged, cur = line;\n while (merged = collapsedSpanAtStart(cur)) {\n var found = merged.find(0, true);\n cur = found.from.line;\n len += found.from.ch - found.to.ch;\n }\n cur = line;\n while (merged = collapsedSpanAtEnd(cur)) {\n var found$1 = merged.find(0, true);\n len -= cur.text.length - found$1.from.ch;\n cur = found$1.to.line;\n len += cur.text.length - found$1.to.ch;\n }\n return len\n}\n\n// Find the longest line in the document.\nfunction findMaxLine(cm) {\n var d = cm.display, doc = cm.doc;\n d.maxLine = getLine(doc, doc.first);\n d.maxLineLength = lineLength(d.maxLine);\n d.maxLineChanged = true;\n doc.iter(function (line) {\n var len = lineLength(line);\n if (len > d.maxLineLength) {\n d.maxLineLength = len;\n d.maxLine = line;\n }\n });\n}\n\n// BIDI HELPERS\n\nfunction iterateBidiSections(order, from, to, f) {\n if (!order) { return f(from, to, \"ltr\", 0) }\n var found = false;\n for (var i = 0; i < order.length; ++i) {\n var part = order[i];\n if (part.from < to && part.to > from || from == to && part.to == from) {\n f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? \"rtl\" : \"ltr\", i);\n found = true;\n }\n }\n if (!found) { f(from, to, \"ltr\"); }\n}\n\nvar bidiOther = null;\nfunction getBidiPartAt(order, ch, sticky) {\n var found;\n bidiOther = null;\n for (var i = 0; i < order.length; ++i) {\n var cur = order[i];\n if (cur.from < ch && cur.to > ch) { return i }\n if (cur.to == ch) {\n if (cur.from != cur.to && sticky == \"before\") { found = i; }\n else { bidiOther = i; }\n }\n if (cur.from == ch) {\n if (cur.from != cur.to && sticky != \"before\") { found = i; }\n else { bidiOther = i; }\n }\n }\n return found != null ? found : bidiOther\n}\n\n// Bidirectional ordering algorithm\n// See http://unicode.org/reports/tr9/tr9-13.html for the algorithm\n// that this (partially) implements.\n\n// One-char codes used for character types:\n// L (L): Left-to-Right\n// R (R): Right-to-Left\n// r (AL): Right-to-Left Arabic\n// 1 (EN): European Number\n// + (ES): European Number Separator\n// % (ET): European Number Terminator\n// n (AN): Arabic Number\n// , (CS): Common Number Separator\n// m (NSM): Non-Spacing Mark\n// b (BN): Boundary Neutral\n// s (B): Paragraph Separator\n// t (S): Segment Separator\n// w (WS): Whitespace\n// N (ON): Other Neutrals\n\n// Returns null if characters are ordered as they appear\n// (left-to-right), or an array of sections ({from, to, level}\n// objects) in the order in which they occur visually.\nvar bidiOrdering = (function() {\n // Character types for codepoints 0 to 0xff\n var lowTypes = \"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN\";\n // Character types for codepoints 0x600 to 0x6f9\n var arabicTypes = \"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111\";\n function charType(code) {\n if (code <= 0xf7) { return lowTypes.charAt(code) }\n else if (0x590 <= code && code <= 0x5f4) { return \"R\" }\n else if (0x600 <= code && code <= 0x6f9) { return arabicTypes.charAt(code - 0x600) }\n else if (0x6ee <= code && code <= 0x8ac) { return \"r\" }\n else if (0x2000 <= code && code <= 0x200b) { return \"w\" }\n else if (code == 0x200c) { return \"b\" }\n else { return \"L\" }\n }\n\n var bidiRE = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\n var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;\n\n function BidiSpan(level, from, to) {\n this.level = level;\n this.from = from; this.to = to;\n }\n\n return function(str, direction) {\n var outerType = direction == \"ltr\" ? \"L\" : \"R\";\n\n if (str.length == 0 || direction == \"ltr\" && !bidiRE.test(str)) { return false }\n var len = str.length, types = [];\n for (var i = 0; i < len; ++i)\n { types.push(charType(str.charCodeAt(i))); }\n\n // W1. Examine each non-spacing mark (NSM) in the level run, and\n // change the type of the NSM to the type of the previous\n // character. If the NSM is at the start of the level run, it will\n // get the type of sor.\n for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) {\n var type = types[i$1];\n if (type == \"m\") { types[i$1] = prev; }\n else { prev = type; }\n }\n\n // W2. Search backwards from each instance of a European number\n // until the first strong type (R, L, AL, or sor) is found. If an\n // AL is found, change the type of the European number to Arabic\n // number.\n // W3. Change all ALs to R.\n for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) {\n var type$1 = types[i$2];\n if (type$1 == \"1\" && cur == \"r\") { types[i$2] = \"n\"; }\n else if (isStrong.test(type$1)) { cur = type$1; if (type$1 == \"r\") { types[i$2] = \"R\"; } }\n }\n\n // W4. A single European separator between two European numbers\n // changes to a European number. A single common separator between\n // two numbers of the same type changes to that type.\n for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) {\n var type$2 = types[i$3];\n if (type$2 == \"+\" && prev$1 == \"1\" && types[i$3+1] == \"1\") { types[i$3] = \"1\"; }\n else if (type$2 == \",\" && prev$1 == types[i$3+1] &&\n (prev$1 == \"1\" || prev$1 == \"n\")) { types[i$3] = prev$1; }\n prev$1 = type$2;\n }\n\n // W5. A sequence of European terminators adjacent to European\n // numbers changes to all European numbers.\n // W6. Otherwise, separators and terminators change to Other\n // Neutral.\n for (var i$4 = 0; i$4 < len; ++i$4) {\n var type$3 = types[i$4];\n if (type$3 == \",\") { types[i$4] = \"N\"; }\n else if (type$3 == \"%\") {\n var end = (void 0);\n for (end = i$4 + 1; end < len && types[end] == \"%\"; ++end) {}\n var replace = (i$4 && types[i$4-1] == \"!\") || (end < len && types[end] == \"1\") ? \"1\" : \"N\";\n for (var j = i$4; j < end; ++j) { types[j] = replace; }\n i$4 = end - 1;\n }\n }\n\n // W7. Search backwards from each instance of a European number\n // until the first strong type (R, L, or sor) is found. If an L is\n // found, then change the type of the European number to L.\n for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) {\n var type$4 = types[i$5];\n if (cur$1 == \"L\" && type$4 == \"1\") { types[i$5] = \"L\"; }\n else if (isStrong.test(type$4)) { cur$1 = type$4; }\n }\n\n // N1. A sequence of neutrals takes the direction of the\n // surrounding strong text if the text on both sides has the same\n // direction. European and Arabic numbers act as if they were R in\n // terms of their influence on neutrals. Start-of-level-run (sor)\n // and end-of-level-run (eor) are used at level run boundaries.\n // N2. Any remaining neutrals take the embedding direction.\n for (var i$6 = 0; i$6 < len; ++i$6) {\n if (isNeutral.test(types[i$6])) {\n var end$1 = (void 0);\n for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {}\n var before = (i$6 ? types[i$6-1] : outerType) == \"L\";\n var after = (end$1 < len ? types[end$1] : outerType) == \"L\";\n var replace$1 = before == after ? (before ? \"L\" : \"R\") : outerType;\n for (var j$1 = i$6; j$1 < end$1; ++j$1) { types[j$1] = replace$1; }\n i$6 = end$1 - 1;\n }\n }\n\n // Here we depart from the documented algorithm, in order to avoid\n // building up an actual levels array. Since there are only three\n // levels (0, 1, 2) in an implementation that doesn't take\n // explicit embedding into account, we can build up the order on\n // the fly, without following the level-based algorithm.\n var order = [], m;\n for (var i$7 = 0; i$7 < len;) {\n if (countsAsLeft.test(types[i$7])) {\n var start = i$7;\n for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {}\n order.push(new BidiSpan(0, start, i$7));\n } else {\n var pos = i$7, at = order.length;\n for (++i$7; i$7 < len && types[i$7] != \"L\"; ++i$7) {}\n for (var j$2 = pos; j$2 < i$7;) {\n if (countsAsNum.test(types[j$2])) {\n if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); }\n var nstart = j$2;\n for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}\n order.splice(at, 0, new BidiSpan(2, nstart, j$2));\n pos = j$2;\n } else { ++j$2; }\n }\n if (pos < i$7) { order.splice(at, 0, new BidiSpan(1, pos, i$7)); }\n }\n }\n if (direction == \"ltr\") {\n if (order[0].level == 1 && (m = str.match(/^\\s+/))) {\n order[0].from = m[0].length;\n order.unshift(new BidiSpan(0, 0, m[0].length));\n }\n if (lst(order).level == 1 && (m = str.match(/\\s+$/))) {\n lst(order).to -= m[0].length;\n order.push(new BidiSpan(0, len - m[0].length, len));\n }\n }\n\n return direction == \"rtl\" ? order.reverse() : order\n }\n})();\n\n// Get the bidi ordering for the given line (and cache it). Returns\n// false for lines that are fully left-to-right, and an array of\n// BidiSpan objects otherwise.\nfunction getOrder(line, direction) {\n var order = line.order;\n if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n return order\n}\n\n// EVENT HANDLING\n\n// Lightweight event framework. on/off also work on DOM nodes,\n// registering native DOM handlers.\n\nvar noHandlers = [];\n\nvar on = function(emitter, type, f) {\n if (emitter.addEventListener) {\n emitter.addEventListener(type, f, false);\n } else if (emitter.attachEvent) {\n emitter.attachEvent(\"on\" + type, f);\n } else {\n var map$$1 = emitter._handlers || (emitter._handlers = {});\n map$$1[type] = (map$$1[type] || noHandlers).concat(f);\n }\n};\n\nfunction getHandlers(emitter, type) {\n return emitter._handlers && emitter._handlers[type] || noHandlers\n}\n\nfunction off(emitter, type, f) {\n if (emitter.removeEventListener) {\n emitter.removeEventListener(type, f, false);\n } else if (emitter.detachEvent) {\n emitter.detachEvent(\"on\" + type, f);\n } else {\n var map$$1 = emitter._handlers, arr = map$$1 && map$$1[type];\n if (arr) {\n var index = indexOf(arr, f);\n if (index > -1)\n { map$$1[type] = arr.slice(0, index).concat(arr.slice(index + 1)); }\n }\n }\n}\n\nfunction signal(emitter, type /*, values...*/) {\n var handlers = getHandlers(emitter, type);\n if (!handlers.length) { return }\n var args = Array.prototype.slice.call(arguments, 2);\n for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args); }\n}\n\n// The DOM events that CodeMirror handles can be overridden by\n// registering a (non-DOM) handler on the editor for the event name,\n// and preventDefault-ing the event in that handler.\nfunction signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore\n}\n\nfunction signalCursorActivity(cm) {\n var arr = cm._handlers && cm._handlers.cursorActivity;\n if (!arr) { return }\n var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);\n for (var i = 0; i < arr.length; ++i) { if (indexOf(set, arr[i]) == -1)\n { set.push(arr[i]); } }\n}\n\nfunction hasHandler(emitter, type) {\n return getHandlers(emitter, type).length > 0\n}\n\n// Add on and off methods to a constructor's prototype, to make\n// registering events on such objects more convenient.\nfunction eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f);};\n ctor.prototype.off = function(type, f) {off(this, type, f);};\n}\n\n// Due to the fact that we still support jurassic IE versions, some\n// compatibility wrappers are needed.\n\nfunction e_preventDefault(e) {\n if (e.preventDefault) { e.preventDefault(); }\n else { e.returnValue = false; }\n}\nfunction e_stopPropagation(e) {\n if (e.stopPropagation) { e.stopPropagation(); }\n else { e.cancelBubble = true; }\n}\nfunction e_defaultPrevented(e) {\n return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false\n}\nfunction e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}\n\nfunction e_target(e) {return e.target || e.srcElement}\nfunction e_button(e) {\n var b = e.which;\n if (b == null) {\n if (e.button & 1) { b = 1; }\n else if (e.button & 2) { b = 3; }\n else if (e.button & 4) { b = 2; }\n }\n if (mac && e.ctrlKey && b == 1) { b = 3; }\n return b\n}\n\n// Detect drag-and-drop\nvar dragAndDrop = function() {\n // There is *some* kind of drag-and-drop support in IE6-8, but I\n // couldn't get it to work yet.\n if (ie && ie_version < 9) { return false }\n var div = elt('div');\n return \"draggable\" in div || \"dragDrop\" in div\n}();\n\nvar zwspSupported;\nfunction zeroWidthElement(measure) {\n if (zwspSupported == null) {\n var test = elt(\"span\", \"\\u200b\");\n removeChildrenAndAdd(measure, elt(\"span\", [test, document.createTextNode(\"x\")]));\n if (measure.firstChild.offsetHeight != 0)\n { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); }\n }\n var node = zwspSupported ? elt(\"span\", \"\\u200b\") :\n elt(\"span\", \"\\u00a0\", null, \"display: inline-block; width: 1px; margin-right: -1px\");\n node.setAttribute(\"cm-text\", \"\");\n return node\n}\n\n// Feature-detect IE's crummy client rect reporting for bidi text\nvar badBidiRects;\nfunction hasBadBidiRects(measure) {\n if (badBidiRects != null) { return badBidiRects }\n var txt = removeChildrenAndAdd(measure, document.createTextNode(\"A\\u062eA\"));\n var r0 = range(txt, 0, 1).getBoundingClientRect();\n var r1 = range(txt, 1, 2).getBoundingClientRect();\n removeChildren(measure);\n if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780)\n return badBidiRects = (r1.right - r0.right < 3)\n}\n\n// See if \"\".split is the broken IE version, if so, provide an\n// alternative way to split lines.\nvar splitLinesAuto = \"\\n\\nb\".split(/\\n/).length != 3 ? function (string) {\n var pos = 0, result = [], l = string.length;\n while (pos <= l) {\n var nl = string.indexOf(\"\\n\", pos);\n if (nl == -1) { nl = string.length; }\n var line = string.slice(pos, string.charAt(nl - 1) == \"\\r\" ? nl - 1 : nl);\n var rt = line.indexOf(\"\\r\");\n if (rt != -1) {\n result.push(line.slice(0, rt));\n pos += rt + 1;\n } else {\n result.push(line);\n pos = nl + 1;\n }\n }\n return result\n} : function (string) { return string.split(/\\r\\n?|\\n/); };\n\nvar hasSelection = window.getSelection ? function (te) {\n try { return te.selectionStart != te.selectionEnd }\n catch(e) { return false }\n} : function (te) {\n var range$$1;\n try {range$$1 = te.ownerDocument.selection.createRange();}\n catch(e) {}\n if (!range$$1 || range$$1.parentElement() != te) { return false }\n return range$$1.compareEndPoints(\"StartToEnd\", range$$1) != 0\n};\n\nvar hasCopyEvent = (function () {\n var e = elt(\"div\");\n if (\"oncopy\" in e) { return true }\n e.setAttribute(\"oncopy\", \"return;\");\n return typeof e.oncopy == \"function\"\n})();\n\nvar badZoomedRects = null;\nfunction hasBadZoomedRects(measure) {\n if (badZoomedRects != null) { return badZoomedRects }\n var node = removeChildrenAndAdd(measure, elt(\"span\", \"x\"));\n var normal = node.getBoundingClientRect();\n var fromRange = range(node, 0, 1).getBoundingClientRect();\n return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1\n}\n\n// Known modes, by name and by MIME\nvar modes = {};\nvar mimeModes = {};\n\n// Extra arguments are stored as the mode's dependencies, which is\n// used by (legacy) mechanisms like loadmode.js to automatically\n// load a mode. (Preferred mechanism is the require/define calls.)\nfunction defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}\n\nfunction defineMIME(mime, spec) {\n mimeModes[mime] = spec;\n}\n\n// Given a MIME type, a {name, ...options} config object, or a name\n// string, return a mode config object.\nfunction resolveMode(spec) {\n if (typeof spec == \"string\" && mimeModes.hasOwnProperty(spec)) {\n spec = mimeModes[spec];\n } else if (spec && typeof spec.name == \"string\" && mimeModes.hasOwnProperty(spec.name)) {\n var found = mimeModes[spec.name];\n if (typeof found == \"string\") { found = {name: found}; }\n spec = createObj(found, spec);\n spec.name = found.name;\n } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+xml$/.test(spec)) {\n return resolveMode(\"application/xml\")\n } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+json$/.test(spec)) {\n return resolveMode(\"application/json\")\n }\n if (typeof spec == \"string\") { return {name: spec} }\n else { return spec || {name: \"null\"} }\n}\n\n// Given a mode spec (anything that resolveMode accepts), find and\n// initialize an actual mode object.\nfunction getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n if (!mfactory) { return getMode(options, \"text/plain\") }\n var modeObj = mfactory(options, spec);\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n modeObj[prop] = exts[prop];\n }\n }\n modeObj.name = spec.name;\n if (spec.helperType) { modeObj.helperType = spec.helperType; }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n return modeObj\n}\n\n// This can be used to attach properties to mode objects from\n// outside the actual mode definition.\nvar modeExtensions = {};\nfunction extendMode(mode, properties) {\n var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});\n copyObj(properties, exts);\n}\n\nfunction copyState(mode, state) {\n if (state === true) { return state }\n if (mode.copyState) { return mode.copyState(state) }\n var nstate = {};\n for (var n in state) {\n var val = state[n];\n if (val instanceof Array) { val = val.concat([]); }\n nstate[n] = val;\n }\n return nstate\n}\n\n// Given a mode and a state (for that mode), find the inner mode and\n// state at the position that the state refers to.\nfunction innerMode(mode, state) {\n var info;\n while (mode.innerMode) {\n info = mode.innerMode(state);\n if (!info || info.mode == mode) { break }\n state = info.state;\n mode = info.mode;\n }\n return info || {mode: mode, state: state}\n}\n\nfunction startState(mode, a1, a2) {\n return mode.startState ? mode.startState(a1, a2) : true\n}\n\n// STRING STREAM\n\n// Fed to the mode parsers, provides helper functions to make\n// parsers more succinct.\n\nvar StringStream = function(string, tabSize, lineOracle) {\n this.pos = this.start = 0;\n this.string = string;\n this.tabSize = tabSize || 8;\n this.lastColumnPos = this.lastColumnValue = 0;\n this.lineStart = 0;\n this.lineOracle = lineOracle;\n};\n\nStringStream.prototype.eol = function () {return this.pos >= this.string.length};\nStringStream.prototype.sol = function () {return this.pos == this.lineStart};\nStringStream.prototype.peek = function () {return this.string.charAt(this.pos) || undefined};\nStringStream.prototype.next = function () {\n if (this.pos < this.string.length)\n { return this.string.charAt(this.pos++) }\n};\nStringStream.prototype.eat = function (match) {\n var ch = this.string.charAt(this.pos);\n var ok;\n if (typeof match == \"string\") { ok = ch == match; }\n else { ok = ch && (match.test ? match.test(ch) : match(ch)); }\n if (ok) {++this.pos; return ch}\n};\nStringStream.prototype.eatWhile = function (match) {\n var start = this.pos;\n while (this.eat(match)){}\n return this.pos > start\n};\nStringStream.prototype.eatSpace = function () {\n var this$1 = this;\n\n var start = this.pos;\n while (/[\\s\\u00a0]/.test(this.string.charAt(this.pos))) { ++this$1.pos; }\n return this.pos > start\n};\nStringStream.prototype.skipToEnd = function () {this.pos = this.string.length;};\nStringStream.prototype.skipTo = function (ch) {\n var found = this.string.indexOf(ch, this.pos);\n if (found > -1) {this.pos = found; return true}\n};\nStringStream.prototype.backUp = function (n) {this.pos -= n;};\nStringStream.prototype.column = function () {\n if (this.lastColumnPos < this.start) {\n this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);\n this.lastColumnPos = this.start;\n }\n return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)\n};\nStringStream.prototype.indentation = function () {\n return countColumn(this.string, null, this.tabSize) -\n (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)\n};\nStringStream.prototype.match = function (pattern, consume, caseInsensitive) {\n if (typeof pattern == \"string\") {\n var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; };\n var substr = this.string.substr(this.pos, pattern.length);\n if (cased(substr) == cased(pattern)) {\n if (consume !== false) { this.pos += pattern.length; }\n return true\n }\n } else {\n var match = this.string.slice(this.pos).match(pattern);\n if (match && match.index > 0) { return null }\n if (match && consume !== false) { this.pos += match[0].length; }\n return match\n }\n};\nStringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)};\nStringStream.prototype.hideFirstChars = function (n, inner) {\n this.lineStart += n;\n try { return inner() }\n finally { this.lineStart -= n; }\n};\nStringStream.prototype.lookAhead = function (n) {\n var oracle = this.lineOracle;\n return oracle && oracle.lookAhead(n)\n};\nStringStream.prototype.baseToken = function () {\n var oracle = this.lineOracle;\n return oracle && oracle.baseToken(this.pos)\n};\n\nvar SavedContext = function(state, lookAhead) {\n this.state = state;\n this.lookAhead = lookAhead;\n};\n\nvar Context = function(doc, state, line, lookAhead) {\n this.state = state;\n this.doc = doc;\n this.line = line;\n this.maxLookAhead = lookAhead || 0;\n this.baseTokens = null;\n this.baseTokenPos = 1;\n};\n\nContext.prototype.lookAhead = function (n) {\n var line = this.doc.getLine(this.line + n);\n if (line != null && n > this.maxLookAhead) { this.maxLookAhead = n; }\n return line\n};\n\nContext.prototype.baseToken = function (n) {\n var this$1 = this;\n\n if (!this.baseTokens) { return null }\n while (this.baseTokens[this.baseTokenPos] <= n)\n { this$1.baseTokenPos += 2; }\n var type = this.baseTokens[this.baseTokenPos + 1];\n return {type: type && type.replace(/( |^)overlay .*/, \"\"),\n size: this.baseTokens[this.baseTokenPos] - n}\n};\n\nContext.prototype.nextLine = function () {\n this.line++;\n if (this.maxLookAhead > 0) { this.maxLookAhead--; }\n};\n\nContext.fromSaved = function (doc, saved, line) {\n if (saved instanceof SavedContext)\n { return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead) }\n else\n { return new Context(doc, copyState(doc.mode, saved), line) }\n};\n\nContext.prototype.save = function (copy) {\n var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state;\n return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state\n};\n\n\n// Compute a style array (an array starting with a mode generation\n// -- for invalidation -- followed by pairs of end positions and\n// style strings), which is used to highlight the tokens on the\n// line.\nfunction highlightLine(cm, line, context, forceToEnd) {\n // A styles array always starts with a number identifying the\n // mode/overlays that it is based on (for easy invalidation).\n var st = [cm.state.modeGen], lineClasses = {};\n // Compute the base array of styles\n runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd);\n var state = context.state;\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n context.baseTokens = st;\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n context.state = true;\n runMode(cm, line.text, overlay.mode, context, function (end, style) {\n var start = i;\n // Ensure there's a token end at the current position, and that i points at it\n while (at < end) {\n var i_end = st[i];\n if (i_end > end)\n { st.splice(i, 1, end, st[i+1], i_end); }\n i += 2;\n at = Math.min(end, i_end);\n }\n if (!style) { return }\n if (overlay.opaque) {\n st.splice(start, i - start, end, \"overlay \" + style);\n i = start + 2;\n } else {\n for (; start < i; start += 2) {\n var cur = st[start+1];\n st[start+1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\n }\n }\n }, lineClasses);\n context.state = state;\n context.baseTokens = null;\n context.baseTokenPos = 1;\n };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n}\n\nfunction getLineStyles(cm, line, updateFrontier) {\n if (!line.styles || line.styles[0] != cm.state.modeGen) {\n var context = getContextBefore(cm, lineNo(line));\n var resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state);\n var result = highlightLine(cm, line, context);\n if (resetState) { context.state = resetState; }\n line.stateAfter = context.save(!resetState);\n line.styles = result.styles;\n if (result.classes) { line.styleClasses = result.classes; }\n else if (line.styleClasses) { line.styleClasses = null; }\n if (updateFrontier === cm.doc.highlightFrontier)\n { cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier); }\n }\n return line.styles\n}\n\nfunction getContextBefore(cm, n, precise) {\n var doc = cm.doc, display = cm.display;\n if (!doc.mode.startState) { return new Context(doc, true, n) }\n var start = findStartLine(cm, n, precise);\n var saved = start > doc.first && getLine(doc, start - 1).stateAfter;\n var context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start);\n\n doc.iter(start, n, function (line) {\n processLine(cm, line.text, context);\n var pos = context.line;\n line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null;\n context.nextLine();\n });\n if (precise) { doc.modeFrontier = context.line; }\n return context\n}\n\n// Lightweight form of highlight -- proceed over this line and\n// update state, but don't save a style array. Used for lines that\n// aren't currently visible.\nfunction processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n}\n\nfunction callBlankLine(mode, state) {\n if (mode.blankLine) { return mode.blankLine(state) }\n if (!mode.innerMode) { return }\n var inner = innerMode(mode, state);\n if (inner.mode.blankLine) { return inner.mode.blankLine(inner.state) }\n}\n\nfunction readToken(mode, stream, state, inner) {\n for (var i = 0; i < 10; i++) {\n if (inner) { inner[0] = innerMode(mode, state).mode; }\n var style = mode.token(stream, state);\n if (stream.pos > stream.start) { return style }\n }\n throw new Error(\"Mode \" + mode.name + \" failed to advance stream.\")\n}\n\nvar Token = function(stream, type, state) {\n this.start = stream.start; this.end = stream.pos;\n this.string = stream.current();\n this.type = type || null;\n this.state = state;\n};\n\n// Utility for getTokenAt and getLineTokens\nfunction takeToken(cm, pos, precise, asArray) {\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n if (asArray) { tokens = []; }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, context.state);\n if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n }\n return asArray ? tokens : new Token(stream, style, context.state)\n}\n\nfunction extractLineClasses(type, output) {\n if (type) { for (;;) {\n var lineClass = type.match(/(?:^|\\s+)line-(background-)?(\\S+)/);\n if (!lineClass) { break }\n type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);\n var prop = lineClass[1] ? \"bgClass\" : \"textClass\";\n if (output[prop] == null)\n { output[prop] = lineClass[2]; }\n else if (!(new RegExp(\"(?:^|\\s)\" + lineClass[2] + \"(?:$|\\s)\")).test(output[prop]))\n { output[prop] += \" \" + lineClass[2]; }\n } }\n return type\n}\n\n// Run the given mode's parser over a line, calling f for each token.\nfunction runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize, context), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000);\n f(pos, curStyle);\n curStart = pos;\n }\n}\n\n// Finds the line to start with when starting a parse. Tries to\n// find a line with a stateAfter, so that it can start with a\n// valid state. If that fails, it returns the line with the\n// smallest indentation, which tends to need the least context to\n// parse correctly.\nfunction findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1), after = line.stateAfter;\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline\n}\n\nfunction retreatFrontier(doc, n) {\n doc.modeFrontier = Math.min(doc.modeFrontier, n);\n if (doc.highlightFrontier < n - 10) { return }\n var start = doc.first;\n for (var line = n - 1; line > start; line--) {\n var saved = getLine(doc, line).stateAfter;\n // change is on 3\n // state on line 1 looked ahead 2 -- so saw 3\n // test 1 + 2 < 3 should cover this\n if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) {\n start = line + 1;\n break\n }\n }\n doc.highlightFrontier = Math.min(doc.highlightFrontier, start);\n}\n\n// LINE DATA STRUCTURE\n\n// Line objects. These hold state related to a line, including\n// highlighting info (the styles array).\nvar Line = function(text, markedSpans, estimateHeight) {\n this.text = text;\n attachMarkedSpans(this, markedSpans);\n this.height = estimateHeight ? estimateHeight(this) : 1;\n};\n\nLine.prototype.lineNo = function () { return lineNo(this) };\neventMixin(Line);\n\n// Change the content (text, markers) of a line. Automatically\n// invalidates cached information and tries to re-estimate the\n// line's height.\nfunction updateLine(line, text, markedSpans, estimateHeight) {\n line.text = text;\n if (line.stateAfter) { line.stateAfter = null; }\n if (line.styles) { line.styles = null; }\n if (line.order != null) { line.order = null; }\n detachMarkedSpans(line);\n attachMarkedSpans(line, markedSpans);\n var estHeight = estimateHeight ? estimateHeight(line) : 1;\n if (estHeight != line.height) { updateLineHeight(line, estHeight); }\n}\n\n// Detach a line from the document tree and its markers.\nfunction cleanUpLine(line) {\n line.parent = null;\n detachMarkedSpans(line);\n}\n\n// Convert a style as returned by a mode (either null, or a string\n// containing one or more styles) to a CSS style. This is cached,\n// and also looks for line-wide styles.\nvar styleToClassCache = {};\nvar styleToClassCacheWithMode = {};\nfunction interpretTokenStyle(style, options) {\n if (!style || /^\\s*$/.test(style)) { return null }\n var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;\n return cache[style] ||\n (cache[style] = style.replace(/\\S+/g, \"cm-$&\"))\n}\n\n// Render the DOM representation of the text of a line. Also builds\n// up a 'line map', which points at the DOM nodes that represent\n// specific stretches of text, and is used by the measuring code.\n// The returned object contains the DOM node, this map, and\n// information about line-wide styles that were set by the mode.\nfunction buildLineContent(cm, lineView) {\n // The padding-right forces the element to have a 'border', which\n // is needed on Webkit to be able to get line-level bounding\n // rectangles for it (in measureChar).\n var content = eltP(\"span\", null, null, webkit ? \"padding-right: .1px\" : null);\n var builder = {pre: eltP(\"pre\", [content], \"CodeMirror-line\"), content: content,\n col: 0, pos: 0, cm: cm,\n trailingSpace: false,\n splitSpaces: (ie || webkit) && cm.getOption(\"lineWrapping\")};\n lineView.measure = {};\n\n // Iterate over the logical lines that make up this visual line.\n for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {\n var line = i ? lineView.rest[i - 1] : lineView.line, order = (void 0);\n builder.pos = 0;\n builder.addToken = buildToken;\n // Optionally wire in some hacks into the token-rendering\n // algorithm, to deal with browser quirks.\n if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction)))\n { builder.addToken = buildTokenBadBidi(builder.addToken, order); }\n builder.map = [];\n var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);\n insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));\n if (line.styleClasses) {\n if (line.styleClasses.bgClass)\n { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || \"\"); }\n if (line.styleClasses.textClass)\n { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || \"\"); }\n }\n\n // Ensure at least a single node is present, for measuring.\n if (builder.map.length == 0)\n { builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); }\n\n // Store the map and a cache object for the current logical line\n if (i == 0) {\n lineView.measure.map = builder.map;\n lineView.measure.cache = {};\n } else {\n (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map)\n ;(lineView.measure.caches || (lineView.measure.caches = [])).push({});\n }\n }\n\n // See issue #2901\n if (webkit) {\n var last = builder.content.lastChild;\n if (/\\bcm-tab\\b/.test(last.className) || (last.querySelector && last.querySelector(\".cm-tab\")))\n { builder.content.className = \"cm-tab-wrap-hack\"; }\n }\n\n signal(cm, \"renderLine\", cm, lineView.line, builder.pre);\n if (builder.pre.className)\n { builder.textClass = joinClasses(builder.pre.className, builder.textClass || \"\"); }\n\n return builder\n}\n\nfunction defaultSpecialCharPlaceholder(ch) {\n var token = elt(\"span\", \"\\u2022\", \"cm-invalidchar\");\n token.title = \"\\\\u\" + ch.charCodeAt(0).toString(16);\n token.setAttribute(\"aria-label\", token.title);\n return token\n}\n\n// Build up the DOM representation for a single token, and add it to\n// the line map. Takes care to render special characters separately.\nfunction buildToken(builder, text, style, startStyle, endStyle, title, css) {\n if (!text) { return }\n var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text;\n var special = builder.cm.state.specialChars, mustWrap = false;\n var content;\n if (!special.test(text)) {\n builder.col += text.length;\n content = document.createTextNode(displayText);\n builder.map.push(builder.pos, builder.pos + text.length, content);\n if (ie && ie_version < 9) { mustWrap = true; }\n builder.pos += text.length;\n } else {\n content = document.createDocumentFragment();\n var pos = 0;\n while (true) {\n special.lastIndex = pos;\n var m = special.exec(text);\n var skipped = m ? m.index - pos : text.length - pos;\n if (skipped) {\n var txt = document.createTextNode(displayText.slice(pos, pos + skipped));\n if (ie && ie_version < 9) { content.appendChild(elt(\"span\", [txt])); }\n else { content.appendChild(txt); }\n builder.map.push(builder.pos, builder.pos + skipped, txt);\n builder.col += skipped;\n builder.pos += skipped;\n }\n if (!m) { break }\n pos += skipped + 1;\n var txt$1 = (void 0);\n if (m[0] == \"\\t\") {\n var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;\n txt$1 = content.appendChild(elt(\"span\", spaceStr(tabWidth), \"cm-tab\"));\n txt$1.setAttribute(\"role\", \"presentation\");\n txt$1.setAttribute(\"cm-text\", \"\\t\");\n builder.col += tabWidth;\n } else if (m[0] == \"\\r\" || m[0] == \"\\n\") {\n txt$1 = content.appendChild(elt(\"span\", m[0] == \"\\r\" ? \"\\u240d\" : \"\\u2424\", \"cm-invalidchar\"));\n txt$1.setAttribute(\"cm-text\", m[0]);\n builder.col += 1;\n } else {\n txt$1 = builder.cm.options.specialCharPlaceholder(m[0]);\n txt$1.setAttribute(\"cm-text\", m[0]);\n if (ie && ie_version < 9) { content.appendChild(elt(\"span\", [txt$1])); }\n else { content.appendChild(txt$1); }\n builder.col += 1;\n }\n builder.map.push(builder.pos, builder.pos + 1, txt$1);\n builder.pos++;\n }\n }\n builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32;\n if (style || startStyle || endStyle || mustWrap || css) {\n var fullStyle = style || \"\";\n if (startStyle) { fullStyle += startStyle; }\n if (endStyle) { fullStyle += endStyle; }\n var token = elt(\"span\", [content], fullStyle, css);\n if (title) { token.title = title; }\n return builder.content.appendChild(token)\n }\n builder.content.appendChild(content);\n}\n\nfunction splitSpaces(text, trailingBefore) {\n if (text.length > 1 && !/ /.test(text)) { return text }\n var spaceBefore = trailingBefore, result = \"\";\n for (var i = 0; i < text.length; i++) {\n var ch = text.charAt(i);\n if (ch == \" \" && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32))\n { ch = \"\\u00a0\"; }\n result += ch;\n spaceBefore = ch == \" \";\n }\n return result\n}\n\n// Work around nonsense dimensions being reported for stretches of\n// right-to-left text.\nfunction buildTokenBadBidi(inner, order) {\n return function (builder, text, style, startStyle, endStyle, title, css) {\n style = style ? style + \" cm-force-border\" : \"cm-force-border\";\n var start = builder.pos, end = start + text.length;\n for (;;) {\n // Find the part that overlaps with the start of this text\n var part = (void 0);\n for (var i = 0; i < order.length; i++) {\n part = order[i];\n if (part.to > start && part.from <= start) { break }\n }\n if (part.to >= end) { return inner(builder, text, style, startStyle, endStyle, title, css) }\n inner(builder, text.slice(0, part.to - start), style, startStyle, null, title, css);\n startStyle = null;\n text = text.slice(part.to - start);\n start = part.to;\n }\n }\n}\n\nfunction buildCollapsedSpan(builder, size, marker, ignoreWidget) {\n var widget = !ignoreWidget && marker.widgetNode;\n if (widget) { builder.map.push(builder.pos, builder.pos + size, widget); }\n if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {\n if (!widget)\n { widget = builder.content.appendChild(document.createElement(\"span\")); }\n widget.setAttribute(\"cm-marker\", marker.id);\n }\n if (widget) {\n builder.cm.display.input.setUneditable(widget);\n builder.content.appendChild(widget);\n }\n builder.pos += size;\n builder.trailingSpace = false;\n}\n\n// Outputs a number of spans to make up a line, taking highlighting\n// and marked text into account.\nfunction insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n if (m.title && !title) { title = m.title; }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n}\n\n\n// These objects are used to represent the visible (currently drawn)\n// part of the document. A LineView may correspond to multiple\n// logical lines, if those are connected by collapsed ranges.\nfunction LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n}\n\n// Create a range of LineView objects for the given lines.\nfunction buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n}\n\nvar operationGroup = null;\n\nfunction pushOperation(op) {\n if (operationGroup) {\n operationGroup.ops.push(op);\n } else {\n op.ownsGroup = operationGroup = {\n ops: [op],\n delayedCallbacks: []\n };\n }\n}\n\nfunction fireCallbacksForOps(group) {\n // Calls delayed callbacks and cursorActivity handlers until no\n // new ones appear\n var callbacks = group.delayedCallbacks, i = 0;\n do {\n for (; i < callbacks.length; i++)\n { callbacks[i].call(null); }\n for (var j = 0; j < group.ops.length; j++) {\n var op = group.ops[j];\n if (op.cursorActivityHandlers)\n { while (op.cursorActivityCalled < op.cursorActivityHandlers.length)\n { op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); } }\n }\n } while (i < callbacks.length)\n}\n\nfunction finishOperation(op, endCb) {\n var group = op.ownsGroup;\n if (!group) { return }\n\n try { fireCallbacksForOps(group); }\n finally {\n operationGroup = null;\n endCb(group);\n }\n}\n\nvar orphanDelayedCallbacks = null;\n\n// Often, we want to signal events at a point where we are in the\n// middle of some work, but don't want the handler to start calling\n// other methods on the editor, which might be in an inconsistent\n// state or simply not expect any other events to happen.\n// signalLater looks whether there are any handlers, and schedules\n// them to be executed when the last operation ends, or, if no\n// operation is active, when a timeout fires.\nfunction signalLater(emitter, type /*, values...*/) {\n var arr = getHandlers(emitter, type);\n if (!arr.length) { return }\n var args = Array.prototype.slice.call(arguments, 2), list;\n if (operationGroup) {\n list = operationGroup.delayedCallbacks;\n } else if (orphanDelayedCallbacks) {\n list = orphanDelayedCallbacks;\n } else {\n list = orphanDelayedCallbacks = [];\n setTimeout(fireOrphanDelayed, 0);\n }\n var loop = function ( i ) {\n list.push(function () { return arr[i].apply(null, args); });\n };\n\n for (var i = 0; i < arr.length; ++i)\n loop( i );\n}\n\nfunction fireOrphanDelayed() {\n var delayed = orphanDelayedCallbacks;\n orphanDelayedCallbacks = null;\n for (var i = 0; i < delayed.length; ++i) { delayed[i](); }\n}\n\n// When an aspect of a line changes, a string is added to\n// lineView.changes. This updates the relevant part of the line's\n// DOM structure.\nfunction updateLineForChanges(cm, lineView, lineN, dims) {\n for (var j = 0; j < lineView.changes.length; j++) {\n var type = lineView.changes[j];\n if (type == \"text\") { updateLineText(cm, lineView); }\n else if (type == \"gutter\") { updateLineGutter(cm, lineView, lineN, dims); }\n else if (type == \"class\") { updateLineClasses(cm, lineView); }\n else if (type == \"widget\") { updateLineWidgets(cm, lineView, dims); }\n }\n lineView.changes = null;\n}\n\n// Lines with gutter elements, widgets or a background class need to\n// be wrapped, and have the extra elements added to the wrapper div\nfunction ensureLineWrapped(lineView) {\n if (lineView.node == lineView.text) {\n lineView.node = elt(\"div\", null, null, \"position: relative\");\n if (lineView.text.parentNode)\n { lineView.text.parentNode.replaceChild(lineView.node, lineView.text); }\n lineView.node.appendChild(lineView.text);\n if (ie && ie_version < 8) { lineView.node.style.zIndex = 2; }\n }\n return lineView.node\n}\n\nfunction updateLineBackground(cm, lineView) {\n var cls = lineView.bgClass ? lineView.bgClass + \" \" + (lineView.line.bgClass || \"\") : lineView.line.bgClass;\n if (cls) { cls += \" CodeMirror-linebackground\"; }\n if (lineView.background) {\n if (cls) { lineView.background.className = cls; }\n else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }\n } else if (cls) {\n var wrap = ensureLineWrapped(lineView);\n lineView.background = wrap.insertBefore(elt(\"div\", null, cls), wrap.firstChild);\n cm.display.input.setUneditable(lineView.background);\n }\n}\n\n// Wrapper around buildLineContent which will reuse the structure\n// in display.externalMeasured when possible.\nfunction getLineContent(cm, lineView) {\n var ext = cm.display.externalMeasured;\n if (ext && ext.line == lineView.line) {\n cm.display.externalMeasured = null;\n lineView.measure = ext.measure;\n return ext.built\n }\n return buildLineContent(cm, lineView)\n}\n\n// Redraw the line's text. Interacts with the background and text\n// classes because the mode may output tokens that influence these\n// classes.\nfunction updateLineText(cm, lineView) {\n var cls = lineView.text.className;\n var built = getLineContent(cm, lineView);\n if (lineView.text == lineView.node) { lineView.node = built.pre; }\n lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n lineView.text = built.pre;\n if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n lineView.bgClass = built.bgClass;\n lineView.textClass = built.textClass;\n updateLineClasses(cm, lineView);\n } else if (cls) {\n lineView.text.className = cls;\n }\n}\n\nfunction updateLineClasses(cm, lineView) {\n updateLineBackground(cm, lineView);\n if (lineView.line.wrapClass)\n { ensureLineWrapped(lineView).className = lineView.line.wrapClass; }\n else if (lineView.node != lineView.text)\n { lineView.node.className = \"\"; }\n var textClass = lineView.textClass ? lineView.textClass + \" \" + (lineView.line.textClass || \"\") : lineView.line.textClass;\n lineView.text.className = textClass || \"\";\n}\n\nfunction updateLineGutter(cm, lineView, lineN, dims) {\n if (lineView.gutter) {\n lineView.node.removeChild(lineView.gutter);\n lineView.gutter = null;\n }\n if (lineView.gutterBackground) {\n lineView.node.removeChild(lineView.gutterBackground);\n lineView.gutterBackground = null;\n }\n if (lineView.line.gutterClass) {\n var wrap = ensureLineWrapped(lineView);\n lineView.gutterBackground = elt(\"div\", null, \"CodeMirror-gutter-background \" + lineView.line.gutterClass,\n (\"left: \" + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + \"px; width: \" + (dims.gutterTotalWidth) + \"px\"));\n cm.display.input.setUneditable(lineView.gutterBackground);\n wrap.insertBefore(lineView.gutterBackground, lineView.text);\n }\n var markers = lineView.line.gutterMarkers;\n if (cm.options.lineNumbers || markers) {\n var wrap$1 = ensureLineWrapped(lineView);\n var gutterWrap = lineView.gutter = elt(\"div\", null, \"CodeMirror-gutter-wrapper\", (\"left: \" + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + \"px\"));\n cm.display.input.setUneditable(gutterWrap);\n wrap$1.insertBefore(gutterWrap, lineView.text);\n if (lineView.line.gutterClass)\n { gutterWrap.className += \" \" + lineView.line.gutterClass; }\n if (cm.options.lineNumbers && (!markers || !markers[\"CodeMirror-linenumbers\"]))\n { lineView.lineNumber = gutterWrap.appendChild(\n elt(\"div\", lineNumberFor(cm.options, lineN),\n \"CodeMirror-linenumber CodeMirror-gutter-elt\",\n (\"left: \" + (dims.gutterLeft[\"CodeMirror-linenumbers\"]) + \"px; width: \" + (cm.display.lineNumInnerWidth) + \"px\"))); }\n if (markers) { for (var k = 0; k < cm.options.gutters.length; ++k) {\n var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id];\n if (found)\n { gutterWrap.appendChild(elt(\"div\", [found], \"CodeMirror-gutter-elt\",\n (\"left: \" + (dims.gutterLeft[id]) + \"px; width: \" + (dims.gutterWidth[id]) + \"px\"))); }\n } }\n }\n}\n\nfunction updateLineWidgets(cm, lineView, dims) {\n if (lineView.alignable) { lineView.alignable = null; }\n for (var node = lineView.node.firstChild, next = (void 0); node; node = next) {\n next = node.nextSibling;\n if (node.className == \"CodeMirror-linewidget\")\n { lineView.node.removeChild(node); }\n }\n insertLineWidgets(cm, lineView, dims);\n}\n\n// Build a line's DOM representation from scratch\nfunction buildLineElement(cm, lineView, lineN, dims) {\n var built = getLineContent(cm, lineView);\n lineView.text = lineView.node = built.pre;\n if (built.bgClass) { lineView.bgClass = built.bgClass; }\n if (built.textClass) { lineView.textClass = built.textClass; }\n\n updateLineClasses(cm, lineView);\n updateLineGutter(cm, lineView, lineN, dims);\n insertLineWidgets(cm, lineView, dims);\n return lineView.node\n}\n\n// A lineView may contain multiple logical lines (when merged by\n// collapsed spans). The widgets for all of them need to be drawn.\nfunction insertLineWidgets(cm, lineView, dims) {\n insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);\n if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)\n { insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); } }\n}\n\nfunction insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {\n if (!line.widgets) { return }\n var wrap = ensureLineWrapped(lineView);\n for (var i = 0, ws = line.widgets; i < ws.length; ++i) {\n var widget = ws[i], node = elt(\"div\", [widget.node], \"CodeMirror-linewidget\");\n if (!widget.handleMouseEvents) { node.setAttribute(\"cm-ignore-events\", \"true\"); }\n positionLineWidget(widget, node, lineView, dims);\n cm.display.input.setUneditable(node);\n if (allowAbove && widget.above)\n { wrap.insertBefore(node, lineView.gutter || lineView.text); }\n else\n { wrap.appendChild(node); }\n signalLater(widget, \"redraw\");\n }\n}\n\nfunction positionLineWidget(widget, node, lineView, dims) {\n if (widget.noHScroll) {\n (lineView.alignable || (lineView.alignable = [])).push(node);\n var width = dims.wrapperWidth;\n node.style.left = dims.fixedPos + \"px\";\n if (!widget.coverGutter) {\n width -= dims.gutterTotalWidth;\n node.style.paddingLeft = dims.gutterTotalWidth + \"px\";\n }\n node.style.width = width + \"px\";\n }\n if (widget.coverGutter) {\n node.style.zIndex = 5;\n node.style.position = \"relative\";\n if (!widget.noHScroll) { node.style.marginLeft = -dims.gutterTotalWidth + \"px\"; }\n }\n}\n\nfunction widgetHeight(widget) {\n if (widget.height != null) { return widget.height }\n var cm = widget.doc.cm;\n if (!cm) { return 0 }\n if (!contains(document.body, widget.node)) {\n var parentStyle = \"position: relative;\";\n if (widget.coverGutter)\n { parentStyle += \"margin-left: -\" + cm.display.gutters.offsetWidth + \"px;\"; }\n if (widget.noHScroll)\n { parentStyle += \"width: \" + cm.display.wrapper.clientWidth + \"px;\"; }\n removeChildrenAndAdd(cm.display.measure, elt(\"div\", [widget.node], null, parentStyle));\n }\n return widget.height = widget.node.parentNode.offsetHeight\n}\n\n// Return true when the given mouse event happened in a widget\nfunction eventInWidget(display, e) {\n for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {\n if (!n || (n.nodeType == 1 && n.getAttribute(\"cm-ignore-events\") == \"true\") ||\n (n.parentNode == display.sizer && n != display.mover))\n { return true }\n }\n}\n\n// POSITION MEASUREMENT\n\nfunction paddingTop(display) {return display.lineSpace.offsetTop}\nfunction paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight}\nfunction paddingH(display) {\n if (display.cachedPaddingH) { return display.cachedPaddingH }\n var e = removeChildrenAndAdd(display.measure, elt(\"pre\", \"x\"));\n var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;\n var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};\n if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data; }\n return data\n}\n\nfunction scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth }\nfunction displayWidth(cm) {\n return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth\n}\nfunction displayHeight(cm) {\n return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight\n}\n\n// Ensure the lineView.wrapping.heights array is populated. This is\n// an array of bottom offsets for the lines that make up a drawn\n// line. When lineWrapping is on, there might be more than one\n// height.\nfunction ensureLineHeights(cm, lineView, rect) {\n var wrapping = cm.options.lineWrapping;\n var curWidth = wrapping && displayWidth(cm);\n if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {\n var heights = lineView.measure.heights = [];\n if (wrapping) {\n lineView.measure.width = curWidth;\n var rects = lineView.text.firstChild.getClientRects();\n for (var i = 0; i < rects.length - 1; i++) {\n var cur = rects[i], next = rects[i + 1];\n if (Math.abs(cur.bottom - next.bottom) > 2)\n { heights.push((cur.bottom + next.top) / 2 - rect.top); }\n }\n }\n heights.push(rect.bottom - rect.top);\n }\n}\n\n// Find a line map (mapping character offsets to text nodes) and a\n// measurement cache for the given line number. (A line view might\n// contain multiple lines when collapsed ranges are present.)\nfunction mapFromLineView(lineView, line, lineN) {\n if (lineView.line == line)\n { return {map: lineView.measure.map, cache: lineView.measure.cache} }\n for (var i = 0; i < lineView.rest.length; i++)\n { if (lineView.rest[i] == line)\n { return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]} } }\n for (var i$1 = 0; i$1 < lineView.rest.length; i$1++)\n { if (lineNo(lineView.rest[i$1]) > lineN)\n { return {map: lineView.measure.maps[i$1], cache: lineView.measure.caches[i$1], before: true} } }\n}\n\n// Render a line into the hidden node display.externalMeasured. Used\n// when measurement is needed for a line that's not in the viewport.\nfunction updateExternalMeasurement(cm, line) {\n line = visualLine(line);\n var lineN = lineNo(line);\n var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);\n view.lineN = lineN;\n var built = view.built = buildLineContent(cm, view);\n view.text = built.pre;\n removeChildrenAndAdd(cm.display.lineMeasure, built.pre);\n return view\n}\n\n// Get a {top, bottom, left, right} box (in line-local coordinates)\n// for a given character.\nfunction measureChar(cm, line, ch, bias) {\n return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias)\n}\n\n// Find a line view that corresponds to the given line number.\nfunction findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n}\n\n// Measurement can be split in two steps, the set-up work that\n// applies to the whole line, and the measurement of the actual\n// character. Functions like coordsChar, that need to do a lot of\n// measurements in a row, can thus ensure that the set-up work is\n// only done once.\nfunction prepareMeasureForLine(cm, line) {\n var lineN = lineNo(line);\n var view = findViewForLine(cm, lineN);\n if (view && !view.text) {\n view = null;\n } else if (view && view.changes) {\n updateLineForChanges(cm, view, lineN, getDimensions(cm));\n cm.curOp.forceUpdate = true;\n }\n if (!view)\n { view = updateExternalMeasurement(cm, line); }\n\n var info = mapFromLineView(view, line, lineN);\n return {\n line: line, view: view, rect: null,\n map: info.map, cache: info.cache, before: info.before,\n hasHeights: false\n }\n}\n\n// Given a prepared measurement object, measures the position of an\n// actual character (or fetches it from the cache).\nfunction measureCharPrepared(cm, prepared, ch, bias, varHeight) {\n if (prepared.before) { ch = -1; }\n var key = ch + (bias || \"\"), found;\n if (prepared.cache.hasOwnProperty(key)) {\n found = prepared.cache[key];\n } else {\n if (!prepared.rect)\n { prepared.rect = prepared.view.text.getBoundingClientRect(); }\n if (!prepared.hasHeights) {\n ensureLineHeights(cm, prepared.view, prepared.rect);\n prepared.hasHeights = true;\n }\n found = measureCharInner(cm, prepared, ch, bias);\n if (!found.bogus) { prepared.cache[key] = found; }\n }\n return {left: found.left, right: found.right,\n top: varHeight ? found.rtop : found.top,\n bottom: varHeight ? found.rbottom : found.bottom}\n}\n\nvar nullRect = {left: 0, right: 0, top: 0, bottom: 0};\n\nfunction nodeAndOffsetInLineMap(map$$1, ch, bias) {\n var node, start, end, collapse, mStart, mEnd;\n // First, search the line map for the text node corresponding to,\n // or closest to, the target character.\n for (var i = 0; i < map$$1.length; i += 3) {\n mStart = map$$1[i];\n mEnd = map$$1[i + 1];\n if (ch < mStart) {\n start = 0; end = 1;\n collapse = \"left\";\n } else if (ch < mEnd) {\n start = ch - mStart;\n end = start + 1;\n } else if (i == map$$1.length - 3 || ch == mEnd && map$$1[i + 3] > ch) {\n end = mEnd - mStart;\n start = end - 1;\n if (ch >= mEnd) { collapse = \"right\"; }\n }\n if (start != null) {\n node = map$$1[i + 2];\n if (mStart == mEnd && bias == (node.insertLeft ? \"left\" : \"right\"))\n { collapse = bias; }\n if (bias == \"left\" && start == 0)\n { while (i && map$$1[i - 2] == map$$1[i - 3] && map$$1[i - 1].insertLeft) {\n node = map$$1[(i -= 3) + 2];\n collapse = \"left\";\n } }\n if (bias == \"right\" && start == mEnd - mStart)\n { while (i < map$$1.length - 3 && map$$1[i + 3] == map$$1[i + 4] && !map$$1[i + 5].insertLeft) {\n node = map$$1[(i += 3) + 2];\n collapse = \"right\";\n } }\n break\n }\n }\n return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd}\n}\n\nfunction getUsefulRect(rects, bias) {\n var rect = nullRect;\n if (bias == \"left\") { for (var i = 0; i < rects.length; i++) {\n if ((rect = rects[i]).left != rect.right) { break }\n } } else { for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) {\n if ((rect = rects[i$1]).left != rect.right) { break }\n } }\n return rect\n}\n\nfunction measureCharInner(cm, prepared, ch, bias) {\n var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);\n var node = place.node, start = place.start, end = place.end, collapse = place.collapse;\n\n var rect;\n if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.\n for (var i$1 = 0; i$1 < 4; i$1++) { // Retry a maximum of 4 times when nonsense rectangles are returned\n while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) { --start; }\n while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) { ++end; }\n if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart)\n { rect = node.parentNode.getBoundingClientRect(); }\n else\n { rect = getUsefulRect(range(node, start, end).getClientRects(), bias); }\n if (rect.left || rect.right || start == 0) { break }\n end = start;\n start = start - 1;\n collapse = \"right\";\n }\n if (ie && ie_version < 11) { rect = maybeUpdateRectForZooming(cm.display.measure, rect); }\n } else { // If it is a widget, simply get the box for the whole widget.\n if (start > 0) { collapse = bias = \"right\"; }\n var rects;\n if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)\n { rect = rects[bias == \"right\" ? rects.length - 1 : 0]; }\n else\n { rect = node.getBoundingClientRect(); }\n }\n if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {\n var rSpan = node.parentNode.getClientRects()[0];\n if (rSpan)\n { rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; }\n else\n { rect = nullRect; }\n }\n\n var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;\n var mid = (rtop + rbot) / 2;\n var heights = prepared.view.measure.heights;\n var i = 0;\n for (; i < heights.length - 1; i++)\n { if (mid < heights[i]) { break } }\n var top = i ? heights[i - 1] : 0, bot = heights[i];\n var result = {left: (collapse == \"right\" ? rect.right : rect.left) - prepared.rect.left,\n right: (collapse == \"left\" ? rect.left : rect.right) - prepared.rect.left,\n top: top, bottom: bot};\n if (!rect.left && !rect.right) { result.bogus = true; }\n if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }\n\n return result\n}\n\n// Work around problem with bounding client rects on ranges being\n// returned incorrectly when zoomed on IE10 and below.\nfunction maybeUpdateRectForZooming(measure, rect) {\n if (!window.screen || screen.logicalXDPI == null ||\n screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))\n { return rect }\n var scaleX = screen.logicalXDPI / screen.deviceXDPI;\n var scaleY = screen.logicalYDPI / screen.deviceYDPI;\n return {left: rect.left * scaleX, right: rect.right * scaleX,\n top: rect.top * scaleY, bottom: rect.bottom * scaleY}\n}\n\nfunction clearLineMeasurementCacheFor(lineView) {\n if (lineView.measure) {\n lineView.measure.cache = {};\n lineView.measure.heights = null;\n if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)\n { lineView.measure.caches[i] = {}; } }\n }\n}\n\nfunction clearLineMeasurementCache(cm) {\n cm.display.externalMeasure = null;\n removeChildren(cm.display.lineMeasure);\n for (var i = 0; i < cm.display.view.length; i++)\n { clearLineMeasurementCacheFor(cm.display.view[i]); }\n}\n\nfunction clearCaches(cm) {\n clearLineMeasurementCache(cm);\n cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;\n if (!cm.options.lineWrapping) { cm.display.maxLineChanged = true; }\n cm.display.lineNumChars = null;\n}\n\nfunction pageScrollX() {\n // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206\n // which causes page_Offset and bounding client rects to use\n // different reference viewports and invalidate our calculations.\n if (chrome && android) { return -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft)) }\n return window.pageXOffset || (document.documentElement || document.body).scrollLeft\n}\nfunction pageScrollY() {\n if (chrome && android) { return -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop)) }\n return window.pageYOffset || (document.documentElement || document.body).scrollTop\n}\n\nfunction widgetTopHeight(lineObj) {\n var height = 0;\n if (lineObj.widgets) { for (var i = 0; i < lineObj.widgets.length; ++i) { if (lineObj.widgets[i].above)\n { height += widgetHeight(lineObj.widgets[i]); } } }\n return height\n}\n\n// Converts a {top, bottom, left, right} box from line-local\n// coordinates into another coordinate system. Context may be one of\n// \"line\", \"div\" (display.lineDiv), \"local\"./null (editor), \"window\",\n// or \"page\".\nfunction intoCoordSystem(cm, lineObj, rect, context, includeWidgets) {\n if (!includeWidgets) {\n var height = widgetTopHeight(lineObj);\n rect.top += height; rect.bottom += height;\n }\n if (context == \"line\") { return rect }\n if (!context) { context = \"local\"; }\n var yOff = heightAtLine(lineObj);\n if (context == \"local\") { yOff += paddingTop(cm.display); }\n else { yOff -= cm.display.viewOffset; }\n if (context == \"page\" || context == \"window\") {\n var lOff = cm.display.lineSpace.getBoundingClientRect();\n yOff += lOff.top + (context == \"window\" ? 0 : pageScrollY());\n var xOff = lOff.left + (context == \"window\" ? 0 : pageScrollX());\n rect.left += xOff; rect.right += xOff;\n }\n rect.top += yOff; rect.bottom += yOff;\n return rect\n}\n\n// Coverts a box from \"div\" coords to another coordinate system.\n// Context may be \"window\", \"page\", \"div\", or \"local\"./null.\nfunction fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n}\n\nfunction charCoords(cm, pos, context, lineObj, bias) {\n if (!lineObj) { lineObj = getLine(cm.doc, pos.line); }\n return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context)\n}\n\n// Returns a box for a given cursor position, which may have an\n// 'other' property containing the position of the secondary cursor\n// on a bidi boundary.\n// A cursor Pos(line, char, \"before\") is on the same visual line as `char - 1`\n// and after `char - 1` in writing order of `char - 1`\n// A cursor Pos(line, char, \"after\") is on the same visual line as `char`\n// and before `char` in writing order of `char`\n// Examples (upper-case letters are RTL, lower-case are LTR):\n// Pos(0, 1, ...)\n// before after\n// ab a|b a|b\n// aB a|B aB|\n// Ab |Ab A|b\n// AB B|A B|A\n// Every position after the last character on a line is considered to stick\n// to the last character on the line.\nfunction cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {\n lineObj = lineObj || getLine(cm.doc, pos.line);\n if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }\n function get(ch, right) {\n var m = measureCharPrepared(cm, preparedMeasure, ch, right ? \"right\" : \"left\", varHeight);\n if (right) { m.left = m.right; } else { m.right = m.left; }\n return intoCoordSystem(cm, lineObj, m, context)\n }\n var order = getOrder(lineObj, cm.doc.direction), ch = pos.ch, sticky = pos.sticky;\n if (ch >= lineObj.text.length) {\n ch = lineObj.text.length;\n sticky = \"before\";\n } else if (ch <= 0) {\n ch = 0;\n sticky = \"after\";\n }\n if (!order) { return get(sticky == \"before\" ? ch - 1 : ch, sticky == \"before\") }\n\n function getBidi(ch, partPos, invert) {\n var part = order[partPos], right = part.level == 1;\n return get(invert ? ch - 1 : ch, right != invert)\n }\n var partPos = getBidiPartAt(order, ch, sticky);\n var other = bidiOther;\n var val = getBidi(ch, partPos, sticky == \"before\");\n if (other != null) { val.other = getBidi(ch, other, sticky != \"before\"); }\n return val\n}\n\n// Used to cheaply estimate the coordinates for a position. Used for\n// intermediate scroll updates.\nfunction estimateCoords(cm, pos) {\n var left = 0;\n pos = clipPos(cm.doc, pos);\n if (!cm.options.lineWrapping) { left = charWidth(cm.display) * pos.ch; }\n var lineObj = getLine(cm.doc, pos.line);\n var top = heightAtLine(lineObj) + paddingTop(cm.display);\n return {left: left, right: left, top: top, bottom: top + lineObj.height}\n}\n\n// Positions returned by coordsChar contain some extra information.\n// xRel is the relative x position of the input coordinates compared\n// to the found position (so xRel > 0 means the coordinates are to\n// the right of the character position, for example). When outside\n// is true, that means the coordinates lie outside the line's\n// vertical range.\nfunction PosWithInfo(line, ch, sticky, outside, xRel) {\n var pos = Pos(line, ch, sticky);\n pos.xRel = xRel;\n if (outside) { pos.outside = true; }\n return pos\n}\n\n// Compute the character position closest to the given coordinates.\n// Input must be lineSpace-local (\"div\" coordinate system).\nfunction coordsChar(cm, x, y) {\n var doc = cm.doc;\n y += cm.display.viewOffset;\n if (y < 0) { return PosWithInfo(doc.first, 0, null, true, -1) }\n var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;\n if (lineN > last)\n { return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, true, 1) }\n if (x < 0) { x = 0; }\n\n var lineObj = getLine(doc, lineN);\n for (;;) {\n var found = coordsCharInner(cm, lineObj, lineN, x, y);\n var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 ? 1 : 0));\n if (!collapsed) { return found }\n var rangeEnd = collapsed.find(1);\n if (rangeEnd.line == lineN) { return rangeEnd }\n lineObj = getLine(doc, lineN = rangeEnd.line);\n }\n}\n\nfunction wrappedLineExtent(cm, lineObj, preparedMeasure, y) {\n y -= widgetTopHeight(lineObj);\n var end = lineObj.text.length;\n var begin = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y; }, end, 0);\n end = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch).top > y; }, begin, end);\n return {begin: begin, end: end}\n}\n\nfunction wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) {\n if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }\n var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), \"line\").top;\n return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop)\n}\n\n// Returns true if the given side of a box is after the given\n// coordinates, in top-to-bottom, left-to-right order.\nfunction boxIsAfter(box, x, y, left) {\n return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x\n}\n\nfunction coordsCharInner(cm, lineObj, lineNo$$1, x, y) {\n // Move y into line-local coordinate space\n y -= heightAtLine(lineObj);\n var preparedMeasure = prepareMeasureForLine(cm, lineObj);\n // When directly calling `measureCharPrepared`, we have to adjust\n // for the widgets at this line.\n var widgetHeight$$1 = widgetTopHeight(lineObj);\n var begin = 0, end = lineObj.text.length, ltr = true;\n\n var order = getOrder(lineObj, cm.doc.direction);\n // If the line isn't plain left-to-right text, first figure out\n // which bidi section the coordinates fall into.\n if (order) {\n var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart)\n (cm, lineObj, lineNo$$1, preparedMeasure, order, x, y);\n ltr = part.level != 1;\n // The awkward -1 offsets are needed because findFirst (called\n // on these below) will treat its first bound as inclusive,\n // second as exclusive, but we want to actually address the\n // characters in the part's range\n begin = ltr ? part.from : part.to - 1;\n end = ltr ? part.to : part.from - 1;\n }\n\n // A binary search to find the first character whose bounding box\n // starts after the coordinates. If we run across any whose box wrap\n // the coordinates, store that.\n var chAround = null, boxAround = null;\n var ch = findFirst(function (ch) {\n var box = measureCharPrepared(cm, preparedMeasure, ch);\n box.top += widgetHeight$$1; box.bottom += widgetHeight$$1;\n if (!boxIsAfter(box, x, y, false)) { return false }\n if (box.top <= y && box.left <= x) {\n chAround = ch;\n boxAround = box;\n }\n return true\n }, begin, end);\n\n var baseX, sticky, outside = false;\n // If a box around the coordinates was found, use that\n if (boxAround) {\n // Distinguish coordinates nearer to the left or right side of the box\n var atLeft = x - boxAround.left < boxAround.right - x, atStart = atLeft == ltr;\n ch = chAround + (atStart ? 0 : 1);\n sticky = atStart ? \"after\" : \"before\";\n baseX = atLeft ? boxAround.left : boxAround.right;\n } else {\n // (Adjust for extended bound, if necessary.)\n if (!ltr && (ch == end || ch == begin)) { ch++; }\n // To determine which side to associate with, get the box to the\n // left of the character and compare it's vertical position to the\n // coordinates\n sticky = ch == 0 ? \"after\" : ch == lineObj.text.length ? \"before\" :\n (measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight$$1 <= y) == ltr ?\n \"after\" : \"before\";\n // Now get accurate coordinates for this place, in order to get a\n // base X position\n var coords = cursorCoords(cm, Pos(lineNo$$1, ch, sticky), \"line\", lineObj, preparedMeasure);\n baseX = coords.left;\n outside = y < coords.top || y >= coords.bottom;\n }\n\n ch = skipExtendingChars(lineObj.text, ch, 1);\n return PosWithInfo(lineNo$$1, ch, sticky, outside, x - baseX)\n}\n\nfunction coordsBidiPart(cm, lineObj, lineNo$$1, preparedMeasure, order, x, y) {\n // Bidi parts are sorted left-to-right, and in a non-line-wrapping\n // situation, we can take this ordering to correspond to the visual\n // ordering. This finds the first part whose end is after the given\n // coordinates.\n var index = findFirst(function (i) {\n var part = order[i], ltr = part.level != 1;\n return boxIsAfter(cursorCoords(cm, Pos(lineNo$$1, ltr ? part.to : part.from, ltr ? \"before\" : \"after\"),\n \"line\", lineObj, preparedMeasure), x, y, true)\n }, 0, order.length - 1);\n var part = order[index];\n // If this isn't the first part, the part's start is also after\n // the coordinates, and the coordinates aren't on the same line as\n // that start, move one part back.\n if (index > 0) {\n var ltr = part.level != 1;\n var start = cursorCoords(cm, Pos(lineNo$$1, ltr ? part.from : part.to, ltr ? \"after\" : \"before\"),\n \"line\", lineObj, preparedMeasure);\n if (boxIsAfter(start, x, y, true) && start.top > y)\n { part = order[index - 1]; }\n }\n return part\n}\n\nfunction coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) {\n // In a wrapped line, rtl text on wrapping boundaries can do things\n // that don't correspond to the ordering in our `order` array at\n // all, so a binary search doesn't work, and we want to return a\n // part that only spans one line so that the binary search in\n // coordsCharInner is safe. As such, we first find the extent of the\n // wrapped line, and then do a flat search in which we discard any\n // spans that aren't on the line.\n var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y);\n var begin = ref.begin;\n var end = ref.end;\n if (/\\s/.test(lineObj.text.charAt(end - 1))) { end--; }\n var part = null, closestDist = null;\n for (var i = 0; i < order.length; i++) {\n var p = order[i];\n if (p.from >= end || p.to <= begin) { continue }\n var ltr = p.level != 1;\n var endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right;\n // Weigh against spans ending before this, so that they are only\n // picked if nothing ends after\n var dist = endX < x ? x - endX + 1e9 : endX - x;\n if (!part || closestDist > dist) {\n part = p;\n closestDist = dist;\n }\n }\n if (!part) { part = order[order.length - 1]; }\n // Clip the part to the wrapped line.\n if (part.from < begin) { part = {from: begin, to: part.to, level: part.level}; }\n if (part.to > end) { part = {from: part.from, to: end, level: part.level}; }\n return part\n}\n\nvar measureText;\n// Compute the default text height.\nfunction textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n}\n\n// Compute the default character width.\nfunction charWidth(display) {\n if (display.cachedCharWidth != null) { return display.cachedCharWidth }\n var anchor = elt(\"span\", \"xxxxxxxxxx\");\n var pre = elt(\"pre\", [anchor]);\n removeChildrenAndAdd(display.measure, pre);\n var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n if (width > 2) { display.cachedCharWidth = width; }\n return width || 10\n}\n\n// Do a bulk-read of the DOM positions and sizes needed to draw the\n// view, so that we don't interleave reading and writing to the DOM.\nfunction getDimensions(cm) {\n var d = cm.display, left = {}, width = {};\n var gutterLeft = d.gutters.clientLeft;\n for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {\n left[cm.options.gutters[i]] = n.offsetLeft + n.clientLeft + gutterLeft;\n width[cm.options.gutters[i]] = n.clientWidth;\n }\n return {fixedPos: compensateForHScroll(d),\n gutterTotalWidth: d.gutters.offsetWidth,\n gutterLeft: left,\n gutterWidth: width,\n wrapperWidth: d.wrapper.clientWidth}\n}\n\n// Computes display.scroller.scrollLeft + display.gutters.offsetWidth,\n// but using getBoundingClientRect to get a sub-pixel-accurate\n// result.\nfunction compensateForHScroll(display) {\n return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left\n}\n\n// Returns a function that estimates the height of a line, to use as\n// first approximation until the line becomes visible (and is thus\n// properly measurable).\nfunction estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n}\n\nfunction estimateLineHeights(cm) {\n var doc = cm.doc, est = estimateHeight(cm);\n doc.iter(function (line) {\n var estHeight = est(line);\n if (estHeight != line.height) { updateLineHeight(line, estHeight); }\n });\n}\n\n// Given a mouse event, find the corresponding position. If liberal\n// is false, it checks whether a gutter or scrollbar was clicked,\n// and returns null if it was. forRect is used by rectangular\n// selections, and tries to estimate a character position even for\n// coordinates beyond the right of the text.\nfunction posFromMouse(cm, e, liberal, forRect) {\n var display = cm.display;\n if (!liberal && e_target(e).getAttribute(\"cm-not-content\") == \"true\") { return null }\n\n var x, y, space = display.lineSpace.getBoundingClientRect();\n // Fails unpredictably on IE[67] when mouse is dragged around quickly.\n try { x = e.clientX - space.left; y = e.clientY - space.top; }\n catch (e) { return null }\n var coords = coordsChar(cm, x, y), line;\n if (forRect && coords.xRel == 1 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {\n var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;\n coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));\n }\n return coords\n}\n\n// Find the view element corresponding to a given line. Return null\n// when the line isn't visible.\nfunction findViewIndex(cm, n) {\n if (n >= cm.display.viewTo) { return null }\n n -= cm.display.viewFrom;\n if (n < 0) { return null }\n var view = cm.display.view;\n for (var i = 0; i < view.length; i++) {\n n -= view[i].size;\n if (n < 0) { return i }\n }\n}\n\nfunction updateSelection(cm) {\n cm.display.input.showSelection(cm.display.input.prepareSelection());\n}\n\nfunction prepareSelection(cm, primary) {\n if ( primary === void 0 ) primary = true;\n\n var doc = cm.doc, result = {};\n var curFragment = result.cursors = document.createDocumentFragment();\n var selFragment = result.selection = document.createDocumentFragment();\n\n for (var i = 0; i < doc.sel.ranges.length; i++) {\n if (!primary && i == doc.sel.primIndex) { continue }\n var range$$1 = doc.sel.ranges[i];\n if (range$$1.from().line >= cm.display.viewTo || range$$1.to().line < cm.display.viewFrom) { continue }\n var collapsed = range$$1.empty();\n if (collapsed || cm.options.showCursorWhenSelecting)\n { drawSelectionCursor(cm, range$$1.head, curFragment); }\n if (!collapsed)\n { drawSelectionRange(cm, range$$1, selFragment); }\n }\n return result\n}\n\n// Draws a cursor for the given range\nfunction drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n}\n\nfunction cmpCoords(a, b) { return a.top - b.top || a.left - b.left }\n\n// Draws the given range as a highlighted selection\nfunction drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n}\n\n// Cursor-blinking\nfunction restartBlink(cm) {\n if (!cm.state.focused) { return }\n var display = cm.display;\n clearInterval(display.blinker);\n var on = true;\n display.cursorDiv.style.visibility = \"\";\n if (cm.options.cursorBlinkRate > 0)\n { display.blinker = setInterval(function () { return display.cursorDiv.style.visibility = (on = !on) ? \"\" : \"hidden\"; },\n cm.options.cursorBlinkRate); }\n else if (cm.options.cursorBlinkRate < 0)\n { display.cursorDiv.style.visibility = \"hidden\"; }\n}\n\nfunction ensureFocus(cm) {\n if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); }\n}\n\nfunction delayBlurEvent(cm) {\n cm.state.delayingBlurEvent = true;\n setTimeout(function () { if (cm.state.delayingBlurEvent) {\n cm.state.delayingBlurEvent = false;\n onBlur(cm);\n } }, 100);\n}\n\nfunction onFocus(cm, e) {\n if (cm.state.delayingBlurEvent) { cm.state.delayingBlurEvent = false; }\n\n if (cm.options.readOnly == \"nocursor\") { return }\n if (!cm.state.focused) {\n signal(cm, \"focus\", cm, e);\n cm.state.focused = true;\n addClass(cm.display.wrapper, \"CodeMirror-focused\");\n // This test prevents this from firing when a context\n // menu is closed (since the input reset would kill the\n // select-all detection hack)\n if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {\n cm.display.input.reset();\n if (webkit) { setTimeout(function () { return cm.display.input.reset(true); }, 20); } // Issue #1730\n }\n cm.display.input.receivedFocus();\n }\n restartBlink(cm);\n}\nfunction onBlur(cm, e) {\n if (cm.state.delayingBlurEvent) { return }\n\n if (cm.state.focused) {\n signal(cm, \"blur\", cm, e);\n cm.state.focused = false;\n rmClass(cm.display.wrapper, \"CodeMirror-focused\");\n }\n clearInterval(cm.display.blinker);\n setTimeout(function () { if (!cm.state.focused) { cm.display.shift = false; } }, 150);\n}\n\n// Read the actual heights of the rendered lines, and update their\n// stored heights to match.\nfunction updateHeightsInViewport(cm) {\n var display = cm.display;\n var prevBottom = display.lineDiv.offsetTop;\n for (var i = 0; i < display.view.length; i++) {\n var cur = display.view[i], height = (void 0);\n if (cur.hidden) { continue }\n if (ie && ie_version < 8) {\n var bot = cur.node.offsetTop + cur.node.offsetHeight;\n height = bot - prevBottom;\n prevBottom = bot;\n } else {\n var box = cur.node.getBoundingClientRect();\n height = box.bottom - box.top;\n }\n var diff = cur.line.height - height;\n if (height < 2) { height = textHeight(display); }\n if (diff > .005 || diff < -.005) {\n updateLineHeight(cur.line, height);\n updateWidgetHeight(cur.line);\n if (cur.rest) { for (var j = 0; j < cur.rest.length; j++)\n { updateWidgetHeight(cur.rest[j]); } }\n }\n }\n}\n\n// Read and store the height of line widgets associated with the\n// given line.\nfunction updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n}\n\n// Compute the lines that are visible in a given viewport (defaults\n// the the current scroll position). viewport may contain top,\n// height, and ensure (see op.scrollToPos) properties.\nfunction visibleLines(display, doc, viewport) {\n var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;\n top = Math.floor(top - paddingTop(display));\n var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;\n\n var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);\n // Ensure is a {from: {line, ch}, to: {line, ch}} object, and\n // forces those lines into the viewport (if possible).\n if (viewport && viewport.ensure) {\n var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line;\n if (ensureFrom < from) {\n from = ensureFrom;\n to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);\n } else if (Math.min(ensureTo, doc.lastLine()) >= to) {\n from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);\n to = ensureTo;\n }\n }\n return {from: from, to: Math.max(to, from + 1)}\n}\n\n// Re-align line numbers and gutter marks to compensate for\n// horizontal scrolling.\nfunction alignHorizontally(cm) {\n var display = cm.display, view = display.view;\n if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return }\n var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;\n var gutterW = display.gutters.offsetWidth, left = comp + \"px\";\n for (var i = 0; i < view.length; i++) { if (!view[i].hidden) {\n if (cm.options.fixedGutter) {\n if (view[i].gutter)\n { view[i].gutter.style.left = left; }\n if (view[i].gutterBackground)\n { view[i].gutterBackground.style.left = left; }\n }\n var align = view[i].alignable;\n if (align) { for (var j = 0; j < align.length; j++)\n { align[j].style.left = left; } }\n } }\n if (cm.options.fixedGutter)\n { display.gutters.style.left = (comp + gutterW) + \"px\"; }\n}\n\n// Used to ensure that the line number gutter is still the right\n// size for the current document size. Returns true when an update\n// is needed.\nfunction maybeUpdateLineNumberWidth(cm) {\n if (!cm.options.lineNumbers) { return false }\n var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;\n if (last.length != display.lineNumChars) {\n var test = display.measure.appendChild(elt(\"div\", [elt(\"div\", last)],\n \"CodeMirror-linenumber CodeMirror-gutter-elt\"));\n var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;\n display.lineGutter.style.width = \"\";\n display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;\n display.lineNumWidth = display.lineNumInnerWidth + padding;\n display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;\n display.lineGutter.style.width = display.lineNumWidth + \"px\";\n updateGutterSpace(cm);\n return true\n }\n return false\n}\n\n// SCROLLING THINGS INTO VIEW\n\n// If an editor sits on the top or bottom of the window, partially\n// scrolled out of view, this ensures that the cursor is visible.\nfunction maybeScrollWindow(cm, rect) {\n if (signalDOMEvent(cm, \"scrollCursorIntoView\")) { return }\n\n var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;\n if (rect.top + box.top < 0) { doScroll = true; }\n else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) { doScroll = false; }\n if (doScroll != null && !phantom) {\n var scrollNode = elt(\"div\", \"\\u200b\", null, (\"position: absolute;\\n top: \" + (rect.top - display.viewOffset - paddingTop(cm.display)) + \"px;\\n height: \" + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + \"px;\\n left: \" + (rect.left) + \"px; width: \" + (Math.max(2, rect.right - rect.left)) + \"px;\"));\n cm.display.lineSpace.appendChild(scrollNode);\n scrollNode.scrollIntoView(doScroll);\n cm.display.lineSpace.removeChild(scrollNode);\n }\n}\n\n// Scroll a given position into view (immediately), verifying that\n// it actually became visible (as line heights are accurately\n// measured, the position of something may 'drift' during drawing).\nfunction scrollPosIntoView(cm, pos, end, margin) {\n if (margin == null) { margin = 0; }\n var rect;\n if (!cm.options.lineWrapping && pos == end) {\n // Set pos and end to the cursor positions around the character pos sticks to\n // If pos.sticky == \"before\", that is around pos.ch - 1, otherwise around pos.ch\n // If pos == Pos(_, 0, \"before\"), pos and end are unchanged\n pos = pos.ch ? Pos(pos.line, pos.sticky == \"before\" ? pos.ch - 1 : pos.ch, \"after\") : pos;\n end = pos.sticky == \"before\" ? Pos(pos.line, pos.ch + 1, \"before\") : pos;\n }\n for (var limit = 0; limit < 5; limit++) {\n var changed = false;\n var coords = cursorCoords(cm, pos);\n var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);\n rect = {left: Math.min(coords.left, endCoords.left),\n top: Math.min(coords.top, endCoords.top) - margin,\n right: Math.max(coords.left, endCoords.left),\n bottom: Math.max(coords.bottom, endCoords.bottom) + margin};\n var scrollPos = calculateScrollPos(cm, rect);\n var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;\n if (scrollPos.scrollTop != null) {\n updateScrollTop(cm, scrollPos.scrollTop);\n if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true; }\n }\n if (scrollPos.scrollLeft != null) {\n setScrollLeft(cm, scrollPos.scrollLeft);\n if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true; }\n }\n if (!changed) { break }\n }\n return rect\n}\n\n// Scroll a given set of coordinates into view (immediately).\nfunction scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n}\n\n// Calculate a new scroll position needed to scroll the given\n// rectangle into view. Returns an object with scrollTop and\n// scrollLeft properties. When these are undefined, the\n// vertical/horizontal position does not need to be adjusted.\nfunction calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n}\n\n// Store a relative adjustment to the scroll position in the current\n// operation (to be applied when the operation finishes).\nfunction addToScrollTop(cm, top) {\n if (top == null) { return }\n resolveScrollToPos(cm);\n cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;\n}\n\n// Make sure that at the end of the operation the current cursor is\n// shown.\nfunction ensureCursorVisible(cm) {\n resolveScrollToPos(cm);\n var cur = cm.getCursor();\n cm.curOp.scrollToPos = {from: cur, to: cur, margin: cm.options.cursorScrollMargin};\n}\n\nfunction scrollToCoords(cm, x, y) {\n if (x != null || y != null) { resolveScrollToPos(cm); }\n if (x != null) { cm.curOp.scrollLeft = x; }\n if (y != null) { cm.curOp.scrollTop = y; }\n}\n\nfunction scrollToRange(cm, range$$1) {\n resolveScrollToPos(cm);\n cm.curOp.scrollToPos = range$$1;\n}\n\n// When an operation has its scrollToPos property set, and another\n// scroll action is applied before the end of the operation, this\n// 'simulates' scrolling that position into view in a cheap way, so\n// that the effect of intermediate scroll commands is not ignored.\nfunction resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n}\n\nfunction scrollToCoordsRange(cm, from, to, margin) {\n var sPos = calculateScrollPos(cm, {\n left: Math.min(from.left, to.left),\n top: Math.min(from.top, to.top) - margin,\n right: Math.max(from.right, to.right),\n bottom: Math.max(from.bottom, to.bottom) + margin\n });\n scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop);\n}\n\n// Sync the scrollable area and scrollbars, ensure the viewport\n// covers the visible area.\nfunction updateScrollTop(cm, val) {\n if (Math.abs(cm.doc.scrollTop - val) < 2) { return }\n if (!gecko) { updateDisplaySimple(cm, {top: val}); }\n setScrollTop(cm, val, true);\n if (gecko) { updateDisplaySimple(cm); }\n startWorker(cm, 100);\n}\n\nfunction setScrollTop(cm, val, forceScroll) {\n val = Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val);\n if (cm.display.scroller.scrollTop == val && !forceScroll) { return }\n cm.doc.scrollTop = val;\n cm.display.scrollbars.setScrollTop(val);\n if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val; }\n}\n\n// Sync scroller and scrollbar, ensure the gutter elements are\n// aligned.\nfunction setScrollLeft(cm, val, isScroller, forceScroll) {\n val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth);\n if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) { return }\n cm.doc.scrollLeft = val;\n alignHorizontally(cm);\n if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val; }\n cm.display.scrollbars.setScrollLeft(val);\n}\n\n// SCROLLBARS\n\n// Prepare DOM reads needed to update the scrollbars. Done in one\n// shot to minimize update/measure roundtrips.\nfunction measureForScrollbars(cm) {\n var d = cm.display, gutterW = d.gutters.offsetWidth;\n var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n return {\n clientHeight: d.scroller.clientHeight,\n viewHeight: d.wrapper.clientHeight,\n scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n viewWidth: d.wrapper.clientWidth,\n barLeft: cm.options.fixedGutter ? gutterW : 0,\n docHeight: docH,\n scrollHeight: docH + scrollGap(cm) + d.barHeight,\n nativeBarWidth: d.nativeBarWidth,\n gutterWidth: gutterW\n }\n}\n\nvar NativeScrollbars = function(place, scroll, cm) {\n this.cm = cm;\n var vert = this.vert = elt(\"div\", [elt(\"div\", null, null, \"min-width: 1px\")], \"CodeMirror-vscrollbar\");\n var horiz = this.horiz = elt(\"div\", [elt(\"div\", null, null, \"height: 100%; min-height: 1px\")], \"CodeMirror-hscrollbar\");\n vert.tabIndex = horiz.tabIndex = -1;\n place(vert); place(horiz);\n\n on(vert, \"scroll\", function () {\n if (vert.clientHeight) { scroll(vert.scrollTop, \"vertical\"); }\n });\n on(horiz, \"scroll\", function () {\n if (horiz.clientWidth) { scroll(horiz.scrollLeft, \"horizontal\"); }\n });\n\n this.checkedZeroWidth = false;\n // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).\n if (ie && ie_version < 8) { this.horiz.style.minHeight = this.vert.style.minWidth = \"18px\"; }\n};\n\nNativeScrollbars.prototype.update = function (measure) {\n var needsH = measure.scrollWidth > measure.clientWidth + 1;\n var needsV = measure.scrollHeight > measure.clientHeight + 1;\n var sWidth = measure.nativeBarWidth;\n\n if (needsV) {\n this.vert.style.display = \"block\";\n this.vert.style.bottom = needsH ? sWidth + \"px\" : \"0\";\n var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);\n // A bug in IE8 can cause this value to be negative, so guard it.\n this.vert.firstChild.style.height =\n Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + \"px\";\n } else {\n this.vert.style.display = \"\";\n this.vert.firstChild.style.height = \"0\";\n }\n\n if (needsH) {\n this.horiz.style.display = \"block\";\n this.horiz.style.right = needsV ? sWidth + \"px\" : \"0\";\n this.horiz.style.left = measure.barLeft + \"px\";\n var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);\n this.horiz.firstChild.style.width =\n Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + \"px\";\n } else {\n this.horiz.style.display = \"\";\n this.horiz.firstChild.style.width = \"0\";\n }\n\n if (!this.checkedZeroWidth && measure.clientHeight > 0) {\n if (sWidth == 0) { this.zeroWidthHack(); }\n this.checkedZeroWidth = true;\n }\n\n return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}\n};\n\nNativeScrollbars.prototype.setScrollLeft = function (pos) {\n if (this.horiz.scrollLeft != pos) { this.horiz.scrollLeft = pos; }\n if (this.disableHoriz) { this.enableZeroWidthBar(this.horiz, this.disableHoriz, \"horiz\"); }\n};\n\nNativeScrollbars.prototype.setScrollTop = function (pos) {\n if (this.vert.scrollTop != pos) { this.vert.scrollTop = pos; }\n if (this.disableVert) { this.enableZeroWidthBar(this.vert, this.disableVert, \"vert\"); }\n};\n\nNativeScrollbars.prototype.zeroWidthHack = function () {\n var w = mac && !mac_geMountainLion ? \"12px\" : \"18px\";\n this.horiz.style.height = this.vert.style.width = w;\n this.horiz.style.pointerEvents = this.vert.style.pointerEvents = \"none\";\n this.disableHoriz = new Delayed;\n this.disableVert = new Delayed;\n};\n\nNativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay, type) {\n bar.style.pointerEvents = \"auto\";\n function maybeDisable() {\n // To find out whether the scrollbar is still visible, we\n // check whether the element under the pixel in the bottom\n // right corner of the scrollbar box is the scrollbar box\n // itself (when the bar is still visible) or its filler child\n // (when the bar is hidden). If it is still visible, we keep\n // it enabled, if it's hidden, we disable pointer events.\n var box = bar.getBoundingClientRect();\n var elt$$1 = type == \"vert\" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2)\n : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1);\n if (elt$$1 != bar) { bar.style.pointerEvents = \"none\"; }\n else { delay.set(1000, maybeDisable); }\n }\n delay.set(1000, maybeDisable);\n};\n\nNativeScrollbars.prototype.clear = function () {\n var parent = this.horiz.parentNode;\n parent.removeChild(this.horiz);\n parent.removeChild(this.vert);\n};\n\nvar NullScrollbars = function () {};\n\nNullScrollbars.prototype.update = function () { return {bottom: 0, right: 0} };\nNullScrollbars.prototype.setScrollLeft = function () {};\nNullScrollbars.prototype.setScrollTop = function () {};\nNullScrollbars.prototype.clear = function () {};\n\nfunction updateScrollbars(cm, measure) {\n if (!measure) { measure = measureForScrollbars(cm); }\n var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight;\n updateScrollbarsInner(cm, measure);\n for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {\n if (startWidth != cm.display.barWidth && cm.options.lineWrapping)\n { updateHeightsInViewport(cm); }\n updateScrollbarsInner(cm, measureForScrollbars(cm));\n startWidth = cm.display.barWidth; startHeight = cm.display.barHeight;\n }\n}\n\n// Re-synchronize the fake scrollbars with the actual size of the\n// content.\nfunction updateScrollbarsInner(cm, measure) {\n var d = cm.display;\n var sizes = d.scrollbars.update(measure);\n\n d.sizer.style.paddingRight = (d.barWidth = sizes.right) + \"px\";\n d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + \"px\";\n d.heightForcer.style.borderBottom = sizes.bottom + \"px solid transparent\";\n\n if (sizes.right && sizes.bottom) {\n d.scrollbarFiller.style.display = \"block\";\n d.scrollbarFiller.style.height = sizes.bottom + \"px\";\n d.scrollbarFiller.style.width = sizes.right + \"px\";\n } else { d.scrollbarFiller.style.display = \"\"; }\n if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {\n d.gutterFiller.style.display = \"block\";\n d.gutterFiller.style.height = sizes.bottom + \"px\";\n d.gutterFiller.style.width = measure.gutterWidth + \"px\";\n } else { d.gutterFiller.style.display = \"\"; }\n}\n\nvar scrollbarModel = {\"native\": NativeScrollbars, \"null\": NullScrollbars};\n\nfunction initScrollbars(cm) {\n if (cm.display.scrollbars) {\n cm.display.scrollbars.clear();\n if (cm.display.scrollbars.addClass)\n { rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); }\n }\n\n cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) {\n cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);\n // Prevent clicks in the scrollbars from killing focus\n on(node, \"mousedown\", function () {\n if (cm.state.focused) { setTimeout(function () { return cm.display.input.focus(); }, 0); }\n });\n node.setAttribute(\"cm-not-content\", \"true\");\n }, function (pos, axis) {\n if (axis == \"horizontal\") { setScrollLeft(cm, pos); }\n else { updateScrollTop(cm, pos); }\n }, cm);\n if (cm.display.scrollbars.addClass)\n { addClass(cm.display.wrapper, cm.display.scrollbars.addClass); }\n}\n\n// Operations are used to wrap a series of changes to the editor\n// state in such a way that each change won't have to update the\n// cursor and display (which would be awkward, slow, and\n// error-prone). Instead, display updates are batched and then all\n// combined and executed at once.\n\nvar nextOpId = 0;\n// Start a new operation.\nfunction startOperation(cm) {\n cm.curOp = {\n cm: cm,\n viewChanged: false, // Flag that indicates that lines might need to be redrawn\n startHeight: cm.doc.height, // Used to detect need to update scrollbar\n forceUpdate: false, // Used to force a redraw\n updateInput: null, // Whether to reset the input textarea\n typing: false, // Whether this reset should be careful to leave existing text (for compositing)\n changeObjs: null, // Accumulated changes, for firing change events\n cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on\n cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already\n selectionChanged: false, // Whether the selection needs to be redrawn\n updateMaxLine: false, // Set when the widest line needs to be determined anew\n scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet\n scrollToPos: null, // Used to scroll to a specific position\n focus: false,\n id: ++nextOpId // Unique ID\n };\n pushOperation(cm.curOp);\n}\n\n// Finish an operation, updating the display and signalling delayed events\nfunction endOperation(cm) {\n var op = cm.curOp;\n finishOperation(op, function (group) {\n for (var i = 0; i < group.ops.length; i++)\n { group.ops[i].cm.curOp = null; }\n endOperations(group);\n });\n}\n\n// The DOM updates done when an operation finishes are batched so\n// that the minimum number of relayouts are required.\nfunction endOperations(group) {\n var ops = group.ops;\n for (var i = 0; i < ops.length; i++) // Read DOM\n { endOperation_R1(ops[i]); }\n for (var i$1 = 0; i$1 < ops.length; i$1++) // Write DOM (maybe)\n { endOperation_W1(ops[i$1]); }\n for (var i$2 = 0; i$2 < ops.length; i$2++) // Read DOM\n { endOperation_R2(ops[i$2]); }\n for (var i$3 = 0; i$3 < ops.length; i$3++) // Write DOM (maybe)\n { endOperation_W2(ops[i$3]); }\n for (var i$4 = 0; i$4 < ops.length; i$4++) // Read DOM\n { endOperation_finish(ops[i$4]); }\n}\n\nfunction endOperation_R1(op) {\n var cm = op.cm, display = cm.display;\n maybeClipScrollbars(cm);\n if (op.updateMaxLine) { findMaxLine(cm); }\n\n op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||\n op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||\n op.scrollToPos.to.line >= display.viewTo) ||\n display.maxLineChanged && cm.options.lineWrapping;\n op.update = op.mustUpdate &&\n new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);\n}\n\nfunction endOperation_W1(op) {\n op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);\n}\n\nfunction endOperation_R2(op) {\n var cm = op.cm, display = cm.display;\n if (op.updatedDisplay) { updateHeightsInViewport(cm); }\n\n op.barMeasure = measureForScrollbars(cm);\n\n // If the max line changed since it was last measured, measure it,\n // and ensure the document's width matches it.\n // updateDisplay_W2 will use these properties to do the actual resizing\n if (display.maxLineChanged && !cm.options.lineWrapping) {\n op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;\n cm.display.sizerWidth = op.adjustWidthTo;\n op.barMeasure.scrollWidth =\n Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);\n op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));\n }\n\n if (op.updatedDisplay || op.selectionChanged)\n { op.preparedSelection = display.input.prepareSelection(); }\n}\n\nfunction endOperation_W2(op) {\n var cm = op.cm;\n\n if (op.adjustWidthTo != null) {\n cm.display.sizer.style.minWidth = op.adjustWidthTo + \"px\";\n if (op.maxScrollLeft < cm.doc.scrollLeft)\n { setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); }\n cm.display.maxLineChanged = false;\n }\n\n var takeFocus = op.focus && op.focus == activeElt();\n if (op.preparedSelection)\n { cm.display.input.showSelection(op.preparedSelection, takeFocus); }\n if (op.updatedDisplay || op.startHeight != cm.doc.height)\n { updateScrollbars(cm, op.barMeasure); }\n if (op.updatedDisplay)\n { setDocumentHeight(cm, op.barMeasure); }\n\n if (op.selectionChanged) { restartBlink(cm); }\n\n if (cm.state.focused && op.updateInput)\n { cm.display.input.reset(op.typing); }\n if (takeFocus) { ensureFocus(op.cm); }\n}\n\nfunction endOperation_finish(op) {\n var cm = op.cm, display = cm.display, doc = cm.doc;\n\n if (op.updatedDisplay) { postUpdateDisplay(cm, op.update); }\n\n // Abort mouse wheel delta measurement, when scrolling explicitly\n if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))\n { display.wheelStartX = display.wheelStartY = null; }\n\n // Propagate the scroll position to the actual DOM scroller\n if (op.scrollTop != null) { setScrollTop(cm, op.scrollTop, op.forceScroll); }\n\n if (op.scrollLeft != null) { setScrollLeft(cm, op.scrollLeft, true, true); }\n // If we need to scroll a specific position into view, do so.\n if (op.scrollToPos) {\n var rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from),\n clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);\n maybeScrollWindow(cm, rect);\n }\n\n // Fire events for markers that are hidden/unidden by editing or\n // undoing\n var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;\n if (hidden) { for (var i = 0; i < hidden.length; ++i)\n { if (!hidden[i].lines.length) { signal(hidden[i], \"hide\"); } } }\n if (unhidden) { for (var i$1 = 0; i$1 < unhidden.length; ++i$1)\n { if (unhidden[i$1].lines.length) { signal(unhidden[i$1], \"unhide\"); } } }\n\n if (display.wrapper.offsetHeight)\n { doc.scrollTop = cm.display.scroller.scrollTop; }\n\n // Fire change events, and delayed event handlers\n if (op.changeObjs)\n { signal(cm, \"changes\", cm, op.changeObjs); }\n if (op.update)\n { op.update.finish(); }\n}\n\n// Run the given function in an operation\nfunction runInOp(cm, f) {\n if (cm.curOp) { return f() }\n startOperation(cm);\n try { return f() }\n finally { endOperation(cm); }\n}\n// Wraps a function in an operation. Returns the wrapped function.\nfunction operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n}\n// Used to add methods to editor and doc instances, wrapping them in\n// operations.\nfunction methodOp(f) {\n return function() {\n if (this.curOp) { return f.apply(this, arguments) }\n startOperation(this);\n try { return f.apply(this, arguments) }\n finally { endOperation(this); }\n }\n}\nfunction docMethodOp(f) {\n return function() {\n var cm = this.cm;\n if (!cm || cm.curOp) { return f.apply(this, arguments) }\n startOperation(cm);\n try { return f.apply(this, arguments) }\n finally { endOperation(cm); }\n }\n}\n\n// Updates the display.view data structure for a given change to the\n// document. From and to are in pre-change coordinates. Lendiff is\n// the amount of lines added or subtracted by the change. This is\n// used for changes that span multiple lines, or change the way\n// lines are divided into visual lines. regLineChange (below)\n// registers single-line changes.\nfunction regChange(cm, from, to, lendiff) {\n if (from == null) { from = cm.doc.first; }\n if (to == null) { to = cm.doc.first + cm.doc.size; }\n if (!lendiff) { lendiff = 0; }\n\n var display = cm.display;\n if (lendiff && to < display.viewTo &&\n (display.updateLineNumbers == null || display.updateLineNumbers > from))\n { display.updateLineNumbers = from; }\n\n cm.curOp.viewChanged = true;\n\n if (from >= display.viewTo) { // Change after\n if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)\n { resetView(cm); }\n } else if (to <= display.viewFrom) { // Change before\n if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {\n resetView(cm);\n } else {\n display.viewFrom += lendiff;\n display.viewTo += lendiff;\n }\n } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap\n resetView(cm);\n } else if (from <= display.viewFrom) { // Top overlap\n var cut = viewCuttingPoint(cm, to, to + lendiff, 1);\n if (cut) {\n display.view = display.view.slice(cut.index);\n display.viewFrom = cut.lineN;\n display.viewTo += lendiff;\n } else {\n resetView(cm);\n }\n } else if (to >= display.viewTo) { // Bottom overlap\n var cut$1 = viewCuttingPoint(cm, from, from, -1);\n if (cut$1) {\n display.view = display.view.slice(0, cut$1.index);\n display.viewTo = cut$1.lineN;\n } else {\n resetView(cm);\n }\n } else { // Gap in the middle\n var cutTop = viewCuttingPoint(cm, from, from, -1);\n var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);\n if (cutTop && cutBot) {\n display.view = display.view.slice(0, cutTop.index)\n .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))\n .concat(display.view.slice(cutBot.index));\n display.viewTo += lendiff;\n } else {\n resetView(cm);\n }\n }\n\n var ext = display.externalMeasured;\n if (ext) {\n if (to < ext.lineN)\n { ext.lineN += lendiff; }\n else if (from < ext.lineN + ext.size)\n { display.externalMeasured = null; }\n }\n}\n\n// Register a change to a single line. Type must be one of \"text\",\n// \"gutter\", \"class\", \"widget\"\nfunction regLineChange(cm, line, type) {\n cm.curOp.viewChanged = true;\n var display = cm.display, ext = cm.display.externalMeasured;\n if (ext && line >= ext.lineN && line < ext.lineN + ext.size)\n { display.externalMeasured = null; }\n\n if (line < display.viewFrom || line >= display.viewTo) { return }\n var lineView = display.view[findViewIndex(cm, line)];\n if (lineView.node == null) { return }\n var arr = lineView.changes || (lineView.changes = []);\n if (indexOf(arr, type) == -1) { arr.push(type); }\n}\n\n// Clear the view.\nfunction resetView(cm) {\n cm.display.viewFrom = cm.display.viewTo = cm.doc.first;\n cm.display.view = [];\n cm.display.viewOffset = 0;\n}\n\nfunction viewCuttingPoint(cm, oldN, newN, dir) {\n var index = findViewIndex(cm, oldN), diff, view = cm.display.view;\n if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)\n { return {index: index, lineN: newN} }\n var n = cm.display.viewFrom;\n for (var i = 0; i < index; i++)\n { n += view[i].size; }\n if (n != oldN) {\n if (dir > 0) {\n if (index == view.length - 1) { return null }\n diff = (n + view[index].size) - oldN;\n index++;\n } else {\n diff = n - oldN;\n }\n oldN += diff; newN += diff;\n }\n while (visualLineNo(cm.doc, newN) != newN) {\n if (index == (dir < 0 ? 0 : view.length - 1)) { return null }\n newN += dir * view[index - (dir < 0 ? 1 : 0)].size;\n index += dir;\n }\n return {index: index, lineN: newN}\n}\n\n// Force the view to cover a given range, adding empty view element\n// or clipping off existing ones as needed.\nfunction adjustView(cm, from, to) {\n var display = cm.display, view = display.view;\n if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {\n display.view = buildViewArray(cm, from, to);\n display.viewFrom = from;\n } else {\n if (display.viewFrom > from)\n { display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); }\n else if (display.viewFrom < from)\n { display.view = display.view.slice(findViewIndex(cm, from)); }\n display.viewFrom = from;\n if (display.viewTo < to)\n { display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); }\n else if (display.viewTo > to)\n { display.view = display.view.slice(0, findViewIndex(cm, to)); }\n }\n display.viewTo = to;\n}\n\n// Count the number of lines in the view whose DOM representation is\n// out of date (or nonexistent).\nfunction countDirtyView(cm) {\n var view = cm.display.view, dirty = 0;\n for (var i = 0; i < view.length; i++) {\n var lineView = view[i];\n if (!lineView.hidden && (!lineView.node || lineView.changes)) { ++dirty; }\n }\n return dirty\n}\n\n// HIGHLIGHT WORKER\n\nfunction startWorker(cm, time) {\n if (cm.doc.highlightFrontier < cm.display.viewTo)\n { cm.state.highlight.set(time, bind(highlightWorker, cm)); }\n}\n\nfunction highlightWorker(cm) {\n var doc = cm.doc;\n if (doc.highlightFrontier >= cm.display.viewTo) { return }\n var end = +new Date + cm.options.workTime;\n var context = getContextBefore(cm, doc.highlightFrontier);\n var changedLines = [];\n\n doc.iter(context.line, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function (line) {\n if (context.line >= cm.display.viewFrom) { // Visible\n var oldStyles = line.styles;\n var resetState = line.text.length > cm.options.maxHighlightLength ? copyState(doc.mode, context.state) : null;\n var highlighted = highlightLine(cm, line, context, true);\n if (resetState) { context.state = resetState; }\n line.styles = highlighted.styles;\n var oldCls = line.styleClasses, newCls = highlighted.classes;\n if (newCls) { line.styleClasses = newCls; }\n else if (oldCls) { line.styleClasses = null; }\n var ischange = !oldStyles || oldStyles.length != line.styles.length ||\n oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);\n for (var i = 0; !ischange && i < oldStyles.length; ++i) { ischange = oldStyles[i] != line.styles[i]; }\n if (ischange) { changedLines.push(context.line); }\n line.stateAfter = context.save();\n context.nextLine();\n } else {\n if (line.text.length <= cm.options.maxHighlightLength)\n { processLine(cm, line.text, context); }\n line.stateAfter = context.line % 5 == 0 ? context.save() : null;\n context.nextLine();\n }\n if (+new Date > end) {\n startWorker(cm, cm.options.workDelay);\n return true\n }\n });\n doc.highlightFrontier = context.line;\n doc.modeFrontier = Math.max(doc.modeFrontier, context.line);\n if (changedLines.length) { runInOp(cm, function () {\n for (var i = 0; i < changedLines.length; i++)\n { regLineChange(cm, changedLines[i], \"text\"); }\n }); }\n}\n\n// DISPLAY DRAWING\n\nvar DisplayUpdate = function(cm, viewport, force) {\n var display = cm.display;\n\n this.viewport = viewport;\n // Store some values that we'll need later (but don't want to force a relayout for)\n this.visible = visibleLines(display, cm.doc, viewport);\n this.editorIsHidden = !display.wrapper.offsetWidth;\n this.wrapperHeight = display.wrapper.clientHeight;\n this.wrapperWidth = display.wrapper.clientWidth;\n this.oldDisplayWidth = displayWidth(cm);\n this.force = force;\n this.dims = getDimensions(cm);\n this.events = [];\n};\n\nDisplayUpdate.prototype.signal = function (emitter, type) {\n if (hasHandler(emitter, type))\n { this.events.push(arguments); }\n};\nDisplayUpdate.prototype.finish = function () {\n var this$1 = this;\n\n for (var i = 0; i < this.events.length; i++)\n { signal.apply(null, this$1.events[i]); }\n};\n\nfunction maybeClipScrollbars(cm) {\n var display = cm.display;\n if (!display.scrollbarsClipped && display.scroller.offsetWidth) {\n display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;\n display.heightForcer.style.height = scrollGap(cm) + \"px\";\n display.sizer.style.marginBottom = -display.nativeBarWidth + \"px\";\n display.sizer.style.borderRightWidth = scrollGap(cm) + \"px\";\n display.scrollbarsClipped = true;\n }\n}\n\nfunction selectionSnapshot(cm) {\n if (cm.hasFocus()) { return null }\n var active = activeElt();\n if (!active || !contains(cm.display.lineDiv, active)) { return null }\n var result = {activeElt: active};\n if (window.getSelection) {\n var sel = window.getSelection();\n if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) {\n result.anchorNode = sel.anchorNode;\n result.anchorOffset = sel.anchorOffset;\n result.focusNode = sel.focusNode;\n result.focusOffset = sel.focusOffset;\n }\n }\n return result\n}\n\nfunction restoreSelection(snapshot) {\n if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt()) { return }\n snapshot.activeElt.focus();\n if (snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) {\n var sel = window.getSelection(), range$$1 = document.createRange();\n range$$1.setEnd(snapshot.anchorNode, snapshot.anchorOffset);\n range$$1.collapse(false);\n sel.removeAllRanges();\n sel.addRange(range$$1);\n sel.extend(snapshot.focusNode, snapshot.focusOffset);\n }\n}\n\n// Does the actual updating of the line display. Bails out\n// (returning false) when there is nothing to be done and forced is\n// false.\nfunction updateDisplayIfNeeded(cm, update) {\n var display = cm.display, doc = cm.doc;\n\n if (update.editorIsHidden) {\n resetView(cm);\n return false\n }\n\n // Bail out if the visible area is already rendered and nothing changed.\n if (!update.force &&\n update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo &&\n (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&\n display.renderedView == display.view && countDirtyView(cm) == 0)\n { return false }\n\n if (maybeUpdateLineNumberWidth(cm)) {\n resetView(cm);\n update.dims = getDimensions(cm);\n }\n\n // Compute a suitable new viewport (from & to)\n var end = doc.first + doc.size;\n var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);\n var to = Math.min(end, update.visible.to + cm.options.viewportMargin);\n if (display.viewFrom < from && from - display.viewFrom < 20) { from = Math.max(doc.first, display.viewFrom); }\n if (display.viewTo > to && display.viewTo - to < 20) { to = Math.min(end, display.viewTo); }\n if (sawCollapsedSpans) {\n from = visualLineNo(cm.doc, from);\n to = visualLineEndNo(cm.doc, to);\n }\n\n var different = from != display.viewFrom || to != display.viewTo ||\n display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;\n adjustView(cm, from, to);\n\n display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));\n // Position the mover div to align with the current scroll position\n cm.display.mover.style.top = display.viewOffset + \"px\";\n\n var toUpdate = countDirtyView(cm);\n if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&\n (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))\n { return false }\n\n // For big changes, we hide the enclosing element during the\n // update, since that speeds up the operations on most browsers.\n var selSnapshot = selectionSnapshot(cm);\n if (toUpdate > 4) { display.lineDiv.style.display = \"none\"; }\n patchDisplay(cm, display.updateLineNumbers, update.dims);\n if (toUpdate > 4) { display.lineDiv.style.display = \"\"; }\n display.renderedView = display.view;\n // There might have been a widget with a focused element that got\n // hidden or updated, if so re-focus it.\n restoreSelection(selSnapshot);\n\n // Prevent selection and cursors from interfering with the scroll\n // width and height.\n removeChildren(display.cursorDiv);\n removeChildren(display.selectionDiv);\n display.gutters.style.height = display.sizer.style.minHeight = 0;\n\n if (different) {\n display.lastWrapHeight = update.wrapperHeight;\n display.lastWrapWidth = update.wrapperWidth;\n startWorker(cm, 400);\n }\n\n display.updateLineNumbers = null;\n\n return true\n}\n\nfunction postUpdateDisplay(cm, update) {\n var viewport = update.viewport;\n\n for (var first = true;; first = false) {\n if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {\n // Clip forced viewport to actual scrollable area.\n if (viewport && viewport.top != null)\n { viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; }\n // Updated line heights might result in the drawn area not\n // actually covering the viewport. Keep looping until it does.\n update.visible = visibleLines(cm.display, cm.doc, viewport);\n if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)\n { break }\n }\n if (!updateDisplayIfNeeded(cm, update)) { break }\n updateHeightsInViewport(cm);\n var barMeasure = measureForScrollbars(cm);\n updateSelection(cm);\n updateScrollbars(cm, barMeasure);\n setDocumentHeight(cm, barMeasure);\n update.force = false;\n }\n\n update.signal(cm, \"update\", cm);\n if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {\n update.signal(cm, \"viewportChange\", cm, cm.display.viewFrom, cm.display.viewTo);\n cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;\n }\n}\n\nfunction updateDisplaySimple(cm, viewport) {\n var update = new DisplayUpdate(cm, viewport);\n if (updateDisplayIfNeeded(cm, update)) {\n updateHeightsInViewport(cm);\n postUpdateDisplay(cm, update);\n var barMeasure = measureForScrollbars(cm);\n updateSelection(cm);\n updateScrollbars(cm, barMeasure);\n setDocumentHeight(cm, barMeasure);\n update.finish();\n }\n}\n\n// Sync the actual display DOM structure with display.view, removing\n// nodes for lines that are no longer in view, and creating the ones\n// that are not there yet, and updating the ones that are out of\n// date.\nfunction patchDisplay(cm, updateNumbersFrom, dims) {\n var display = cm.display, lineNumbers = cm.options.lineNumbers;\n var container = display.lineDiv, cur = container.firstChild;\n\n function rm(node) {\n var next = node.nextSibling;\n // Works around a throw-scroll bug in OS X Webkit\n if (webkit && mac && cm.display.currentWheelTarget == node)\n { node.style.display = \"none\"; }\n else\n { node.parentNode.removeChild(node); }\n return next\n }\n\n var view = display.view, lineN = display.viewFrom;\n // Loop over the elements in the view, syncing cur (the DOM nodes\n // in display.lineDiv) with the view as we go.\n for (var i = 0; i < view.length; i++) {\n var lineView = view[i];\n if (lineView.hidden) {\n } else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet\n var node = buildLineElement(cm, lineView, lineN, dims);\n container.insertBefore(node, cur);\n } else { // Already drawn\n while (cur != lineView.node) { cur = rm(cur); }\n var updateNumber = lineNumbers && updateNumbersFrom != null &&\n updateNumbersFrom <= lineN && lineView.lineNumber;\n if (lineView.changes) {\n if (indexOf(lineView.changes, \"gutter\") > -1) { updateNumber = false; }\n updateLineForChanges(cm, lineView, lineN, dims);\n }\n if (updateNumber) {\n removeChildren(lineView.lineNumber);\n lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));\n }\n cur = lineView.node.nextSibling;\n }\n lineN += lineView.size;\n }\n while (cur) { cur = rm(cur); }\n}\n\nfunction updateGutterSpace(cm) {\n var width = cm.display.gutters.offsetWidth;\n cm.display.sizer.style.marginLeft = width + \"px\";\n}\n\nfunction setDocumentHeight(cm, measure) {\n cm.display.sizer.style.minHeight = measure.docHeight + \"px\";\n cm.display.heightForcer.style.top = measure.docHeight + \"px\";\n cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + \"px\";\n}\n\n// Rebuild the gutter elements, ensure the margin to the left of the\n// code matches their width.\nfunction updateGutters(cm) {\n var gutters = cm.display.gutters, specs = cm.options.gutters;\n removeChildren(gutters);\n var i = 0;\n for (; i < specs.length; ++i) {\n var gutterClass = specs[i];\n var gElt = gutters.appendChild(elt(\"div\", null, \"CodeMirror-gutter \" + gutterClass));\n if (gutterClass == \"CodeMirror-linenumbers\") {\n cm.display.lineGutter = gElt;\n gElt.style.width = (cm.display.lineNumWidth || 1) + \"px\";\n }\n }\n gutters.style.display = i ? \"\" : \"none\";\n updateGutterSpace(cm);\n}\n\n// Make sure the gutters options contains the element\n// \"CodeMirror-linenumbers\" when the lineNumbers option is true.\nfunction setGuttersForLineNumbers(options) {\n var found = indexOf(options.gutters, \"CodeMirror-linenumbers\");\n if (found == -1 && options.lineNumbers) {\n options.gutters = options.gutters.concat([\"CodeMirror-linenumbers\"]);\n } else if (found > -1 && !options.lineNumbers) {\n options.gutters = options.gutters.slice(0);\n options.gutters.splice(found, 1);\n }\n}\n\n// Since the delta values reported on mouse wheel events are\n// unstandardized between browsers and even browser versions, and\n// generally horribly unpredictable, this code starts by measuring\n// the scroll effect that the first few mouse wheel events have,\n// and, from that, detects the way it can convert deltas to pixel\n// offsets afterwards.\n//\n// The reason we want to know the amount a wheel event will scroll\n// is that it gives us a chance to update the display before the\n// actual scrolling happens, reducing flickering.\n\nvar wheelSamples = 0;\nvar wheelPixelsPerUnit = null;\n// Fill in a browser-detected starting value on browsers where we\n// know one. These don't have to be accurate -- the result of them\n// being wrong would just be a slight flicker on the first wheel\n// scroll (if it is large enough).\nif (ie) { wheelPixelsPerUnit = -.53; }\nelse if (gecko) { wheelPixelsPerUnit = 15; }\nelse if (chrome) { wheelPixelsPerUnit = -.7; }\nelse if (safari) { wheelPixelsPerUnit = -1/3; }\n\nfunction wheelEventDelta(e) {\n var dx = e.wheelDeltaX, dy = e.wheelDeltaY;\n if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { dx = e.detail; }\n if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { dy = e.detail; }\n else if (dy == null) { dy = e.wheelDelta; }\n return {x: dx, y: dy}\n}\nfunction wheelEventPixels(e) {\n var delta = wheelEventDelta(e);\n delta.x *= wheelPixelsPerUnit;\n delta.y *= wheelPixelsPerUnit;\n return delta\n}\n\nfunction onScrollWheel(cm, e) {\n var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;\n\n var display = cm.display, scroll = display.scroller;\n // Quit if there's nothing to scroll here\n var canScrollX = scroll.scrollWidth > scroll.clientWidth;\n var canScrollY = scroll.scrollHeight > scroll.clientHeight;\n if (!(dx && canScrollX || dy && canScrollY)) { return }\n\n // Webkit browsers on OS X abort momentum scrolls when the target\n // of the scroll event is removed from the scrollable element.\n // This hack (see related code in patchDisplay) makes sure the\n // element is kept around.\n if (dy && mac && webkit) {\n outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {\n for (var i = 0; i < view.length; i++) {\n if (view[i].node == cur) {\n cm.display.currentWheelTarget = cur;\n break outer\n }\n }\n }\n }\n\n // On some browsers, horizontal scrolling will cause redraws to\n // happen before the gutter has been realigned, causing it to\n // wriggle around in a most unseemly way. When we have an\n // estimated pixels/delta value, we just handle horizontal\n // scrolling entirely here. It'll be slightly off from native, but\n // better than glitching out.\n if (dx && !gecko && !presto && wheelPixelsPerUnit != null) {\n if (dy && canScrollY)\n { updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * wheelPixelsPerUnit)); }\n setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * wheelPixelsPerUnit));\n // Only prevent default scrolling if vertical scrolling is\n // actually possible. Otherwise, it causes vertical scroll\n // jitter on OSX trackpads when deltaX is small and deltaY\n // is large (issue #3579)\n if (!dy || (dy && canScrollY))\n { e_preventDefault(e); }\n display.wheelStartX = null; // Abort measurement, if in progress\n return\n }\n\n // 'Project' the visible viewport to cover the area that is being\n // scrolled into view (if we know enough to estimate it).\n if (dy && wheelPixelsPerUnit != null) {\n var pixels = dy * wheelPixelsPerUnit;\n var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;\n if (pixels < 0) { top = Math.max(0, top + pixels - 50); }\n else { bot = Math.min(cm.doc.height, bot + pixels + 50); }\n updateDisplaySimple(cm, {top: top, bottom: bot});\n }\n\n if (wheelSamples < 20) {\n if (display.wheelStartX == null) {\n display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;\n display.wheelDX = dx; display.wheelDY = dy;\n setTimeout(function () {\n if (display.wheelStartX == null) { return }\n var movedX = scroll.scrollLeft - display.wheelStartX;\n var movedY = scroll.scrollTop - display.wheelStartY;\n var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||\n (movedX && display.wheelDX && movedX / display.wheelDX);\n display.wheelStartX = display.wheelStartY = null;\n if (!sample) { return }\n wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);\n ++wheelSamples;\n }, 200);\n } else {\n display.wheelDX += dx; display.wheelDY += dy;\n }\n }\n}\n\n// Selection objects are immutable. A new one is created every time\n// the selection changes. A selection is one or more non-overlapping\n// (and non-touching) ranges, sorted, and an integer that indicates\n// which one is the primary selection (the one that's scrolled into\n// view, that getCursor returns, etc).\nvar Selection = function(ranges, primIndex) {\n this.ranges = ranges;\n this.primIndex = primIndex;\n};\n\nSelection.prototype.primary = function () { return this.ranges[this.primIndex] };\n\nSelection.prototype.equals = function (other) {\n var this$1 = this;\n\n if (other == this) { return true }\n if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) { return false }\n for (var i = 0; i < this.ranges.length; i++) {\n var here = this$1.ranges[i], there = other.ranges[i];\n if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) { return false }\n }\n return true\n};\n\nSelection.prototype.deepCopy = function () {\n var this$1 = this;\n\n var out = [];\n for (var i = 0; i < this.ranges.length; i++)\n { out[i] = new Range(copyPos(this$1.ranges[i].anchor), copyPos(this$1.ranges[i].head)); }\n return new Selection(out, this.primIndex)\n};\n\nSelection.prototype.somethingSelected = function () {\n var this$1 = this;\n\n for (var i = 0; i < this.ranges.length; i++)\n { if (!this$1.ranges[i].empty()) { return true } }\n return false\n};\n\nSelection.prototype.contains = function (pos, end) {\n var this$1 = this;\n\n if (!end) { end = pos; }\n for (var i = 0; i < this.ranges.length; i++) {\n var range = this$1.ranges[i];\n if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)\n { return i }\n }\n return -1\n};\n\nvar Range = function(anchor, head) {\n this.anchor = anchor; this.head = head;\n};\n\nRange.prototype.from = function () { return minPos(this.anchor, this.head) };\nRange.prototype.to = function () { return maxPos(this.anchor, this.head) };\nRange.prototype.empty = function () { return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch };\n\n// Take an unsorted, potentially overlapping set of ranges, and\n// build a selection out of it. 'Consumes' ranges array (modifying\n// it).\nfunction normalizeSelection(ranges, primIndex) {\n var prim = ranges[primIndex];\n ranges.sort(function (a, b) { return cmp(a.from(), b.from()); });\n primIndex = indexOf(ranges, prim);\n for (var i = 1; i < ranges.length; i++) {\n var cur = ranges[i], prev = ranges[i - 1];\n if (cmp(prev.to(), cur.from()) >= 0) {\n var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to());\n var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;\n if (i <= primIndex) { --primIndex; }\n ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));\n }\n }\n return new Selection(ranges, primIndex)\n}\n\nfunction simpleSelection(anchor, head) {\n return new Selection([new Range(anchor, head || anchor)], 0)\n}\n\n// Compute the position of the end of a change (its 'to' property\n// refers to the pre-change end).\nfunction changeEnd(change) {\n if (!change.text) { return change.to }\n return Pos(change.from.line + change.text.length - 1,\n lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0))\n}\n\n// Adjust a position to refer to the post-change position of the\n// same text, or the end of the change if the change covers it.\nfunction adjustForChange(pos, change) {\n if (cmp(pos, change.from) < 0) { return pos }\n if (cmp(pos, change.to) <= 0) { return changeEnd(change) }\n\n var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;\n if (pos.line == change.to.line) { ch += changeEnd(change).ch - change.to.ch; }\n return Pos(line, ch)\n}\n\nfunction computeSelAfterChange(doc, change) {\n var out = [];\n for (var i = 0; i < doc.sel.ranges.length; i++) {\n var range = doc.sel.ranges[i];\n out.push(new Range(adjustForChange(range.anchor, change),\n adjustForChange(range.head, change)));\n }\n return normalizeSelection(out, doc.sel.primIndex)\n}\n\nfunction offsetPos(pos, old, nw) {\n if (pos.line == old.line)\n { return Pos(nw.line, pos.ch - old.ch + nw.ch) }\n else\n { return Pos(nw.line + (pos.line - old.line), pos.ch) }\n}\n\n// Used by replaceSelections to allow moving the selection to the\n// start or around the replaced test. Hint may be \"start\" or \"around\".\nfunction computeReplacedSel(doc, changes, hint) {\n var out = [];\n var oldPrev = Pos(doc.first, 0), newPrev = oldPrev;\n for (var i = 0; i < changes.length; i++) {\n var change = changes[i];\n var from = offsetPos(change.from, oldPrev, newPrev);\n var to = offsetPos(changeEnd(change), oldPrev, newPrev);\n oldPrev = change.to;\n newPrev = to;\n if (hint == \"around\") {\n var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0;\n out[i] = new Range(inv ? to : from, inv ? from : to);\n } else {\n out[i] = new Range(from, from);\n }\n }\n return new Selection(out, doc.sel.primIndex)\n}\n\n// Used to get the editor into a consistent state again when options change.\n\nfunction loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n}\n\nfunction resetModeState(cm) {\n cm.doc.iter(function (line) {\n if (line.stateAfter) { line.stateAfter = null; }\n if (line.styles) { line.styles = null; }\n });\n cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first;\n startWorker(cm, 100);\n cm.state.modeGen++;\n if (cm.curOp) { regChange(cm); }\n}\n\n// DOCUMENT DATA STRUCTURE\n\n// By default, updates that start and end at the beginning of a line\n// are treated specially, in order to make the association of line\n// widgets and marker elements with the text behave more intuitive.\nfunction isWholeLineUpdate(doc, change) {\n return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == \"\" &&\n (!doc.cm || doc.cm.options.wholeLineUpdateBefore)\n}\n\n// Perform a change on the document data structure.\nfunction updateDoc(doc, change, markedSpans, estimateHeight$$1) {\n function spansFor(n) {return markedSpans ? markedSpans[n] : null}\n function update(line, text, spans) {\n updateLine(line, text, spans, estimateHeight$$1);\n signalLater(line, \"change\", line, change);\n }\n function linesFor(start, end) {\n var result = [];\n for (var i = start; i < end; ++i)\n { result.push(new Line(text[i], spansFor(i), estimateHeight$$1)); }\n return result\n }\n\n var from = change.from, to = change.to, text = change.text;\n var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);\n var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;\n\n // Adjust the line structure\n if (change.full) {\n doc.insert(0, linesFor(0, text.length));\n doc.remove(text.length, doc.size - text.length);\n } else if (isWholeLineUpdate(doc, change)) {\n // This is a whole-line replace. Treated specially to make\n // sure line objects move the way they are supposed to.\n var added = linesFor(0, text.length - 1);\n update(lastLine, lastLine.text, lastSpans);\n if (nlines) { doc.remove(from.line, nlines); }\n if (added.length) { doc.insert(from.line, added); }\n } else if (firstLine == lastLine) {\n if (text.length == 1) {\n update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);\n } else {\n var added$1 = linesFor(1, text.length - 1);\n added$1.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight$$1));\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n doc.insert(from.line + 1, added$1);\n }\n } else if (text.length == 1) {\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));\n doc.remove(from.line + 1, nlines);\n } else {\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);\n var added$2 = linesFor(1, text.length - 1);\n if (nlines > 1) { doc.remove(from.line + 1, nlines - 1); }\n doc.insert(from.line + 1, added$2);\n }\n\n signalLater(doc, \"change\", doc, change);\n}\n\n// Call f for all linked documents.\nfunction linkedDocs(doc, f, sharedHistOnly) {\n function propagate(doc, skip, sharedHist) {\n if (doc.linked) { for (var i = 0; i < doc.linked.length; ++i) {\n var rel = doc.linked[i];\n if (rel.doc == skip) { continue }\n var shared = sharedHist && rel.sharedHist;\n if (sharedHistOnly && !shared) { continue }\n f(rel.doc, shared);\n propagate(rel.doc, doc, shared);\n } }\n }\n propagate(doc, null, true);\n}\n\n// Attach a document to an editor.\nfunction attachDoc(cm, doc) {\n if (doc.cm) { throw new Error(\"This document is already in use.\") }\n cm.doc = doc;\n doc.cm = cm;\n estimateLineHeights(cm);\n loadMode(cm);\n setDirectionClass(cm);\n if (!cm.options.lineWrapping) { findMaxLine(cm); }\n cm.options.mode = doc.modeOption;\n regChange(cm);\n}\n\nfunction setDirectionClass(cm) {\n (cm.doc.direction == \"rtl\" ? addClass : rmClass)(cm.display.lineDiv, \"CodeMirror-rtl\");\n}\n\nfunction directionChanged(cm) {\n runInOp(cm, function () {\n setDirectionClass(cm);\n regChange(cm);\n });\n}\n\nfunction History(startGen) {\n // Arrays of change events and selections. Doing something adds an\n // event to done and clears undo. Undoing moves events from done\n // to undone, redoing moves them in the other direction.\n this.done = []; this.undone = [];\n this.undoDepth = Infinity;\n // Used to track when changes can be merged into a single undo\n // event\n this.lastModTime = this.lastSelTime = 0;\n this.lastOp = this.lastSelOp = null;\n this.lastOrigin = this.lastSelOrigin = null;\n // Used by the isClean() method\n this.generation = this.maxGeneration = startGen || 1;\n}\n\n// Create a history change event from an updateDoc-style change\n// object.\nfunction historyChangeFromChange(doc, change) {\n var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};\n attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);\n linkedDocs(doc, function (doc) { return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); }, true);\n return histChange\n}\n\n// Pop all selection events off the end of a history array. Stop at\n// a change event.\nfunction clearSelectionEvents(array) {\n while (array.length) {\n var last = lst(array);\n if (last.ranges) { array.pop(); }\n else { break }\n }\n}\n\n// Find the top change event in the history. Pop off selection\n// events that are in the way.\nfunction lastChangeEvent(hist, force) {\n if (force) {\n clearSelectionEvents(hist.done);\n return lst(hist.done)\n } else if (hist.done.length && !lst(hist.done).ranges) {\n return lst(hist.done)\n } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {\n hist.done.pop();\n return lst(hist.done)\n }\n}\n\n// Register a change in the history. Merges changes that are within\n// a single operation, or are close together with an origin that\n// allows merging (starting with \"+\") into a single event.\nfunction addChangeToHistory(doc, change, selAfter, opId) {\n var hist = doc.history;\n hist.undone.length = 0;\n var time = +new Date, cur;\n var last;\n\n if ((hist.lastOp == opId ||\n hist.lastOrigin == change.origin && change.origin &&\n ((change.origin.charAt(0) == \"+\" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) ||\n change.origin.charAt(0) == \"*\")) &&\n (cur = lastChangeEvent(hist, hist.lastOp == opId))) {\n // Merge this change into the last event\n last = lst(cur.changes);\n if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {\n // Optimized case for simple insertion -- don't want to add\n // new changesets for every character typed\n last.to = changeEnd(change);\n } else {\n // Add new sub-event\n cur.changes.push(historyChangeFromChange(doc, change));\n }\n } else {\n // Can not be merged, start a new event.\n var before = lst(hist.done);\n if (!before || !before.ranges)\n { pushSelectionToHistory(doc.sel, hist.done); }\n cur = {changes: [historyChangeFromChange(doc, change)],\n generation: hist.generation};\n hist.done.push(cur);\n while (hist.done.length > hist.undoDepth) {\n hist.done.shift();\n if (!hist.done[0].ranges) { hist.done.shift(); }\n }\n }\n hist.done.push(selAfter);\n hist.generation = ++hist.maxGeneration;\n hist.lastModTime = hist.lastSelTime = time;\n hist.lastOp = hist.lastSelOp = opId;\n hist.lastOrigin = hist.lastSelOrigin = change.origin;\n\n if (!last) { signal(doc, \"historyAdded\"); }\n}\n\nfunction selectionEventCanBeMerged(doc, origin, prev, sel) {\n var ch = origin.charAt(0);\n return ch == \"*\" ||\n ch == \"+\" &&\n prev.ranges.length == sel.ranges.length &&\n prev.somethingSelected() == sel.somethingSelected() &&\n new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500)\n}\n\n// Called whenever the selection changes, sets the new selection as\n// the pending selection in the history, and pushes the old pending\n// selection into the 'done' array when it was significantly\n// different (in number of selected ranges, emptiness, or time).\nfunction addSelectionToHistory(doc, sel, opId, options) {\n var hist = doc.history, origin = options && options.origin;\n\n // A new event is started when the previous origin does not match\n // the current, or the origins don't allow matching. Origins\n // starting with * are always merged, those starting with + are\n // merged when similar and close together in time.\n if (opId == hist.lastSelOp ||\n (origin && hist.lastSelOrigin == origin &&\n (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||\n selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))\n { hist.done[hist.done.length - 1] = sel; }\n else\n { pushSelectionToHistory(sel, hist.done); }\n\n hist.lastSelTime = +new Date;\n hist.lastSelOrigin = origin;\n hist.lastSelOp = opId;\n if (options && options.clearRedo !== false)\n { clearSelectionEvents(hist.undone); }\n}\n\nfunction pushSelectionToHistory(sel, dest) {\n var top = lst(dest);\n if (!(top && top.ranges && top.equals(sel)))\n { dest.push(sel); }\n}\n\n// Used to store marked span information in the history.\nfunction attachLocalSpans(doc, change, from, to) {\n var existing = change[\"spans_\" + doc.id], n = 0;\n doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) {\n if (line.markedSpans)\n { (existing || (existing = change[\"spans_\" + doc.id] = {}))[n] = line.markedSpans; }\n ++n;\n });\n}\n\n// When un/re-doing restores text containing marked spans, those\n// that have been explicitly cleared should not be restored.\nfunction removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}\n\n// Retrieve and filter the old marked spans stored in a change event.\nfunction getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}\n\n// Used for un/re-doing changes from the history. Combines the\n// result of computing the existing spans with the set of spans that\n// existed in the history (so that deleting around a span and then\n// undoing brings back the span).\nfunction mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n if (!old) { return stretched }\n if (!stretched) { return old }\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i], stretchCur = stretched[i];\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n for (var k = 0; k < oldCur.length; ++k)\n { if (oldCur[k].marker == span.marker) { continue spans } }\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n return old\n}\n\n// Used both to provide a JSON-safe object in .getHistory, and, when\n// detaching a document, to split the history in two\nfunction copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n}\n\n// The 'scroll' parameter given to many of these indicated whether\n// the new cursor position should be scrolled into view after\n// modifying the selection.\n\n// If shift is held or the extend flag is set, extends a range to\n// include a given position (and optionally a second position).\n// Otherwise, simply returns the range between the given positions.\n// Used for cursor motion and such.\nfunction extendRange(range, head, other, extend) {\n if (extend) {\n var anchor = range.anchor;\n if (other) {\n var posBefore = cmp(head, anchor) < 0;\n if (posBefore != (cmp(other, anchor) < 0)) {\n anchor = head;\n head = other;\n } else if (posBefore != (cmp(head, other) < 0)) {\n head = other;\n }\n }\n return new Range(anchor, head)\n } else {\n return new Range(other || head, head)\n }\n}\n\n// Extend the primary selection range, discard the rest.\nfunction extendSelection(doc, head, other, options, extend) {\n if (extend == null) { extend = doc.cm && (doc.cm.display.shift || doc.extend); }\n setSelection(doc, new Selection([extendRange(doc.sel.primary(), head, other, extend)], 0), options);\n}\n\n// Extend all selections (pos is an array of selections with length\n// equal the number of selections)\nfunction extendSelections(doc, heads, options) {\n var out = [];\n var extend = doc.cm && (doc.cm.display.shift || doc.extend);\n for (var i = 0; i < doc.sel.ranges.length; i++)\n { out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend); }\n var newSel = normalizeSelection(out, doc.sel.primIndex);\n setSelection(doc, newSel, options);\n}\n\n// Updates a single range in the selection.\nfunction replaceOneSelection(doc, i, range, options) {\n var ranges = doc.sel.ranges.slice(0);\n ranges[i] = range;\n setSelection(doc, normalizeSelection(ranges, doc.sel.primIndex), options);\n}\n\n// Reset the selection to a single range.\nfunction setSimpleSelection(doc, anchor, head, options) {\n setSelection(doc, simpleSelection(anchor, head), options);\n}\n\n// Give beforeSelectionChange handlers a change to influence a\n// selection update.\nfunction filterSelectionChange(doc, sel, options) {\n var obj = {\n ranges: sel.ranges,\n update: function(ranges) {\n var this$1 = this;\n\n this.ranges = [];\n for (var i = 0; i < ranges.length; i++)\n { this$1.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),\n clipPos(doc, ranges[i].head)); }\n },\n origin: options && options.origin\n };\n signal(doc, \"beforeSelectionChange\", doc, obj);\n if (doc.cm) { signal(doc.cm, \"beforeSelectionChange\", doc.cm, obj); }\n if (obj.ranges != sel.ranges) { return normalizeSelection(obj.ranges, obj.ranges.length - 1) }\n else { return sel }\n}\n\nfunction setSelectionReplaceHistory(doc, sel, options) {\n var done = doc.history.done, last = lst(done);\n if (last && last.ranges) {\n done[done.length - 1] = sel;\n setSelectionNoUndo(doc, sel, options);\n } else {\n setSelection(doc, sel, options);\n }\n}\n\n// Set a new selection.\nfunction setSelection(doc, sel, options) {\n setSelectionNoUndo(doc, sel, options);\n addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);\n}\n\nfunction setSelectionNoUndo(doc, sel, options) {\n if (hasHandler(doc, \"beforeSelectionChange\") || doc.cm && hasHandler(doc.cm, \"beforeSelectionChange\"))\n { sel = filterSelectionChange(doc, sel, options); }\n\n var bias = options && options.bias ||\n (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);\n setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));\n\n if (!(options && options.scroll === false) && doc.cm)\n { ensureCursorVisible(doc.cm); }\n}\n\nfunction setSelectionInner(doc, sel) {\n if (sel.equals(doc.sel)) { return }\n\n doc.sel = sel;\n\n if (doc.cm) {\n doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged = true;\n signalCursorActivity(doc.cm);\n }\n signalLater(doc, \"cursorActivity\", doc);\n}\n\n// Verify that the selection does not partially select any atomic\n// marked ranges.\nfunction reCheckSelection(doc) {\n setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false));\n}\n\n// Return a selection that does not partially select any atomic\n// ranges.\nfunction skipAtomicInSelection(doc, sel, bias, mayClear) {\n var out;\n for (var i = 0; i < sel.ranges.length; i++) {\n var range = sel.ranges[i];\n var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i];\n var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear);\n var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear);\n if (out || newAnchor != range.anchor || newHead != range.head) {\n if (!out) { out = sel.ranges.slice(0, i); }\n out[i] = new Range(newAnchor, newHead);\n }\n }\n return out ? normalizeSelection(out, sel.primIndex) : sel\n}\n\nfunction skipAtomicInner(doc, pos, oldPos, dir, mayClear) {\n var line = getLine(doc, pos.line);\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var sp = line.markedSpans[i], m = sp.marker;\n if ((sp.from == null || (m.inclusiveLeft ? sp.from <= pos.ch : sp.from < pos.ch)) &&\n (sp.to == null || (m.inclusiveRight ? sp.to >= pos.ch : sp.to > pos.ch))) {\n if (mayClear) {\n signal(m, \"beforeCursorEnter\");\n if (m.explicitlyCleared) {\n if (!line.markedSpans) { break }\n else {--i; continue}\n }\n }\n if (!m.atomic) { continue }\n\n if (oldPos) {\n var near = m.find(dir < 0 ? 1 : -1), diff = (void 0);\n if (dir < 0 ? m.inclusiveRight : m.inclusiveLeft)\n { near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null); }\n if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))\n { return skipAtomicInner(doc, near, pos, dir, mayClear) }\n }\n\n var far = m.find(dir < 0 ? -1 : 1);\n if (dir < 0 ? m.inclusiveLeft : m.inclusiveRight)\n { far = movePos(doc, far, dir, far.line == pos.line ? line : null); }\n return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null\n }\n } }\n return pos\n}\n\n// Ensure a given position is not inside an atomic range.\nfunction skipAtomic(doc, pos, oldPos, bias, mayClear) {\n var dir = bias || 1;\n var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) ||\n (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) ||\n skipAtomicInner(doc, pos, oldPos, -dir, mayClear) ||\n (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true));\n if (!found) {\n doc.cantEdit = true;\n return Pos(doc.first, 0)\n }\n return found\n}\n\nfunction movePos(doc, pos, dir, line) {\n if (dir < 0 && pos.ch == 0) {\n if (pos.line > doc.first) { return clipPos(doc, Pos(pos.line - 1)) }\n else { return null }\n } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) {\n if (pos.line < doc.first + doc.size - 1) { return Pos(pos.line + 1, 0) }\n else { return null }\n } else {\n return new Pos(pos.line, pos.ch + dir)\n }\n}\n\nfunction selectAll(cm) {\n cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);\n}\n\n// UPDATING\n\n// Allow \"beforeChange\" event handlers to influence a change\nfunction filterChange(doc, change, update) {\n var obj = {\n canceled: false,\n from: change.from,\n to: change.to,\n text: change.text,\n origin: change.origin,\n cancel: function () { return obj.canceled = true; }\n };\n if (update) { obj.update = function (from, to, text, origin) {\n if (from) { obj.from = clipPos(doc, from); }\n if (to) { obj.to = clipPos(doc, to); }\n if (text) { obj.text = text; }\n if (origin !== undefined) { obj.origin = origin; }\n }; }\n signal(doc, \"beforeChange\", doc, obj);\n if (doc.cm) { signal(doc.cm, \"beforeChange\", doc.cm, obj); }\n\n if (obj.canceled) { return null }\n return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}\n}\n\n// Apply a change to a document, and add it to the document's\n// history, and propagating it to all linked documents.\nfunction makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n}\n\nfunction makeChangeInner(doc, change) {\n if (change.text.length == 1 && change.text[0] == \"\" && cmp(change.from, change.to) == 0) { return }\n var selAfter = computeSelAfterChange(doc, change);\n addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);\n\n makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));\n var rebased = [];\n\n linkedDocs(doc, function (doc, sharedHist) {\n if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n rebaseHist(doc.history, change);\n rebased.push(doc.history);\n }\n makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));\n });\n}\n\n// Revert a change stored in a document's history.\nfunction makeChangeFromHistory(doc, type, allowSelectionOnly) {\n var suppress = doc.cm && doc.cm.state.suppressEdits;\n if (suppress && !allowSelectionOnly) { return }\n\n var hist = doc.history, event, selAfter = doc.sel;\n var source = type == \"undo\" ? hist.done : hist.undone, dest = type == \"undo\" ? hist.undone : hist.done;\n\n // Verify that there is a useable event (so that ctrl-z won't\n // needlessly clear selection events)\n var i = 0;\n for (; i < source.length; i++) {\n event = source[i];\n if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges)\n { break }\n }\n if (i == source.length) { return }\n hist.lastOrigin = hist.lastSelOrigin = null;\n\n for (;;) {\n event = source.pop();\n if (event.ranges) {\n pushSelectionToHistory(event, dest);\n if (allowSelectionOnly && !event.equals(doc.sel)) {\n setSelection(doc, event, {clearRedo: false});\n return\n }\n selAfter = event;\n } else if (suppress) {\n source.push(event);\n return\n } else { break }\n }\n\n // Build up a reverse change object to add to the opposite history\n // stack (redo when undoing, and vice versa).\n var antiChanges = [];\n pushSelectionToHistory(selAfter, dest);\n dest.push({changes: antiChanges, generation: hist.generation});\n hist.generation = event.generation || ++hist.maxGeneration;\n\n var filter = hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\");\n\n var loop = function ( i ) {\n var change = event.changes[i];\n change.origin = type;\n if (filter && !filterChange(doc, change, false)) {\n source.length = 0;\n return {}\n }\n\n antiChanges.push(historyChangeFromChange(doc, change));\n\n var after = i ? computeSelAfterChange(doc, change) : lst(source);\n makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));\n if (!i && doc.cm) { doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); }\n var rebased = [];\n\n // Propagate to the linked documents\n linkedDocs(doc, function (doc, sharedHist) {\n if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n rebaseHist(doc.history, change);\n rebased.push(doc.history);\n }\n makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));\n });\n };\n\n for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) {\n var returned = loop( i$1 );\n\n if ( returned ) return returned.v;\n }\n}\n\n// Sub-views need their line numbers shifted when text is added\n// above or below them in the parent document.\nfunction shiftDoc(doc, distance) {\n if (distance == 0) { return }\n doc.first += distance;\n doc.sel = new Selection(map(doc.sel.ranges, function (range) { return new Range(\n Pos(range.anchor.line + distance, range.anchor.ch),\n Pos(range.head.line + distance, range.head.ch)\n ); }), doc.sel.primIndex);\n if (doc.cm) {\n regChange(doc.cm, doc.first, doc.first - distance, distance);\n for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++)\n { regLineChange(doc.cm, l, \"gutter\"); }\n }\n}\n\n// More lower-level change function, handling only a single document\n// (not linked ones).\nfunction makeChangeSingleDoc(doc, change, selAfter, spans) {\n if (doc.cm && !doc.cm.curOp)\n { return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) }\n\n if (change.to.line < doc.first) {\n shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));\n return\n }\n if (change.from.line > doc.lastLine()) { return }\n\n // Clip the change to the size of this doc\n if (change.from.line < doc.first) {\n var shift = change.text.length - 1 - (doc.first - change.from.line);\n shiftDoc(doc, shift);\n change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),\n text: [lst(change.text)], origin: change.origin};\n }\n var last = doc.lastLine();\n if (change.to.line > last) {\n change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),\n text: [change.text[0]], origin: change.origin};\n }\n\n change.removed = getBetween(doc, change.from, change.to);\n\n if (!selAfter) { selAfter = computeSelAfterChange(doc, change); }\n if (doc.cm) { makeChangeSingleDocInEditor(doc.cm, change, spans); }\n else { updateDoc(doc, change, spans); }\n setSelectionNoUndo(doc, selAfter, sel_dontScroll);\n}\n\n// Handle the interaction of a change to a document with the editor\n// that this document is part of.\nfunction makeChangeSingleDocInEditor(cm, change, spans) {\n var doc = cm.doc, display = cm.display, from = change.from, to = change.to;\n\n var recomputeMaxLength = false, checkWidthStart = from.line;\n if (!cm.options.lineWrapping) {\n checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));\n doc.iter(checkWidthStart, to.line + 1, function (line) {\n if (line == display.maxLine) {\n recomputeMaxLength = true;\n return true\n }\n });\n }\n\n if (doc.sel.contains(change.from, change.to) > -1)\n { signalCursorActivity(cm); }\n\n updateDoc(doc, change, spans, estimateHeight(cm));\n\n if (!cm.options.lineWrapping) {\n doc.iter(checkWidthStart, from.line + change.text.length, function (line) {\n var len = lineLength(line);\n if (len > display.maxLineLength) {\n display.maxLine = line;\n display.maxLineLength = len;\n display.maxLineChanged = true;\n recomputeMaxLength = false;\n }\n });\n if (recomputeMaxLength) { cm.curOp.updateMaxLine = true; }\n }\n\n retreatFrontier(doc, from.line);\n startWorker(cm, 400);\n\n var lendiff = change.text.length - (to.line - from.line) - 1;\n // Remember that these lines changed, for updating the display\n if (change.full)\n { regChange(cm); }\n else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change))\n { regLineChange(cm, from.line, \"text\"); }\n else\n { regChange(cm, from.line, to.line + 1, lendiff); }\n\n var changesHandler = hasHandler(cm, \"changes\"), changeHandler = hasHandler(cm, \"change\");\n if (changeHandler || changesHandler) {\n var obj = {\n from: from, to: to,\n text: change.text,\n removed: change.removed,\n origin: change.origin\n };\n if (changeHandler) { signalLater(cm, \"change\", cm, obj); }\n if (changesHandler) { (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); }\n }\n cm.display.selForContextMenu = null;\n}\n\nfunction replaceRange(doc, code, from, to, origin) {\n if (!to) { to = from; }\n if (cmp(to, from) < 0) { var assign;\n (assign = [to, from], from = assign[0], to = assign[1]); }\n if (typeof code == \"string\") { code = doc.splitLines(code); }\n makeChange(doc, {from: from, to: to, text: code, origin: origin});\n}\n\n// Rebasing/resetting history to deal with externally-sourced changes\n\nfunction rebaseHistSelSingle(pos, from, to, diff) {\n if (to < pos.line) {\n pos.line += diff;\n } else if (from < pos.line) {\n pos.line = from;\n pos.ch = 0;\n }\n}\n\n// Tries to rebase an array of history events given a change in the\n// document. If the change touches the same lines as the event, the\n// event, and everything 'behind' it, is discarded. If the change is\n// before the event, the event's positions are updated. Uses a\n// copy-on-write scheme for the positions, to avoid having to\n// reallocate them all on every rebase, but also avoid problems with\n// shared position objects being unsafely updated.\nfunction rebaseHistArray(array, from, to, diff) {\n for (var i = 0; i < array.length; ++i) {\n var sub = array[i], ok = true;\n if (sub.ranges) {\n if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; }\n for (var j = 0; j < sub.ranges.length; j++) {\n rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);\n rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);\n }\n continue\n }\n for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) {\n var cur = sub.changes[j$1];\n if (to < cur.from.line) {\n cur.from = Pos(cur.from.line + diff, cur.from.ch);\n cur.to = Pos(cur.to.line + diff, cur.to.ch);\n } else if (from <= cur.to.line) {\n ok = false;\n break\n }\n }\n if (!ok) {\n array.splice(0, i + 1);\n i = 0;\n }\n }\n}\n\nfunction rebaseHist(hist, change) {\n var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;\n rebaseHistArray(hist.done, from, to, diff);\n rebaseHistArray(hist.undone, from, to, diff);\n}\n\n// Utility for applying a change to a line by handle or number,\n// returning the number and optionally registering the line as\n// changed.\nfunction changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n}\n\n// The document is represented as a BTree consisting of leaves, with\n// chunk of lines in them, and branches, with up to ten leaves or\n// other branch nodes below them. The top node is always a branch\n// node, and is the document object itself (meaning it has\n// additional methods and properties).\n//\n// All nodes have parent links. The tree is used both to go from\n// line numbers to line objects, and to go from objects to numbers.\n// It also indexes by height, and is used to convert between height\n// and line object, and to find the total height of the document.\n//\n// See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html\n\nfunction LeafChunk(lines) {\n var this$1 = this;\n\n this.lines = lines;\n this.parent = null;\n var height = 0;\n for (var i = 0; i < lines.length; ++i) {\n lines[i].parent = this$1;\n height += lines[i].height;\n }\n this.height = height;\n}\n\nLeafChunk.prototype = {\n chunkSize: function() { return this.lines.length },\n\n // Remove the n lines at offset 'at'.\n removeInner: function(at, n) {\n var this$1 = this;\n\n for (var i = at, e = at + n; i < e; ++i) {\n var line = this$1.lines[i];\n this$1.height -= line.height;\n cleanUpLine(line);\n signalLater(line, \"delete\");\n }\n this.lines.splice(at, n);\n },\n\n // Helper used to collapse a small branch into a single leaf.\n collapse: function(lines) {\n lines.push.apply(lines, this.lines);\n },\n\n // Insert the given array of lines at offset 'at', count them as\n // having the given height.\n insertInner: function(at, lines, height) {\n var this$1 = this;\n\n this.height += height;\n this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));\n for (var i = 0; i < lines.length; ++i) { lines[i].parent = this$1; }\n },\n\n // Used to iterate over a part of the tree.\n iterN: function(at, n, op) {\n var this$1 = this;\n\n for (var e = at + n; at < e; ++at)\n { if (op(this$1.lines[at])) { return true } }\n }\n};\n\nfunction BranchChunk(children) {\n var this$1 = this;\n\n this.children = children;\n var size = 0, height = 0;\n for (var i = 0; i < children.length; ++i) {\n var ch = children[i];\n size += ch.chunkSize(); height += ch.height;\n ch.parent = this$1;\n }\n this.size = size;\n this.height = height;\n this.parent = null;\n}\n\nBranchChunk.prototype = {\n chunkSize: function() { return this.size },\n\n removeInner: function(at, n) {\n var this$1 = this;\n\n this.size -= n;\n for (var i = 0; i < this.children.length; ++i) {\n var child = this$1.children[i], sz = child.chunkSize();\n if (at < sz) {\n var rm = Math.min(n, sz - at), oldHeight = child.height;\n child.removeInner(at, rm);\n this$1.height -= oldHeight - child.height;\n if (sz == rm) { this$1.children.splice(i--, 1); child.parent = null; }\n if ((n -= rm) == 0) { break }\n at = 0;\n } else { at -= sz; }\n }\n // If the result is smaller than 25 lines, ensure that it is a\n // single leaf node.\n if (this.size - n < 25 &&\n (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {\n var lines = [];\n this.collapse(lines);\n this.children = [new LeafChunk(lines)];\n this.children[0].parent = this;\n }\n },\n\n collapse: function(lines) {\n var this$1 = this;\n\n for (var i = 0; i < this.children.length; ++i) { this$1.children[i].collapse(lines); }\n },\n\n insertInner: function(at, lines, height) {\n var this$1 = this;\n\n this.size += lines.length;\n this.height += height;\n for (var i = 0; i < this.children.length; ++i) {\n var child = this$1.children[i], sz = child.chunkSize();\n if (at <= sz) {\n child.insertInner(at, lines, height);\n if (child.lines && child.lines.length > 50) {\n // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced.\n // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest.\n var remaining = child.lines.length % 25 + 25;\n for (var pos = remaining; pos < child.lines.length;) {\n var leaf = new LeafChunk(child.lines.slice(pos, pos += 25));\n child.height -= leaf.height;\n this$1.children.splice(++i, 0, leaf);\n leaf.parent = this$1;\n }\n child.lines = child.lines.slice(0, remaining);\n this$1.maybeSpill();\n }\n break\n }\n at -= sz;\n }\n },\n\n // When a node has grown, check whether it should be split.\n maybeSpill: function() {\n if (this.children.length <= 10) { return }\n var me = this;\n do {\n var spilled = me.children.splice(me.children.length - 5, 5);\n var sibling = new BranchChunk(spilled);\n if (!me.parent) { // Become the parent node\n var copy = new BranchChunk(me.children);\n copy.parent = me;\n me.children = [copy, sibling];\n me = copy;\n } else {\n me.size -= sibling.size;\n me.height -= sibling.height;\n var myIndex = indexOf(me.parent.children, me);\n me.parent.children.splice(myIndex + 1, 0, sibling);\n }\n sibling.parent = me.parent;\n } while (me.children.length > 10)\n me.parent.maybeSpill();\n },\n\n iterN: function(at, n, op) {\n var this$1 = this;\n\n for (var i = 0; i < this.children.length; ++i) {\n var child = this$1.children[i], sz = child.chunkSize();\n if (at < sz) {\n var used = Math.min(n, sz - at);\n if (child.iterN(at, used, op)) { return true }\n if ((n -= used) == 0) { break }\n at = 0;\n } else { at -= sz; }\n }\n }\n};\n\n// Line widgets are block elements displayed above or below a line.\n\nvar LineWidget = function(doc, node, options) {\n var this$1 = this;\n\n if (options) { for (var opt in options) { if (options.hasOwnProperty(opt))\n { this$1[opt] = options[opt]; } } }\n this.doc = doc;\n this.node = node;\n};\n\nLineWidget.prototype.clear = function () {\n var this$1 = this;\n\n var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);\n if (no == null || !ws) { return }\n for (var i = 0; i < ws.length; ++i) { if (ws[i] == this$1) { ws.splice(i--, 1); } }\n if (!ws.length) { line.widgets = null; }\n var height = widgetHeight(this);\n updateLineHeight(line, Math.max(0, line.height - height));\n if (cm) {\n runInOp(cm, function () {\n adjustScrollWhenAboveVisible(cm, line, -height);\n regLineChange(cm, no, \"widget\");\n });\n signalLater(cm, \"lineWidgetCleared\", cm, this, no);\n }\n};\n\nLineWidget.prototype.changed = function () {\n var this$1 = this;\n\n var oldH = this.height, cm = this.doc.cm, line = this.line;\n this.height = null;\n var diff = widgetHeight(this) - oldH;\n if (!diff) { return }\n updateLineHeight(line, line.height + diff);\n if (cm) {\n runInOp(cm, function () {\n cm.curOp.forceUpdate = true;\n adjustScrollWhenAboveVisible(cm, line, diff);\n signalLater(cm, \"lineWidgetChanged\", cm, this$1, lineNo(line));\n });\n }\n};\neventMixin(LineWidget);\n\nfunction adjustScrollWhenAboveVisible(cm, line, diff) {\n if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop))\n { addToScrollTop(cm, diff); }\n}\n\nfunction addLineWidget(doc, handle, node, options) {\n var widget = new LineWidget(doc, node, options);\n var cm = doc.cm;\n if (cm && widget.noHScroll) { cm.display.alignWidgets = true; }\n changeLine(doc, handle, \"widget\", function (line) {\n var widgets = line.widgets || (line.widgets = []);\n if (widget.insertAt == null) { widgets.push(widget); }\n else { widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget); }\n widget.line = line;\n if (cm && !lineIsHidden(doc, line)) {\n var aboveVisible = heightAtLine(line) < doc.scrollTop;\n updateLineHeight(line, line.height + widgetHeight(widget));\n if (aboveVisible) { addToScrollTop(cm, widget.height); }\n cm.curOp.forceUpdate = true;\n }\n return true\n });\n if (cm) { signalLater(cm, \"lineWidgetAdded\", cm, widget, typeof handle == \"number\" ? handle : lineNo(handle)); }\n return widget\n}\n\n// TEXTMARKERS\n\n// Created with markText and setBookmark methods. A TextMarker is a\n// handle that can be used to clear or find a marked position in the\n// document. Line objects hold arrays (markedSpans) containing\n// {from, to, marker} object pointing to such marker objects, and\n// indicating that such a marker is present on that line. Multiple\n// lines may point to the same marker when it spans across lines.\n// The spans will have null for their from/to properties when the\n// marker continues beyond the start/end of the line. Markers have\n// links back to the lines they currently touch.\n\n// Collapsed markers have unique ids, in order to be able to order\n// them, which is needed for uniquely determining an outer marker\n// when they overlap (they may nest, but not partially overlap).\nvar nextMarkerId = 0;\n\nvar TextMarker = function(doc, type) {\n this.lines = [];\n this.type = type;\n this.doc = doc;\n this.id = ++nextMarkerId;\n};\n\n// Clear the marker.\nTextMarker.prototype.clear = function () {\n var this$1 = this;\n\n if (this.explicitlyCleared) { return }\n var cm = this.doc.cm, withOp = cm && !cm.curOp;\n if (withOp) { startOperation(cm); }\n if (hasHandler(this, \"clear\")) {\n var found = this.find();\n if (found) { signalLater(this, \"clear\", found.from, found.to); }\n }\n var min = null, max = null;\n for (var i = 0; i < this.lines.length; ++i) {\n var line = this$1.lines[i];\n var span = getMarkedSpanFor(line.markedSpans, this$1);\n if (cm && !this$1.collapsed) { regLineChange(cm, lineNo(line), \"text\"); }\n else if (cm) {\n if (span.to != null) { max = lineNo(line); }\n if (span.from != null) { min = lineNo(line); }\n }\n line.markedSpans = removeMarkedSpan(line.markedSpans, span);\n if (span.from == null && this$1.collapsed && !lineIsHidden(this$1.doc, line) && cm)\n { updateLineHeight(line, textHeight(cm.display)); }\n }\n if (cm && this.collapsed && !cm.options.lineWrapping) { for (var i$1 = 0; i$1 < this.lines.length; ++i$1) {\n var visual = visualLine(this$1.lines[i$1]), len = lineLength(visual);\n if (len > cm.display.maxLineLength) {\n cm.display.maxLine = visual;\n cm.display.maxLineLength = len;\n cm.display.maxLineChanged = true;\n }\n } }\n\n if (min != null && cm && this.collapsed) { regChange(cm, min, max + 1); }\n this.lines.length = 0;\n this.explicitlyCleared = true;\n if (this.atomic && this.doc.cantEdit) {\n this.doc.cantEdit = false;\n if (cm) { reCheckSelection(cm.doc); }\n }\n if (cm) { signalLater(cm, \"markerCleared\", cm, this, min, max); }\n if (withOp) { endOperation(cm); }\n if (this.parent) { this.parent.clear(); }\n};\n\n// Find the position of the marker in the document. Returns a {from,\n// to} object by default. Side can be passed to get a specific side\n// -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the\n// Pos objects returned contain a line object, rather than a line\n// number (used to prevent looking up the same line twice).\nTextMarker.prototype.find = function (side, lineObj) {\n var this$1 = this;\n\n if (side == null && this.type == \"bookmark\") { side = 1; }\n var from, to;\n for (var i = 0; i < this.lines.length; ++i) {\n var line = this$1.lines[i];\n var span = getMarkedSpanFor(line.markedSpans, this$1);\n if (span.from != null) {\n from = Pos(lineObj ? line : lineNo(line), span.from);\n if (side == -1) { return from }\n }\n if (span.to != null) {\n to = Pos(lineObj ? line : lineNo(line), span.to);\n if (side == 1) { return to }\n }\n }\n return from && {from: from, to: to}\n};\n\n// Signals that the marker's widget changed, and surrounding layout\n// should be recomputed.\nTextMarker.prototype.changed = function () {\n var this$1 = this;\n\n var pos = this.find(-1, true), widget = this, cm = this.doc.cm;\n if (!pos || !cm) { return }\n runInOp(cm, function () {\n var line = pos.line, lineN = lineNo(pos.line);\n var view = findViewForLine(cm, lineN);\n if (view) {\n clearLineMeasurementCacheFor(view);\n cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;\n }\n cm.curOp.updateMaxLine = true;\n if (!lineIsHidden(widget.doc, line) && widget.height != null) {\n var oldHeight = widget.height;\n widget.height = null;\n var dHeight = widgetHeight(widget) - oldHeight;\n if (dHeight)\n { updateLineHeight(line, line.height + dHeight); }\n }\n signalLater(cm, \"markerChanged\", cm, this$1);\n });\n};\n\nTextMarker.prototype.attachLine = function (line) {\n if (!this.lines.length && this.doc.cm) {\n var op = this.doc.cm.curOp;\n if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)\n { (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); }\n }\n this.lines.push(line);\n};\n\nTextMarker.prototype.detachLine = function (line) {\n this.lines.splice(indexOf(this.lines, line), 1);\n if (!this.lines.length && this.doc.cm) {\n var op = this.doc.cm.curOp;(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);\n }\n};\neventMixin(TextMarker);\n\n// Create a marker, wire it up to the right lines, and\nfunction markText(doc, from, to, options, type) {\n // Shared markers (across linked documents) are handled separately\n // (markTextShared will call out to this again, once per\n // document).\n if (options && options.shared) { return markTextShared(doc, from, to, options, type) }\n // Ensure we are in an operation.\n if (doc.cm && !doc.cm.curOp) { return operation(doc.cm, markText)(doc, from, to, options, type) }\n\n var marker = new TextMarker(doc, type), diff = cmp(from, to);\n if (options) { copyObj(options, marker, false); }\n // Don't connect empty markers unless clearWhenEmpty is false\n if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false)\n { return marker }\n if (marker.replacedWith) {\n // Showing up as a widget implies collapsed (widget replaces text)\n marker.collapsed = true;\n marker.widgetNode = eltP(\"span\", [marker.replacedWith], \"CodeMirror-widget\");\n if (!options.handleMouseEvents) { marker.widgetNode.setAttribute(\"cm-ignore-events\", \"true\"); }\n if (options.insertLeft) { marker.widgetNode.insertLeft = true; }\n }\n if (marker.collapsed) {\n if (conflictingCollapsedRange(doc, from.line, from, to, marker) ||\n from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker))\n { throw new Error(\"Inserting collapsed marker partially overlapping an existing one\") }\n seeCollapsedSpans();\n }\n\n if (marker.addToHistory)\n { addChangeToHistory(doc, {from: from, to: to, origin: \"markText\"}, doc.sel, NaN); }\n\n var curLine = from.line, cm = doc.cm, updateMaxLine;\n doc.iter(curLine, to.line + 1, function (line) {\n if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine)\n { updateMaxLine = true; }\n if (marker.collapsed && curLine != from.line) { updateLineHeight(line, 0); }\n addMarkedSpan(line, new MarkedSpan(marker,\n curLine == from.line ? from.ch : null,\n curLine == to.line ? to.ch : null));\n ++curLine;\n });\n // lineIsHidden depends on the presence of the spans, so needs a second pass\n if (marker.collapsed) { doc.iter(from.line, to.line + 1, function (line) {\n if (lineIsHidden(doc, line)) { updateLineHeight(line, 0); }\n }); }\n\n if (marker.clearOnEnter) { on(marker, \"beforeCursorEnter\", function () { return marker.clear(); }); }\n\n if (marker.readOnly) {\n seeReadOnlySpans();\n if (doc.history.done.length || doc.history.undone.length)\n { doc.clearHistory(); }\n }\n if (marker.collapsed) {\n marker.id = ++nextMarkerId;\n marker.atomic = true;\n }\n if (cm) {\n // Sync editor state\n if (updateMaxLine) { cm.curOp.updateMaxLine = true; }\n if (marker.collapsed)\n { regChange(cm, from.line, to.line + 1); }\n else if (marker.className || marker.title || marker.startStyle || marker.endStyle || marker.css)\n { for (var i = from.line; i <= to.line; i++) { regLineChange(cm, i, \"text\"); } }\n if (marker.atomic) { reCheckSelection(cm.doc); }\n signalLater(cm, \"markerAdded\", cm, marker);\n }\n return marker\n}\n\n// SHARED TEXTMARKERS\n\n// A shared marker spans multiple linked documents. It is\n// implemented as a meta-marker-object controlling multiple normal\n// markers.\nvar SharedTextMarker = function(markers, primary) {\n var this$1 = this;\n\n this.markers = markers;\n this.primary = primary;\n for (var i = 0; i < markers.length; ++i)\n { markers[i].parent = this$1; }\n};\n\nSharedTextMarker.prototype.clear = function () {\n var this$1 = this;\n\n if (this.explicitlyCleared) { return }\n this.explicitlyCleared = true;\n for (var i = 0; i < this.markers.length; ++i)\n { this$1.markers[i].clear(); }\n signalLater(this, \"clear\");\n};\n\nSharedTextMarker.prototype.find = function (side, lineObj) {\n return this.primary.find(side, lineObj)\n};\neventMixin(SharedTextMarker);\n\nfunction markTextShared(doc, from, to, options, type) {\n options = copyObj(options);\n options.shared = false;\n var markers = [markText(doc, from, to, options, type)], primary = markers[0];\n var widget = options.widgetNode;\n linkedDocs(doc, function (doc) {\n if (widget) { options.widgetNode = widget.cloneNode(true); }\n markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));\n for (var i = 0; i < doc.linked.length; ++i)\n { if (doc.linked[i].isParent) { return } }\n primary = lst(markers);\n });\n return new SharedTextMarker(markers, primary)\n}\n\nfunction findSharedMarkers(doc) {\n return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), function (m) { return m.parent; })\n}\n\nfunction copySharedMarkers(doc, markers) {\n for (var i = 0; i < markers.length; i++) {\n var marker = markers[i], pos = marker.find();\n var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to);\n if (cmp(mFrom, mTo)) {\n var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type);\n marker.markers.push(subMark);\n subMark.parent = marker;\n }\n }\n}\n\nfunction detachSharedMarkers(markers) {\n var loop = function ( i ) {\n var marker = markers[i], linked = [marker.primary.doc];\n linkedDocs(marker.primary.doc, function (d) { return linked.push(d); });\n for (var j = 0; j < marker.markers.length; j++) {\n var subMarker = marker.markers[j];\n if (indexOf(linked, subMarker.doc) == -1) {\n subMarker.parent = null;\n marker.markers.splice(j--, 1);\n }\n }\n };\n\n for (var i = 0; i < markers.length; i++) loop( i );\n}\n\nvar nextDocId = 0;\nvar Doc = function(text, mode, firstLine, lineSep, direction) {\n if (!(this instanceof Doc)) { return new Doc(text, mode, firstLine, lineSep, direction) }\n if (firstLine == null) { firstLine = 0; }\n\n BranchChunk.call(this, [new LeafChunk([new Line(\"\", null)])]);\n this.first = firstLine;\n this.scrollTop = this.scrollLeft = 0;\n this.cantEdit = false;\n this.cleanGeneration = 1;\n this.modeFrontier = this.highlightFrontier = firstLine;\n var start = Pos(firstLine, 0);\n this.sel = simpleSelection(start);\n this.history = new History(null);\n this.id = ++nextDocId;\n this.modeOption = mode;\n this.lineSep = lineSep;\n this.direction = (direction == \"rtl\") ? \"rtl\" : \"ltr\";\n this.extend = false;\n\n if (typeof text == \"string\") { text = this.splitLines(text); }\n updateDoc(this, {from: start, to: start, text: text});\n setSelection(this, simpleSelection(start), sel_dontScroll);\n};\n\nDoc.prototype = createObj(BranchChunk.prototype, {\n constructor: Doc,\n // Iterate over the document. Supports two forms -- with only one\n // argument, it calls that for each line in the document. With\n // three, it iterates over the range given by the first two (with\n // the second being non-inclusive).\n iter: function(from, to, op) {\n if (op) { this.iterN(from - this.first, to - from, op); }\n else { this.iterN(this.first, this.first + this.size, from); }\n },\n\n // Non-public interface for adding and removing lines.\n insert: function(at, lines) {\n var height = 0;\n for (var i = 0; i < lines.length; ++i) { height += lines[i].height; }\n this.insertInner(at - this.first, lines, height);\n },\n remove: function(at, n) { this.removeInner(at - this.first, n); },\n\n // From here, the methods are part of the public interface. Most\n // are also available from CodeMirror (editor) instances.\n\n getValue: function(lineSep) {\n var lines = getLines(this, this.first, this.first + this.size);\n if (lineSep === false) { return lines }\n return lines.join(lineSep || this.lineSeparator())\n },\n setValue: docMethodOp(function(code) {\n var top = Pos(this.first, 0), last = this.first + this.size - 1;\n makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),\n text: this.splitLines(code), origin: \"setValue\", full: true}, true);\n if (this.cm) { scrollToCoords(this.cm, 0, 0); }\n setSelection(this, simpleSelection(top), sel_dontScroll);\n }),\n replaceRange: function(code, from, to, origin) {\n from = clipPos(this, from);\n to = to ? clipPos(this, to) : from;\n replaceRange(this, code, from, to, origin);\n },\n getRange: function(from, to, lineSep) {\n var lines = getBetween(this, clipPos(this, from), clipPos(this, to));\n if (lineSep === false) { return lines }\n return lines.join(lineSep || this.lineSeparator())\n },\n\n getLine: function(line) {var l = this.getLineHandle(line); return l && l.text},\n\n getLineHandle: function(line) {if (isLine(this, line)) { return getLine(this, line) }},\n getLineNumber: function(line) {return lineNo(line)},\n\n getLineHandleVisualStart: function(line) {\n if (typeof line == \"number\") { line = getLine(this, line); }\n return visualLine(line)\n },\n\n lineCount: function() {return this.size},\n firstLine: function() {return this.first},\n lastLine: function() {return this.first + this.size - 1},\n\n clipPos: function(pos) {return clipPos(this, pos)},\n\n getCursor: function(start) {\n var range$$1 = this.sel.primary(), pos;\n if (start == null || start == \"head\") { pos = range$$1.head; }\n else if (start == \"anchor\") { pos = range$$1.anchor; }\n else if (start == \"end\" || start == \"to\" || start === false) { pos = range$$1.to(); }\n else { pos = range$$1.from(); }\n return pos\n },\n listSelections: function() { return this.sel.ranges },\n somethingSelected: function() {return this.sel.somethingSelected()},\n\n setCursor: docMethodOp(function(line, ch, options) {\n setSimpleSelection(this, clipPos(this, typeof line == \"number\" ? Pos(line, ch || 0) : line), null, options);\n }),\n setSelection: docMethodOp(function(anchor, head, options) {\n setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options);\n }),\n extendSelection: docMethodOp(function(head, other, options) {\n extendSelection(this, clipPos(this, head), other && clipPos(this, other), options);\n }),\n extendSelections: docMethodOp(function(heads, options) {\n extendSelections(this, clipPosArray(this, heads), options);\n }),\n extendSelectionsBy: docMethodOp(function(f, options) {\n var heads = map(this.sel.ranges, f);\n extendSelections(this, clipPosArray(this, heads), options);\n }),\n setSelections: docMethodOp(function(ranges, primary, options) {\n var this$1 = this;\n\n if (!ranges.length) { return }\n var out = [];\n for (var i = 0; i < ranges.length; i++)\n { out[i] = new Range(clipPos(this$1, ranges[i].anchor),\n clipPos(this$1, ranges[i].head)); }\n if (primary == null) { primary = Math.min(ranges.length - 1, this.sel.primIndex); }\n setSelection(this, normalizeSelection(out, primary), options);\n }),\n addSelection: docMethodOp(function(anchor, head, options) {\n var ranges = this.sel.ranges.slice(0);\n ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));\n setSelection(this, normalizeSelection(ranges, ranges.length - 1), options);\n }),\n\n getSelection: function(lineSep) {\n var this$1 = this;\n\n var ranges = this.sel.ranges, lines;\n for (var i = 0; i < ranges.length; i++) {\n var sel = getBetween(this$1, ranges[i].from(), ranges[i].to());\n lines = lines ? lines.concat(sel) : sel;\n }\n if (lineSep === false) { return lines }\n else { return lines.join(lineSep || this.lineSeparator()) }\n },\n getSelections: function(lineSep) {\n var this$1 = this;\n\n var parts = [], ranges = this.sel.ranges;\n for (var i = 0; i < ranges.length; i++) {\n var sel = getBetween(this$1, ranges[i].from(), ranges[i].to());\n if (lineSep !== false) { sel = sel.join(lineSep || this$1.lineSeparator()); }\n parts[i] = sel;\n }\n return parts\n },\n replaceSelection: function(code, collapse, origin) {\n var dup = [];\n for (var i = 0; i < this.sel.ranges.length; i++)\n { dup[i] = code; }\n this.replaceSelections(dup, collapse, origin || \"+input\");\n },\n replaceSelections: docMethodOp(function(code, collapse, origin) {\n var this$1 = this;\n\n var changes = [], sel = this.sel;\n for (var i = 0; i < sel.ranges.length; i++) {\n var range$$1 = sel.ranges[i];\n changes[i] = {from: range$$1.from(), to: range$$1.to(), text: this$1.splitLines(code[i]), origin: origin};\n }\n var newSel = collapse && collapse != \"end\" && computeReplacedSel(this, changes, collapse);\n for (var i$1 = changes.length - 1; i$1 >= 0; i$1--)\n { makeChange(this$1, changes[i$1]); }\n if (newSel) { setSelectionReplaceHistory(this, newSel); }\n else if (this.cm) { ensureCursorVisible(this.cm); }\n }),\n undo: docMethodOp(function() {makeChangeFromHistory(this, \"undo\");}),\n redo: docMethodOp(function() {makeChangeFromHistory(this, \"redo\");}),\n undoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"undo\", true);}),\n redoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"redo\", true);}),\n\n setExtending: function(val) {this.extend = val;},\n getExtending: function() {return this.extend},\n\n historySize: function() {\n var hist = this.history, done = 0, undone = 0;\n for (var i = 0; i < hist.done.length; i++) { if (!hist.done[i].ranges) { ++done; } }\n for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { if (!hist.undone[i$1].ranges) { ++undone; } }\n return {undo: done, redo: undone}\n },\n clearHistory: function() {this.history = new History(this.history.maxGeneration);},\n\n markClean: function() {\n this.cleanGeneration = this.changeGeneration(true);\n },\n changeGeneration: function(forceSplit) {\n if (forceSplit)\n { this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; }\n return this.history.generation\n },\n isClean: function (gen) {\n return this.history.generation == (gen || this.cleanGeneration)\n },\n\n getHistory: function() {\n return {done: copyHistoryArray(this.history.done),\n undone: copyHistoryArray(this.history.undone)}\n },\n setHistory: function(histData) {\n var hist = this.history = new History(this.history.maxGeneration);\n hist.done = copyHistoryArray(histData.done.slice(0), null, true);\n hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);\n },\n\n setGutterMarker: docMethodOp(function(line, gutterID, value) {\n return changeLine(this, line, \"gutter\", function (line) {\n var markers = line.gutterMarkers || (line.gutterMarkers = {});\n markers[gutterID] = value;\n if (!value && isEmpty(markers)) { line.gutterMarkers = null; }\n return true\n })\n }),\n\n clearGutter: docMethodOp(function(gutterID) {\n var this$1 = this;\n\n this.iter(function (line) {\n if (line.gutterMarkers && line.gutterMarkers[gutterID]) {\n changeLine(this$1, line, \"gutter\", function () {\n line.gutterMarkers[gutterID] = null;\n if (isEmpty(line.gutterMarkers)) { line.gutterMarkers = null; }\n return true\n });\n }\n });\n }),\n\n lineInfo: function(line) {\n var n;\n if (typeof line == \"number\") {\n if (!isLine(this, line)) { return null }\n n = line;\n line = getLine(this, line);\n if (!line) { return null }\n } else {\n n = lineNo(line);\n if (n == null) { return null }\n }\n return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,\n textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,\n widgets: line.widgets}\n },\n\n addLineClass: docMethodOp(function(handle, where, cls) {\n return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function (line) {\n var prop = where == \"text\" ? \"textClass\"\n : where == \"background\" ? \"bgClass\"\n : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n if (!line[prop]) { line[prop] = cls; }\n else if (classTest(cls).test(line[prop])) { return false }\n else { line[prop] += \" \" + cls; }\n return true\n })\n }),\n removeLineClass: docMethodOp(function(handle, where, cls) {\n return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function (line) {\n var prop = where == \"text\" ? \"textClass\"\n : where == \"background\" ? \"bgClass\"\n : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n var cur = line[prop];\n if (!cur) { return false }\n else if (cls == null) { line[prop] = null; }\n else {\n var found = cur.match(classTest(cls));\n if (!found) { return false }\n var end = found.index + found[0].length;\n line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? \"\" : \" \") + cur.slice(end) || null;\n }\n return true\n })\n }),\n\n addLineWidget: docMethodOp(function(handle, node, options) {\n return addLineWidget(this, handle, node, options)\n }),\n removeLineWidget: function(widget) { widget.clear(); },\n\n markText: function(from, to, options) {\n return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || \"range\")\n },\n setBookmark: function(pos, options) {\n var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),\n insertLeft: options && options.insertLeft,\n clearWhenEmpty: false, shared: options && options.shared,\n handleMouseEvents: options && options.handleMouseEvents};\n pos = clipPos(this, pos);\n return markText(this, pos, pos, realOpts, \"bookmark\")\n },\n findMarksAt: function(pos) {\n pos = clipPos(this, pos);\n var markers = [], spans = getLine(this, pos.line).markedSpans;\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if ((span.from == null || span.from <= pos.ch) &&\n (span.to == null || span.to >= pos.ch))\n { markers.push(span.marker.parent || span.marker); }\n } }\n return markers\n },\n findMarks: function(from, to, filter) {\n from = clipPos(this, from); to = clipPos(this, to);\n var found = [], lineNo$$1 = from.line;\n this.iter(from.line, to.line + 1, function (line) {\n var spans = line.markedSpans;\n if (spans) { for (var i = 0; i < spans.length; i++) {\n var span = spans[i];\n if (!(span.to != null && lineNo$$1 == from.line && from.ch >= span.to ||\n span.from == null && lineNo$$1 != from.line ||\n span.from != null && lineNo$$1 == to.line && span.from >= to.ch) &&\n (!filter || filter(span.marker)))\n { found.push(span.marker.parent || span.marker); }\n } }\n ++lineNo$$1;\n });\n return found\n },\n getAllMarks: function() {\n var markers = [];\n this.iter(function (line) {\n var sps = line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i)\n { if (sps[i].from != null) { markers.push(sps[i].marker); } } }\n });\n return markers\n },\n\n posFromIndex: function(off) {\n var ch, lineNo$$1 = this.first, sepSize = this.lineSeparator().length;\n this.iter(function (line) {\n var sz = line.text.length + sepSize;\n if (sz > off) { ch = off; return true }\n off -= sz;\n ++lineNo$$1;\n });\n return clipPos(this, Pos(lineNo$$1, ch))\n },\n indexFromPos: function (coords) {\n coords = clipPos(this, coords);\n var index = coords.ch;\n if (coords.line < this.first || coords.ch < 0) { return 0 }\n var sepSize = this.lineSeparator().length;\n this.iter(this.first, coords.line, function (line) { // iter aborts when callback returns a truthy value\n index += line.text.length + sepSize;\n });\n return index\n },\n\n copy: function(copyHistory) {\n var doc = new Doc(getLines(this, this.first, this.first + this.size),\n this.modeOption, this.first, this.lineSep, this.direction);\n doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;\n doc.sel = this.sel;\n doc.extend = false;\n if (copyHistory) {\n doc.history.undoDepth = this.history.undoDepth;\n doc.setHistory(this.getHistory());\n }\n return doc\n },\n\n linkedDoc: function(options) {\n if (!options) { options = {}; }\n var from = this.first, to = this.first + this.size;\n if (options.from != null && options.from > from) { from = options.from; }\n if (options.to != null && options.to < to) { to = options.to; }\n var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep, this.direction);\n if (options.sharedHist) { copy.history = this.history\n ; }(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});\n copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];\n copySharedMarkers(copy, findSharedMarkers(this));\n return copy\n },\n unlinkDoc: function(other) {\n var this$1 = this;\n\n if (other instanceof CodeMirror$1) { other = other.doc; }\n if (this.linked) { for (var i = 0; i < this.linked.length; ++i) {\n var link = this$1.linked[i];\n if (link.doc != other) { continue }\n this$1.linked.splice(i, 1);\n other.unlinkDoc(this$1);\n detachSharedMarkers(findSharedMarkers(this$1));\n break\n } }\n // If the histories were shared, split them again\n if (other.history == this.history) {\n var splitIds = [other.id];\n linkedDocs(other, function (doc) { return splitIds.push(doc.id); }, true);\n other.history = new History(null);\n other.history.done = copyHistoryArray(this.history.done, splitIds);\n other.history.undone = copyHistoryArray(this.history.undone, splitIds);\n }\n },\n iterLinkedDocs: function(f) {linkedDocs(this, f);},\n\n getMode: function() {return this.mode},\n getEditor: function() {return this.cm},\n\n splitLines: function(str) {\n if (this.lineSep) { return str.split(this.lineSep) }\n return splitLinesAuto(str)\n },\n lineSeparator: function() { return this.lineSep || \"\\n\" },\n\n setDirection: docMethodOp(function (dir) {\n if (dir != \"rtl\") { dir = \"ltr\"; }\n if (dir == this.direction) { return }\n this.direction = dir;\n this.iter(function (line) { return line.order = null; });\n if (this.cm) { directionChanged(this.cm); }\n })\n});\n\n// Public alias.\nDoc.prototype.eachLine = Doc.prototype.iter;\n\n// Kludge to work around strange IE behavior where it'll sometimes\n// re-fire a series of drag-related events right after the drop (#1551)\nvar lastDrop = 0;\n\nfunction onDrop(e) {\n var cm = this;\n clearDragCursor(cm);\n if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))\n { return }\n e_preventDefault(e);\n if (ie) { lastDrop = +new Date; }\n var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;\n if (!pos || cm.isReadOnly()) { return }\n // Might be a file drop, in which case we simply extract the text\n // and insert it.\n if (files && files.length && window.FileReader && window.File) {\n var n = files.length, text = Array(n), read = 0;\n var loadFile = function (file, i) {\n if (cm.options.allowDropFileTypes &&\n indexOf(cm.options.allowDropFileTypes, file.type) == -1)\n { return }\n\n var reader = new FileReader;\n reader.onload = operation(cm, function () {\n var content = reader.result;\n if (/[\\x00-\\x08\\x0e-\\x1f]{2}/.test(content)) { content = \"\"; }\n text[i] = content;\n if (++read == n) {\n pos = clipPos(cm.doc, pos);\n var change = {from: pos, to: pos,\n text: cm.doc.splitLines(text.join(cm.doc.lineSeparator())),\n origin: \"paste\"};\n makeChange(cm.doc, change);\n setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change)));\n }\n });\n reader.readAsText(file);\n };\n for (var i = 0; i < n; ++i) { loadFile(files[i], i); }\n } else { // Normal drop\n // Don't do a replace if the drop happened inside of the selected text.\n if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {\n cm.state.draggingText(e);\n // Ensure the editor is re-focused\n setTimeout(function () { return cm.display.input.focus(); }, 20);\n return\n }\n try {\n var text$1 = e.dataTransfer.getData(\"Text\");\n if (text$1) {\n var selected;\n if (cm.state.draggingText && !cm.state.draggingText.copy)\n { selected = cm.listSelections(); }\n setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));\n if (selected) { for (var i$1 = 0; i$1 < selected.length; ++i$1)\n { replaceRange(cm.doc, \"\", selected[i$1].anchor, selected[i$1].head, \"drag\"); } }\n cm.replaceSelection(text$1, \"around\", \"paste\");\n cm.display.input.focus();\n }\n }\n catch(e){}\n }\n}\n\nfunction onDragStart(cm, e) {\n if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return }\n if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { return }\n\n e.dataTransfer.setData(\"Text\", cm.getSelection());\n e.dataTransfer.effectAllowed = \"copyMove\";\n\n // Use dummy image instead of default browsers image.\n // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.\n if (e.dataTransfer.setDragImage && !safari) {\n var img = elt(\"img\", null, null, \"position: fixed; left: 0; top: 0;\");\n img.src = \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\";\n if (presto) {\n img.width = img.height = 1;\n cm.display.wrapper.appendChild(img);\n // Force a relayout, or Opera won't use our image for some obscure reason\n img._top = img.offsetTop;\n }\n e.dataTransfer.setDragImage(img, 0, 0);\n if (presto) { img.parentNode.removeChild(img); }\n }\n}\n\nfunction onDragOver(cm, e) {\n var pos = posFromMouse(cm, e);\n if (!pos) { return }\n var frag = document.createDocumentFragment();\n drawSelectionCursor(cm, pos, frag);\n if (!cm.display.dragCursor) {\n cm.display.dragCursor = elt(\"div\", null, \"CodeMirror-cursors CodeMirror-dragcursors\");\n cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv);\n }\n removeChildrenAndAdd(cm.display.dragCursor, frag);\n}\n\nfunction clearDragCursor(cm) {\n if (cm.display.dragCursor) {\n cm.display.lineSpace.removeChild(cm.display.dragCursor);\n cm.display.dragCursor = null;\n }\n}\n\n// These must be handled carefully, because naively registering a\n// handler for each editor will cause the editors to never be\n// garbage collected.\n\nfunction forEachCodeMirror(f) {\n if (!document.getElementsByClassName) { return }\n var byClass = document.getElementsByClassName(\"CodeMirror\");\n for (var i = 0; i < byClass.length; i++) {\n var cm = byClass[i].CodeMirror;\n if (cm) { f(cm); }\n }\n}\n\nvar globalsRegistered = false;\nfunction ensureGlobalHandlers() {\n if (globalsRegistered) { return }\n registerGlobalHandlers();\n globalsRegistered = true;\n}\nfunction registerGlobalHandlers() {\n // When the window resizes, we need to refresh active editors.\n var resizeTimer;\n on(window, \"resize\", function () {\n if (resizeTimer == null) { resizeTimer = setTimeout(function () {\n resizeTimer = null;\n forEachCodeMirror(onResize);\n }, 100); }\n });\n // When the window loses focus, we want to show the editor as blurred\n on(window, \"blur\", function () { return forEachCodeMirror(onBlur); });\n}\n// Called when the window resizes\nfunction onResize(cm) {\n var d = cm.display;\n // Might be a text scaling operation, clear size caches.\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n d.scrollbarsClipped = false;\n cm.setSize();\n}\n\nvar keyNames = {\n 3: \"Pause\", 8: \"Backspace\", 9: \"Tab\", 13: \"Enter\", 16: \"Shift\", 17: \"Ctrl\", 18: \"Alt\",\n 19: \"Pause\", 20: \"CapsLock\", 27: \"Esc\", 32: \"Space\", 33: \"PageUp\", 34: \"PageDown\", 35: \"End\",\n 36: \"Home\", 37: \"Left\", 38: \"Up\", 39: \"Right\", 40: \"Down\", 44: \"PrintScrn\", 45: \"Insert\",\n 46: \"Delete\", 59: \";\", 61: \"=\", 91: \"Mod\", 92: \"Mod\", 93: \"Mod\",\n 106: \"*\", 107: \"=\", 109: \"-\", 110: \".\", 111: \"/\", 127: \"Delete\", 145: \"ScrollLock\",\n 173: \"-\", 186: \";\", 187: \"=\", 188: \",\", 189: \"-\", 190: \".\", 191: \"/\", 192: \"`\", 219: \"[\", 220: \"\\\\\",\n 221: \"]\", 222: \"'\", 63232: \"Up\", 63233: \"Down\", 63234: \"Left\", 63235: \"Right\", 63272: \"Delete\",\n 63273: \"Home\", 63275: \"End\", 63276: \"PageUp\", 63277: \"PageDown\", 63302: \"Insert\"\n};\n\n// Number keys\nfor (var i = 0; i < 10; i++) { keyNames[i + 48] = keyNames[i + 96] = String(i); }\n// Alphabetic keys\nfor (var i$1 = 65; i$1 <= 90; i$1++) { keyNames[i$1] = String.fromCharCode(i$1); }\n// Function keys\nfor (var i$2 = 1; i$2 <= 12; i$2++) { keyNames[i$2 + 111] = keyNames[i$2 + 63235] = \"F\" + i$2; }\n\nvar keyMap = {};\n\nkeyMap.basic = {\n \"Left\": \"goCharLeft\", \"Right\": \"goCharRight\", \"Up\": \"goLineUp\", \"Down\": \"goLineDown\",\n \"End\": \"goLineEnd\", \"Home\": \"goLineStartSmart\", \"PageUp\": \"goPageUp\", \"PageDown\": \"goPageDown\",\n \"Delete\": \"delCharAfter\", \"Backspace\": \"delCharBefore\", \"Shift-Backspace\": \"delCharBefore\",\n \"Tab\": \"defaultTab\", \"Shift-Tab\": \"indentAuto\",\n \"Enter\": \"newlineAndIndent\", \"Insert\": \"toggleOverwrite\",\n \"Esc\": \"singleSelection\"\n};\n// Note that the save and find-related commands aren't defined by\n// default. User code or addons can define them. Unknown commands\n// are simply ignored.\nkeyMap.pcDefault = {\n \"Ctrl-A\": \"selectAll\", \"Ctrl-D\": \"deleteLine\", \"Ctrl-Z\": \"undo\", \"Shift-Ctrl-Z\": \"redo\", \"Ctrl-Y\": \"redo\",\n \"Ctrl-Home\": \"goDocStart\", \"Ctrl-End\": \"goDocEnd\", \"Ctrl-Up\": \"goLineUp\", \"Ctrl-Down\": \"goLineDown\",\n \"Ctrl-Left\": \"goGroupLeft\", \"Ctrl-Right\": \"goGroupRight\", \"Alt-Left\": \"goLineStart\", \"Alt-Right\": \"goLineEnd\",\n \"Ctrl-Backspace\": \"delGroupBefore\", \"Ctrl-Delete\": \"delGroupAfter\", \"Ctrl-S\": \"save\", \"Ctrl-F\": \"find\",\n \"Ctrl-G\": \"findNext\", \"Shift-Ctrl-G\": \"findPrev\", \"Shift-Ctrl-F\": \"replace\", \"Shift-Ctrl-R\": \"replaceAll\",\n \"Ctrl-[\": \"indentLess\", \"Ctrl-]\": \"indentMore\",\n \"Ctrl-U\": \"undoSelection\", \"Shift-Ctrl-U\": \"redoSelection\", \"Alt-U\": \"redoSelection\",\n fallthrough: \"basic\"\n};\n// Very basic readline/emacs-style bindings, which are standard on Mac.\nkeyMap.emacsy = {\n \"Ctrl-F\": \"goCharRight\", \"Ctrl-B\": \"goCharLeft\", \"Ctrl-P\": \"goLineUp\", \"Ctrl-N\": \"goLineDown\",\n \"Alt-F\": \"goWordRight\", \"Alt-B\": \"goWordLeft\", \"Ctrl-A\": \"goLineStart\", \"Ctrl-E\": \"goLineEnd\",\n \"Ctrl-V\": \"goPageDown\", \"Shift-Ctrl-V\": \"goPageUp\", \"Ctrl-D\": \"delCharAfter\", \"Ctrl-H\": \"delCharBefore\",\n \"Alt-D\": \"delWordAfter\", \"Alt-Backspace\": \"delWordBefore\", \"Ctrl-K\": \"killLine\", \"Ctrl-T\": \"transposeChars\",\n \"Ctrl-O\": \"openLine\"\n};\nkeyMap.macDefault = {\n \"Cmd-A\": \"selectAll\", \"Cmd-D\": \"deleteLine\", \"Cmd-Z\": \"undo\", \"Shift-Cmd-Z\": \"redo\", \"Cmd-Y\": \"redo\",\n \"Cmd-Home\": \"goDocStart\", \"Cmd-Up\": \"goDocStart\", \"Cmd-End\": \"goDocEnd\", \"Cmd-Down\": \"goDocEnd\", \"Alt-Left\": \"goGroupLeft\",\n \"Alt-Right\": \"goGroupRight\", \"Cmd-Left\": \"goLineLeft\", \"Cmd-Right\": \"goLineRight\", \"Alt-Backspace\": \"delGroupBefore\",\n \"Ctrl-Alt-Backspace\": \"delGroupAfter\", \"Alt-Delete\": \"delGroupAfter\", \"Cmd-S\": \"save\", \"Cmd-F\": \"find\",\n \"Cmd-G\": \"findNext\", \"Shift-Cmd-G\": \"findPrev\", \"Cmd-Alt-F\": \"replace\", \"Shift-Cmd-Alt-F\": \"replaceAll\",\n \"Cmd-[\": \"indentLess\", \"Cmd-]\": \"indentMore\", \"Cmd-Backspace\": \"delWrappedLineLeft\", \"Cmd-Delete\": \"delWrappedLineRight\",\n \"Cmd-U\": \"undoSelection\", \"Shift-Cmd-U\": \"redoSelection\", \"Ctrl-Up\": \"goDocStart\", \"Ctrl-Down\": \"goDocEnd\",\n fallthrough: [\"basic\", \"emacsy\"]\n};\nkeyMap[\"default\"] = mac ? keyMap.macDefault : keyMap.pcDefault;\n\n// KEYMAP DISPATCH\n\nfunction normalizeKeyName(name) {\n var parts = name.split(/-(?!$)/);\n name = parts[parts.length - 1];\n var alt, ctrl, shift, cmd;\n for (var i = 0; i < parts.length - 1; i++) {\n var mod = parts[i];\n if (/^(cmd|meta|m)$/i.test(mod)) { cmd = true; }\n else if (/^a(lt)?$/i.test(mod)) { alt = true; }\n else if (/^(c|ctrl|control)$/i.test(mod)) { ctrl = true; }\n else if (/^s(hift)?$/i.test(mod)) { shift = true; }\n else { throw new Error(\"Unrecognized modifier name: \" + mod) }\n }\n if (alt) { name = \"Alt-\" + name; }\n if (ctrl) { name = \"Ctrl-\" + name; }\n if (cmd) { name = \"Cmd-\" + name; }\n if (shift) { name = \"Shift-\" + name; }\n return name\n}\n\n// This is a kludge to keep keymaps mostly working as raw objects\n// (backwards compatibility) while at the same time support features\n// like normalization and multi-stroke key bindings. It compiles a\n// new normalized keymap, and then updates the old object to reflect\n// this.\nfunction normalizeKeyMap(keymap) {\n var copy = {};\n for (var keyname in keymap) { if (keymap.hasOwnProperty(keyname)) {\n var value = keymap[keyname];\n if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { continue }\n if (value == \"...\") { delete keymap[keyname]; continue }\n\n var keys = map(keyname.split(\" \"), normalizeKeyName);\n for (var i = 0; i < keys.length; i++) {\n var val = (void 0), name = (void 0);\n if (i == keys.length - 1) {\n name = keys.join(\" \");\n val = value;\n } else {\n name = keys.slice(0, i + 1).join(\" \");\n val = \"...\";\n }\n var prev = copy[name];\n if (!prev) { copy[name] = val; }\n else if (prev != val) { throw new Error(\"Inconsistent bindings for \" + name) }\n }\n delete keymap[keyname];\n } }\n for (var prop in copy) { keymap[prop] = copy[prop]; }\n return keymap\n}\n\nfunction lookupKey(key, map$$1, handle, context) {\n map$$1 = getKeyMap(map$$1);\n var found = map$$1.call ? map$$1.call(key, context) : map$$1[key];\n if (found === false) { return \"nothing\" }\n if (found === \"...\") { return \"multi\" }\n if (found != null && handle(found)) { return \"handled\" }\n\n if (map$$1.fallthrough) {\n if (Object.prototype.toString.call(map$$1.fallthrough) != \"[object Array]\")\n { return lookupKey(key, map$$1.fallthrough, handle, context) }\n for (var i = 0; i < map$$1.fallthrough.length; i++) {\n var result = lookupKey(key, map$$1.fallthrough[i], handle, context);\n if (result) { return result }\n }\n }\n}\n\n// Modifier key presses don't count as 'real' key presses for the\n// purpose of keymap fallthrough.\nfunction isModifierKey(value) {\n var name = typeof value == \"string\" ? value : keyNames[value.keyCode];\n return name == \"Ctrl\" || name == \"Alt\" || name == \"Shift\" || name == \"Mod\"\n}\n\nfunction addModifierNames(name, event, noShift) {\n var base = name;\n if (event.altKey && base != \"Alt\") { name = \"Alt-\" + name; }\n if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != \"Ctrl\") { name = \"Ctrl-\" + name; }\n if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != \"Cmd\") { name = \"Cmd-\" + name; }\n if (!noShift && event.shiftKey && base != \"Shift\") { name = \"Shift-\" + name; }\n return name\n}\n\n// Look up the name of a key as indicated by an event object.\nfunction keyName(event, noShift) {\n if (presto && event.keyCode == 34 && event[\"char\"]) { return false }\n var name = keyNames[event.keyCode];\n if (name == null || event.altGraphKey) { return false }\n // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause,\n // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+)\n if (event.keyCode == 3 && event.code) { name = event.code; }\n return addModifierNames(name, event, noShift)\n}\n\nfunction getKeyMap(val) {\n return typeof val == \"string\" ? keyMap[val] : val\n}\n\n// Helper for deleting text near the selection(s), used to implement\n// backspace, delete, and similar functionality.\nfunction deleteNearSelection(cm, compute) {\n var ranges = cm.doc.sel.ranges, kill = [];\n // Build up a set of ranges to kill first, merging overlapping\n // ranges.\n for (var i = 0; i < ranges.length; i++) {\n var toKill = compute(ranges[i]);\n while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {\n var replaced = kill.pop();\n if (cmp(replaced.from, toKill.from) < 0) {\n toKill.from = replaced.from;\n break\n }\n }\n kill.push(toKill);\n }\n // Next, remove those actual ranges.\n runInOp(cm, function () {\n for (var i = kill.length - 1; i >= 0; i--)\n { replaceRange(cm.doc, \"\", kill[i].from, kill[i].to, \"+delete\"); }\n ensureCursorVisible(cm);\n });\n}\n\nfunction moveCharLogically(line, ch, dir) {\n var target = skipExtendingChars(line.text, ch + dir, dir);\n return target < 0 || target > line.text.length ? null : target\n}\n\nfunction moveLogically(line, start, dir) {\n var ch = moveCharLogically(line, start.ch, dir);\n return ch == null ? null : new Pos(start.line, ch, dir < 0 ? \"after\" : \"before\")\n}\n\nfunction endOfLine(visually, cm, lineObj, lineNo, dir) {\n if (visually) {\n var order = getOrder(lineObj, cm.doc.direction);\n if (order) {\n var part = dir < 0 ? lst(order) : order[0];\n var moveInStorageOrder = (dir < 0) == (part.level == 1);\n var sticky = moveInStorageOrder ? \"after\" : \"before\";\n var ch;\n // With a wrapped rtl chunk (possibly spanning multiple bidi parts),\n // it could be that the last bidi part is not on the last visual line,\n // since visual lines contain content order-consecutive chunks.\n // Thus, in rtl, we are looking for the first (content-order) character\n // in the rtl chunk that is on the last line (that is, the same line\n // as the last (content-order) character).\n if (part.level > 0 || cm.doc.direction == \"rtl\") {\n var prep = prepareMeasureForLine(cm, lineObj);\n ch = dir < 0 ? lineObj.text.length - 1 : 0;\n var targetTop = measureCharPrepared(cm, prep, ch).top;\n ch = findFirst(function (ch) { return measureCharPrepared(cm, prep, ch).top == targetTop; }, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch);\n if (sticky == \"before\") { ch = moveCharLogically(lineObj, ch, 1); }\n } else { ch = dir < 0 ? part.to : part.from; }\n return new Pos(lineNo, ch, sticky)\n }\n }\n return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? \"before\" : \"after\")\n}\n\nfunction moveVisually(cm, line, start, dir) {\n var bidi = getOrder(line, cm.doc.direction);\n if (!bidi) { return moveLogically(line, start, dir) }\n if (start.ch >= line.text.length) {\n start.ch = line.text.length;\n start.sticky = \"before\";\n } else if (start.ch <= 0) {\n start.ch = 0;\n start.sticky = \"after\";\n }\n var partPos = getBidiPartAt(bidi, start.ch, start.sticky), part = bidi[partPos];\n if (cm.doc.direction == \"ltr\" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) {\n // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines,\n // nothing interesting happens.\n return moveLogically(line, start, dir)\n }\n\n var mv = function (pos, dir) { return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir); };\n var prep;\n var getWrappedLineExtent = function (ch) {\n if (!cm.options.lineWrapping) { return {begin: 0, end: line.text.length} }\n prep = prep || prepareMeasureForLine(cm, line);\n return wrappedLineExtentChar(cm, line, prep, ch)\n };\n var wrappedLineExtent = getWrappedLineExtent(start.sticky == \"before\" ? mv(start, -1) : start.ch);\n\n if (cm.doc.direction == \"rtl\" || part.level == 1) {\n var moveInStorageOrder = (part.level == 1) == (dir < 0);\n var ch = mv(start, moveInStorageOrder ? 1 : -1);\n if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) {\n // Case 2: We move within an rtl part or in an rtl editor on the same visual line\n var sticky = moveInStorageOrder ? \"before\" : \"after\";\n return new Pos(start.line, ch, sticky)\n }\n }\n\n // Case 3: Could not move within this bidi part in this visual line, so leave\n // the current bidi part\n\n var searchInVisualLine = function (partPos, dir, wrappedLineExtent) {\n var getRes = function (ch, moveInStorageOrder) { return moveInStorageOrder\n ? new Pos(start.line, mv(ch, 1), \"before\")\n : new Pos(start.line, ch, \"after\"); };\n\n for (; partPos >= 0 && partPos < bidi.length; partPos += dir) {\n var part = bidi[partPos];\n var moveInStorageOrder = (dir > 0) == (part.level != 1);\n var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1);\n if (part.from <= ch && ch < part.to) { return getRes(ch, moveInStorageOrder) }\n ch = moveInStorageOrder ? part.from : mv(part.to, -1);\n if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) { return getRes(ch, moveInStorageOrder) }\n }\n };\n\n // Case 3a: Look for other bidi parts on the same visual line\n var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent);\n if (res) { return res }\n\n // Case 3b: Look for other bidi parts on the next visual line\n var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1);\n if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) {\n res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh));\n if (res) { return res }\n }\n\n // Case 4: Nowhere to move\n return null\n}\n\n// Commands are parameter-less actions that can be performed on an\n// editor, mostly used for keybindings.\nvar commands = {\n selectAll: selectAll,\n singleSelection: function (cm) { return cm.setSelection(cm.getCursor(\"anchor\"), cm.getCursor(\"head\"), sel_dontScroll); },\n killLine: function (cm) { return deleteNearSelection(cm, function (range) {\n if (range.empty()) {\n var len = getLine(cm.doc, range.head.line).text.length;\n if (range.head.ch == len && range.head.line < cm.lastLine())\n { return {from: range.head, to: Pos(range.head.line + 1, 0)} }\n else\n { return {from: range.head, to: Pos(range.head.line, len)} }\n } else {\n return {from: range.from(), to: range.to()}\n }\n }); },\n deleteLine: function (cm) { return deleteNearSelection(cm, function (range) { return ({\n from: Pos(range.from().line, 0),\n to: clipPos(cm.doc, Pos(range.to().line + 1, 0))\n }); }); },\n delLineLeft: function (cm) { return deleteNearSelection(cm, function (range) { return ({\n from: Pos(range.from().line, 0), to: range.from()\n }); }); },\n delWrappedLineLeft: function (cm) { return deleteNearSelection(cm, function (range) {\n var top = cm.charCoords(range.head, \"div\").top + 5;\n var leftPos = cm.coordsChar({left: 0, top: top}, \"div\");\n return {from: leftPos, to: range.from()}\n }); },\n delWrappedLineRight: function (cm) { return deleteNearSelection(cm, function (range) {\n var top = cm.charCoords(range.head, \"div\").top + 5;\n var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\");\n return {from: range.from(), to: rightPos }\n }); },\n undo: function (cm) { return cm.undo(); },\n redo: function (cm) { return cm.redo(); },\n undoSelection: function (cm) { return cm.undoSelection(); },\n redoSelection: function (cm) { return cm.redoSelection(); },\n goDocStart: function (cm) { return cm.extendSelection(Pos(cm.firstLine(), 0)); },\n goDocEnd: function (cm) { return cm.extendSelection(Pos(cm.lastLine())); },\n goLineStart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStart(cm, range.head.line); },\n {origin: \"+move\", bias: 1}\n ); },\n goLineStartSmart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStartSmart(cm, range.head); },\n {origin: \"+move\", bias: 1}\n ); },\n goLineEnd: function (cm) { return cm.extendSelectionsBy(function (range) { return lineEnd(cm, range.head.line); },\n {origin: \"+move\", bias: -1}\n ); },\n goLineRight: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, \"div\").top + 5;\n return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\")\n }, sel_move); },\n goLineLeft: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, \"div\").top + 5;\n return cm.coordsChar({left: 0, top: top}, \"div\")\n }, sel_move); },\n goLineLeftSmart: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, \"div\").top + 5;\n var pos = cm.coordsChar({left: 0, top: top}, \"div\");\n if (pos.ch < cm.getLine(pos.line).search(/\\S/)) { return lineStartSmart(cm, range.head) }\n return pos\n }, sel_move); },\n goLineUp: function (cm) { return cm.moveV(-1, \"line\"); },\n goLineDown: function (cm) { return cm.moveV(1, \"line\"); },\n goPageUp: function (cm) { return cm.moveV(-1, \"page\"); },\n goPageDown: function (cm) { return cm.moveV(1, \"page\"); },\n goCharLeft: function (cm) { return cm.moveH(-1, \"char\"); },\n goCharRight: function (cm) { return cm.moveH(1, \"char\"); },\n goColumnLeft: function (cm) { return cm.moveH(-1, \"column\"); },\n goColumnRight: function (cm) { return cm.moveH(1, \"column\"); },\n goWordLeft: function (cm) { return cm.moveH(-1, \"word\"); },\n goGroupRight: function (cm) { return cm.moveH(1, \"group\"); },\n goGroupLeft: function (cm) { return cm.moveH(-1, \"group\"); },\n goWordRight: function (cm) { return cm.moveH(1, \"word\"); },\n delCharBefore: function (cm) { return cm.deleteH(-1, \"char\"); },\n delCharAfter: function (cm) { return cm.deleteH(1, \"char\"); },\n delWordBefore: function (cm) { return cm.deleteH(-1, \"word\"); },\n delWordAfter: function (cm) { return cm.deleteH(1, \"word\"); },\n delGroupBefore: function (cm) { return cm.deleteH(-1, \"group\"); },\n delGroupAfter: function (cm) { return cm.deleteH(1, \"group\"); },\n indentAuto: function (cm) { return cm.indentSelection(\"smart\"); },\n indentMore: function (cm) { return cm.indentSelection(\"add\"); },\n indentLess: function (cm) { return cm.indentSelection(\"subtract\"); },\n insertTab: function (cm) { return cm.replaceSelection(\"\\t\"); },\n insertSoftTab: function (cm) {\n var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize;\n for (var i = 0; i < ranges.length; i++) {\n var pos = ranges[i].from();\n var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);\n spaces.push(spaceStr(tabSize - col % tabSize));\n }\n cm.replaceSelections(spaces);\n },\n defaultTab: function (cm) {\n if (cm.somethingSelected()) { cm.indentSelection(\"add\"); }\n else { cm.execCommand(\"insertTab\"); }\n },\n // Swap the two chars left and right of each selection's head.\n // Move cursor behind the two swapped characters afterwards.\n //\n // Doesn't consider line feeds a character.\n // Doesn't scan more than one line above to find a character.\n // Doesn't do anything on an empty line.\n // Doesn't do anything with non-empty selections.\n transposeChars: function (cm) { return runInOp(cm, function () {\n var ranges = cm.listSelections(), newSel = [];\n for (var i = 0; i < ranges.length; i++) {\n if (!ranges[i].empty()) { continue }\n var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;\n if (line) {\n if (cur.ch == line.length) { cur = new Pos(cur.line, cur.ch - 1); }\n if (cur.ch > 0) {\n cur = new Pos(cur.line, cur.ch + 1);\n cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),\n Pos(cur.line, cur.ch - 2), cur, \"+transpose\");\n } else if (cur.line > cm.doc.first) {\n var prev = getLine(cm.doc, cur.line - 1).text;\n if (prev) {\n cur = new Pos(cur.line, 1);\n cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() +\n prev.charAt(prev.length - 1),\n Pos(cur.line - 1, prev.length - 1), cur, \"+transpose\");\n }\n }\n }\n newSel.push(new Range(cur, cur));\n }\n cm.setSelections(newSel);\n }); },\n newlineAndIndent: function (cm) { return runInOp(cm, function () {\n var sels = cm.listSelections();\n for (var i = sels.length - 1; i >= 0; i--)\n { cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, \"+input\"); }\n sels = cm.listSelections();\n for (var i$1 = 0; i$1 < sels.length; i$1++)\n { cm.indentLine(sels[i$1].from().line, null, true); }\n ensureCursorVisible(cm);\n }); },\n openLine: function (cm) { return cm.replaceSelection(\"\\n\", \"start\"); },\n toggleOverwrite: function (cm) { return cm.toggleOverwrite(); }\n};\n\n\nfunction lineStart(cm, lineN) {\n var line = getLine(cm.doc, lineN);\n var visual = visualLine(line);\n if (visual != line) { lineN = lineNo(visual); }\n return endOfLine(true, cm, visual, lineN, 1)\n}\nfunction lineEnd(cm, lineN) {\n var line = getLine(cm.doc, lineN);\n var visual = visualLineEnd(line);\n if (visual != line) { lineN = lineNo(visual); }\n return endOfLine(true, cm, line, lineN, -1)\n}\nfunction lineStartSmart(cm, pos) {\n var start = lineStart(cm, pos.line);\n var line = getLine(cm.doc, start.line);\n var order = getOrder(line, cm.doc.direction);\n if (!order || order[0].level == 0) {\n var firstNonWS = Math.max(0, line.text.search(/\\S/));\n var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;\n return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky)\n }\n return start\n}\n\n// Run a handler that was bound to a key.\nfunction doHandleBinding(cm, bound, dropShift) {\n if (typeof bound == \"string\") {\n bound = commands[bound];\n if (!bound) { return false }\n }\n // Ensure previous input has been read, so that the handler sees a\n // consistent view of the document\n cm.display.input.ensurePolled();\n var prevShift = cm.display.shift, done = false;\n try {\n if (cm.isReadOnly()) { cm.state.suppressEdits = true; }\n if (dropShift) { cm.display.shift = false; }\n done = bound(cm) != Pass;\n } finally {\n cm.display.shift = prevShift;\n cm.state.suppressEdits = false;\n }\n return done\n}\n\nfunction lookupKeyForEditor(cm, name, handle) {\n for (var i = 0; i < cm.state.keyMaps.length; i++) {\n var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);\n if (result) { return result }\n }\n return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))\n || lookupKey(name, cm.options.keyMap, handle, cm)\n}\n\n// Note that, despite the name, this function is also used to check\n// for bound mouse clicks.\n\nvar stopSeq = new Delayed;\n\nfunction dispatchKey(cm, name, e, handle) {\n var seq = cm.state.keySeq;\n if (seq) {\n if (isModifierKey(name)) { return \"handled\" }\n if (/\\'$/.test(name))\n { cm.state.keySeq = null; }\n else\n { stopSeq.set(50, function () {\n if (cm.state.keySeq == seq) {\n cm.state.keySeq = null;\n cm.display.input.reset();\n }\n }); }\n if (dispatchKeyInner(cm, seq + \" \" + name, e, handle)) { return true }\n }\n return dispatchKeyInner(cm, name, e, handle)\n}\n\nfunction dispatchKeyInner(cm, name, e, handle) {\n var result = lookupKeyForEditor(cm, name, handle);\n\n if (result == \"multi\")\n { cm.state.keySeq = name; }\n if (result == \"handled\")\n { signalLater(cm, \"keyHandled\", cm, name, e); }\n\n if (result == \"handled\" || result == \"multi\") {\n e_preventDefault(e);\n restartBlink(cm);\n }\n\n return !!result\n}\n\n// Handle a key from the keydown event.\nfunction handleKeyBinding(cm, e) {\n var name = keyName(e, true);\n if (!name) { return false }\n\n if (e.shiftKey && !cm.state.keySeq) {\n // First try to resolve full name (including 'Shift-'). Failing\n // that, see if there is a cursor-motion command (starting with\n // 'go') bound to the keyname without 'Shift-'.\n return dispatchKey(cm, \"Shift-\" + name, e, function (b) { return doHandleBinding(cm, b, true); })\n || dispatchKey(cm, name, e, function (b) {\n if (typeof b == \"string\" ? /^go[A-Z]/.test(b) : b.motion)\n { return doHandleBinding(cm, b) }\n })\n } else {\n return dispatchKey(cm, name, e, function (b) { return doHandleBinding(cm, b); })\n }\n}\n\n// Handle a key from the keypress event\nfunction handleCharBinding(cm, e, ch) {\n return dispatchKey(cm, \"'\" + ch + \"'\", e, function (b) { return doHandleBinding(cm, b, true); })\n}\n\nvar lastStoppedKey = null;\nfunction onKeyDown(e) {\n var cm = this;\n cm.curOp.focus = activeElt();\n if (signalDOMEvent(cm, e)) { return }\n // IE does strange things with escape.\n if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false; }\n var code = e.keyCode;\n cm.display.shift = code == 16 || e.shiftKey;\n var handled = handleKeyBinding(cm, e);\n if (presto) {\n lastStoppedKey = handled ? code : null;\n // Opera has no cut event... we try to at least catch the key combo\n if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))\n { cm.replaceSelection(\"\", null, \"cut\"); }\n }\n\n // Turn mouse into crosshair when Alt is held on Mac.\n if (code == 18 && !/\\bCodeMirror-crosshair\\b/.test(cm.display.lineDiv.className))\n { showCrossHair(cm); }\n}\n\nfunction showCrossHair(cm) {\n var lineDiv = cm.display.lineDiv;\n addClass(lineDiv, \"CodeMirror-crosshair\");\n\n function up(e) {\n if (e.keyCode == 18 || !e.altKey) {\n rmClass(lineDiv, \"CodeMirror-crosshair\");\n off(document, \"keyup\", up);\n off(document, \"mouseover\", up);\n }\n }\n on(document, \"keyup\", up);\n on(document, \"mouseover\", up);\n}\n\nfunction onKeyUp(e) {\n if (e.keyCode == 16) { this.doc.sel.shift = false; }\n signalDOMEvent(this, e);\n}\n\nfunction onKeyPress(e) {\n var cm = this;\n if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return }\n var keyCode = e.keyCode, charCode = e.charCode;\n if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return}\n if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) { return }\n var ch = String.fromCharCode(charCode == null ? keyCode : charCode);\n // Some browsers fire keypress events for backspace\n if (ch == \"\\x08\") { return }\n if (handleCharBinding(cm, e, ch)) { return }\n cm.display.input.onKeyPress(e);\n}\n\nvar DOUBLECLICK_DELAY = 400;\n\nvar PastClick = function(time, pos, button) {\n this.time = time;\n this.pos = pos;\n this.button = button;\n};\n\nPastClick.prototype.compare = function (time, pos, button) {\n return this.time + DOUBLECLICK_DELAY > time &&\n cmp(pos, this.pos) == 0 && button == this.button\n};\n\nvar lastClick;\nvar lastDoubleClick;\nfunction clickRepeat(pos, button) {\n var now = +new Date;\n if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) {\n lastClick = lastDoubleClick = null;\n return \"triple\"\n } else if (lastClick && lastClick.compare(now, pos, button)) {\n lastDoubleClick = new PastClick(now, pos, button);\n lastClick = null;\n return \"double\"\n } else {\n lastClick = new PastClick(now, pos, button);\n lastDoubleClick = null;\n return \"single\"\n }\n}\n\n// A mouse down can be a single click, double click, triple click,\n// start of selection drag, start of text drag, new cursor\n// (ctrl-click), rectangle drag (alt-drag), or xwin\n// middle-click-paste. Or it might be a click on something we should\n// not interfere with, such as a scrollbar or widget.\nfunction onMouseDown(e) {\n var cm = this, display = cm.display;\n if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return }\n display.input.ensurePolled();\n display.shift = e.shiftKey;\n\n if (eventInWidget(display, e)) {\n if (!webkit) {\n // Briefly turn off draggability, to allow widgets to do\n // normal dragging things.\n display.scroller.draggable = false;\n setTimeout(function () { return display.scroller.draggable = true; }, 100);\n }\n return\n }\n if (clickInGutter(cm, e)) { return }\n var pos = posFromMouse(cm, e), button = e_button(e), repeat = pos ? clickRepeat(pos, button) : \"single\";\n window.focus();\n\n // #3261: make sure, that we're not starting a second selection\n if (button == 1 && cm.state.selectingText)\n { cm.state.selectingText(e); }\n\n if (pos && handleMappedButton(cm, button, pos, repeat, e)) { return }\n\n if (button == 1) {\n if (pos) { leftButtonDown(cm, pos, repeat, e); }\n else if (e_target(e) == display.scroller) { e_preventDefault(e); }\n } else if (button == 2) {\n if (pos) { extendSelection(cm.doc, pos); }\n setTimeout(function () { return display.input.focus(); }, 20);\n } else if (button == 3) {\n if (captureRightClick) { onContextMenu(cm, e); }\n else { delayBlurEvent(cm); }\n }\n}\n\nfunction handleMappedButton(cm, button, pos, repeat, event) {\n var name = \"Click\";\n if (repeat == \"double\") { name = \"Double\" + name; }\n else if (repeat == \"triple\") { name = \"Triple\" + name; }\n name = (button == 1 ? \"Left\" : button == 2 ? \"Middle\" : \"Right\") + name;\n\n return dispatchKey(cm, addModifierNames(name, event), event, function (bound) {\n if (typeof bound == \"string\") { bound = commands[bound]; }\n if (!bound) { return false }\n var done = false;\n try {\n if (cm.isReadOnly()) { cm.state.suppressEdits = true; }\n done = bound(cm, pos) != Pass;\n } finally {\n cm.state.suppressEdits = false;\n }\n return done\n })\n}\n\nfunction configureMouse(cm, repeat, event) {\n var option = cm.getOption(\"configureMouse\");\n var value = option ? option(cm, repeat, event) : {};\n if (value.unit == null) {\n var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey;\n value.unit = rect ? \"rectangle\" : repeat == \"single\" ? \"char\" : repeat == \"double\" ? \"word\" : \"line\";\n }\n if (value.extend == null || cm.doc.extend) { value.extend = cm.doc.extend || event.shiftKey; }\n if (value.addNew == null) { value.addNew = mac ? event.metaKey : event.ctrlKey; }\n if (value.moveOnDrag == null) { value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey); }\n return value\n}\n\nfunction leftButtonDown(cm, pos, repeat, event) {\n if (ie) { setTimeout(bind(ensureFocus, cm), 0); }\n else { cm.curOp.focus = activeElt(); }\n\n var behavior = configureMouse(cm, repeat, event);\n\n var sel = cm.doc.sel, contained;\n if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&\n repeat == \"single\" && (contained = sel.contains(pos)) > -1 &&\n (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) &&\n (cmp(contained.to(), pos) > 0 || pos.xRel < 0))\n { leftButtonStartDrag(cm, event, pos, behavior); }\n else\n { leftButtonSelect(cm, event, pos, behavior); }\n}\n\n// Start a text drag. When it ends, see if any dragging actually\n// happen, and treat as a click if it didn't.\nfunction leftButtonStartDrag(cm, event, pos, behavior) {\n var display = cm.display, moved = false;\n var dragEnd = operation(cm, function (e) {\n if (webkit) { display.scroller.draggable = false; }\n cm.state.draggingText = false;\n off(display.wrapper.ownerDocument, \"mouseup\", dragEnd);\n off(display.wrapper.ownerDocument, \"mousemove\", mouseMove);\n off(display.scroller, \"dragstart\", dragStart);\n off(display.scroller, \"drop\", dragEnd);\n if (!moved) {\n e_preventDefault(e);\n if (!behavior.addNew)\n { extendSelection(cm.doc, pos, null, null, behavior.extend); }\n // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)\n if (webkit || ie && ie_version == 9)\n { setTimeout(function () {display.wrapper.ownerDocument.body.focus(); display.input.focus();}, 20); }\n else\n { display.input.focus(); }\n }\n });\n var mouseMove = function(e2) {\n moved = moved || Math.abs(event.clientX - e2.clientX) + Math.abs(event.clientY - e2.clientY) >= 10;\n };\n var dragStart = function () { return moved = true; };\n // Let the drag handler handle this.\n if (webkit) { display.scroller.draggable = true; }\n cm.state.draggingText = dragEnd;\n dragEnd.copy = !behavior.moveOnDrag;\n // IE's approach to draggable\n if (display.scroller.dragDrop) { display.scroller.dragDrop(); }\n on(display.wrapper.ownerDocument, \"mouseup\", dragEnd);\n on(display.wrapper.ownerDocument, \"mousemove\", mouseMove);\n on(display.scroller, \"dragstart\", dragStart);\n on(display.scroller, \"drop\", dragEnd);\n\n delayBlurEvent(cm);\n setTimeout(function () { return display.input.focus(); }, 20);\n}\n\nfunction rangeForUnit(cm, pos, unit) {\n if (unit == \"char\") { return new Range(pos, pos) }\n if (unit == \"word\") { return cm.findWordAt(pos) }\n if (unit == \"line\") { return new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) }\n var result = unit(cm, pos);\n return new Range(result.from, result.to)\n}\n\n// Normal selection, as opposed to text dragging.\nfunction leftButtonSelect(cm, event, start, behavior) {\n var display = cm.display, doc = cm.doc;\n e_preventDefault(event);\n\n var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;\n if (behavior.addNew && !behavior.extend) {\n ourIndex = doc.sel.contains(start);\n if (ourIndex > -1)\n { ourRange = ranges[ourIndex]; }\n else\n { ourRange = new Range(start, start); }\n } else {\n ourRange = doc.sel.primary();\n ourIndex = doc.sel.primIndex;\n }\n\n if (behavior.unit == \"rectangle\") {\n if (!behavior.addNew) { ourRange = new Range(start, start); }\n start = posFromMouse(cm, event, true, true);\n ourIndex = -1;\n } else {\n var range$$1 = rangeForUnit(cm, start, behavior.unit);\n if (behavior.extend)\n { ourRange = extendRange(ourRange, range$$1.anchor, range$$1.head, behavior.extend); }\n else\n { ourRange = range$$1; }\n }\n\n if (!behavior.addNew) {\n ourIndex = 0;\n setSelection(doc, new Selection([ourRange], 0), sel_mouse);\n startSel = doc.sel;\n } else if (ourIndex == -1) {\n ourIndex = ranges.length;\n setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex),\n {scroll: false, origin: \"*mouse\"});\n } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == \"char\" && !behavior.extend) {\n setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),\n {scroll: false, origin: \"*mouse\"});\n startSel = doc.sel;\n } else {\n replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);\n }\n\n var lastPos = start;\n function extendTo(pos) {\n if (cmp(lastPos, pos) == 0) { return }\n lastPos = pos;\n\n if (behavior.unit == \"rectangle\") {\n var ranges = [], tabSize = cm.options.tabSize;\n var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);\n var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);\n var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);\n for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n line <= end; line++) {\n var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);\n if (left == right)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }\n else if (text.length > leftPos)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }\n }\n if (!ranges.length) { ranges.push(new Range(start, start)); }\n setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n {origin: \"*mouse\", scroll: false});\n cm.scrollIntoView(pos);\n } else {\n var oldRange = ourRange;\n var range$$1 = rangeForUnit(cm, pos, behavior.unit);\n var anchor = oldRange.anchor, head;\n if (cmp(range$$1.anchor, anchor) > 0) {\n head = range$$1.head;\n anchor = minPos(oldRange.from(), range$$1.anchor);\n } else {\n head = range$$1.anchor;\n anchor = maxPos(oldRange.to(), range$$1.head);\n }\n var ranges$1 = startSel.ranges.slice(0);\n ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head));\n setSelection(doc, normalizeSelection(ranges$1, ourIndex), sel_mouse);\n }\n }\n\n var editorSize = display.wrapper.getBoundingClientRect();\n // Used to ensure timeout re-tries don't fire when another extend\n // happened in the meantime (clearTimeout isn't reliable -- at\n // least on Chrome, the timeouts still happen even when cleared,\n // if the clear happens after their scheduled firing time).\n var counter = 0;\n\n function extend(e) {\n var curCount = ++counter;\n var cur = posFromMouse(cm, e, true, behavior.unit == \"rectangle\");\n if (!cur) { return }\n if (cmp(cur, lastPos) != 0) {\n cm.curOp.focus = activeElt();\n extendTo(cur);\n var visible = visibleLines(display, doc);\n if (cur.line >= visible.to || cur.line < visible.from)\n { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }\n } else {\n var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;\n if (outside) { setTimeout(operation(cm, function () {\n if (counter != curCount) { return }\n display.scroller.scrollTop += outside;\n extend(e);\n }), 50); }\n }\n }\n\n function done(e) {\n cm.state.selectingText = false;\n counter = Infinity;\n e_preventDefault(e);\n display.input.focus();\n off(display.wrapper.ownerDocument, \"mousemove\", move);\n off(display.wrapper.ownerDocument, \"mouseup\", up);\n doc.history.lastSelOrigin = null;\n }\n\n var move = operation(cm, function (e) {\n if (e.buttons === 0 || !e_button(e)) { done(e); }\n else { extend(e); }\n });\n var up = operation(cm, done);\n cm.state.selectingText = up;\n on(display.wrapper.ownerDocument, \"mousemove\", move);\n on(display.wrapper.ownerDocument, \"mouseup\", up);\n}\n\n// Used when mouse-selecting to adjust the anchor to the proper side\n// of a bidi jump depending on the visual position of the head.\nfunction bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n}\n\n\n// Determines whether an event happened in the gutter, and fires the\n// handlers for the corresponding event.\nfunction gutterEvent(cm, e, type, prevent) {\n var mX, mY;\n if (e.touches) {\n mX = e.touches[0].clientX;\n mY = e.touches[0].clientY;\n } else {\n try { mX = e.clientX; mY = e.clientY; }\n catch(e) { return false }\n }\n if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false }\n if (prevent) { e_preventDefault(e); }\n\n var display = cm.display;\n var lineBox = display.lineDiv.getBoundingClientRect();\n\n if (mY > lineBox.bottom || !hasHandler(cm, type)) { return e_defaultPrevented(e) }\n mY -= lineBox.top - display.viewOffset;\n\n for (var i = 0; i < cm.options.gutters.length; ++i) {\n var g = display.gutters.childNodes[i];\n if (g && g.getBoundingClientRect().right >= mX) {\n var line = lineAtHeight(cm.doc, mY);\n var gutter = cm.options.gutters[i];\n signal(cm, type, cm, line, gutter, e);\n return e_defaultPrevented(e)\n }\n }\n}\n\nfunction clickInGutter(cm, e) {\n return gutterEvent(cm, e, \"gutterClick\", true)\n}\n\n// CONTEXT MENU HANDLING\n\n// To make the context menu work, we need to briefly unhide the\n// textarea (making it as unobtrusive as possible) to let the\n// right-click take effect on it.\nfunction onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n cm.display.input.onContextMenu(e);\n}\n\nfunction contextMenuInGutter(cm, e) {\n if (!hasHandler(cm, \"gutterContextMenu\")) { return false }\n return gutterEvent(cm, e, \"gutterContextMenu\", false)\n}\n\nfunction themeChanged(cm) {\n cm.display.wrapper.className = cm.display.wrapper.className.replace(/\\s*cm-s-\\S+/g, \"\") +\n cm.options.theme.replace(/(^|\\s)\\s*/g, \" cm-s-\");\n clearCaches(cm);\n}\n\nvar Init = {toString: function(){return \"CodeMirror.Init\"}};\n\nvar defaults = {};\nvar optionHandlers = {};\n\nfunction defineOptions(CodeMirror) {\n var optionHandlers = CodeMirror.optionHandlers;\n\n function option(name, deflt, handle, notOnInit) {\n CodeMirror.defaults[name] = deflt;\n if (handle) { optionHandlers[name] =\n notOnInit ? function (cm, val, old) {if (old != Init) { handle(cm, val, old); }} : handle; }\n }\n\n CodeMirror.defineOption = option;\n\n // Passed to option handlers when there is no old value.\n CodeMirror.Init = Init;\n\n // These two are, on init, called from the constructor because they\n // have to be initialized before the editor can start at all.\n option(\"value\", \"\", function (cm, val) { return cm.setValue(val); }, true);\n option(\"mode\", null, function (cm, val) {\n cm.doc.modeOption = val;\n loadMode(cm);\n }, true);\n\n option(\"indentUnit\", 2, loadMode, true);\n option(\"indentWithTabs\", false);\n option(\"smartIndent\", true);\n option(\"tabSize\", 4, function (cm) {\n resetModeState(cm);\n clearCaches(cm);\n regChange(cm);\n }, true);\n\n option(\"lineSeparator\", null, function (cm, val) {\n cm.doc.lineSep = val;\n if (!val) { return }\n var newBreaks = [], lineNo = cm.doc.first;\n cm.doc.iter(function (line) {\n for (var pos = 0;;) {\n var found = line.text.indexOf(val, pos);\n if (found == -1) { break }\n pos = found + val.length;\n newBreaks.push(Pos(lineNo, found));\n }\n lineNo++;\n });\n for (var i = newBreaks.length - 1; i >= 0; i--)\n { replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); }\n });\n option(\"specialChars\", /[\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u061c\\u200b-\\u200f\\u2028\\u2029\\ufeff]/g, function (cm, val, old) {\n cm.state.specialChars = new RegExp(val.source + (val.test(\"\\t\") ? \"\" : \"|\\t\"), \"g\");\n if (old != Init) { cm.refresh(); }\n });\n option(\"specialCharPlaceholder\", defaultSpecialCharPlaceholder, function (cm) { return cm.refresh(); }, true);\n option(\"electricChars\", true);\n option(\"inputStyle\", mobile ? \"contenteditable\" : \"textarea\", function () {\n throw new Error(\"inputStyle can not (yet) be changed in a running editor\") // FIXME\n }, true);\n option(\"spellcheck\", false, function (cm, val) { return cm.getInputField().spellcheck = val; }, true);\n option(\"rtlMoveVisually\", !windows);\n option(\"wholeLineUpdateBefore\", true);\n\n option(\"theme\", \"default\", function (cm) {\n themeChanged(cm);\n guttersChanged(cm);\n }, true);\n option(\"keyMap\", \"default\", function (cm, val, old) {\n var next = getKeyMap(val);\n var prev = old != Init && getKeyMap(old);\n if (prev && prev.detach) { prev.detach(cm, next); }\n if (next.attach) { next.attach(cm, prev || null); }\n });\n option(\"extraKeys\", null);\n option(\"configureMouse\", null);\n\n option(\"lineWrapping\", false, wrappingChanged, true);\n option(\"gutters\", [], function (cm) {\n setGuttersForLineNumbers(cm.options);\n guttersChanged(cm);\n }, true);\n option(\"fixedGutter\", true, function (cm, val) {\n cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + \"px\" : \"0\";\n cm.refresh();\n }, true);\n option(\"coverGutterNextToScrollbar\", false, function (cm) { return updateScrollbars(cm); }, true);\n option(\"scrollbarStyle\", \"native\", function (cm) {\n initScrollbars(cm);\n updateScrollbars(cm);\n cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);\n cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);\n }, true);\n option(\"lineNumbers\", false, function (cm) {\n setGuttersForLineNumbers(cm.options);\n guttersChanged(cm);\n }, true);\n option(\"firstLineNumber\", 1, guttersChanged, true);\n option(\"lineNumberFormatter\", function (integer) { return integer; }, guttersChanged, true);\n option(\"showCursorWhenSelecting\", false, updateSelection, true);\n\n option(\"resetSelectionOnContextMenu\", true);\n option(\"lineWiseCopyCut\", true);\n option(\"pasteLinesPerSelection\", true);\n\n option(\"readOnly\", false, function (cm, val) {\n if (val == \"nocursor\") {\n onBlur(cm);\n cm.display.input.blur();\n }\n cm.display.input.readOnlyChanged(val);\n });\n option(\"disableInput\", false, function (cm, val) {if (!val) { cm.display.input.reset(); }}, true);\n option(\"dragDrop\", true, dragDropChanged);\n option(\"allowDropFileTypes\", null);\n\n option(\"cursorBlinkRate\", 530);\n option(\"cursorScrollMargin\", 0);\n option(\"cursorHeight\", 1, updateSelection, true);\n option(\"singleCursorHeightPerLine\", true, updateSelection, true);\n option(\"workTime\", 100);\n option(\"workDelay\", 100);\n option(\"flattenSpans\", true, resetModeState, true);\n option(\"addModeClass\", false, resetModeState, true);\n option(\"pollInterval\", 100);\n option(\"undoDepth\", 200, function (cm, val) { return cm.doc.history.undoDepth = val; });\n option(\"historyEventDelay\", 1250);\n option(\"viewportMargin\", 10, function (cm) { return cm.refresh(); }, true);\n option(\"maxHighlightLength\", 10000, resetModeState, true);\n option(\"moveInputWithCursor\", true, function (cm, val) {\n if (!val) { cm.display.input.resetPosition(); }\n });\n\n option(\"tabindex\", null, function (cm, val) { return cm.display.input.getField().tabIndex = val || \"\"; });\n option(\"autofocus\", null);\n option(\"direction\", \"ltr\", function (cm, val) { return cm.doc.setDirection(val); }, true);\n}\n\nfunction guttersChanged(cm) {\n updateGutters(cm);\n regChange(cm);\n alignHorizontally(cm);\n}\n\nfunction dragDropChanged(cm, value, old) {\n var wasOn = old && old != Init;\n if (!value != !wasOn) {\n var funcs = cm.display.dragFunctions;\n var toggle = value ? on : off;\n toggle(cm.display.scroller, \"dragstart\", funcs.start);\n toggle(cm.display.scroller, \"dragenter\", funcs.enter);\n toggle(cm.display.scroller, \"dragover\", funcs.over);\n toggle(cm.display.scroller, \"dragleave\", funcs.leave);\n toggle(cm.display.scroller, \"drop\", funcs.drop);\n }\n}\n\nfunction wrappingChanged(cm) {\n if (cm.options.lineWrapping) {\n addClass(cm.display.wrapper, \"CodeMirror-wrap\");\n cm.display.sizer.style.minWidth = \"\";\n cm.display.sizerWidth = null;\n } else {\n rmClass(cm.display.wrapper, \"CodeMirror-wrap\");\n findMaxLine(cm);\n }\n estimateLineHeights(cm);\n regChange(cm);\n clearCaches(cm);\n setTimeout(function () { return updateScrollbars(cm); }, 100);\n}\n\n// A CodeMirror instance represents an editor. This is the object\n// that user code is usually dealing with.\n\nfunction CodeMirror$1(place, options) {\n var this$1 = this;\n\n if (!(this instanceof CodeMirror$1)) { return new CodeMirror$1(place, options) }\n\n this.options = options = options ? copyObj(options) : {};\n // Determine effective options based on given values and defaults.\n copyObj(defaults, options, false);\n setGuttersForLineNumbers(options);\n\n var doc = options.value;\n if (typeof doc == \"string\") { doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction); }\n this.doc = doc;\n\n var input = new CodeMirror$1.inputStyles[options.inputStyle](this);\n var display = this.display = new Display(place, doc, input);\n display.wrapper.CodeMirror = this;\n updateGutters(this);\n themeChanged(this);\n if (options.lineWrapping)\n { this.display.wrapper.className += \" CodeMirror-wrap\"; }\n initScrollbars(this);\n\n this.state = {\n keyMaps: [], // stores maps added by addKeyMap\n overlays: [], // highlighting overlays, as added by addOverlay\n modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info\n overwrite: false,\n delayingBlurEvent: false,\n focused: false,\n suppressEdits: false, // used to disable editing during key handlers when in readOnly mode\n pasteIncoming: false, cutIncoming: false, // help recognize paste/cut edits in input.poll\n selectingText: false,\n draggingText: false,\n highlight: new Delayed(), // stores highlight worker timeout\n keySeq: null, // Unfinished key sequence\n specialChars: null\n };\n\n if (options.autofocus && !mobile) { display.input.focus(); }\n\n // Override magic textarea content restore that IE sometimes does\n // on our hidden textarea on reload\n if (ie && ie_version < 11) { setTimeout(function () { return this$1.display.input.reset(true); }, 20); }\n\n registerEventHandlers(this);\n ensureGlobalHandlers();\n\n startOperation(this);\n this.curOp.forceUpdate = true;\n attachDoc(this, doc);\n\n if ((options.autofocus && !mobile) || this.hasFocus())\n { setTimeout(bind(onFocus, this), 20); }\n else\n { onBlur(this); }\n\n for (var opt in optionHandlers) { if (optionHandlers.hasOwnProperty(opt))\n { optionHandlers[opt](this$1, options[opt], Init); } }\n maybeUpdateLineNumberWidth(this);\n if (options.finishInit) { options.finishInit(this); }\n for (var i = 0; i < initHooks.length; ++i) { initHooks[i](this$1); }\n endOperation(this);\n // Suppress optimizelegibility in Webkit, since it breaks text\n // measuring on line wrapping boundaries.\n if (webkit && options.lineWrapping &&\n getComputedStyle(display.lineDiv).textRendering == \"optimizelegibility\")\n { display.lineDiv.style.textRendering = \"auto\"; }\n}\n\n// The default configuration options.\nCodeMirror$1.defaults = defaults;\n// Functions to run when options are changed.\nCodeMirror$1.optionHandlers = optionHandlers;\n\n// Attach the necessary event handlers when initializing the editor\nfunction registerEventHandlers(cm) {\n var d = cm.display;\n on(d.scroller, \"mousedown\", operation(cm, onMouseDown));\n // Older IE's will not fire a second mousedown for a double click\n if (ie && ie_version < 11)\n { on(d.scroller, \"dblclick\", operation(cm, function (e) {\n if (signalDOMEvent(cm, e)) { return }\n var pos = posFromMouse(cm, e);\n if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) { return }\n e_preventDefault(e);\n var word = cm.findWordAt(pos);\n extendSelection(cm.doc, word.anchor, word.head);\n })); }\n else\n { on(d.scroller, \"dblclick\", function (e) { return signalDOMEvent(cm, e) || e_preventDefault(e); }); }\n // Some browsers fire contextmenu *after* opening the menu, at\n // which point we can't mess with it anymore. Context menu is\n // handled in onMouseDown for these browsers.\n if (!captureRightClick) { on(d.scroller, \"contextmenu\", function (e) { return onContextMenu(cm, e); }); }\n\n // Used to suppress mouse event handling when a touch happens\n var touchFinished, prevTouch = {end: 0};\n function finishTouch() {\n if (d.activeTouch) {\n touchFinished = setTimeout(function () { return d.activeTouch = null; }, 1000);\n prevTouch = d.activeTouch;\n prevTouch.end = +new Date;\n }\n }\n function isMouseLikeTouchEvent(e) {\n if (e.touches.length != 1) { return false }\n var touch = e.touches[0];\n return touch.radiusX <= 1 && touch.radiusY <= 1\n }\n function farAway(touch, other) {\n if (other.left == null) { return true }\n var dx = other.left - touch.left, dy = other.top - touch.top;\n return dx * dx + dy * dy > 20 * 20\n }\n on(d.scroller, \"touchstart\", function (e) {\n if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e) && !clickInGutter(cm, e)) {\n d.input.ensurePolled();\n clearTimeout(touchFinished);\n var now = +new Date;\n d.activeTouch = {start: now, moved: false,\n prev: now - prevTouch.end <= 300 ? prevTouch : null};\n if (e.touches.length == 1) {\n d.activeTouch.left = e.touches[0].pageX;\n d.activeTouch.top = e.touches[0].pageY;\n }\n }\n });\n on(d.scroller, \"touchmove\", function () {\n if (d.activeTouch) { d.activeTouch.moved = true; }\n });\n on(d.scroller, \"touchend\", function (e) {\n var touch = d.activeTouch;\n if (touch && !eventInWidget(d, e) && touch.left != null &&\n !touch.moved && new Date - touch.start < 300) {\n var pos = cm.coordsChar(d.activeTouch, \"page\"), range;\n if (!touch.prev || farAway(touch, touch.prev)) // Single tap\n { range = new Range(pos, pos); }\n else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap\n { range = cm.findWordAt(pos); }\n else // Triple tap\n { range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); }\n cm.setSelection(range.anchor, range.head);\n cm.focus();\n e_preventDefault(e);\n }\n finishTouch();\n });\n on(d.scroller, \"touchcancel\", finishTouch);\n\n // Sync scrolling between fake scrollbars and real scrollable\n // area, ensure viewport is updated when scrolling.\n on(d.scroller, \"scroll\", function () {\n if (d.scroller.clientHeight) {\n updateScrollTop(cm, d.scroller.scrollTop);\n setScrollLeft(cm, d.scroller.scrollLeft, true);\n signal(cm, \"scroll\", cm);\n }\n });\n\n // Listen to wheel events in order to try and update the viewport on time.\n on(d.scroller, \"mousewheel\", function (e) { return onScrollWheel(cm, e); });\n on(d.scroller, \"DOMMouseScroll\", function (e) { return onScrollWheel(cm, e); });\n\n // Prevent wrapper from ever scrolling\n on(d.wrapper, \"scroll\", function () { return d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });\n\n d.dragFunctions = {\n enter: function (e) {if (!signalDOMEvent(cm, e)) { e_stop(e); }},\n over: function (e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }},\n start: function (e) { return onDragStart(cm, e); },\n drop: operation(cm, onDrop),\n leave: function (e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }}\n };\n\n var inp = d.input.getField();\n on(inp, \"keyup\", function (e) { return onKeyUp.call(cm, e); });\n on(inp, \"keydown\", operation(cm, onKeyDown));\n on(inp, \"keypress\", operation(cm, onKeyPress));\n on(inp, \"focus\", function (e) { return onFocus(cm, e); });\n on(inp, \"blur\", function (e) { return onBlur(cm, e); });\n}\n\nvar initHooks = [];\nCodeMirror$1.defineInitHook = function (f) { return initHooks.push(f); };\n\n// Indent the given line. The how parameter can be \"smart\",\n// \"add\"/null, \"subtract\", or \"prev\". When aggressive is false\n// (typically set to true for forced single-line indents), empty\n// lines are not indented, and places where the mode returns Pass\n// are left alone.\nfunction indentLine(cm, n, how, aggressive) {\n var doc = cm.doc, state;\n if (how == null) { how = \"add\"; }\n if (how == \"smart\") {\n // Fall back to \"prev\" when the mode doesn't have an indentation\n // method.\n if (!doc.mode.indent) { how = \"prev\"; }\n else { state = getContextBefore(cm, n).state; }\n }\n\n var tabSize = cm.options.tabSize;\n var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);\n if (line.stateAfter) { line.stateAfter = null; }\n var curSpaceString = line.text.match(/^\\s*/)[0], indentation;\n if (!aggressive && !/\\S/.test(line.text)) {\n indentation = 0;\n how = \"not\";\n } else if (how == \"smart\") {\n indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);\n if (indentation == Pass || indentation > 150) {\n if (!aggressive) { return }\n how = \"prev\";\n }\n }\n if (how == \"prev\") {\n if (n > doc.first) { indentation = countColumn(getLine(doc, n-1).text, null, tabSize); }\n else { indentation = 0; }\n } else if (how == \"add\") {\n indentation = curSpace + cm.options.indentUnit;\n } else if (how == \"subtract\") {\n indentation = curSpace - cm.options.indentUnit;\n } else if (typeof how == \"number\") {\n indentation = curSpace + how;\n }\n indentation = Math.max(0, indentation);\n\n var indentString = \"\", pos = 0;\n if (cm.options.indentWithTabs)\n { for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += \"\\t\";} }\n if (pos < indentation) { indentString += spaceStr(indentation - pos); }\n\n if (indentString != curSpaceString) {\n replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), \"+input\");\n line.stateAfter = null;\n return true\n } else {\n // Ensure that, if the cursor was in the whitespace at the start\n // of the line, it is moved to the end of that space.\n for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) {\n var range = doc.sel.ranges[i$1];\n if (range.head.line == n && range.head.ch < curSpaceString.length) {\n var pos$1 = Pos(n, curSpaceString.length);\n replaceOneSelection(doc, i$1, new Range(pos$1, pos$1));\n break\n }\n }\n }\n}\n\n// This will be set to a {lineWise: bool, text: [string]} object, so\n// that, when pasting, we know what kind of selections the copied\n// text was made out of.\nvar lastCopied = null;\n\nfunction setLastCopied(newLastCopied) {\n lastCopied = newLastCopied;\n}\n\nfunction applyTextInput(cm, inserted, deleted, sel, origin) {\n var doc = cm.doc;\n cm.display.shift = false;\n if (!sel) { sel = doc.sel; }\n\n var paste = cm.state.pasteIncoming || origin == \"paste\";\n var textLines = splitLinesAuto(inserted), multiPaste = null;\n // When pasting N lines into N selections, insert one line per selection\n if (paste && sel.ranges.length > 1) {\n if (lastCopied && lastCopied.text.join(\"\\n\") == inserted) {\n if (sel.ranges.length % lastCopied.text.length == 0) {\n multiPaste = [];\n for (var i = 0; i < lastCopied.text.length; i++)\n { multiPaste.push(doc.splitLines(lastCopied.text[i])); }\n }\n } else if (textLines.length == sel.ranges.length && cm.options.pasteLinesPerSelection) {\n multiPaste = map(textLines, function (l) { return [l]; });\n }\n }\n\n var updateInput;\n // Normal behavior is to insert the new text into every selection\n for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) {\n var range$$1 = sel.ranges[i$1];\n var from = range$$1.from(), to = range$$1.to();\n if (range$$1.empty()) {\n if (deleted && deleted > 0) // Handle deletion\n { from = Pos(from.line, from.ch - deleted); }\n else if (cm.state.overwrite && !paste) // Handle overwrite\n { to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); }\n else if (lastCopied && lastCopied.lineWise && lastCopied.text.join(\"\\n\") == inserted)\n { from = to = Pos(from.line, 0); }\n }\n updateInput = cm.curOp.updateInput;\n var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,\n origin: origin || (paste ? \"paste\" : cm.state.cutIncoming ? \"cut\" : \"+input\")};\n makeChange(cm.doc, changeEvent);\n signalLater(cm, \"inputRead\", cm, changeEvent);\n }\n if (inserted && !paste)\n { triggerElectric(cm, inserted); }\n\n ensureCursorVisible(cm);\n cm.curOp.updateInput = updateInput;\n cm.curOp.typing = true;\n cm.state.pasteIncoming = cm.state.cutIncoming = false;\n}\n\nfunction handlePaste(e, cm) {\n var pasted = e.clipboardData && e.clipboardData.getData(\"Text\");\n if (pasted) {\n e.preventDefault();\n if (!cm.isReadOnly() && !cm.options.disableInput)\n { runInOp(cm, function () { return applyTextInput(cm, pasted, 0, null, \"paste\"); }); }\n return true\n }\n}\n\nfunction triggerElectric(cm, inserted) {\n // When an 'electric' character is inserted, immediately trigger a reindent\n if (!cm.options.electricChars || !cm.options.smartIndent) { return }\n var sel = cm.doc.sel;\n\n for (var i = sel.ranges.length - 1; i >= 0; i--) {\n var range$$1 = sel.ranges[i];\n if (range$$1.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range$$1.head.line)) { continue }\n var mode = cm.getModeAt(range$$1.head);\n var indented = false;\n if (mode.electricChars) {\n for (var j = 0; j < mode.electricChars.length; j++)\n { if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {\n indented = indentLine(cm, range$$1.head.line, \"smart\");\n break\n } }\n } else if (mode.electricInput) {\n if (mode.electricInput.test(getLine(cm.doc, range$$1.head.line).text.slice(0, range$$1.head.ch)))\n { indented = indentLine(cm, range$$1.head.line, \"smart\"); }\n }\n if (indented) { signalLater(cm, \"electricInput\", cm, range$$1.head.line); }\n }\n}\n\nfunction copyableRanges(cm) {\n var text = [], ranges = [];\n for (var i = 0; i < cm.doc.sel.ranges.length; i++) {\n var line = cm.doc.sel.ranges[i].head.line;\n var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};\n ranges.push(lineRange);\n text.push(cm.getRange(lineRange.anchor, lineRange.head));\n }\n return {text: text, ranges: ranges}\n}\n\nfunction disableBrowserMagic(field, spellcheck) {\n field.setAttribute(\"autocorrect\", \"off\");\n field.setAttribute(\"autocapitalize\", \"off\");\n field.setAttribute(\"spellcheck\", !!spellcheck);\n}\n\nfunction hiddenTextarea() {\n var te = elt(\"textarea\", null, null, \"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none\");\n var div = elt(\"div\", [te], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n // The textarea is kept positioned near the cursor to prevent the\n // fact that it'll be scrolled into view on input from scrolling\n // our fake cursor out of view. On webkit, when wrap=off, paste is\n // very slow. So make the area wide instead.\n if (webkit) { te.style.width = \"1000px\"; }\n else { te.setAttribute(\"wrap\", \"off\"); }\n // If border: 0; -- iOS fails to open keyboard (issue #1287)\n if (ios) { te.style.border = \"1px solid black\"; }\n disableBrowserMagic(te);\n return div\n}\n\n// The publicly visible API. Note that methodOp(f) means\n// 'wrap f in an operation, performed on its `this` parameter'.\n\n// This is not the complete set of editor methods. Most of the\n// methods defined on the Doc type are also injected into\n// CodeMirror.prototype, for backwards compatibility and\n// convenience.\n\nvar addEditorMethods = function(CodeMirror) {\n var optionHandlers = CodeMirror.optionHandlers;\n\n var helpers = CodeMirror.helpers = {};\n\n CodeMirror.prototype = {\n constructor: CodeMirror,\n focus: function(){window.focus(); this.display.input.focus();},\n\n setOption: function(option, value) {\n var options = this.options, old = options[option];\n if (options[option] == value && option != \"mode\") { return }\n options[option] = value;\n if (optionHandlers.hasOwnProperty(option))\n { operation(this, optionHandlers[option])(this, value, old); }\n signal(this, \"optionChange\", this, option);\n },\n\n getOption: function(option) {return this.options[option]},\n getDoc: function() {return this.doc},\n\n addKeyMap: function(map$$1, bottom) {\n this.state.keyMaps[bottom ? \"push\" : \"unshift\"](getKeyMap(map$$1));\n },\n removeKeyMap: function(map$$1) {\n var maps = this.state.keyMaps;\n for (var i = 0; i < maps.length; ++i)\n { if (maps[i] == map$$1 || maps[i].name == map$$1) {\n maps.splice(i, 1);\n return true\n } }\n },\n\n addOverlay: methodOp(function(spec, options) {\n var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);\n if (mode.startState) { throw new Error(\"Overlays may not be stateful.\") }\n insertSorted(this.state.overlays,\n {mode: mode, modeSpec: spec, opaque: options && options.opaque,\n priority: (options && options.priority) || 0},\n function (overlay) { return overlay.priority; });\n this.state.modeGen++;\n regChange(this);\n }),\n removeOverlay: methodOp(function(spec) {\n var this$1 = this;\n\n var overlays = this.state.overlays;\n for (var i = 0; i < overlays.length; ++i) {\n var cur = overlays[i].modeSpec;\n if (cur == spec || typeof spec == \"string\" && cur.name == spec) {\n overlays.splice(i, 1);\n this$1.state.modeGen++;\n regChange(this$1);\n return\n }\n }\n }),\n\n indentLine: methodOp(function(n, dir, aggressive) {\n if (typeof dir != \"string\" && typeof dir != \"number\") {\n if (dir == null) { dir = this.options.smartIndent ? \"smart\" : \"prev\"; }\n else { dir = dir ? \"add\" : \"subtract\"; }\n }\n if (isLine(this.doc, n)) { indentLine(this, n, dir, aggressive); }\n }),\n indentSelection: methodOp(function(how) {\n var this$1 = this;\n\n var ranges = this.doc.sel.ranges, end = -1;\n for (var i = 0; i < ranges.length; i++) {\n var range$$1 = ranges[i];\n if (!range$$1.empty()) {\n var from = range$$1.from(), to = range$$1.to();\n var start = Math.max(end, from.line);\n end = Math.min(this$1.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;\n for (var j = start; j < end; ++j)\n { indentLine(this$1, j, how); }\n var newRanges = this$1.doc.sel.ranges;\n if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0)\n { replaceOneSelection(this$1.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); }\n } else if (range$$1.head.line > end) {\n indentLine(this$1, range$$1.head.line, how, true);\n end = range$$1.head.line;\n if (i == this$1.doc.sel.primIndex) { ensureCursorVisible(this$1); }\n }\n }\n }),\n\n // Fetch the parser token for a given character. Useful for hacks\n // that want to inspect the mode state (say, for completion).\n getTokenAt: function(pos, precise) {\n return takeToken(this, pos, precise)\n },\n\n getLineTokens: function(line, precise) {\n return takeToken(this, Pos(line), precise, true)\n },\n\n getTokenTypeAt: function(pos) {\n pos = clipPos(this.doc, pos);\n var styles = getLineStyles(this, getLine(this.doc, pos.line));\n var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;\n var type;\n if (ch == 0) { type = styles[2]; }\n else { for (;;) {\n var mid = (before + after) >> 1;\n if ((mid ? styles[mid * 2 - 1] : 0) >= ch) { after = mid; }\n else if (styles[mid * 2 + 1] < ch) { before = mid + 1; }\n else { type = styles[mid * 2 + 2]; break }\n } }\n var cut = type ? type.indexOf(\"overlay \") : -1;\n return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1)\n },\n\n getModeAt: function(pos) {\n var mode = this.doc.mode;\n if (!mode.innerMode) { return mode }\n return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode\n },\n\n getHelper: function(pos, type) {\n return this.getHelpers(pos, type)[0]\n },\n\n getHelpers: function(pos, type) {\n var this$1 = this;\n\n var found = [];\n if (!helpers.hasOwnProperty(type)) { return found }\n var help = helpers[type], mode = this.getModeAt(pos);\n if (typeof mode[type] == \"string\") {\n if (help[mode[type]]) { found.push(help[mode[type]]); }\n } else if (mode[type]) {\n for (var i = 0; i < mode[type].length; i++) {\n var val = help[mode[type][i]];\n if (val) { found.push(val); }\n }\n } else if (mode.helperType && help[mode.helperType]) {\n found.push(help[mode.helperType]);\n } else if (help[mode.name]) {\n found.push(help[mode.name]);\n }\n for (var i$1 = 0; i$1 < help._global.length; i$1++) {\n var cur = help._global[i$1];\n if (cur.pred(mode, this$1) && indexOf(found, cur.val) == -1)\n { found.push(cur.val); }\n }\n return found\n },\n\n getStateAfter: function(line, precise) {\n var doc = this.doc;\n line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);\n return getContextBefore(this, line + 1, precise).state\n },\n\n cursorCoords: function(start, mode) {\n var pos, range$$1 = this.doc.sel.primary();\n if (start == null) { pos = range$$1.head; }\n else if (typeof start == \"object\") { pos = clipPos(this.doc, start); }\n else { pos = start ? range$$1.from() : range$$1.to(); }\n return cursorCoords(this, pos, mode || \"page\")\n },\n\n charCoords: function(pos, mode) {\n return charCoords(this, clipPos(this.doc, pos), mode || \"page\")\n },\n\n coordsChar: function(coords, mode) {\n coords = fromCoordSystem(this, coords, mode || \"page\");\n return coordsChar(this, coords.left, coords.top)\n },\n\n lineAtHeight: function(height, mode) {\n height = fromCoordSystem(this, {top: height, left: 0}, mode || \"page\").top;\n return lineAtHeight(this.doc, height + this.display.viewOffset)\n },\n heightAtLine: function(line, mode, includeWidgets) {\n var end = false, lineObj;\n if (typeof line == \"number\") {\n var last = this.doc.first + this.doc.size - 1;\n if (line < this.doc.first) { line = this.doc.first; }\n else if (line > last) { line = last; end = true; }\n lineObj = getLine(this.doc, line);\n } else {\n lineObj = line;\n }\n return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || \"page\", includeWidgets || end).top +\n (end ? this.doc.height - heightAtLine(lineObj) : 0)\n },\n\n defaultTextHeight: function() { return textHeight(this.display) },\n defaultCharWidth: function() { return charWidth(this.display) },\n\n getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo}},\n\n addWidget: function(pos, node, scroll, vert, horiz) {\n var display = this.display;\n pos = cursorCoords(this, clipPos(this.doc, pos));\n var top = pos.bottom, left = pos.left;\n node.style.position = \"absolute\";\n node.setAttribute(\"cm-ignore-events\", \"true\");\n this.display.input.setUneditable(node);\n display.sizer.appendChild(node);\n if (vert == \"over\") {\n top = pos.top;\n } else if (vert == \"above\" || vert == \"near\") {\n var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),\n hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);\n // Default to positioning above (if specified and possible); otherwise default to positioning below\n if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)\n { top = pos.top - node.offsetHeight; }\n else if (pos.bottom + node.offsetHeight <= vspace)\n { top = pos.bottom; }\n if (left + node.offsetWidth > hspace)\n { left = hspace - node.offsetWidth; }\n }\n node.style.top = top + \"px\";\n node.style.left = node.style.right = \"\";\n if (horiz == \"right\") {\n left = display.sizer.clientWidth - node.offsetWidth;\n node.style.right = \"0px\";\n } else {\n if (horiz == \"left\") { left = 0; }\n else if (horiz == \"middle\") { left = (display.sizer.clientWidth - node.offsetWidth) / 2; }\n node.style.left = left + \"px\";\n }\n if (scroll)\n { scrollIntoView(this, {left: left, top: top, right: left + node.offsetWidth, bottom: top + node.offsetHeight}); }\n },\n\n triggerOnKeyDown: methodOp(onKeyDown),\n triggerOnKeyPress: methodOp(onKeyPress),\n triggerOnKeyUp: onKeyUp,\n triggerOnMouseDown: methodOp(onMouseDown),\n\n execCommand: function(cmd) {\n if (commands.hasOwnProperty(cmd))\n { return commands[cmd].call(null, this) }\n },\n\n triggerElectric: methodOp(function(text) { triggerElectric(this, text); }),\n\n findPosH: function(from, amount, unit, visually) {\n var this$1 = this;\n\n var dir = 1;\n if (amount < 0) { dir = -1; amount = -amount; }\n var cur = clipPos(this.doc, from);\n for (var i = 0; i < amount; ++i) {\n cur = findPosH(this$1.doc, cur, dir, unit, visually);\n if (cur.hitSide) { break }\n }\n return cur\n },\n\n moveH: methodOp(function(dir, unit) {\n var this$1 = this;\n\n this.extendSelectionsBy(function (range$$1) {\n if (this$1.display.shift || this$1.doc.extend || range$$1.empty())\n { return findPosH(this$1.doc, range$$1.head, dir, unit, this$1.options.rtlMoveVisually) }\n else\n { return dir < 0 ? range$$1.from() : range$$1.to() }\n }, sel_move);\n }),\n\n deleteH: methodOp(function(dir, unit) {\n var sel = this.doc.sel, doc = this.doc;\n if (sel.somethingSelected())\n { doc.replaceSelection(\"\", null, \"+delete\"); }\n else\n { deleteNearSelection(this, function (range$$1) {\n var other = findPosH(doc, range$$1.head, dir, unit, false);\n return dir < 0 ? {from: other, to: range$$1.head} : {from: range$$1.head, to: other}\n }); }\n }),\n\n findPosV: function(from, amount, unit, goalColumn) {\n var this$1 = this;\n\n var dir = 1, x = goalColumn;\n if (amount < 0) { dir = -1; amount = -amount; }\n var cur = clipPos(this.doc, from);\n for (var i = 0; i < amount; ++i) {\n var coords = cursorCoords(this$1, cur, \"div\");\n if (x == null) { x = coords.left; }\n else { coords.left = x; }\n cur = findPosV(this$1, coords, dir, unit);\n if (cur.hitSide) { break }\n }\n return cur\n },\n\n moveV: methodOp(function(dir, unit) {\n var this$1 = this;\n\n var doc = this.doc, goals = [];\n var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected();\n doc.extendSelectionsBy(function (range$$1) {\n if (collapse)\n { return dir < 0 ? range$$1.from() : range$$1.to() }\n var headPos = cursorCoords(this$1, range$$1.head, \"div\");\n if (range$$1.goalColumn != null) { headPos.left = range$$1.goalColumn; }\n goals.push(headPos.left);\n var pos = findPosV(this$1, headPos, dir, unit);\n if (unit == \"page\" && range$$1 == doc.sel.primary())\n { addToScrollTop(this$1, charCoords(this$1, pos, \"div\").top - headPos.top); }\n return pos\n }, sel_move);\n if (goals.length) { for (var i = 0; i < doc.sel.ranges.length; i++)\n { doc.sel.ranges[i].goalColumn = goals[i]; } }\n }),\n\n // Find the word at the given position (as returned by coordsChar).\n findWordAt: function(pos) {\n var doc = this.doc, line = getLine(doc, pos.line).text;\n var start = pos.ch, end = pos.ch;\n if (line) {\n var helper = this.getHelper(pos, \"wordChars\");\n if ((pos.sticky == \"before\" || end == line.length) && start) { --start; } else { ++end; }\n var startChar = line.charAt(start);\n var check = isWordChar(startChar, helper)\n ? function (ch) { return isWordChar(ch, helper); }\n : /\\s/.test(startChar) ? function (ch) { return /\\s/.test(ch); }\n : function (ch) { return (!/\\s/.test(ch) && !isWordChar(ch)); };\n while (start > 0 && check(line.charAt(start - 1))) { --start; }\n while (end < line.length && check(line.charAt(end))) { ++end; }\n }\n return new Range(Pos(pos.line, start), Pos(pos.line, end))\n },\n\n toggleOverwrite: function(value) {\n if (value != null && value == this.state.overwrite) { return }\n if (this.state.overwrite = !this.state.overwrite)\n { addClass(this.display.cursorDiv, \"CodeMirror-overwrite\"); }\n else\n { rmClass(this.display.cursorDiv, \"CodeMirror-overwrite\"); }\n\n signal(this, \"overwriteToggle\", this, this.state.overwrite);\n },\n hasFocus: function() { return this.display.input.getField() == activeElt() },\n isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) },\n\n scrollTo: methodOp(function (x, y) { scrollToCoords(this, x, y); }),\n getScrollInfo: function() {\n var scroller = this.display.scroller;\n return {left: scroller.scrollLeft, top: scroller.scrollTop,\n height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,\n width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,\n clientHeight: displayHeight(this), clientWidth: displayWidth(this)}\n },\n\n scrollIntoView: methodOp(function(range$$1, margin) {\n if (range$$1 == null) {\n range$$1 = {from: this.doc.sel.primary().head, to: null};\n if (margin == null) { margin = this.options.cursorScrollMargin; }\n } else if (typeof range$$1 == \"number\") {\n range$$1 = {from: Pos(range$$1, 0), to: null};\n } else if (range$$1.from == null) {\n range$$1 = {from: range$$1, to: null};\n }\n if (!range$$1.to) { range$$1.to = range$$1.from; }\n range$$1.margin = margin || 0;\n\n if (range$$1.from.line != null) {\n scrollToRange(this, range$$1);\n } else {\n scrollToCoordsRange(this, range$$1.from, range$$1.to, range$$1.margin);\n }\n }),\n\n setSize: methodOp(function(width, height) {\n var this$1 = this;\n\n var interpret = function (val) { return typeof val == \"number\" || /^\\d+$/.test(String(val)) ? val + \"px\" : val; };\n if (width != null) { this.display.wrapper.style.width = interpret(width); }\n if (height != null) { this.display.wrapper.style.height = interpret(height); }\n if (this.options.lineWrapping) { clearLineMeasurementCache(this); }\n var lineNo$$1 = this.display.viewFrom;\n this.doc.iter(lineNo$$1, this.display.viewTo, function (line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++)\n { if (line.widgets[i].noHScroll) { regLineChange(this$1, lineNo$$1, \"widget\"); break } } }\n ++lineNo$$1;\n });\n this.curOp.forceUpdate = true;\n signal(this, \"refresh\", this);\n }),\n\n operation: function(f){return runInOp(this, f)},\n startOperation: function(){return startOperation(this)},\n endOperation: function(){return endOperation(this)},\n\n refresh: methodOp(function() {\n var oldHeight = this.display.cachedTextHeight;\n regChange(this);\n this.curOp.forceUpdate = true;\n clearCaches(this);\n scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop);\n updateGutterSpace(this);\n if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5)\n { estimateLineHeights(this); }\n signal(this, \"refresh\", this);\n }),\n\n swapDoc: methodOp(function(doc) {\n var old = this.doc;\n old.cm = null;\n attachDoc(this, doc);\n clearCaches(this);\n this.display.input.reset();\n scrollToCoords(this, doc.scrollLeft, doc.scrollTop);\n this.curOp.forceScroll = true;\n signalLater(this, \"swapDoc\", this, old);\n return old\n }),\n\n getInputField: function(){return this.display.input.getField()},\n getWrapperElement: function(){return this.display.wrapper},\n getScrollerElement: function(){return this.display.scroller},\n getGutterElement: function(){return this.display.gutters}\n };\n eventMixin(CodeMirror);\n\n CodeMirror.registerHelper = function(type, name, value) {\n if (!helpers.hasOwnProperty(type)) { helpers[type] = CodeMirror[type] = {_global: []}; }\n helpers[type][name] = value;\n };\n CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {\n CodeMirror.registerHelper(type, name, value);\n helpers[type]._global.push({pred: predicate, val: value});\n };\n};\n\n// Used for horizontal relative motion. Dir is -1 or 1 (left or\n// right), unit can be \"char\", \"column\" (like char, but doesn't\n// cross line boundaries), \"word\" (across next word), or \"group\" (to\n// the start of next group of word or non-word-non-whitespace\n// chars). The visually param controls whether, in right-to-left\n// text, direction 1 means to move towards the next index in the\n// string, or towards the character to the right of the current\n// position. The resulting position will have a hitSide=true\n// property if it reached the end of the document.\nfunction findPosH(doc, pos, dir, unit, visually) {\n var oldPos = pos;\n var origDir = dir;\n var lineObj = getLine(doc, pos.line);\n function findNextLine() {\n var l = pos.line + dir;\n if (l < doc.first || l >= doc.first + doc.size) { return false }\n pos = new Pos(l, pos.ch, pos.sticky);\n return lineObj = getLine(doc, l)\n }\n function moveOnce(boundToLine) {\n var next;\n if (visually) {\n next = moveVisually(doc.cm, lineObj, pos, dir);\n } else {\n next = moveLogically(lineObj, pos, dir);\n }\n if (next == null) {\n if (!boundToLine && findNextLine())\n { pos = endOfLine(visually, doc.cm, lineObj, pos.line, dir); }\n else\n { return false }\n } else {\n pos = next;\n }\n return true\n }\n\n if (unit == \"char\") {\n moveOnce();\n } else if (unit == \"column\") {\n moveOnce(true);\n } else if (unit == \"word\" || unit == \"group\") {\n var sawType = null, group = unit == \"group\";\n var helper = doc.cm && doc.cm.getHelper(pos, \"wordChars\");\n for (var first = true;; first = false) {\n if (dir < 0 && !moveOnce(!first)) { break }\n var cur = lineObj.text.charAt(pos.ch) || \"\\n\";\n var type = isWordChar(cur, helper) ? \"w\"\n : group && cur == \"\\n\" ? \"n\"\n : !group || /\\s/.test(cur) ? null\n : \"p\";\n if (group && !first && !type) { type = \"s\"; }\n if (sawType && sawType != type) {\n if (dir < 0) {dir = 1; moveOnce(); pos.sticky = \"after\";}\n break\n }\n\n if (type) { sawType = type; }\n if (dir > 0 && !moveOnce(!first)) { break }\n }\n }\n var result = skipAtomic(doc, pos, oldPos, origDir, true);\n if (equalCursorPos(oldPos, result)) { result.hitSide = true; }\n return result\n}\n\n// For relative vertical movement. Dir may be -1 or 1. Unit can be\n// \"page\" or \"line\". The resulting position will have a hitSide=true\n// property if it reached the end of the document.\nfunction findPosV(cm, pos, dir, unit) {\n var doc = cm.doc, x = pos.left, y;\n if (unit == \"page\") {\n var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);\n var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);\n y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount;\n\n } else if (unit == \"line\") {\n y = dir > 0 ? pos.bottom + 3 : pos.top - 3;\n }\n var target;\n for (;;) {\n target = coordsChar(cm, x, y);\n if (!target.outside) { break }\n if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break }\n y += dir * 5;\n }\n return target\n}\n\n// CONTENTEDITABLE INPUT STYLE\n\nvar ContentEditableInput = function(cm) {\n this.cm = cm;\n this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;\n this.polling = new Delayed();\n this.composing = null;\n this.gracePeriod = false;\n this.readDOMTimeout = null;\n};\n\nContentEditableInput.prototype.init = function (display) {\n var this$1 = this;\n\n var input = this, cm = input.cm;\n var div = input.div = display.lineDiv;\n disableBrowserMagic(div, cm.options.spellcheck);\n\n on(div, \"paste\", function (e) {\n if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }\n // IE doesn't fire input events, so we schedule a read for the pasted content in this way\n if (ie_version <= 11) { setTimeout(operation(cm, function () { return this$1.updateFromDOM(); }), 20); }\n });\n\n on(div, \"compositionstart\", function (e) {\n this$1.composing = {data: e.data, done: false};\n });\n on(div, \"compositionupdate\", function (e) {\n if (!this$1.composing) { this$1.composing = {data: e.data, done: false}; }\n });\n on(div, \"compositionend\", function (e) {\n if (this$1.composing) {\n if (e.data != this$1.composing.data) { this$1.readFromDOMSoon(); }\n this$1.composing.done = true;\n }\n });\n\n on(div, \"touchstart\", function () { return input.forceCompositionEnd(); });\n\n on(div, \"input\", function () {\n if (!this$1.composing) { this$1.readFromDOMSoon(); }\n });\n\n function onCopyCut(e) {\n if (signalDOMEvent(cm, e)) { return }\n if (cm.somethingSelected()) {\n setLastCopied({lineWise: false, text: cm.getSelections()});\n if (e.type == \"cut\") { cm.replaceSelection(\"\", null, \"cut\"); }\n } else if (!cm.options.lineWiseCopyCut) {\n return\n } else {\n var ranges = copyableRanges(cm);\n setLastCopied({lineWise: true, text: ranges.text});\n if (e.type == \"cut\") {\n cm.operation(function () {\n cm.setSelections(ranges.ranges, 0, sel_dontScroll);\n cm.replaceSelection(\"\", null, \"cut\");\n });\n }\n }\n if (e.clipboardData) {\n e.clipboardData.clearData();\n var content = lastCopied.text.join(\"\\n\");\n // iOS exposes the clipboard API, but seems to discard content inserted into it\n e.clipboardData.setData(\"Text\", content);\n if (e.clipboardData.getData(\"Text\") == content) {\n e.preventDefault();\n return\n }\n }\n // Old-fashioned briefly-focus-a-textarea hack\n var kludge = hiddenTextarea(), te = kludge.firstChild;\n cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);\n te.value = lastCopied.text.join(\"\\n\");\n var hadFocus = document.activeElement;\n selectInput(te);\n setTimeout(function () {\n cm.display.lineSpace.removeChild(kludge);\n hadFocus.focus();\n if (hadFocus == div) { input.showPrimarySelection(); }\n }, 50);\n }\n on(div, \"copy\", onCopyCut);\n on(div, \"cut\", onCopyCut);\n};\n\nContentEditableInput.prototype.prepareSelection = function () {\n var result = prepareSelection(this.cm, false);\n result.focus = this.cm.state.focused;\n return result\n};\n\nContentEditableInput.prototype.showSelection = function (info, takeFocus) {\n if (!info || !this.cm.display.view.length) { return }\n if (info.focus || takeFocus) { this.showPrimarySelection(); }\n this.showMultipleSelections(info);\n};\n\nContentEditableInput.prototype.getSelection = function () {\n return this.cm.display.wrapper.ownerDocument.getSelection()\n};\n\nContentEditableInput.prototype.showPrimarySelection = function () {\n var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();\n var from = prim.from(), to = prim.to();\n\n if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {\n sel.removeAllRanges();\n return\n }\n\n var curAnchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n var curFocus = domToPos(cm, sel.focusNode, sel.focusOffset);\n if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&\n cmp(minPos(curAnchor, curFocus), from) == 0 &&\n cmp(maxPos(curAnchor, curFocus), to) == 0)\n { return }\n\n var view = cm.display.view;\n var start = (from.line >= cm.display.viewFrom && posToDOM(cm, from)) ||\n {node: view[0].measure.map[2], offset: 0};\n var end = to.line < cm.display.viewTo && posToDOM(cm, to);\n if (!end) {\n var measure = view[view.length - 1].measure;\n var map$$1 = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;\n end = {node: map$$1[map$$1.length - 1], offset: map$$1[map$$1.length - 2] - map$$1[map$$1.length - 3]};\n }\n\n if (!start || !end) {\n sel.removeAllRanges();\n return\n }\n\n var old = sel.rangeCount && sel.getRangeAt(0), rng;\n try { rng = range(start.node, start.offset, end.offset, end.node); }\n catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible\n if (rng) {\n if (!gecko && cm.state.focused) {\n sel.collapse(start.node, start.offset);\n if (!rng.collapsed) {\n sel.removeAllRanges();\n sel.addRange(rng);\n }\n } else {\n sel.removeAllRanges();\n sel.addRange(rng);\n }\n if (old && sel.anchorNode == null) { sel.addRange(old); }\n else if (gecko) { this.startGracePeriod(); }\n }\n this.rememberSelection();\n};\n\nContentEditableInput.prototype.startGracePeriod = function () {\n var this$1 = this;\n\n clearTimeout(this.gracePeriod);\n this.gracePeriod = setTimeout(function () {\n this$1.gracePeriod = false;\n if (this$1.selectionChanged())\n { this$1.cm.operation(function () { return this$1.cm.curOp.selectionChanged = true; }); }\n }, 20);\n};\n\nContentEditableInput.prototype.showMultipleSelections = function (info) {\n removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);\n removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);\n};\n\nContentEditableInput.prototype.rememberSelection = function () {\n var sel = this.getSelection();\n this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;\n this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;\n};\n\nContentEditableInput.prototype.selectionInEditor = function () {\n var sel = this.getSelection();\n if (!sel.rangeCount) { return false }\n var node = sel.getRangeAt(0).commonAncestorContainer;\n return contains(this.div, node)\n};\n\nContentEditableInput.prototype.focus = function () {\n if (this.cm.options.readOnly != \"nocursor\") {\n if (!this.selectionInEditor())\n { this.showSelection(this.prepareSelection(), true); }\n this.div.focus();\n }\n};\nContentEditableInput.prototype.blur = function () { this.div.blur(); };\nContentEditableInput.prototype.getField = function () { return this.div };\n\nContentEditableInput.prototype.supportsTouch = function () { return true };\n\nContentEditableInput.prototype.receivedFocus = function () {\n var input = this;\n if (this.selectionInEditor())\n { this.pollSelection(); }\n else\n { runInOp(this.cm, function () { return input.cm.curOp.selectionChanged = true; }); }\n\n function poll() {\n if (input.cm.state.focused) {\n input.pollSelection();\n input.polling.set(input.cm.options.pollInterval, poll);\n }\n }\n this.polling.set(this.cm.options.pollInterval, poll);\n};\n\nContentEditableInput.prototype.selectionChanged = function () {\n var sel = this.getSelection();\n return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||\n sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset\n};\n\nContentEditableInput.prototype.pollSelection = function () {\n if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return }\n var sel = this.getSelection(), cm = this.cm;\n // On Android Chrome (version 56, at least), backspacing into an\n // uneditable block element will put the cursor in that element,\n // and then, because it's not editable, hide the virtual keyboard.\n // Because Android doesn't allow us to actually detect backspace\n // presses in a sane way, this code checks for when that happens\n // and simulates a backspace press in this case.\n if (android && chrome && this.cm.options.gutters.length && isInGutter(sel.anchorNode)) {\n this.cm.triggerOnKeyDown({type: \"keydown\", keyCode: 8, preventDefault: Math.abs});\n this.blur();\n this.focus();\n return\n }\n if (this.composing) { return }\n this.rememberSelection();\n var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n var head = domToPos(cm, sel.focusNode, sel.focusOffset);\n if (anchor && head) { runInOp(cm, function () {\n setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);\n if (anchor.bad || head.bad) { cm.curOp.selectionChanged = true; }\n }); }\n};\n\nContentEditableInput.prototype.pollContent = function () {\n if (this.readDOMTimeout != null) {\n clearTimeout(this.readDOMTimeout);\n this.readDOMTimeout = null;\n }\n\n var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary();\n var from = sel.from(), to = sel.to();\n if (from.ch == 0 && from.line > cm.firstLine())\n { from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length); }\n if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine())\n { to = Pos(to.line + 1, 0); }\n if (from.line < display.viewFrom || to.line > display.viewTo - 1) { return false }\n\n var fromIndex, fromLine, fromNode;\n if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {\n fromLine = lineNo(display.view[0].line);\n fromNode = display.view[0].node;\n } else {\n fromLine = lineNo(display.view[fromIndex].line);\n fromNode = display.view[fromIndex - 1].node.nextSibling;\n }\n var toIndex = findViewIndex(cm, to.line);\n var toLine, toNode;\n if (toIndex == display.view.length - 1) {\n toLine = display.viewTo - 1;\n toNode = display.lineDiv.lastChild;\n } else {\n toLine = lineNo(display.view[toIndex + 1].line) - 1;\n toNode = display.view[toIndex + 1].node.previousSibling;\n }\n\n if (!fromNode) { return false }\n var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));\n var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));\n while (newText.length > 1 && oldText.length > 1) {\n if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; }\n else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; }\n else { break }\n }\n\n var cutFront = 0, cutEnd = 0;\n var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length);\n while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront))\n { ++cutFront; }\n var newBot = lst(newText), oldBot = lst(oldText);\n var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0),\n oldBot.length - (oldText.length == 1 ? cutFront : 0));\n while (cutEnd < maxCutEnd &&\n newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))\n { ++cutEnd; }\n // Try to move start of change to start of selection if ambiguous\n if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) {\n while (cutFront && cutFront > from.ch &&\n newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) {\n cutFront--;\n cutEnd++;\n }\n }\n\n newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\\u200b+/, \"\");\n newText[0] = newText[0].slice(cutFront).replace(/\\u200b+$/, \"\");\n\n var chFrom = Pos(fromLine, cutFront);\n var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);\n if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {\n replaceRange(cm.doc, newText, chFrom, chTo, \"+input\");\n return true\n }\n};\n\nContentEditableInput.prototype.ensurePolled = function () {\n this.forceCompositionEnd();\n};\nContentEditableInput.prototype.reset = function () {\n this.forceCompositionEnd();\n};\nContentEditableInput.prototype.forceCompositionEnd = function () {\n if (!this.composing) { return }\n clearTimeout(this.readDOMTimeout);\n this.composing = null;\n this.updateFromDOM();\n this.div.blur();\n this.div.focus();\n};\nContentEditableInput.prototype.readFromDOMSoon = function () {\n var this$1 = this;\n\n if (this.readDOMTimeout != null) { return }\n this.readDOMTimeout = setTimeout(function () {\n this$1.readDOMTimeout = null;\n if (this$1.composing) {\n if (this$1.composing.done) { this$1.composing = null; }\n else { return }\n }\n this$1.updateFromDOM();\n }, 80);\n};\n\nContentEditableInput.prototype.updateFromDOM = function () {\n var this$1 = this;\n\n if (this.cm.isReadOnly() || !this.pollContent())\n { runInOp(this.cm, function () { return regChange(this$1.cm); }); }\n};\n\nContentEditableInput.prototype.setUneditable = function (node) {\n node.contentEditable = \"false\";\n};\n\nContentEditableInput.prototype.onKeyPress = function (e) {\n if (e.charCode == 0 || this.composing) { return }\n e.preventDefault();\n if (!this.cm.isReadOnly())\n { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); }\n};\n\nContentEditableInput.prototype.readOnlyChanged = function (val) {\n this.div.contentEditable = String(val != \"nocursor\");\n};\n\nContentEditableInput.prototype.onContextMenu = function () {};\nContentEditableInput.prototype.resetPosition = function () {};\n\nContentEditableInput.prototype.needsContentAttribute = true;\n\nfunction posToDOM(cm, pos) {\n var view = findViewForLine(cm, pos.line);\n if (!view || view.hidden) { return null }\n var line = getLine(cm.doc, pos.line);\n var info = mapFromLineView(view, line, pos.line);\n\n var order = getOrder(line, cm.doc.direction), side = \"left\";\n if (order) {\n var partPos = getBidiPartAt(order, pos.ch);\n side = partPos % 2 ? \"right\" : \"left\";\n }\n var result = nodeAndOffsetInLineMap(info.map, pos.ch, side);\n result.offset = result.collapse == \"right\" ? result.end : result.start;\n return result\n}\n\nfunction isInGutter(node) {\n for (var scan = node; scan; scan = scan.parentNode)\n { if (/CodeMirror-gutter-wrapper/.test(scan.className)) { return true } }\n return false\n}\n\nfunction badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }\n\nfunction domTextBetween(cm, from, to, fromLine, toLine) {\n var text = \"\", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false;\n function recognizeMarker(id) { return function (marker) { return marker.id == id; } }\n function close() {\n if (closing) {\n text += lineSep;\n if (extraLinebreak) { text += lineSep; }\n closing = extraLinebreak = false;\n }\n }\n function addText(str) {\n if (str) {\n close();\n text += str;\n }\n }\n function walk(node) {\n if (node.nodeType == 1) {\n var cmText = node.getAttribute(\"cm-text\");\n if (cmText) {\n addText(cmText);\n return\n }\n var markerID = node.getAttribute(\"cm-marker\"), range$$1;\n if (markerID) {\n var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));\n if (found.length && (range$$1 = found[0].find(0)))\n { addText(getBetween(cm.doc, range$$1.from, range$$1.to).join(lineSep)); }\n return\n }\n if (node.getAttribute(\"contenteditable\") == \"false\") { return }\n var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName);\n if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return }\n\n if (isBlock) { close(); }\n for (var i = 0; i < node.childNodes.length; i++)\n { walk(node.childNodes[i]); }\n\n if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; }\n if (isBlock) { closing = true; }\n } else if (node.nodeType == 3) {\n addText(node.nodeValue.replace(/\\u200b/g, \"\").replace(/\\u00a0/g, \" \"));\n }\n }\n for (;;) {\n walk(from);\n if (from == to) { break }\n from = from.nextSibling;\n extraLinebreak = false;\n }\n return text\n}\n\nfunction domToPos(cm, node, offset) {\n var lineNode;\n if (node == cm.display.lineDiv) {\n lineNode = cm.display.lineDiv.childNodes[offset];\n if (!lineNode) { return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true) }\n node = null; offset = 0;\n } else {\n for (lineNode = node;; lineNode = lineNode.parentNode) {\n if (!lineNode || lineNode == cm.display.lineDiv) { return null }\n if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) { break }\n }\n }\n for (var i = 0; i < cm.display.view.length; i++) {\n var lineView = cm.display.view[i];\n if (lineView.node == lineNode)\n { return locateNodeInLineView(lineView, node, offset) }\n }\n}\n\nfunction locateNodeInLineView(lineView, node, offset) {\n var wrapper = lineView.text.firstChild, bad = false;\n if (!node || !contains(wrapper, node)) { return badPos(Pos(lineNo(lineView.line), 0), true) }\n if (node == wrapper) {\n bad = true;\n node = wrapper.childNodes[offset];\n offset = 0;\n if (!node) {\n var line = lineView.rest ? lst(lineView.rest) : lineView.line;\n return badPos(Pos(lineNo(line), line.text.length), bad)\n }\n }\n\n var textNode = node.nodeType == 3 ? node : null, topNode = node;\n if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {\n textNode = node.firstChild;\n if (offset) { offset = textNode.nodeValue.length; }\n }\n while (topNode.parentNode != wrapper) { topNode = topNode.parentNode; }\n var measure = lineView.measure, maps = measure.maps;\n\n function find(textNode, topNode, offset) {\n for (var i = -1; i < (maps ? maps.length : 0); i++) {\n var map$$1 = i < 0 ? measure.map : maps[i];\n for (var j = 0; j < map$$1.length; j += 3) {\n var curNode = map$$1[j + 2];\n if (curNode == textNode || curNode == topNode) {\n var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);\n var ch = map$$1[j] + offset;\n if (offset < 0 || curNode != textNode) { ch = map$$1[j + (offset ? 1 : 0)]; }\n return Pos(line, ch)\n }\n }\n }\n }\n var found = find(textNode, topNode, offset);\n if (found) { return badPos(found, bad) }\n\n // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems\n for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {\n found = find(after, after.firstChild, 0);\n if (found)\n { return badPos(Pos(found.line, found.ch - dist), bad) }\n else\n { dist += after.textContent.length; }\n }\n for (var before = topNode.previousSibling, dist$1 = offset; before; before = before.previousSibling) {\n found = find(before, before.firstChild, -1);\n if (found)\n { return badPos(Pos(found.line, found.ch + dist$1), bad) }\n else\n { dist$1 += before.textContent.length; }\n }\n}\n\n// TEXTAREA INPUT STYLE\n\nvar TextareaInput = function(cm) {\n this.cm = cm;\n // See input.poll and input.reset\n this.prevInput = \"\";\n\n // Flag that indicates whether we expect input to appear real soon\n // now (after some event like 'keypress' or 'input') and are\n // polling intensively.\n this.pollingFast = false;\n // Self-resetting timeout for the poller\n this.polling = new Delayed();\n // Used to work around IE issue with selection being forgotten when focus moves away from textarea\n this.hasSelection = false;\n this.composing = null;\n};\n\nTextareaInput.prototype.init = function (display) {\n var this$1 = this;\n\n var input = this, cm = this.cm;\n this.createField(display);\n var te = this.textarea;\n\n display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild);\n\n // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)\n if (ios) { te.style.width = \"0px\"; }\n\n on(te, \"input\", function () {\n if (ie && ie_version >= 9 && this$1.hasSelection) { this$1.hasSelection = null; }\n input.poll();\n });\n\n on(te, \"paste\", function (e) {\n if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }\n\n cm.state.pasteIncoming = true;\n input.fastPoll();\n });\n\n function prepareCopyCut(e) {\n if (signalDOMEvent(cm, e)) { return }\n if (cm.somethingSelected()) {\n setLastCopied({lineWise: false, text: cm.getSelections()});\n } else if (!cm.options.lineWiseCopyCut) {\n return\n } else {\n var ranges = copyableRanges(cm);\n setLastCopied({lineWise: true, text: ranges.text});\n if (e.type == \"cut\") {\n cm.setSelections(ranges.ranges, null, sel_dontScroll);\n } else {\n input.prevInput = \"\";\n te.value = ranges.text.join(\"\\n\");\n selectInput(te);\n }\n }\n if (e.type == \"cut\") { cm.state.cutIncoming = true; }\n }\n on(te, \"cut\", prepareCopyCut);\n on(te, \"copy\", prepareCopyCut);\n\n on(display.scroller, \"paste\", function (e) {\n if (eventInWidget(display, e) || signalDOMEvent(cm, e)) { return }\n cm.state.pasteIncoming = true;\n input.focus();\n });\n\n // Prevent normal selection in the editor (we handle our own)\n on(display.lineSpace, \"selectstart\", function (e) {\n if (!eventInWidget(display, e)) { e_preventDefault(e); }\n });\n\n on(te, \"compositionstart\", function () {\n var start = cm.getCursor(\"from\");\n if (input.composing) { input.composing.range.clear(); }\n input.composing = {\n start: start,\n range: cm.markText(start, cm.getCursor(\"to\"), {className: \"CodeMirror-composing\"})\n };\n });\n on(te, \"compositionend\", function () {\n if (input.composing) {\n input.poll();\n input.composing.range.clear();\n input.composing = null;\n }\n });\n};\n\nTextareaInput.prototype.createField = function (_display) {\n // Wraps and hides input textarea\n this.wrapper = hiddenTextarea();\n // The semihidden textarea that is focused when the editor is\n // focused, and receives input.\n this.textarea = this.wrapper.firstChild;\n};\n\nTextareaInput.prototype.prepareSelection = function () {\n // Redraw the selection and/or cursor\n var cm = this.cm, display = cm.display, doc = cm.doc;\n var result = prepareSelection(cm);\n\n // Move the hidden textarea near the cursor to prevent scrolling artifacts\n if (cm.options.moveInputWithCursor) {\n var headPos = cursorCoords(cm, doc.sel.primary().head, \"div\");\n var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();\n result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,\n headPos.top + lineOff.top - wrapOff.top));\n result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,\n headPos.left + lineOff.left - wrapOff.left));\n }\n\n return result\n};\n\nTextareaInput.prototype.showSelection = function (drawn) {\n var cm = this.cm, display = cm.display;\n removeChildrenAndAdd(display.cursorDiv, drawn.cursors);\n removeChildrenAndAdd(display.selectionDiv, drawn.selection);\n if (drawn.teTop != null) {\n this.wrapper.style.top = drawn.teTop + \"px\";\n this.wrapper.style.left = drawn.teLeft + \"px\";\n }\n};\n\n// Reset the input to correspond to the selection (or to be empty,\n// when not typing and nothing is selected)\nTextareaInput.prototype.reset = function (typing) {\n if (this.contextMenuPending || this.composing) { return }\n var cm = this.cm;\n if (cm.somethingSelected()) {\n this.prevInput = \"\";\n var content = cm.getSelection();\n this.textarea.value = content;\n if (cm.state.focused) { selectInput(this.textarea); }\n if (ie && ie_version >= 9) { this.hasSelection = content; }\n } else if (!typing) {\n this.prevInput = this.textarea.value = \"\";\n if (ie && ie_version >= 9) { this.hasSelection = null; }\n }\n};\n\nTextareaInput.prototype.getField = function () { return this.textarea };\n\nTextareaInput.prototype.supportsTouch = function () { return false };\n\nTextareaInput.prototype.focus = function () {\n if (this.cm.options.readOnly != \"nocursor\" && (!mobile || activeElt() != this.textarea)) {\n try { this.textarea.focus(); }\n catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM\n }\n};\n\nTextareaInput.prototype.blur = function () { this.textarea.blur(); };\n\nTextareaInput.prototype.resetPosition = function () {\n this.wrapper.style.top = this.wrapper.style.left = 0;\n};\n\nTextareaInput.prototype.receivedFocus = function () { this.slowPoll(); };\n\n// Poll for input changes, using the normal rate of polling. This\n// runs as long as the editor is focused.\nTextareaInput.prototype.slowPoll = function () {\n var this$1 = this;\n\n if (this.pollingFast) { return }\n this.polling.set(this.cm.options.pollInterval, function () {\n this$1.poll();\n if (this$1.cm.state.focused) { this$1.slowPoll(); }\n });\n};\n\n// When an event has just come in that is likely to add or change\n// something in the input textarea, we poll faster, to ensure that\n// the change appears on the screen quickly.\nTextareaInput.prototype.fastPoll = function () {\n var missed = false, input = this;\n input.pollingFast = true;\n function p() {\n var changed = input.poll();\n if (!changed && !missed) {missed = true; input.polling.set(60, p);}\n else {input.pollingFast = false; input.slowPoll();}\n }\n input.polling.set(20, p);\n};\n\n// Read input from the textarea, and update the document to match.\n// When something is selected, it is present in the textarea, and\n// selected (unless it is huge, in which case a placeholder is\n// used). When nothing is selected, the cursor sits after previously\n// seen text (can be empty), which is stored in prevInput (we must\n// not reset the textarea when typing, because that breaks IME).\nTextareaInput.prototype.poll = function () {\n var this$1 = this;\n\n var cm = this.cm, input = this.textarea, prevInput = this.prevInput;\n // Since this is called a *lot*, try to bail out as cheaply as\n // possible when it is clear that nothing happened. hasSelection\n // will be the case when there is a lot of text in the textarea,\n // in which case reading its value would be expensive.\n if (this.contextMenuPending || !cm.state.focused ||\n (hasSelection(input) && !prevInput && !this.composing) ||\n cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)\n { return false }\n\n var text = input.value;\n // If nothing changed, bail.\n if (text == prevInput && !cm.somethingSelected()) { return false }\n // Work around nonsensical selection resetting in IE9/10, and\n // inexplicable appearance of private area unicode characters on\n // some key combos in Mac (#2689).\n if (ie && ie_version >= 9 && this.hasSelection === text ||\n mac && /[\\uf700-\\uf7ff]/.test(text)) {\n cm.display.input.reset();\n return false\n }\n\n if (cm.doc.sel == cm.display.selForContextMenu) {\n var first = text.charCodeAt(0);\n if (first == 0x200b && !prevInput) { prevInput = \"\\u200b\"; }\n if (first == 0x21da) { this.reset(); return this.cm.execCommand(\"undo\") }\n }\n // Find the part of the input that is actually new\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) { ++same; }\n\n runInOp(cm, function () {\n applyTextInput(cm, text.slice(same), prevInput.length - same,\n null, this$1.composing ? \"*compose\" : null);\n\n // Don't leave long text in the textarea, since it makes further polling slow\n if (text.length > 1000 || text.indexOf(\"\\n\") > -1) { input.value = this$1.prevInput = \"\"; }\n else { this$1.prevInput = text; }\n\n if (this$1.composing) {\n this$1.composing.range.clear();\n this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor(\"to\"),\n {className: \"CodeMirror-composing\"});\n }\n });\n return true\n};\n\nTextareaInput.prototype.ensurePolled = function () {\n if (this.pollingFast && this.poll()) { this.pollingFast = false; }\n};\n\nTextareaInput.prototype.onKeyPress = function () {\n if (ie && ie_version >= 9) { this.hasSelection = null; }\n this.fastPoll();\n};\n\nTextareaInput.prototype.onContextMenu = function (e) {\n var input = this, cm = input.cm, display = cm.display, te = input.textarea;\n var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;\n if (!pos || presto) { return } // Opera is difficult.\n\n // Reset the current text selection only if the click is done outside of the selection\n // and 'resetSelectionOnContextMenu' option is true.\n var reset = cm.options.resetSelectionOnContextMenu;\n if (reset && cm.doc.sel.contains(pos) == -1)\n { operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); }\n\n var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText;\n input.wrapper.style.cssText = \"position: absolute\";\n var wrapperBox = input.wrapper.getBoundingClientRect();\n te.style.cssText = \"position: absolute; width: 30px; height: 30px;\\n top: \" + (e.clientY - wrapperBox.top - 5) + \"px; left: \" + (e.clientX - wrapperBox.left - 5) + \"px;\\n z-index: 1000; background: \" + (ie ? \"rgba(255, 255, 255, .05)\" : \"transparent\") + \";\\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);\";\n var oldScrollY;\n if (webkit) { oldScrollY = window.scrollY; } // Work around Chrome issue (#2712)\n display.input.focus();\n if (webkit) { window.scrollTo(null, oldScrollY); }\n display.input.reset();\n // Adds \"Select all\" to context menu in FF\n if (!cm.somethingSelected()) { te.value = input.prevInput = \" \"; }\n input.contextMenuPending = true;\n display.selForContextMenu = cm.doc.sel;\n clearTimeout(display.detectingSelectAll);\n\n // Select-all will be greyed out if there's nothing to select, so\n // this adds a zero-width space so that we can later check whether\n // it got selected.\n function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = \"\\u200b\" + (selected ? te.value : \"\");\n te.value = \"\\u21da\"; // Used to catch context-menu undo\n te.value = extval;\n input.prevInput = selected ? \"\" : \"\\u200b\";\n te.selectionStart = 1; te.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }\n function rehide() {\n input.contextMenuPending = false;\n input.wrapper.style.cssText = oldWrapperCSS;\n te.style.cssText = oldCSS;\n if (ie && ie_version < 9) { display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); }\n\n // Try to detect the user choosing select-all\n if (te.selectionStart != null) {\n if (!ie || (ie && ie_version < 9)) { prepareSelectAllHack(); }\n var i = 0, poll = function () {\n if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&\n te.selectionEnd > 0 && input.prevInput == \"\\u200b\") {\n operation(cm, selectAll)(cm);\n } else if (i++ < 10) {\n display.detectingSelectAll = setTimeout(poll, 500);\n } else {\n display.selForContextMenu = null;\n display.input.reset();\n }\n };\n display.detectingSelectAll = setTimeout(poll, 200);\n }\n }\n\n if (ie && ie_version >= 9) { prepareSelectAllHack(); }\n if (captureRightClick) {\n e_stop(e);\n var mouseup = function () {\n off(window, \"mouseup\", mouseup);\n setTimeout(rehide, 20);\n };\n on(window, \"mouseup\", mouseup);\n } else {\n setTimeout(rehide, 50);\n }\n};\n\nTextareaInput.prototype.readOnlyChanged = function (val) {\n if (!val) { this.reset(); }\n this.textarea.disabled = val == \"nocursor\";\n};\n\nTextareaInput.prototype.setUneditable = function () {};\n\nTextareaInput.prototype.needsContentAttribute = false;\n\nfunction fromTextArea(textarea, options) {\n options = options ? copyObj(options) : {};\n options.value = textarea.value;\n if (!options.tabindex && textarea.tabIndex)\n { options.tabindex = textarea.tabIndex; }\n if (!options.placeholder && textarea.placeholder)\n { options.placeholder = textarea.placeholder; }\n // Set autofocus to true if this textarea is focused, or if it has\n // autofocus and no other element is focused.\n if (options.autofocus == null) {\n var hasFocus = activeElt();\n options.autofocus = hasFocus == textarea ||\n textarea.getAttribute(\"autofocus\") != null && hasFocus == document.body;\n }\n\n function save() {textarea.value = cm.getValue();}\n\n var realSubmit;\n if (textarea.form) {\n on(textarea.form, \"submit\", save);\n // Deplorable hack to make the submit method do the right thing.\n if (!options.leaveSubmitMethodAlone) {\n var form = textarea.form;\n realSubmit = form.submit;\n try {\n var wrappedSubmit = form.submit = function () {\n save();\n form.submit = realSubmit;\n form.submit();\n form.submit = wrappedSubmit;\n };\n } catch(e) {}\n }\n }\n\n options.finishInit = function (cm) {\n cm.save = save;\n cm.getTextArea = function () { return textarea; };\n cm.toTextArea = function () {\n cm.toTextArea = isNaN; // Prevent this from being ran twice\n save();\n textarea.parentNode.removeChild(cm.getWrapperElement());\n textarea.style.display = \"\";\n if (textarea.form) {\n off(textarea.form, \"submit\", save);\n if (typeof textarea.form.submit == \"function\")\n { textarea.form.submit = realSubmit; }\n }\n };\n };\n\n textarea.style.display = \"none\";\n var cm = CodeMirror$1(function (node) { return textarea.parentNode.insertBefore(node, textarea.nextSibling); },\n options);\n return cm\n}\n\nfunction addLegacyProps(CodeMirror) {\n CodeMirror.off = off;\n CodeMirror.on = on;\n CodeMirror.wheelEventPixels = wheelEventPixels;\n CodeMirror.Doc = Doc;\n CodeMirror.splitLines = splitLinesAuto;\n CodeMirror.countColumn = countColumn;\n CodeMirror.findColumn = findColumn;\n CodeMirror.isWordChar = isWordCharBasic;\n CodeMirror.Pass = Pass;\n CodeMirror.signal = signal;\n CodeMirror.Line = Line;\n CodeMirror.changeEnd = changeEnd;\n CodeMirror.scrollbarModel = scrollbarModel;\n CodeMirror.Pos = Pos;\n CodeMirror.cmpPos = cmp;\n CodeMirror.modes = modes;\n CodeMirror.mimeModes = mimeModes;\n CodeMirror.resolveMode = resolveMode;\n CodeMirror.getMode = getMode;\n CodeMirror.modeExtensions = modeExtensions;\n CodeMirror.extendMode = extendMode;\n CodeMirror.copyState = copyState;\n CodeMirror.startState = startState;\n CodeMirror.innerMode = innerMode;\n CodeMirror.commands = commands;\n CodeMirror.keyMap = keyMap;\n CodeMirror.keyName = keyName;\n CodeMirror.isModifierKey = isModifierKey;\n CodeMirror.lookupKey = lookupKey;\n CodeMirror.normalizeKeyMap = normalizeKeyMap;\n CodeMirror.StringStream = StringStream;\n CodeMirror.SharedTextMarker = SharedTextMarker;\n CodeMirror.TextMarker = TextMarker;\n CodeMirror.LineWidget = LineWidget;\n CodeMirror.e_preventDefault = e_preventDefault;\n CodeMirror.e_stopPropagation = e_stopPropagation;\n CodeMirror.e_stop = e_stop;\n CodeMirror.addClass = addClass;\n CodeMirror.contains = contains;\n CodeMirror.rmClass = rmClass;\n CodeMirror.keyNames = keyNames;\n}\n\n// EDITOR CONSTRUCTOR\n\ndefineOptions(CodeMirror$1);\n\naddEditorMethods(CodeMirror$1);\n\n// Set up methods on CodeMirror's prototype to redirect to the editor's document.\nvar dontDelegate = \"iter insert remove copy getEditor constructor\".split(\" \");\nfor (var prop in Doc.prototype) { if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)\n { CodeMirror$1.prototype[prop] = (function(method) {\n return function() {return method.apply(this.doc, arguments)}\n })(Doc.prototype[prop]); } }\n\neventMixin(Doc);\n\n// INPUT HANDLING\n\nCodeMirror$1.inputStyles = {\"textarea\": TextareaInput, \"contenteditable\": ContentEditableInput};\n\n// MODE DEFINITION AND QUERYING\n\n// Extra arguments are stored as the mode's dependencies, which is\n// used by (legacy) mechanisms like loadmode.js to automatically\n// load a mode. (Preferred mechanism is the require/define calls.)\nCodeMirror$1.defineMode = function(name/*, mode, …*/) {\n if (!CodeMirror$1.defaults.mode && name != \"null\") { CodeMirror$1.defaults.mode = name; }\n defineMode.apply(this, arguments);\n};\n\nCodeMirror$1.defineMIME = defineMIME;\n\n// Minimal default mode.\nCodeMirror$1.defineMode(\"null\", function () { return ({token: function (stream) { return stream.skipToEnd(); }}); });\nCodeMirror$1.defineMIME(\"text/plain\", \"null\");\n\n// EXTENSIONS\n\nCodeMirror$1.defineExtension = function (name, func) {\n CodeMirror$1.prototype[name] = func;\n};\nCodeMirror$1.defineDocExtension = function (name, func) {\n Doc.prototype[name] = func;\n};\n\nCodeMirror$1.fromTextArea = fromTextArea;\n\naddLegacyProps(CodeMirror$1);\n\nCodeMirror$1.version = \"5.39.0\";\n\nreturn CodeMirror$1;\n\n})));\n","import _ from 'underscore';\nimport Backbone from 'backbone';\nconst SelectPosition = require('./SelectPosition');\nconst $ = Backbone.$;\n\nmodule.exports = _.extend({}, SelectPosition, {\n init(opt) {\n _.bindAll(this, 'startDraw', 'draw', 'endDraw', 'rollback');\n this.config = opt || {};\n this.hType = this.config.newFixedH ? 'height' : 'min-height';\n this.allowDraw = 1;\n },\n\n /**\n * Start with enabling to select position and listening to start drawning\n * @private\n * */\n enable(...args) {\n SelectPosition.enable.apply(this, args);\n this.$wr.css('cursor', 'crosshair');\n if (this.allowDraw) this.$wr.on('mousedown', this.startDraw);\n this.ghost = this.canvas.getGhostEl();\n },\n\n /**\n * Start drawing component\n * @param {Object} e Event\n * @private\n * */\n startDraw(e) {\n e.preventDefault();\n this.stopSelectPosition();\n this.ghost.style.display = 'block';\n this.frameOff = this.getOffsetDim();\n this.startPos = {\n top: e.pageY + this.frameOff.top,\n left: e.pageX + this.frameOff.left\n };\n this.isDragged = false;\n this.tempComponent = { style: {} };\n this.beforeDraw(this.tempComponent);\n this.updateSize(this.startPos.top, this.startPos.left, 0, 0);\n this.toggleEvents(1);\n },\n\n /**\n * Enable/Disable events\n * @param {Boolean} enable\n */\n toggleEvents(enable) {\n var method = enable ? 'on' : 'off';\n this.$wr[method]('mousemove', this.draw);\n this.$wr[method]('mouseup', this.endDraw);\n this.$canvas[method]('mousemove', this.draw);\n $(document)[method]('mouseup', this.endDraw);\n $(document)[method]('keypress', this.rollback);\n },\n\n /**\n * While drawing the component\n * @param {Object} e Event\n * @private\n * */\n draw(e) {\n this.isDragged = true;\n this.updateComponentSize(e);\n },\n\n /**\n * End drawing component\n * @param {Object} e Event\n * @private\n * */\n endDraw(e) {\n this.toggleEvents();\n var model = {};\n // Only if the mouse was moved\n if (this.isDragged) {\n this.updateComponentSize(e);\n this.setRequirements(this.tempComponent);\n var lp = this.sorter.lastPos;\n model = this.create(\n this.sorter.target,\n this.tempComponent,\n lp.index,\n lp.method\n );\n this.sorter.prevTarget = null;\n }\n this.ghost.style.display = 'none';\n this.startSelectPosition();\n this.afterDraw(model);\n },\n\n /**\n * Create new component inside the target\n * @param {Object} target Tha target collection\n * @param {Object} component New component to create\n * @param {number} index Index inside the collection, 0 if no children inside\n * @param {string} method Before or after of the children\n * @param {Object} opts Options\n */\n create(target, component, index, method, opts) {\n index = method === 'after' ? index + 1 : index;\n var opt = opts || {};\n var $trg = $(target);\n var trgModel = $trg.data('model');\n var trgCollection = $trg.data('collection');\n var droppable = trgModel ? trgModel.get('droppable') : 1;\n opt.at = index;\n if (trgCollection && droppable) return trgCollection.add(component, opt);\n else console.warn('Invalid target position');\n },\n\n /**\n * Check and set basic requirements for the component\n * @param {Object} component New component to be created\n * @return {Object} Component updated\n * @private\n * */\n setRequirements(component) {\n var c = this.config;\n var compStl = component.style;\n // Check min width\n if (compStl.width.replace(/\\D/g, '') < c.minComponentW)\n compStl.width = c.minComponentW + 'px';\n // Check min height\n if (compStl[this.hType].replace(/\\D/g, '') < c.minComponentH)\n compStl[this.hType] = c.minComponentH + 'px';\n // Set overflow in case of fixed height\n if (c.newFixedH) compStl.overflow = 'auto';\n if (!this.absoluteMode) {\n delete compStl.left;\n delete compStl.top;\n } else compStl.position = 'absolute';\n var lp = this.sorter.lastPos;\n\n if (this.nearFloat(lp.index, lp.method, this.sorter.lastDims))\n compStl.float = 'left';\n\n if (\n this.config.firstCentered &&\n this.getCanvasWrapper() == this.sorter.target\n ) {\n compStl.margin = '0 auto';\n }\n\n return component;\n },\n\n /**\n * Update new component size while drawing\n * @param {Object} e Event\n * @private\n * */\n updateComponentSize(e) {\n var y = e.pageY + this.frameOff.top;\n var x = e.pageX + this.frameOff.left;\n var start = this.startPos;\n var top = start.top;\n var left = start.left;\n var height = y - top;\n var width = x - left;\n if (x < left) {\n left = x;\n width = start.left - x;\n }\n if (y < top) {\n top = y;\n height = start.top - y;\n }\n this.updateSize(top, left, width, height);\n },\n\n /**\n * Update size\n * @private\n */\n updateSize(top, left, width, height) {\n var u = 'px';\n var ghStl = this.ghost.style;\n var compStl = this.tempComponent.style;\n ghStl.top = compStl.top = top + u;\n ghStl.left = compStl.left = left + u;\n ghStl.width = compStl.width = width + u;\n ghStl[this.hType] = compStl[this.hType] = height + u;\n },\n\n /**\n * Used to bring the previous situation before event started\n * @param {Object} e Event\n * @param {Boolean} forse Indicates if rollback in anycase\n * @private\n * */\n rollback(e, force) {\n var key = e.which || e.keyCode;\n if (key == this.config.ESCAPE_KEY || force) {\n this.isDragged = false;\n this.endDraw();\n }\n return;\n },\n\n /**\n * This event is triggered at the beginning of a draw operation\n * @param {Object} component Object component before creation\n * @private\n * */\n beforeDraw(component) {\n component.editable = false; //set this component editable\n },\n\n /**\n * This event is triggered at the end of a draw operation\n * @param {Object} model Component model created\n * @private\n * */\n afterDraw(model) {},\n\n run(editor, sender, opts) {\n this.editor = editor;\n this.sender = sender;\n this.$wr = this.$wrapper;\n this.enable();\n },\n\n stop() {\n this.stopSelectPosition();\n this.$wrapper.css('cursor', '');\n this.$wrapper.unbind();\n }\n});\n","import { bindAll, isElement, isUndefined } from 'underscore';\nimport { on, off, getUnitFromValue } from 'utils/mixins';\n\nconst ToolbarView = require('dom_components/view/ToolbarView');\nconst Toolbar = require('dom_components/model/Toolbar');\nconst key = require('keymaster');\nconst $ = require('backbone').$;\nlet showOffsets;\n\nmodule.exports = {\n init(o) {\n bindAll(this, 'onHover', 'onOut', 'onClick', 'onFrameScroll');\n },\n\n enable() {\n this.frameOff = this.canvasOff = this.adjScroll = null;\n var config = this.config.em.get('Config');\n this.startSelectComponent();\n var em = this.config.em;\n showOffsets = 1;\n\n em.on('component:update', this.updateAttached, this);\n em.on('change:canvasOffset', this.updateAttached, this);\n },\n\n /**\n * Start select component event\n * @private\n * */\n startSelectComponent() {\n this.toggleSelectComponent(1);\n },\n\n /**\n * Stop select component event\n * @private\n * */\n stopSelectComponent() {\n this.toggleSelectComponent();\n },\n\n /**\n * Toggle select component event\n * @private\n * */\n toggleSelectComponent(enable) {\n const em = this.em;\n const method = enable ? 'on' : 'off';\n const methods = { on, off };\n const body = this.getCanvasBody();\n const win = this.getContentWindow();\n methods[method](body, 'mouseover', this.onHover);\n methods[method](body, 'mouseout', this.onOut);\n methods[method](body, 'click', this.onClick);\n methods[method](win, 'scroll resize', this.onFrameScroll);\n em[method]('component:toggled', this.onSelect, this);\n em[method]('change:componentHovered', this.onHovered, this);\n },\n\n /**\n * Hover command\n * @param {Object} e\n * @private\n */\n onHover(e) {\n e.stopPropagation();\n let trg = e.target;\n let model = $(trg).data('model');\n\n // Adjust tools scroll top\n if (!this.adjScroll) {\n this.adjScroll = 1;\n this.onFrameScroll(e);\n this.updateAttached();\n }\n\n if (model && !model.get('hoverable')) {\n let parent = model && model.parent();\n while (parent && !parent.get('hoverable')) parent = parent.parent();\n model = parent;\n }\n\n this.em.setHovered(model, { forceChange: 1 });\n },\n\n onHovered(em, component) {\n const trg = component && component.getEl();\n if (trg) {\n const pos = this.getElementPos(trg);\n this.updateBadge(trg, pos);\n this.updateHighlighter(trg, pos);\n this.showElementOffset(trg, pos);\n }\n },\n\n /**\n * Out command\n * @param {Object} e\n * @private\n */\n onOut(e) {\n e.stopPropagation();\n this.hideBadge();\n this.hideHighlighter();\n this.hideElementOffset();\n },\n\n /**\n * Show element offset viewer\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n showElementOffset(el, pos) {\n var $el = $(el);\n var model = $el.data('model');\n\n if ((model && model.get('status') == 'selected') || !showOffsets) {\n return;\n }\n\n this.editor.runCommand('show-offset', {\n el,\n elPos: pos\n });\n },\n\n /**\n * Hide element offset viewer\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n hideElementOffset(el, pos) {\n this.editor.stopCommand('show-offset');\n },\n\n /**\n * Show fixed element offset viewer\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n showFixedElementOffset(el, pos) {\n this.editor.runCommand('show-offset', {\n el,\n elPos: pos,\n state: 'Fixed'\n });\n },\n\n /**\n * Hide fixed element offset viewer\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n hideFixedElementOffset(el, pos) {\n if (this.editor) this.editor.stopCommand('show-offset', { state: 'Fixed' });\n },\n\n /**\n * Hide Highlighter element\n */\n hideHighlighter() {\n this.canvas.getHighlighter().style.display = 'none';\n },\n\n /**\n * On element click\n * @param {Event} e\n * @private\n */\n onClick(e) {\n e.stopPropagation();\n const $el = $(e.target);\n const editor = this.editor;\n let model = $el.data('model');\n\n if (!model) {\n let parent = $el.parent();\n while (!model && parent) {\n model = parent.data('model');\n parent = parent.parent();\n }\n }\n\n if (model) {\n if (model.get('selectable')) {\n this.select(model, e);\n } else {\n let parent = model.parent();\n while (parent && !parent.get('selectable')) parent = parent.parent();\n this.select(parent, e);\n }\n }\n },\n\n /**\n * Select component\n * @param {Component} model\n * @param {Event} event\n */\n select(model, event = {}) {\n if (!model) return;\n const ctrlKey = event.ctrlKey || event.metaKey;\n const shiftKey = event.shiftKey;\n const { editor } = this;\n const multiple = editor.getConfig('multipleSelection');\n const em = this.em;\n\n if (ctrlKey && multiple) {\n editor.selectToggle(model);\n } else if (shiftKey && multiple) {\n em.clearSelection(editor.Canvas.getWindow());\n const coll = model.collection;\n const index = coll.indexOf(model);\n const selAll = editor.getSelectedAll();\n let min, max;\n\n // Fin min and max siblings\n editor.getSelectedAll().forEach(sel => {\n const selColl = sel.collection;\n const selIndex = selColl.indexOf(sel);\n if (selColl === coll) {\n if (selIndex < index) {\n // First model BEFORE the selected one\n min = isUndefined(min) ? selIndex : Math.max(min, selIndex);\n } else if (selIndex > index) {\n // First model AFTER the selected one\n max = isUndefined(max) ? selIndex : Math.min(max, selIndex);\n }\n }\n });\n\n if (!isUndefined(min)) {\n while (min !== index) {\n editor.selectAdd(coll.at(min));\n min++;\n }\n }\n\n if (!isUndefined(max)) {\n while (max !== index) {\n editor.selectAdd(coll.at(max));\n max--;\n }\n }\n\n editor.selectAdd(model);\n } else {\n editor.select(model);\n }\n\n this.initResize(model);\n },\n\n /**\n * Update badge for the component\n * @param {Object} Component\n * @param {Object} pos Position object\n * @private\n * */\n updateBadge(el, pos) {\n var $el = $(el);\n var canvas = this.canvas;\n var config = canvas.getConfig();\n var customeLabel = config.customBadgeLabel;\n this.cacheEl = el;\n var model = $el.data('model');\n if (!model || !model.get('badgable')) return;\n var badge = this.getBadge();\n var badgeLabel = model.getIcon() + model.getName();\n badgeLabel = customeLabel ? customeLabel(model) : badgeLabel;\n badge.innerHTML = badgeLabel;\n var bStyle = badge.style;\n var u = 'px';\n bStyle.display = 'block';\n var canvasPos = canvas.getCanvasView().getPosition();\n if (canvasPos) {\n var badgeH = badge ? badge.offsetHeight : 0;\n var badgeW = badge ? badge.offsetWidth : 0;\n var top =\n pos.top - badgeH < canvasPos.top ? canvasPos.top : pos.top - badgeH;\n var left = pos.left + badgeW < canvasPos.left ? canvasPos.left : pos.left;\n bStyle.top = top + u;\n bStyle.left = left + u;\n }\n },\n\n /**\n * Update highlighter element\n * @param {HTMLElement} el\n * @param {Object} pos Position object\n * @private\n */\n updateHighlighter(el, pos) {\n var $el = $(el);\n var model = $el.data('model');\n\n if (\n !model ||\n !model.get('hoverable') ||\n model.get('status') == 'selected'\n ) {\n return;\n }\n\n var hlEl = this.canvas.getHighlighter();\n var hlStyle = hlEl.style;\n var unit = 'px';\n hlStyle.left = pos.left + unit;\n hlStyle.top = pos.top + unit;\n hlStyle.height = pos.height + unit;\n hlStyle.width = pos.width + unit;\n hlStyle.display = 'block';\n },\n\n /**\n * Say what to do after the component was selected\n * @param {Object} e\n * @param {Object} el\n * @private\n * */\n onSelect() {\n // Get the selected model directly from the Editor as the event might\n // be triggered manually without the model\n const model = this.em.getSelected();\n this.updateToolbar(model);\n\n if (model) {\n const el = model.view.el;\n this.showFixedElementOffset(el);\n this.hideElementOffset();\n this.hideHighlighter();\n this.initResize(el);\n } else {\n this.editor.stopCommand('resize');\n }\n },\n\n /**\n * Init resizer on the element if possible\n * @param {HTMLElement|Component} elem\n * @private\n */\n initResize(elem) {\n const em = this.em;\n const editor = em ? em.get('Editor') : '';\n const config = em ? em.get('Config') : '';\n const pfx = config.stylePrefix || '';\n const attrName = `data-${pfx}handler`;\n const resizeClass = `${pfx}resizing`;\n const model = !isElement(elem) ? elem : em.getSelected();\n const resizable = model.get('resizable');\n const el = isElement(elem) ? elem : model.getEl();\n let options = {};\n let modelToStyle;\n\n var toggleBodyClass = (method, e, opts) => {\n const docs = opts.docs;\n docs &&\n docs.forEach(doc => {\n const body = doc.body;\n const cls = body.className || '';\n body.className = (method == 'add'\n ? `${cls} ${resizeClass}`\n : cls.replace(resizeClass, '')\n ).trim();\n });\n };\n\n if (editor && resizable) {\n options = {\n // Here the resizer is updated with the current element height and width\n onStart(e, opts = {}) {\n const { el, config, resizer } = opts;\n const { keyHeight, keyWidth, currentUnit } = config;\n toggleBodyClass('add', e, opts);\n modelToStyle = em.get('StyleManager').getModelToStyle(model);\n const computedStyle = getComputedStyle(el);\n const modelStyle = modelToStyle.getStyle();\n const currentWidth = modelStyle[keyWidth] || computedStyle[keyWidth];\n const currentHeight =\n modelStyle[keyHeight] || computedStyle[keyHeight];\n resizer.startDim.w = parseFloat(currentWidth);\n resizer.startDim.h = parseFloat(currentHeight);\n showOffsets = 0;\n\n if (currentUnit) {\n config.unitHeight = getUnitFromValue(currentHeight);\n config.unitWidth = getUnitFromValue(currentWidth);\n }\n },\n\n // Update all positioned elements (eg. component toolbar)\n onMove() {\n editor.trigger('change:canvasOffset');\n },\n\n onEnd(e, opts) {\n toggleBodyClass('remove', e, opts);\n editor.trigger('change:canvasOffset');\n showOffsets = 1;\n },\n\n updateTarget(el, rect, options = {}) {\n if (!modelToStyle) {\n return;\n }\n\n const { store, selectedHandler, config } = options;\n const { keyHeight, keyWidth } = config;\n const onlyHeight = ['tc', 'bc'].indexOf(selectedHandler) >= 0;\n const onlyWidth = ['cl', 'cr'].indexOf(selectedHandler) >= 0;\n const style = modelToStyle.getStyle();\n\n if (!onlyHeight) {\n style[keyWidth] = rect.w + config.unitWidth;\n }\n\n if (!onlyWidth) {\n style[keyHeight] = rect.h + config.unitHeight;\n }\n\n modelToStyle.setStyle(style, { avoidStore: 1 });\n const updateEvent = `update:component:style`;\n em &&\n em.trigger(\n `${updateEvent}:${keyHeight} ${updateEvent}:${keyWidth}`\n );\n\n if (store) {\n modelToStyle.trigger('change:style', modelToStyle, style, {});\n }\n }\n };\n\n if (typeof resizable == 'object') {\n options = { ...options, ...resizable };\n }\n editor.runCommand('resize', { el, options });\n\n // On undo/redo the resizer rect is not updating, need somehow to call\n // this.updateRect on undo/redo action\n } else {\n editor.stopCommand('resize');\n }\n },\n\n /**\n * Update toolbar if the component has one\n * @param {Object} mod\n */\n updateToolbar(mod) {\n var em = this.config.em;\n var model = mod == em ? em.getSelected() : mod;\n var toolbarEl = this.canvas.getToolbarEl();\n var toolbarStyle = toolbarEl.style;\n\n if (!model) {\n // By putting `toolbarStyle.display = 'none'` will cause kind\n // of freezed effect with component selection (probably by iframe\n // switching)\n toolbarStyle.opacity = 0;\n return;\n }\n\n var toolbar = model.get('toolbar');\n var ppfx = this.ppfx;\n var showToolbar = em.get('Config').showToolbar;\n\n if (showToolbar && toolbar && toolbar.length) {\n toolbarStyle.opacity = '';\n toolbarStyle.display = '';\n if (!this.toolbar) {\n toolbarEl.innerHTML = '';\n this.toolbar = new Toolbar(toolbar);\n var toolbarView = new ToolbarView({\n collection: this.toolbar,\n editor: this.editor\n });\n toolbarEl.appendChild(toolbarView.render().el);\n }\n\n this.toolbar.reset(toolbar);\n const view = model.view;\n view && this.updateToolbarPos(view.el);\n } else {\n toolbarStyle.display = 'none';\n }\n },\n\n /**\n * Update toolbar positions\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n updateToolbarPos(el, elPos) {\n var unit = 'px';\n var toolbarEl = this.canvas.getToolbarEl();\n var toolbarStyle = toolbarEl.style;\n const origDisp = toolbarStyle.display;\n toolbarStyle.display = 'block';\n var pos = this.canvas.getTargetToElementDim(toolbarEl, el, {\n elPos,\n event: 'toolbarPosUpdate'\n });\n if (pos) {\n var leftPos = pos.left + pos.elementWidth - pos.targetWidth;\n toolbarStyle.top = pos.top + unit;\n toolbarStyle.left = (leftPos < 0 ? 0 : leftPos) + unit;\n toolbarStyle.display = origDisp;\n }\n },\n\n /**\n * Return canvas dimensions and positions\n * @return {Object}\n */\n getCanvasPosition() {\n return this.canvas.getCanvasView().getPosition();\n },\n\n /**\n * Removes all highlighting effects on components\n * @private\n * */\n clean() {\n if (this.selEl) this.selEl.removeClass(this.hoverClass);\n },\n\n /**\n * Returns badge element\n * @return {HTMLElement}\n * @private\n */\n getBadge() {\n return this.canvas.getBadgeEl();\n },\n\n /**\n * On frame scroll callback\n * @private\n */\n onFrameScroll(e) {\n var el = this.cacheEl;\n if (el) {\n var elPos = this.getElementPos(el);\n this.updateBadge(el, elPos);\n var model = this.em.getSelected();\n\n if (model) {\n this.updateToolbarPos(model.view.el);\n }\n }\n },\n\n /**\n * Update attached elements, eg. component toolbar\n * @return {[type]} [description]\n */\n updateAttached(updated) {\n const model = this.em.getSelected();\n\n if (model) {\n var view = model.view;\n this.updateToolbarPos(view.el);\n this.showFixedElementOffset(view.el);\n }\n },\n\n /**\n * Returns element's data info\n * @param {HTMLElement} el\n * @return {Object}\n * @private\n */\n getElementPos(el, badge) {\n return this.canvas.getCanvasView().getElementPos(el);\n },\n\n /**\n * Hide badge\n * @private\n * */\n hideBadge() {\n this.getBadge().style.display = 'none';\n },\n\n /**\n * Clean previous model from different states\n * @param {Component} model\n * @private\n */\n cleanPrevious(model) {\n model &&\n model.set({\n status: '',\n state: ''\n });\n },\n\n /**\n * Returns content window\n * @private\n */\n getContentWindow() {\n return this.frameEl.contentWindow;\n },\n\n run(editor) {\n this.editor = editor && editor.get('Editor');\n this.enable();\n this.onSelect();\n },\n\n stop(editor, sender, opts = {}) {\n const em = this.em;\n this.stopSelectComponent();\n !opts.preserveSelected && em.setSelected(null);\n this.clean();\n this.hideBadge();\n this.hideFixedElementOffset();\n this.canvas.getToolbarEl().style.display = 'none';\n\n em.off('component:update', this.updateAttached, this);\n em.off('change:canvasOffset', this.updateAttached, this);\n }\n};\n","import { isUndefined, clone } from 'underscore';\n\nconst Backbone = require('backbone');\nconst $ = Backbone.$;\n\nmodule.exports = Backbone.View.extend({\n events: {\n change: 'onChange'\n },\n\n attributes() {\n return this.model.get('attributes');\n },\n\n initialize(o) {\n const model = this.model;\n const name = model.get('name');\n const target = model.target;\n this.config = o.config || {};\n this.pfx = this.config.stylePrefix || '';\n this.ppfx = this.config.pStylePrefix || '';\n this.target = target;\n this.className = this.pfx + 'trait';\n this.labelClass = this.ppfx + 'label';\n this.fieldClass =\n this.ppfx + 'field ' + this.ppfx + 'field-' + model.get('type');\n this.inputhClass = this.ppfx + 'input-holder';\n model.off('change:value', this.onValueChange);\n this.listenTo(model, 'change:value', this.onValueChange);\n model.view = this;\n this.tmpl =\n '
';\n },\n\n /**\n * Fires when the input is changed\n * @private\n */\n onChange() {\n this.model.set('value', this.getInputEl().value);\n },\n\n getValueForTarget() {\n return this.model.get('value');\n },\n\n setInputValue(value) {\n this.getInputEl().value = value;\n },\n\n /**\n * On change callback\n * @private\n */\n onValueChange(model, value, opts = {}) {\n const mod = this.model;\n const trg = this.target;\n const name = mod.get('name');\n\n if (opts.fromTarget) {\n this.setInputValue(mod.get('value'));\n } else {\n const value = this.getValueForTarget();\n mod.setTargetValue(value, opts);\n }\n },\n\n /**\n * Render label\n * @private\n */\n renderLabel() {\n const label = this.getLabel();\n this.$el.html(\n `
${label}
`\n );\n },\n\n /**\n * Returns label for the input\n * @return {string}\n * @private\n */\n getLabel() {\n var model = this.model;\n var label = model.get('label') || model.get('name');\n return label.charAt(0).toUpperCase() + label.slice(1).replace(/-/g, ' ');\n },\n\n /**\n * Returns input element\n * @return {HTMLElement}\n * @private\n */\n getInputEl() {\n if (!this.$input) {\n const md = this.model;\n const plh = md.get('placeholder') || md.get('default') || '';\n const type = md.get('type') || 'text';\n const min = md.get('min');\n const max = md.get('max');\n const value = this.getModelValue();\n const input = $(``);\n\n if (value) {\n input.prop('value', value);\n }\n\n if (min) {\n input.prop('min', min);\n }\n\n if (max) {\n input.prop('max', max);\n }\n\n this.$input = input;\n }\n return this.$input.get(0);\n },\n\n getModelValue() {\n let value;\n const model = this.model;\n const target = this.target;\n const name = model.get('name');\n\n if (model.get('changeProp')) {\n value = target.get(name);\n } else {\n const attrs = target.get('attributes');\n value = model.get('value') || attrs[name];\n }\n\n return !isUndefined(value) ? value : '';\n },\n\n /**\n * Renders input\n * @private\n * */\n renderField() {\n if (!this.$input) {\n this.$el.append(this.tmpl);\n const el = this.getInputEl();\n // I use prepand expecially for checkbox traits\n const inputWrap = this.el.querySelector(`.${this.inputhClass}`);\n inputWrap.insertBefore(el, inputWrap.childNodes[0]);\n }\n },\n\n render() {\n this.renderLabel();\n this.renderField();\n this.el.className = this.className;\n return this;\n }\n});\n","var Backbone = require('backbone');\n\nconst TYPE_CLASS = 1;\nconst TYPE_ID = 2;\n\nconst Selector = Backbone.Model.extend(\n {\n idAttribute: 'name',\n\n defaults: {\n name: '',\n\n label: '',\n\n // Type of the selector\n type: TYPE_CLASS,\n\n // If not active it's not selectable by the style manager (uncheckboxed)\n active: true,\n\n // Can't be seen by the style manager, therefore even by the user\n // Will be rendered only in export code\n private: false,\n\n // If true, can't be removed from the attacched element\n protected: false\n },\n\n initialize() {\n const name = this.get('name');\n const label = this.get('label');\n\n if (!name) {\n this.set('name', label);\n } else if (!label) {\n this.set('label', name);\n }\n\n this.set('name', Selector.escapeName(this.get('name')));\n },\n\n /**\n * Get full selector name\n * @return {string}\n */\n getFullName() {\n let init = '';\n\n switch (this.get('type')) {\n case TYPE_CLASS:\n init = '.';\n break;\n case TYPE_ID:\n init = '#';\n break;\n }\n\n return init + this.get('name');\n }\n },\n {\n // All type selectors: https://developer.mozilla.org/it/docs/Web/CSS/CSS_Selectors\n // Here I define only what I need\n TYPE_CLASS,\n\n TYPE_ID,\n\n /**\n * Escape string\n * @param {string} name\n * @return {string}\n * @private\n */\n escapeName(name) {\n return `${name}`.trim().replace(/([^a-z0-9\\w-]+)/gi, '-');\n }\n }\n);\n\nmodule.exports = Selector;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","import _ from 'underscore';\nimport Backbone from 'backbone';\nvar CreateComponent = require('./CreateComponent');\n\nmodule.exports = _.extend({}, CreateComponent, {\n init(...args) {\n CreateComponent.init.apply(this, args);\n _.bindAll(this, 'insertComponent');\n this.allowDraw = 0;\n },\n\n /**\n * Run method\n * @private\n * */\n run(em, sender, options) {\n this.em = em;\n this.sender = sender;\n this.opt = options || {};\n this.$wr = this.$wrapper;\n this.enable();\n },\n\n enable(...args) {\n CreateComponent.enable.apply(this, args);\n this.$wr.on('click', this.insertComponent);\n },\n\n /**\n * Start insert event\n * @private\n * */\n insertComponent() {\n this.$wr.off('click', this.insertComponent);\n this.stopSelectPosition();\n var object = this.buildContent();\n this.beforeInsert(object);\n var index = this.sorter.lastPos.index;\n // By default, collections do not trigger add event, so silent is used\n var model = this.create(this.sorter.target, object, index, null, {\n silent: false\n });\n\n if (this.opt.terminateAfterInsert && this.sender)\n this.sender.set('active', false);\n else this.enable();\n\n if (!model) return;\n\n this.afterInsert(model, this);\n },\n\n /**\n * Trigger before insert\n * @param {Object} obj\n * @private\n * */\n beforeInsert(obj) {},\n\n /**\n * Trigger after insert\n * @param {Object} model Model created after insert\n * @private\n * */\n afterInsert(model) {},\n\n /**\n * Create different object, based on content, to insert inside canvas\n *\n * @return {Object}\n * @private\n * */\n buildContent() {\n return this.opt.content || {};\n }\n});\n","import Backbone from 'backbone';\nconst $ = Backbone.$;\n\nmodule.exports = {\n /**\n * Start select position event\n * @param {HTMLElement} trg\n * @private\n * */\n startSelectPosition(trg, doc) {\n this.isPointed = false;\n var utils = this.editorModel.get('Utils');\n if (utils && !this.sorter)\n this.sorter = new utils.Sorter({\n container: this.getCanvasBody(),\n placer: this.canvas.getPlacerEl(),\n containerSel: '*',\n itemSel: '*',\n pfx: this.ppfx,\n direction: 'a',\n document: doc,\n wmargin: 1,\n nested: 1,\n em: this.editorModel,\n canvasRelative: 1\n });\n trg && this.sorter.startSort(trg);\n },\n\n /**\n * Get frame position\n * @return {Object}\n * @private\n */\n getOffsetDim() {\n var frameOff = this.offset(this.canvas.getFrameEl());\n var canvasOff = this.offset(this.canvas.getElement());\n var top = frameOff.top - canvasOff.top;\n var left = frameOff.left - canvasOff.left;\n return { top, left };\n },\n\n /**\n * Stop select position event\n * @private\n * */\n stopSelectPosition() {\n this.posTargetCollection = null;\n this.posIndex =\n this.posMethod == 'after' && this.cDim.length !== 0\n ? this.posIndex + 1\n : this.posIndex; //Normalize\n if (this.sorter) {\n this.sorter.moved = 0;\n this.sorter.endMove();\n }\n if (this.cDim) {\n this.posIsLastEl =\n this.cDim.length !== 0 &&\n this.posMethod == 'after' &&\n this.posIndex == this.cDim.length;\n this.posTargetEl =\n this.cDim.length === 0\n ? $(this.outsideElem)\n : !this.posIsLastEl && this.cDim[this.posIndex]\n ? $(this.cDim[this.posIndex][5]).parent()\n : $(this.outsideElem);\n this.posTargetModel = this.posTargetEl.data('model');\n this.posTargetCollection = this.posTargetEl.data('model-comp');\n }\n },\n\n /**\n * Enabel select position\n * @private\n */\n enable() {\n this.startSelectPosition();\n },\n\n /**\n * Check if the pointer is near to the float component\n * @param {number} index\n * @param {string} method\n * @param {Array} dims\n * @return {Boolean}\n * @private\n * */\n nearFloat(index, method, dims) {\n var i = index || 0;\n var m = method || 'before';\n var len = dims.length;\n var isLast = len !== 0 && m == 'after' && i == len;\n if (\n len !== 0 &&\n ((!isLast && !dims[i][4]) ||\n (dims[i - 1] && !dims[i - 1][4]) ||\n (isLast && !dims[i - 1][4]))\n )\n return 1;\n return 0;\n },\n\n run() {\n this.enable();\n },\n\n stop() {\n this.stopSelectPosition();\n this.$wrapper.css('cursor', '');\n this.$wrapper.unbind();\n }\n};\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentView');\n\nmodule.exports = ComponentView.extend({\n tagName: 'img',\n\n events: {\n dblclick: 'openModal',\n click: 'initResize'\n },\n\n initialize(o) {\n const model = this.model;\n ComponentView.prototype.initialize.apply(this, arguments);\n this.listenTo(model, 'change:src', this.updateSrc);\n this.listenTo(model, 'dblclick active', this.openModal);\n this.classEmpty = `${this.ppfx}plh-image`;\n const config = this.config;\n config.modal && (this.modal = config.modal);\n config.am && (this.am = config.am);\n this.fetchFile();\n },\n\n /**\n * Fetch file if exists\n */\n fetchFile() {\n const model = this.model;\n const file = model.get('file');\n\n if (file) {\n const fu = this.em.get('AssetManager').FileUploader();\n fu.uploadFile(\n {\n dataTransfer: { files: [file] }\n },\n res => {\n const obj = res && res.data && res.data[0];\n const src = obj && obj.src;\n src && model.set({ src });\n }\n );\n model.set('file', '');\n }\n },\n\n /**\n * Update src attribute\n * @private\n * */\n updateSrc() {\n const { model, classEmpty, $el } = this;\n const src = model.get('src');\n model.addAttributes({ src });\n $el[src ? 'removeClass' : 'addClass'](classEmpty);\n },\n\n /**\n * Open dialog for image changing\n * @param {Object} e Event\n * @private\n * */\n openModal(e) {\n var em = this.opts.config.em;\n var editor = em ? em.get('Editor') : '';\n\n if (editor && this.model.get('editable')) {\n editor.runCommand('open-assets', {\n target: this.model,\n types: ['image'],\n accept: 'image/*',\n onSelect() {\n editor.Modal.close();\n editor.AssetManager.setTarget(null);\n }\n });\n }\n },\n\n render() {\n this.updateAttributes();\n this.updateClasses();\n\n var actCls = this.$el.attr('class') || '';\n if (!this.model.get('src'))\n this.$el.attr('class', (actCls + ' ' + this.classEmpty).trim());\n\n // Avoid strange behaviours while try to drag\n this.$el.attr('onmousedown', 'return false');\n return this;\n }\n});\n","import Backbone from 'backbone';\nconst InputNumber = require('domain_abstract/ui/InputNumber');\nconst PropertyView = require('./PropertyView');\nconst $ = Backbone.$;\nlet timeout;\n\nmodule.exports = PropertyView.extend({\n templateInput() {\n return '';\n },\n\n init() {\n const model = this.model;\n this.listenTo(model, 'change:unit', this.modelValueChanged);\n this.listenTo(model, 'el:change', this.elementUpdated);\n },\n\n setValue(value) {\n const parsed = this.model.parseValue(value);\n value = `${parsed.value}${parsed.unit}`;\n this.inputInst.setValue(value, { silent: 1 });\n },\n\n onRender() {\n const ppfx = this.ppfx;\n\n if (!this.input) {\n const input = this.model.input;\n input.ppfx = ppfx;\n input.render();\n const fields = this.el.querySelector(`.${ppfx}fields`);\n fields.appendChild(input.el);\n this.$input = input.inputEl;\n this.unit = input.unitEl;\n this.$unit = $(this.unit);\n this.input = this.$input.get(0);\n this.inputInst = input;\n }\n }\n});\n","import Backbone from 'backbone';\nconst PropertyView = require('./PropertyView');\nconst PropertyIntegerView = require('./PropertyIntegerView');\nconst PropertyRadioView = require('./PropertyRadioView');\nconst PropertySelectView = require('./PropertySelectView');\nconst PropertyColorView = require('./PropertyColorView');\nconst PropertyFileView = require('./PropertyFileView');\nconst PropertyCompositeView = require('./PropertyCompositeView');\nconst PropertyStackView = require('./PropertyStackView');\n\nmodule.exports = Backbone.View.extend({\n initialize(o) {\n this.config = o.config || {};\n this.pfx = this.config.stylePrefix || '';\n this.target = o.target || {};\n this.propTarget = o.propTarget || {};\n this.onChange = o.onChange;\n this.onInputRender = o.onInputRender || {};\n this.customValue = o.customValue || {};\n this.properties = [];\n const coll = this.collection;\n this.listenTo(coll, 'add', this.addTo);\n this.listenTo(coll, 'reset', this.render);\n },\n\n addTo(model) {\n this.add(model);\n },\n\n add(model, frag) {\n var view = new model.typeView({\n model,\n name: model.get('name'),\n id: this.pfx + model.get('property'),\n target: this.target,\n propTarget: this.propTarget,\n onChange: this.onChange,\n onInputRender: this.onInputRender,\n config: this.config\n });\n\n if (model.get('type') != 'composite') {\n view.customValue = this.customValue;\n }\n\n view.render();\n const el = view.el;\n this.properties.push(view);\n\n if (frag) {\n frag.appendChild(el);\n } else {\n this.el.appendChild(el);\n }\n },\n\n render() {\n this.properties = [];\n const fragment = document.createDocumentFragment();\n this.collection.each(model => this.add(model, fragment));\n this.$el.append(fragment);\n this.$el.attr('class', `${this.pfx}properties`);\n return this;\n }\n});\n","import { isUndefined, isString } from 'underscore';\n\nmodule.exports = require('backbone').Model.extend({\n defaults: {\n name: '',\n property: '',\n type: '',\n defaults: '',\n info: '',\n value: '',\n icon: '',\n functionName: '',\n status: '',\n visible: true,\n fixedValues: ['initial', 'inherit'],\n\n // If true to the value will be added '!important'\n important: 0,\n\n // If true, will be hidden by default and will show up only for targets\n // which require this property (via `stylable-require`)\n // Use case:\n // you can add all SVG CSS properties with toRequire as true\n // and then require them on SVG Components\n toRequire: 0\n },\n\n initialize(opt) {\n var o = opt || {};\n var name = this.get('name');\n var prop = this.get('property');\n\n if (!name) {\n this.set(\n 'name',\n prop.charAt(0).toUpperCase() + prop.slice(1).replace(/-/g, ' ')\n );\n }\n\n const init = this.init && this.init.bind(this);\n init && init();\n },\n\n /**\n * Clear the value\n * @return {this}\n */\n clearValue(opts = {}) {\n this.set({ value: undefined }, opts);\n return this;\n },\n\n /**\n * Update value\n * @param {any} value\n * @param {Boolen} [complete=true] Indicates if it's a final state\n * @param {Object} [opts={}] Options\n */\n setValue(value, complete = 1, opts = {}) {\n const parsed = this.parseValue(value);\n this.set(parsed, { ...opts, avoidStore: 1 });\n\n // It's important to set an empty value, otherwise the\n // UndoManager won't see the change\n if (complete) {\n this.set('value', '', opts);\n this.set(parsed, opts);\n }\n },\n\n /**\n * Like `setValue` but, in addition, prevents the update of the input element\n * as the changes should come from the input itself.\n * This method is useful with the definition of custom properties\n * @param {any} value\n * @param {Boolen} [complete=true] Indicates if it's a final state\n * @param {Object} [opts={}] Options\n */\n setValueFromInput(value, complete, opts = {}) {\n this.setValue(value, complete, { ...opts, fromInput: 1 });\n },\n\n /**\n * Parse a raw value, generally fetched from the target, for this property\n * @param {string} value Raw value string\n * @return {Object}\n * @example\n * // example with an Input type\n * prop.parseValue('translateX(10deg)');\n * // -> { value: 10, unit: 'deg', functionName: 'translateX' }\n *\n */\n parseValue(value) {\n const result = { value };\n const imp = '!important';\n\n if (isString(value) && value.indexOf(imp) !== -1) {\n result.value = value.replace(imp, '').trim();\n result.important = 1;\n }\n\n if (!this.get('functionName')) {\n return result;\n }\n\n const args = [];\n let valueStr = `${result.value}`;\n let start = valueStr.indexOf('(') + 1;\n let end = valueStr.lastIndexOf(')');\n args.push(start);\n\n // Will try even if the last closing parentheses is not found\n if (end >= 0) {\n args.push(end);\n }\n\n result.value = String.prototype.substring.apply(valueStr, args);\n return result;\n },\n\n /**\n * Get the default value\n * @return {string}\n * @private\n */\n getDefaultValue() {\n return this.get('defaults');\n },\n\n /**\n * Get a complete value of the property.\n * This probably will replace the getValue when all\n * properties models will be splitted\n * @param {string} val Custom value to replace the one on the model\n * @return {string}\n * @private\n */\n getFullValue(val) {\n const fn = this.get('functionName');\n let value = isUndefined(val) ? this.get('value') : val;\n\n if (fn && !isUndefined(value)) {\n value = `${fn}(${value})`;\n }\n\n if (this.get('important')) {\n value = `${value} !important`;\n }\n\n return value || '';\n }\n});\n","import TypeableCollection from 'domain_abstract/model/TypeableCollection';\nconst Property = require('./Property');\n\nmodule.exports = require('backbone')\n .Collection.extend(TypeableCollection)\n .extend({\n types: [\n {\n id: 'stack',\n model: require('./PropertyStack'),\n view: require('./../view/PropertyStackView'),\n isType(value) {\n if (value && value.type == 'stack') {\n return value;\n }\n }\n },\n {\n id: 'composite',\n model: require('./PropertyComposite'),\n view: require('./../view/PropertyCompositeView'),\n isType(value) {\n if (value && value.type == 'composite') {\n return value;\n }\n }\n },\n {\n id: 'file',\n model: Property,\n view: require('./../view/PropertyFileView'),\n isType(value) {\n if (value && value.type == 'file') {\n return value;\n }\n }\n },\n {\n id: 'color',\n model: Property,\n view: require('./../view/PropertyColorView'),\n isType(value) {\n if (value && value.type == 'color') {\n return value;\n }\n }\n },\n {\n id: 'select',\n model: require('./PropertyRadio'),\n view: require('./../view/PropertySelectView'),\n isType(value) {\n if (value && value.type == 'select') {\n return value;\n }\n }\n },\n {\n id: 'radio',\n model: require('./PropertyRadio'),\n view: require('./../view/PropertyRadioView'),\n isType(value) {\n if (value && value.type == 'radio') {\n return value;\n }\n }\n },\n {\n id: 'slider',\n model: require('./PropertySlider'),\n view: require('./../view/PropertySliderView'),\n isType(value) {\n if (value && value.type == 'slider') {\n return value;\n }\n }\n },\n {\n id: 'integer',\n model: require('./PropertyInteger'),\n view: require('./../view/PropertyIntegerView'),\n isType(value) {\n if (value && value.type == 'integer') {\n return value;\n }\n }\n },\n {\n id: 'base',\n model: Property,\n view: require('./../view/PropertyView'),\n isType(value) {\n value.type = 'base';\n return value;\n }\n }\n ],\n\n deepClone() {\n const collection = this.clone();\n collection.reset(\n collection.map(model => {\n const cloned = model.clone();\n cloned.typeView = model.typeView;\n return cloned;\n })\n );\n return collection;\n },\n\n /**\n * Parse a value and return an array splitted by properties\n * @param {string} value\n * @return {Array}\n * @return\n */\n parseValue(value) {\n const properties = [];\n const values = value.split(' ');\n values.forEach((value, i) => {\n const property = this.at(i);\n if (!property) return;\n properties.push({ ...property.attributes, ...{ value } });\n });\n return properties;\n },\n\n getFullValue() {\n let result = '';\n this.each(model => (result += `${model.getFullValue()} `));\n return result.trim();\n }\n });\n","import { filter } from 'underscore';\nconst Selector = require('./Selector');\n\nmodule.exports = require('backbone').Collection.extend({\n model: Selector,\n\n getStyleable() {\n return filter(\n this.models,\n item => item.get('active') && !item.get('private')\n );\n },\n\n getValid() {\n return filter(this.models, item => !item.get('private'));\n },\n\n getFullString(collection) {\n const result = [];\n const coll = collection || this;\n coll.forEach(selector => result.push(selector.getFullName()));\n return result.join('').trim();\n }\n});\n","\"use strict\";\n\n/*! cash-dom 1.3.7, https://github.com/kenwheeler/cash @license MIT */\n;(function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(factory);\n } else if (typeof exports !== \"undefined\") {\n module.exports = factory();\n } else {\n root.cash = root.$ = factory();\n }\n})(this, function () {\n var doc = document, win = window, ArrayProto = Array.prototype, slice = ArrayProto.slice, filter = ArrayProto.filter, push = ArrayProto.push;\n\n var noop = function () {}, isFunction = function (item) {\n // @see https://crbug.com/568448\n return typeof item === typeof noop && item.call;\n }, isString = function (item) {\n return typeof item === typeof \"\";\n };\n\n var idMatch = /^#[\\w-]*$/, classMatch = /^\\.[\\w-]*$/, htmlMatch = /<.+>/, singlet = /^\\w+$/;\n\n function find(selector, context) {\n context = context || doc;\n var elems = (classMatch.test(selector) ? context.getElementsByClassName(selector.slice(1)) : singlet.test(selector) ? context.getElementsByTagName(selector) : context.querySelectorAll(selector));\n return elems;\n }\n\n var frag;\n function parseHTML(str) {\n if (!frag) {\n frag = doc.implementation.createHTMLDocument(null);\n var base = frag.createElement(\"base\");\n base.href = doc.location.href;\n frag.head.appendChild(base);\n }\n\n frag.body.innerHTML = str;\n\n return frag.body.childNodes;\n }\n\n function onReady(fn) {\n if (doc.readyState !== \"loading\") {\n setTimeout(fn);\n } else {\n doc.addEventListener(\"DOMContentLoaded\", fn);\n }\n }\n\n function Init(selector, context) {\n if (!selector) {\n return this;\n }\n\n // If already a cash collection, don't do any further processing\n if (selector.cash && selector !== win) {\n return selector;\n }\n\n var elems = selector, i = 0, length;\n\n if (isString(selector)) {\n elems = (idMatch.test(selector) ?\n // If an ID use the faster getElementById check\n doc.getElementById(selector.slice(1)) : htmlMatch.test(selector) ?\n // If HTML, parse it into real elements\n parseHTML(selector) :\n // else use `find`\n find(selector, context));\n\n // If function, use as shortcut for DOM ready\n } else if (isFunction(selector)) {\n onReady(selector);return this;\n }\n\n if (!elems) {\n return this;\n }\n\n // If a single DOM element is passed in or received via ID, return the single element\n if (elems.nodeType || elems === win) {\n this[0] = elems;\n this.length = 1;\n } else {\n // Treat like an array and loop through each item.\n length = this.length = elems.length;\n for (; i < length; i++) {\n this[i] = elems[i];\n }\n }\n\n return this;\n }\n\n function cash(selector, context) {\n return new Init(selector, context);\n }\n\n var fn = cash.fn = cash.prototype = Init.prototype = { // jshint ignore:line\n cash: true,\n length: 0,\n push: push,\n splice: ArrayProto.splice,\n map: ArrayProto.map,\n init: Init\n };\n\n Object.defineProperty(fn, \"constructor\", { value: cash });\n\n cash.parseHTML = parseHTML;\n cash.noop = noop;\n cash.isFunction = isFunction;\n cash.isString = isString;\n\n cash.extend = fn.extend = function (target) {\n target = target || {};\n\n var args = slice.call(arguments), length = args.length, i = 1;\n\n if (args.length === 1) {\n target = this;\n i = 0;\n }\n\n for (; i < length; i++) {\n if (!args[i]) {\n continue;\n }\n for (var key in args[i]) {\n if (args[i].hasOwnProperty(key)) {\n target[key] = args[i][key];\n }\n }\n }\n\n return target;\n };\n\n function each(collection, callback) {\n var l = collection.length, i = 0;\n\n for (; i < l; i++) {\n if (callback.call(collection[i], collection[i], i, collection) === false) {\n break;\n }\n }\n }\n\n function matches(el, selector) {\n var m = el && (el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector || el.oMatchesSelector);\n return !!m && m.call(el, selector);\n }\n\n function getCompareFunction(selector) {\n return (\n /* Use browser's `matches` function if string */\n isString(selector) ? matches :\n /* Match a cash element */\n selector.cash ? function (el) {\n return selector.is(el);\n } :\n /* Direct comparison */\n function (el, selector) {\n return el === selector;\n });\n }\n\n function unique(collection) {\n return cash(slice.call(collection).filter(function (item, index, self) {\n return self.indexOf(item) === index;\n }));\n }\n\n cash.extend({\n merge: function (first, second) {\n var len = +second.length, i = first.length, j = 0;\n\n for (; j < len; i++, j++) {\n first[i] = second[j];\n }\n\n first.length = i;\n return first;\n },\n\n each: each,\n matches: matches,\n unique: unique,\n isArray: Array.isArray,\n isNumeric: function (n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n });\n\n var uid = cash.uid = \"_cash\" + Date.now();\n\n function getDataCache(node) {\n return (node[uid] = node[uid] || {});\n }\n\n function setData(node, key, value) {\n return (getDataCache(node)[key] = value);\n }\n\n function getData(node, key) {\n var c = getDataCache(node);\n if (c[key] === undefined) {\n c[key] = node.dataset ? node.dataset[key] : cash(node).attr(\"data-\" + key);\n }\n return c[key];\n }\n\n function removeData(node, key) {\n var c = getDataCache(node);\n if (c) {\n delete c[key];\n } else if (node.dataset) {\n delete node.dataset[key];\n } else {\n cash(node).removeAttr(\"data-\" + name);\n }\n }\n\n fn.extend({\n data: function (name, value) {\n if (isString(name)) {\n return (value === undefined ? getData(this[0], name) : this.each(function (v) {\n return setData(v, name, value);\n }));\n }\n\n for (var key in name) {\n this.data(key, name[key]);\n }\n\n return this;\n },\n\n removeData: function (key) {\n return this.each(function (v) {\n return removeData(v, key);\n });\n }\n\n });\n\n var notWhiteMatch = /\\S+/g;\n\n function getClasses(c) {\n return isString(c) && c.match(notWhiteMatch);\n }\n\n function hasClass(v, c) {\n return (v.classList ? v.classList.contains(c) : new RegExp(\"(^| )\" + c + \"( |$)\", \"gi\").test(v.className));\n }\n\n function addClass(v, c) {\n if (v.classList) {\n v.classList.add(c);\n } else if (!hasClass(v, c)) {\n v.className += \" \" + c;\n }\n }\n\n function removeClass(v, c) {\n if (v.classList) {\n v.classList.remove(c);\n } else {\n v.className = v.className.replace(c, \"\");\n }\n }\n\n fn.extend({\n addClass: function (c) {\n var classes = getClasses(c);\n\n return (classes ? this.each(function (v) {\n each(classes, function (c) {\n addClass(v, c);\n });\n }) : this);\n },\n\n attr: function (name, value) {\n if (!name) {\n return undefined;\n }\n\n if (isString(name)) {\n if (value === undefined) {\n return this[0] ? this[0].getAttribute ? this[0].getAttribute(name) : this[0][name] : undefined;\n }\n\n return this.each(function (v) {\n if (v.setAttribute) {\n v.setAttribute(name, value);\n } else {\n v[name] = value;\n }\n });\n }\n\n for (var key in name) {\n this.attr(key, name[key]);\n }\n\n return this;\n },\n\n hasClass: function (c) {\n var check = false, classes = getClasses(c);\n if (classes && classes.length) {\n this.each(function (v) {\n check = hasClass(v, classes[0]);\n return !check;\n });\n }\n return check;\n },\n\n prop: function (name, value) {\n if (isString(name)) {\n return (value === undefined ? this[0][name] : this.each(function (v) {\n v[name] = value;\n }));\n }\n\n for (var key in name) {\n this.prop(key, name[key]);\n }\n\n return this;\n },\n\n removeAttr: function (name) {\n return this.each(function (v) {\n if (v.removeAttribute) {\n v.removeAttribute(name);\n } else {\n delete v[name];\n }\n });\n },\n\n removeClass: function (c) {\n if (!arguments.length) {\n return this.attr(\"class\", \"\");\n }\n var classes = getClasses(c);\n return (classes ? this.each(function (v) {\n each(classes, function (c) {\n removeClass(v, c);\n });\n }) : this);\n },\n\n removeProp: function (name) {\n return this.each(function (v) {\n delete v[name];\n });\n },\n\n toggleClass: function (c, state) {\n if (state !== undefined) {\n return this[state ? \"addClass\" : \"removeClass\"](c);\n }\n var classes = getClasses(c);\n return (classes ? this.each(function (v) {\n each(classes, function (c) {\n if (hasClass(v, c)) {\n removeClass(v, c);\n } else {\n addClass(v, c);\n }\n });\n }) : this);\n } });\n\n fn.extend({\n add: function (selector, context) {\n return unique(cash.merge(this, cash(selector, context)));\n },\n\n each: function (callback) {\n each(this, callback);\n return this;\n },\n\n eq: function (index) {\n return cash(this.get(index));\n },\n\n filter: function (selector) {\n if (!selector) {\n return this;\n }\n\n var comparator = (isFunction(selector) ? selector : getCompareFunction(selector));\n\n return cash(filter.call(this, function (e) {\n return comparator(e, selector);\n }));\n },\n\n first: function () {\n return this.eq(0);\n },\n\n get: function (index) {\n if (index === undefined) {\n return slice.call(this);\n }\n return (index < 0 ? this[index + this.length] : this[index]);\n },\n\n index: function (elem) {\n var child = elem ? cash(elem)[0] : this[0], collection = elem ? this : cash(child).parent().children();\n return slice.call(collection).indexOf(child);\n },\n\n last: function () {\n return this.eq(-1);\n }\n\n });\n\n var camelCase = (function () {\n var camelRegex = /(?:^\\w|[A-Z]|\\b\\w)/g, whiteSpace = /[\\s-_]+/g;\n return function (str) {\n return str.replace(camelRegex, function (letter, index) {\n return letter[index === 0 ? \"toLowerCase\" : \"toUpperCase\"]();\n }).replace(whiteSpace, \"\");\n };\n }());\n\n var getPrefixedProp = (function () {\n var cache = {}, doc = document, div = doc.createElement(\"div\"), style = div.style;\n\n return function (prop) {\n prop = camelCase(prop);\n if (cache[prop]) {\n return cache[prop];\n }\n\n var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1), prefixes = [\"webkit\", \"moz\", \"ms\", \"o\"], props = (prop + \" \" + (prefixes).join(ucProp + \" \") + ucProp).split(\" \");\n\n each(props, function (p) {\n if (p in style) {\n cache[p] = prop = cache[prop] = p;\n return false;\n }\n });\n\n return cache[prop];\n };\n }());\n\n cash.prefixedProp = getPrefixedProp;\n cash.camelCase = camelCase;\n\n fn.extend({\n css: function (prop, value) {\n if (isString(prop)) {\n prop = getPrefixedProp(prop);\n return (arguments.length > 1 ? this.each(function (v) {\n return v.style[prop] = value;\n }) : win.getComputedStyle(this[0])[prop]);\n }\n\n for (var key in prop) {\n this.css(key, prop[key]);\n }\n\n return this;\n }\n\n });\n\n function compute(el, prop) {\n return parseInt(win.getComputedStyle(el[0], null)[prop], 10) || 0;\n }\n\n each([\"Width\", \"Height\"], function (v) {\n var lower = v.toLowerCase();\n\n fn[lower] = function () {\n return this[0].getBoundingClientRect()[lower];\n };\n\n fn[\"inner\" + v] = function () {\n return this[0][\"client\" + v];\n };\n\n fn[\"outer\" + v] = function (margins) {\n return this[0][\"offset\" + v] + (margins ? compute(this, \"margin\" + (v === \"Width\" ? \"Left\" : \"Top\")) + compute(this, \"margin\" + (v === \"Width\" ? \"Right\" : \"Bottom\")) : 0);\n };\n });\n\n function registerEvent(node, eventName, callback) {\n var eventCache = getData(node, \"_cashEvents\") || setData(node, \"_cashEvents\", {});\n eventCache[eventName] = eventCache[eventName] || [];\n eventCache[eventName].push(callback);\n node.addEventListener(eventName, callback);\n }\n\n function removeEvent(node, eventName, callback) {\n var events = getData(node, \"_cashEvents\"), eventCache = (events && events[eventName]), index;\n\n if (!eventCache) {\n return;\n }\n\n if (callback) {\n node.removeEventListener(eventName, callback);\n index = eventCache.indexOf(callback);\n if (index >= 0) {\n eventCache.splice(index, 1);\n }\n } else {\n each(eventCache, function (event) {\n node.removeEventListener(eventName, event);\n });\n eventCache = [];\n }\n }\n\n fn.extend({\n off: function (eventName, callback) {\n return this.each(function (v) {\n return removeEvent(v, eventName, callback);\n });\n },\n\n on: function (eventName, delegate, callback, runOnce) {\n // jshint ignore:line\n\n var originalCallback;\n\n if (!isString(eventName)) {\n for (var key in eventName) {\n this.on(key, delegate, eventName[key]);\n }\n return this;\n }\n\n if (isFunction(delegate)) {\n callback = delegate;\n delegate = null;\n }\n\n if (eventName === \"ready\") {\n onReady(callback);\n return this;\n }\n\n if (delegate) {\n originalCallback = callback;\n callback = function (e) {\n var t = e.target;\n\n while (!matches(t, delegate)) {\n if (t === this) {\n return (t = false);\n }\n t = t.parentNode;\n }\n\n if (t) {\n originalCallback.call(t, e);\n }\n };\n }\n\n return this.each(function (v) {\n var finalCallback = callback;\n if (runOnce) {\n finalCallback = function () {\n callback.apply(this, arguments);\n removeEvent(v, eventName, finalCallback);\n };\n }\n registerEvent(v, eventName, finalCallback);\n });\n },\n\n one: function (eventName, delegate, callback) {\n return this.on(eventName, delegate, callback, true);\n },\n\n ready: onReady,\n\n trigger: function (eventName, data) {\n var evt = doc.createEvent(\"HTMLEvents\");\n evt.data = data;\n evt.initEvent(eventName, true, false);\n return this.each(function (v) {\n return v.dispatchEvent(evt);\n });\n }\n\n });\n\n function encode(name, value) {\n return \"&\" + encodeURIComponent(name) + \"=\" + encodeURIComponent(value).replace(/%20/g, \"+\");\n }\n\n function getSelectMultiple_(el) {\n var values = [];\n each(el.options, function (o) {\n if (o.selected) {\n values.push(o.value);\n }\n });\n return values.length ? values : null;\n }\n\n function getSelectSingle_(el) {\n var selectedIndex = el.selectedIndex;\n return selectedIndex >= 0 ? el.options[selectedIndex].value : null;\n }\n\n function getValue(el) {\n var type = el.type;\n if (!type) {\n return null;\n }\n switch (type.toLowerCase()) {\n case \"select-one\":\n return getSelectSingle_(el);\n case \"select-multiple\":\n return getSelectMultiple_(el);\n case \"radio\":\n return (el.checked) ? el.value : null;\n case \"checkbox\":\n return (el.checked) ? el.value : null;\n default:\n return el.value ? el.value : null;\n }\n }\n\n fn.extend({\n serialize: function () {\n var query = \"\";\n\n each(this[0].elements || this, function (el) {\n if (el.disabled || el.tagName === \"FIELDSET\") {\n return;\n }\n var name = el.name;\n switch (el.type.toLowerCase()) {\n case \"file\":\n case \"reset\":\n case \"submit\":\n case \"button\":\n break;\n case \"select-multiple\":\n var values = getValue(el);\n if (values !== null) {\n each(values, function (value) {\n query += encode(name, value);\n });\n }\n break;\n default:\n var value = getValue(el);\n if (value !== null) {\n query += encode(name, value);\n }\n }\n });\n\n return query.substr(1);\n },\n\n val: function (value) {\n if (value === undefined) {\n return getValue(this[0]);\n } else {\n return this.each(function (v) {\n return v.value = value;\n });\n }\n }\n\n });\n\n function insertElement(el, child, prepend) {\n if (prepend) {\n var first = el.childNodes[0];\n el.insertBefore(child, first);\n } else {\n el.appendChild(child);\n }\n }\n\n function insertContent(parent, child, prepend) {\n var str = isString(child);\n\n if (!str && child.length) {\n each(child, function (v) {\n return insertContent(parent, v, prepend);\n });\n return;\n }\n\n each(parent, str ? function (v) {\n return v.insertAdjacentHTML(prepend ? \"afterbegin\" : \"beforeend\", child);\n } : function (v, i) {\n return insertElement(v, (i === 0 ? child : child.cloneNode(true)), prepend);\n });\n }\n\n fn.extend({\n after: function (selector) {\n cash(selector).insertAfter(this);\n return this;\n },\n\n append: function (content) {\n insertContent(this, content);\n return this;\n },\n\n appendTo: function (parent) {\n insertContent(cash(parent), this);\n return this;\n },\n\n before: function (selector) {\n cash(selector).insertBefore(this);\n return this;\n },\n\n clone: function () {\n return cash(this.map(function (v) {\n return v.cloneNode(true);\n }));\n },\n\n empty: function () {\n this.html(\"\");\n return this;\n },\n\n html: function (content) {\n if (content === undefined) {\n return this[0].innerHTML;\n }\n var source = (content.nodeType ? content[0].outerHTML : content);\n return this.each(function (v) {\n return v.innerHTML = source;\n });\n },\n\n insertAfter: function (selector) {\n var _this = this;\n\n\n cash(selector).each(function (el, i) {\n var parent = el.parentNode, sibling = el.nextSibling;\n _this.each(function (v) {\n parent.insertBefore((i === 0 ? v : v.cloneNode(true)), sibling);\n });\n });\n\n return this;\n },\n\n insertBefore: function (selector) {\n var _this2 = this;\n cash(selector).each(function (el, i) {\n var parent = el.parentNode;\n _this2.each(function (v) {\n parent.insertBefore((i === 0 ? v : v.cloneNode(true)), el);\n });\n });\n return this;\n },\n\n prepend: function (content) {\n insertContent(this, content, true);\n return this;\n },\n\n prependTo: function (parent) {\n insertContent(cash(parent), this, true);\n return this;\n },\n\n remove: function () {\n return this.each(function (v) {\n return v.parentNode.removeChild(v);\n });\n },\n\n text: function (content) {\n if (content === undefined) {\n return this[0].textContent;\n }\n return this.each(function (v) {\n return v.textContent = content;\n });\n }\n\n });\n\n var docEl = doc.documentElement;\n\n fn.extend({\n position: function () {\n var el = this[0];\n return {\n left: el.offsetLeft,\n top: el.offsetTop\n };\n },\n\n offset: function () {\n var rect = this[0].getBoundingClientRect();\n return {\n top: rect.top + win.pageYOffset - docEl.clientTop,\n left: rect.left + win.pageXOffset - docEl.clientLeft\n };\n },\n\n offsetParent: function () {\n return cash(this[0].offsetParent);\n }\n\n });\n\n fn.extend({\n children: function (selector) {\n var elems = [];\n this.each(function (el) {\n push.apply(elems, el.children);\n });\n elems = unique(elems);\n\n return (!selector ? elems : elems.filter(function (v) {\n return matches(v, selector);\n }));\n },\n\n closest: function (selector) {\n if (!selector || this.length < 1) {\n return cash();\n }\n if (this.is(selector)) {\n return this.filter(selector);\n }\n return this.parent().closest(selector);\n },\n\n is: function (selector) {\n if (!selector) {\n return false;\n }\n\n var match = false, comparator = getCompareFunction(selector);\n\n this.each(function (el) {\n match = comparator(el, selector);\n return !match;\n });\n\n return match;\n },\n\n find: function (selector) {\n if (!selector || selector.nodeType) {\n return cash(selector && this.has(selector).length ? selector : null);\n }\n\n var elems = [];\n this.each(function (el) {\n push.apply(elems, find(selector, el));\n });\n\n return unique(elems);\n },\n\n has: function (selector) {\n var comparator = (isString(selector) ? function (el) {\n return find(selector, el).length !== 0;\n } : function (el) {\n return el.contains(selector);\n });\n\n return this.filter(comparator);\n },\n\n next: function () {\n return cash(this[0].nextElementSibling);\n },\n\n not: function (selector) {\n if (!selector) {\n return this;\n }\n\n var comparator = getCompareFunction(selector);\n\n return this.filter(function (el) {\n return !comparator(el, selector);\n });\n },\n\n parent: function () {\n var result = [];\n\n this.each(function (item) {\n if (item && item.parentNode) {\n result.push(item.parentNode);\n }\n });\n\n return unique(result);\n },\n\n parents: function (selector) {\n var last, result = [];\n\n this.each(function (item) {\n last = item;\n\n while (last && last.parentNode && last !== doc.body.parentNode) {\n last = last.parentNode;\n\n if (!selector || (selector && matches(last, selector))) {\n result.push(last);\n }\n }\n });\n\n return unique(result);\n },\n\n prev: function () {\n return cash(this[0].previousElementSibling);\n },\n\n siblings: function () {\n var collection = this.parent().children(), el = this[0];\n\n return collection.filter(function (i) {\n return i !== el;\n });\n }\n\n });\n\n\n return cash;\n});","module.exports = {\n run(editor, sender, opts) {\n var el = (opts && opts.el) || '';\n var canvas = editor.Canvas;\n var dragger = this.dragger;\n var options = opts.options || {};\n var canvasView = canvas.getCanvasView();\n options.prefix = editor.getConfig().stylePrefix;\n options.mousePosFetcher = canvas.getMouseRelativePos;\n options.posFetcher = canvasView.getElementPos.bind(canvasView);\n\n // Create the resizer for the canvas if not yet created\n if (!dragger) {\n dragger = editor.Utils.Dragger.init(options);\n this.dragger = dragger;\n }\n\n dragger.setOptions(options);\n dragger.focus(el);\n\n if (options.event) {\n dragger.start(options.event);\n }\n\n return dragger;\n },\n\n stop() {\n if (this.canvasResizer) this.canvasResizer.blur();\n }\n};\n","module.exports = {\n run(editor, sender, opts) {\n var opt = opts || {};\n var el = opt.el || '';\n var canvas = editor.Canvas;\n var canvasResizer = this.canvasResizer;\n var options = opt.options || {};\n var canvasView = canvas.getCanvasView();\n options.ratioDefault = 1;\n options.appendTo = canvas.getResizerEl();\n options.prefix = editor.getConfig().stylePrefix;\n options.posFetcher = canvasView.getElementPos.bind(canvasView);\n options.mousePosFetcher = canvas.getMouseRelativePos;\n\n // Create the resizer for the canvas if not yet created\n if (!canvasResizer || opt.forceNew) {\n this.canvasResizer = editor.Utils.Resizer.init(options);\n canvasResizer = this.canvasResizer;\n }\n\n canvasResizer.setOptions(options);\n canvasResizer.blur();\n canvasResizer.focus(el);\n return canvasResizer;\n },\n\n stop() {\n const resizer = this.canvasResizer;\n resizer && resizer.blur();\n }\n};\n","import _ from 'underscore';\n\nmodule.exports = {\n getPanels(editor) {\n if (!this.panels) this.panels = editor.Panels.getPanelsEl();\n return this.panels;\n },\n\n tglPointers(editor, v) {\n var elP = editor.Canvas.getBody().querySelectorAll(\n '.' + this.ppfx + 'no-pointer'\n );\n _.each(elP, item => {\n item.style.pointerEvents = v ? '' : 'all';\n });\n },\n\n run(editor, sender) {\n if (sender && sender.set) sender.set('active', false);\n editor.stopCommand('sw-visibility');\n editor.getModel().stopDefault();\n var that = this;\n var panels = this.getPanels(editor);\n var canvas = editor.Canvas.getElement();\n var editorEl = editor.getEl();\n var pfx = editor.Config.stylePrefix;\n if (!this.helper) {\n this.helper = document.createElement('span');\n this.helper.className = pfx + 'off-prv fa fa-eye-slash';\n editorEl.appendChild(this.helper);\n this.helper.onclick = () => {\n editor.stopCommand('preview');\n };\n }\n this.helper.style.display = 'inline-block';\n this.tglPointers(editor);\n\n /*\n editor.Canvas.getBody().querySelectorAll('.' + pfx + 'no-pointer').forEach(function(){\n this.style.pointerEvents = 'all';\n });*/\n\n panels.style.display = 'none';\n var canvasS = canvas.style;\n canvasS.width = '100%';\n canvasS.height = '100%';\n canvasS.top = '0';\n canvasS.left = '0';\n canvasS.padding = '0';\n canvasS.margin = '0';\n editor.trigger('change:canvasOffset');\n },\n\n stop(editor, sender) {\n var panels = this.getPanels(editor);\n editor.runCommand('sw-visibility');\n editor.getModel().runDefault();\n panels.style.display = 'block';\n var canvas = editor.Canvas.getElement();\n canvas.setAttribute('style', '');\n if (this.helper) {\n this.helper.style.display = 'none';\n }\n editor.trigger('change:canvasOffset');\n this.tglPointers(editor, 1);\n }\n};\n","module.exports = {\n /**\n * Check if fullscreen mode is enabled\n * @return {Boolean}\n */\n isEnabled() {\n var d = document;\n if (\n d.fullscreenElement ||\n d.webkitFullscreenElement ||\n d.mozFullScreenElement\n )\n return 1;\n else return 0;\n },\n\n /**\n * Enable fullscreen mode and return browser prefix\n * @param {HTMLElement} el\n * @return {string}\n */\n enable(el) {\n var pfx = '';\n if (el.requestFullscreen) el.requestFullscreen();\n else if (el.webkitRequestFullscreen) {\n pfx = 'webkit';\n el.webkitRequestFullscreen();\n } else if (el.mozRequestFullScreen) {\n pfx = 'moz';\n el.mozRequestFullScreen();\n } else if (el.msRequestFullscreen) el.msRequestFullscreen();\n else console.warn('Fullscreen not supported');\n return pfx;\n },\n\n /**\n * Disable fullscreen mode\n */\n disable() {\n var d = document;\n if (d.exitFullscreen) d.exitFullscreen();\n else if (d.webkitExitFullscreen) d.webkitExitFullscreen();\n else if (d.mozCancelFullScreen) d.mozCancelFullScreen();\n else if (d.msExitFullscreen) d.msExitFullscreen();\n },\n\n /**\n * Triggered when the state of the fullscreen is changed. Inside detects if\n * it's enabled\n * @param {strinf} pfx Browser prefix\n * @param {Event} e\n */\n fsChanged(pfx, e) {\n var d = document;\n var ev = (pfx || '') + 'fullscreenchange';\n if (!this.isEnabled()) {\n this.stop(null, this.sender);\n document.removeEventListener(ev, this.fsChanged);\n }\n },\n\n run(editor, sender) {\n this.sender = sender;\n var pfx = this.enable(editor.getContainer());\n this.fsChanged = this.fsChanged.bind(this, pfx);\n document.addEventListener(pfx + 'fullscreenchange', this.fsChanged);\n if (editor) editor.trigger('change:canvasOffset');\n },\n\n stop(editor, sender) {\n if (sender && sender.set) sender.set('active', false);\n this.disable();\n if (editor) editor.trigger('change:canvasOffset');\n }\n};\n","module.exports = {\n run(editor) {\n const sel = editor.getSelected();\n let comp = sel && sel.parent();\n\n // Recurse through the parent() chain until a selectable parent is found\n while (comp && !comp.get('selectable')) {\n comp = comp.parent();\n }\n\n comp && editor.select(comp);\n }\n};\n","import Backbone from 'backbone';\nconst $ = Backbone.$;\n\nmodule.exports = {\n getOffsetMethod(state) {\n var method = state || '';\n return 'get' + method + 'OffsetViewerEl';\n },\n\n run(editor, sender, opts) {\n var opt = opts || {};\n var state = opt.state || '';\n var config = editor.getConfig();\n\n if (\n !config.showOffsets ||\n (!config.showOffsetsSelected && state == 'Fixed')\n ) {\n return;\n }\n\n var canvas = editor.Canvas;\n var el = opt.el || '';\n var pos = opt.elPos || canvas.getElementPos(el);\n var style = window.getComputedStyle(el);\n var ppfx = this.ppfx;\n var stateVar = state + 'State';\n var method = this.getOffsetMethod(state);\n var offsetViewer = canvas[method]();\n offsetViewer.style.display = 'block';\n\n var marginT = this['marginT' + state];\n var marginB = this['marginB' + state];\n var marginL = this['marginL' + state];\n var marginR = this['marginR' + state];\n var padT = this['padT' + state];\n var padB = this['padB' + state];\n var padL = this['padL' + state];\n var padR = this['padR' + state];\n\n if (!this[stateVar]) {\n var stateLow = state.toLowerCase();\n var marginName = stateLow + 'margin-v';\n var paddingName = stateLow + 'padding-v';\n var marginV = $(`
`).get(0);\n var paddingV = $(`
`).get(0);\n var marginEls = ppfx + marginName + '-el';\n var paddingEls = ppfx + paddingName + '-el';\n const fullMargName = `${marginEls} ${ppfx + marginName}`;\n const fullPadName = `${paddingEls} ${ppfx + paddingName}`;\n marginT = $(`
`).get(0);\n marginB = $(`
`).get(0);\n marginL = $(`
`).get(0);\n marginR = $(`
`).get(0);\n padT = $(`
`).get(0);\n padB = $(`
`).get(0);\n padL = $(`
`).get(0);\n padR = $(`
`).get(0);\n this['marginT' + state] = marginT;\n this['marginB' + state] = marginB;\n this['marginL' + state] = marginL;\n this['marginR' + state] = marginR;\n this['padT' + state] = padT;\n this['padB' + state] = padB;\n this['padL' + state] = padL;\n this['padR' + state] = padR;\n marginV.appendChild(marginT);\n marginV.appendChild(marginB);\n marginV.appendChild(marginL);\n marginV.appendChild(marginR);\n paddingV.appendChild(padT);\n paddingV.appendChild(padB);\n paddingV.appendChild(padL);\n paddingV.appendChild(padR);\n offsetViewer.appendChild(marginV);\n offsetViewer.appendChild(paddingV);\n this[stateVar] = '1';\n }\n\n var unit = 'px';\n var marginLeftSt = style.marginLeft.replace(unit, '');\n var marginTopSt = parseInt(style.marginTop.replace(unit, ''));\n var marginBottomSt = parseInt(style.marginBottom.replace(unit, ''));\n var mtStyle = marginT.style;\n var mbStyle = marginB.style;\n var mlStyle = marginL.style;\n var mrStyle = marginR.style;\n var ptStyle = padT.style;\n var pbStyle = padB.style;\n var plStyle = padL.style;\n var prStyle = padR.style;\n var posLeft = parseInt(pos.left);\n\n // Margin style\n mtStyle.height = style.marginTop;\n mtStyle.width = style.width;\n mtStyle.top = pos.top - style.marginTop.replace(unit, '') + unit;\n mtStyle.left = posLeft + unit;\n\n mbStyle.height = style.marginBottom;\n mbStyle.width = style.width;\n mbStyle.top = pos.top + pos.height + unit;\n mbStyle.left = posLeft + unit;\n\n var marginSideH = pos.height + marginTopSt + marginBottomSt + unit;\n var marginSideT = pos.top - marginTopSt + unit;\n mlStyle.height = marginSideH;\n mlStyle.width = style.marginLeft;\n mlStyle.top = marginSideT;\n mlStyle.left = posLeft - marginLeftSt + unit;\n\n mrStyle.height = marginSideH;\n mrStyle.width = style.marginRight;\n mrStyle.top = marginSideT;\n mrStyle.left = posLeft + pos.width + unit;\n\n // Padding style\n var padTop = parseInt(style.paddingTop.replace(unit, ''));\n ptStyle.height = style.paddingTop;\n ptStyle.width = style.width;\n ptStyle.top = pos.top + unit;\n ptStyle.left = posLeft + unit;\n\n var padBot = parseInt(style.paddingBottom.replace(unit, ''));\n pbStyle.height = style.paddingBottom;\n pbStyle.width = style.width;\n pbStyle.top = pos.top + pos.height - padBot + unit;\n pbStyle.left = posLeft + unit;\n\n var padSideH = pos.height - padBot - padTop + unit;\n var padSideT = pos.top + padTop + unit;\n plStyle.height = padSideH;\n plStyle.width = style.paddingLeft;\n plStyle.top = padSideT;\n plStyle.left = pos.left + unit;\n\n var padRight = parseInt(style.paddingRight.replace(unit, ''));\n prStyle.height = padSideH;\n prStyle.width = style.paddingRight;\n prStyle.top = padSideT;\n prStyle.left = pos.left + pos.width - padRight + unit;\n },\n\n stop(editor, sender, opts) {\n var opt = opts || {};\n var state = opt.state || '';\n var method = this.getOffsetMethod(state);\n var canvas = editor.Canvas;\n var offsetViewer = canvas[method]();\n offsetViewer.style.display = 'none';\n }\n};\n","module.exports = {\n run(editor, sender, opts = {}) {\n const modal = editor.Modal;\n const am = editor.AssetManager;\n const config = am.getConfig();\n const amContainer = am.getContainer();\n const title = opts.modalTitle || config.modalTitle || '';\n const types = opts.types;\n const accept = opts.accept;\n\n am.setTarget(opts.target);\n am.onClick(opts.onClick);\n am.onDblClick(opts.onDblClick);\n am.onSelect(opts.onSelect);\n\n if (!this.rendered || types) {\n let assets = am.getAll();\n\n if (types) {\n assets = assets.filter(a => types.indexOf(a.get('type')) !== -1);\n }\n\n am.render(assets);\n this.rendered = 1;\n }\n\n if (accept) {\n const uploadEl = amContainer.querySelector(\n `input#${config.stylePrefix}uploadFile`\n );\n uploadEl && uploadEl.setAttribute('accept', accept);\n }\n\n modal.setTitle(title);\n modal.setContent(amContainer);\n modal.open();\n }\n};\n","module.exports = {\n run(editor, sender) {\n const bm = editor.BlockManager;\n const pn = editor.Panels;\n\n if (!this.blocks) {\n bm.render();\n const id = 'views-container';\n const blocks = document.createElement('div');\n const panels = pn.getPanel(id) || pn.addPanel({ id });\n blocks.appendChild(bm.getContainer());\n panels.set('appendContent', blocks).trigger('change:appendContent');\n this.blocks = blocks;\n }\n\n this.blocks.style.display = 'block';\n },\n\n stop() {\n const blocks = this.blocks;\n blocks && (blocks.style.display = 'none');\n }\n};\n","const $ = require('backbone').$;\n\nmodule.exports = {\n run(editor, sender) {\n this.sender = sender;\n\n var config = editor.Config;\n var pfx = config.stylePrefix;\n var tm = editor.TraitManager;\n var panelC;\n\n if (!this.$cn) {\n var tmView = tm.getTraitsViewer();\n var confTm = tm.getConfig();\n this.$cn = $('
');\n this.$cn2 = $('
');\n this.$cn.append(this.$cn2);\n this.$header = $('
').append(\n `
${confTm.textNoElement}
`\n );\n this.$cn.append(this.$header);\n this.$cn2.append(\n `
${confTm.labelContainer}
`\n );\n this.$cn2.append(tmView.render().el);\n var panels = editor.Panels;\n\n if (!panels.getPanel('views-container'))\n panelC = panels.addPanel({ id: 'views-container' });\n else panelC = panels.getPanel('views-container');\n\n panelC\n .set('appendContent', this.$cn.get(0))\n .trigger('change:appendContent');\n\n this.target = editor.getModel();\n this.listenTo(this.target, 'component:toggled', this.toggleTm);\n }\n\n this.toggleTm();\n },\n\n /**\n * Toggle Trait Manager visibility\n * @private\n */\n toggleTm() {\n const sender = this.sender;\n if (sender && sender.get && !sender.get('active')) return;\n\n if (this.target.getSelectedAll().length === 1) {\n this.$cn2.show();\n this.$header.hide();\n } else {\n this.$cn2.hide();\n this.$header.show();\n }\n },\n\n stop() {\n this.$cn2 && this.$cn2.hide();\n this.$header && this.$header.hide();\n }\n};\n","import Backbone from 'backbone';\nconst StyleManager = require('style_manager');\nconst $ = Backbone.$;\n\nmodule.exports = {\n run(em, sender) {\n this.sender = sender;\n if (!this.$cn) {\n var config = em.getConfig(),\n panels = em.Panels;\n // Main container\n this.$cn = $('
');\n // Secondary container\n this.$cn2 = $('
');\n this.$cn.append(this.$cn2);\n\n // Device Manager\n var dvm = em.DeviceManager;\n if (dvm && config.showDevices) {\n var devicePanel = panels.addPanel({ id: 'devices-c' });\n devicePanel\n .set('appendContent', dvm.render())\n .trigger('change:appendContent');\n }\n\n // Class Manager container\n var clm = em.SelectorManager;\n if (clm) this.$cn2.append(clm.render([]));\n\n this.$cn2.append(em.StyleManager.render());\n var smConfig = em.StyleManager.getConfig();\n const pfx = smConfig.stylePrefix;\n // Create header\n this.$header = $(\n `
${smConfig.textNoElement}
`\n );\n this.$cn.append(this.$header);\n\n // Create panel if not exists\n if (!panels.getPanel('views-container'))\n this.panel = panels.addPanel({ id: 'views-container' });\n else this.panel = panels.getPanel('views-container');\n\n // Add all containers to the panel\n this.panel.set('appendContent', this.$cn).trigger('change:appendContent');\n\n this.target = em.editor;\n this.listenTo(this.target, 'component:toggled', this.toggleSm);\n }\n this.toggleSm();\n },\n\n /**\n * Toggle Style Manager visibility\n * @private\n */\n toggleSm() {\n const { target, sender } = this;\n if (sender && sender.get && !sender.get('active')) return;\n\n if (target.getSelectedAll().length === 1) {\n this.$cn2.show();\n this.$header.hide();\n } else {\n this.$cn2.hide();\n this.$header.show();\n }\n },\n\n stop() {\n // Hide secondary container if exists\n if (this.$cn2) this.$cn2.hide();\n\n // Hide header container if exists\n if (this.$header) this.$header.hide();\n }\n};\n","import Backbone from 'backbone';\nconst Layers = require('navigator');\nconst $ = Backbone.$;\n\nmodule.exports = {\n run(editor) {\n const lm = editor.LayerManager;\n const pn = editor.Panels;\n\n if (!this.layers) {\n const id = 'views-container';\n const layers = document.createElement('div');\n const panels = pn.getPanel(id) || pn.addPanel({ id });\n layers.appendChild(lm.render());\n panels.set('appendContent', layers).trigger('change:appendContent');\n this.layers = layers;\n }\n\n this.layers.style.display = 'block';\n },\n\n stop() {\n const layers = this.layers;\n layers && (layers.style.display = 'none');\n }\n};\n","module.exports = {\n run(ed) {\n ed.Canvas.getBody().className = this.ppfx + 'dashed';\n },\n\n stop(ed) {\n ed.Canvas.getBody().className = '';\n }\n};\n","import _ from 'underscore';\nimport Backbone from 'backbone';\nvar CreateComponent = require('./CreateComponent');\n\nmodule.exports = _.extend({}, CreateComponent, {\n /**\n * This event is triggered at the beginning of a draw operation\n * @param {Object} component Object component before creation\n * @private\n * */\n beforeDraw(component) {\n component.type = 'text';\n if (!component.style) component.style = {};\n component.style.padding = '10px';\n },\n\n /**\n * This event is triggered at the end of a draw operation\n * @param {Object} model Component model created\n * @private\n * */\n afterDraw(model) {\n if (!model || !model.set) return;\n model.trigger('focus');\n if (this.sender) this.sender.set('active', false);\n }\n});\n","import _ from 'underscore';\nimport Backbone from 'backbone';\nimport { on, off } from 'utils/mixins';\n\nconst SelectComponent = require('./SelectComponent');\nconst SelectPosition = require('./SelectPosition');\nconst $ = Backbone.$;\n\nmodule.exports = _.extend({}, SelectPosition, SelectComponent, {\n init(o) {\n SelectComponent.init.apply(this, arguments);\n _.bindAll(this, 'initSorter', 'rollback', 'onEndMove');\n this.opt = o;\n this.hoverClass = this.ppfx + 'highlighter-warning';\n this.badgeClass = this.ppfx + 'badge-warning';\n this.noSelClass = this.ppfx + 'no-select';\n },\n\n enable(...args) {\n SelectComponent.enable.apply(this, args);\n this.getBadgeEl().addClass(this.badgeClass);\n this.getHighlighterEl().addClass(this.hoverClass);\n var wp = this.$wrapper;\n wp.css('cursor', 'move');\n wp.on('mousedown', this.initSorter);\n\n // Avoid strange moving behavior\n wp.addClass(this.noSelClass);\n },\n\n /**\n * Overwrite for doing nothing\n * @private\n */\n toggleClipboard() {},\n\n /**\n * Delegate sorting\n * @param {Event} e\n * @private\n * */\n initSorter(e) {\n var el = $(e.target).data('model');\n var drag = el.get('draggable');\n if (!drag) return;\n\n // Avoid badge showing on move\n this.cacheEl = null;\n this.startSelectPosition(e.target, this.frameEl.contentDocument);\n this.sorter.draggable = drag;\n this.sorter.onEndMove = this.onEndMove.bind(this);\n this.stopSelectComponent();\n this.$wrapper.off('mousedown', this.initSorter);\n on(this.getContentWindow(), 'keydown', this.rollback);\n },\n\n /**\n * Init sorter from model\n * @param {Object} model\n * @private\n */\n initSorterFromModel(model) {\n var drag = model.get('draggable');\n if (!drag) return;\n // Avoid badge showing on move\n this.cacheEl = null;\n var el = model.view.el;\n this.startSelectPosition(el, this.frameEl.contentDocument);\n this.sorter.draggable = drag;\n this.sorter.onEndMove = this.onEndMoveFromModel.bind(this);\n\n /*\n this.sorter.setDragHelper(el);\n var dragHelper = this.sorter.dragHelper;\n dragHelper.className = this.ppfx + 'drag-helper';\n dragHelper.innerHTML = '';\n dragHelper.backgroundColor = 'white';\n */\n\n this.stopSelectComponent();\n on(this.getContentWindow(), 'keydown', this.rollback);\n },\n\n /**\n * Init sorter from models\n * @param {Object} model\n * @private\n */\n initSorterFromModels(models) {\n // TODO: if one only check for `draggable`\n // Avoid badge showing on move\n this.cacheEl = null;\n const lastModel = models[models.length - 1];\n const doc = this.frameEl.contentDocument;\n this.startSelectPosition(lastModel.view.el, doc);\n this.sorter.draggable = lastModel.get('draggable');\n this.sorter.toMove = models;\n this.sorter.onEndMove = this.onEndMoveFromModel.bind(this);\n this.stopSelectComponent();\n on(this.getContentWindow(), 'keydown', this.rollback);\n },\n\n onEndMoveFromModel() {\n off(this.getContentWindow(), 'keydown', this.rollback);\n },\n\n /**\n * Callback after sorting\n * @private\n */\n onEndMove() {\n this.enable();\n off(this.getContentWindow(), 'keydown', this.rollback);\n },\n\n /**\n * Say what to do after the component was selected (selectComponent)\n * @param {Event} e\n * @param {Object} Selected element\n * @private\n * */\n onSelect(e, el) {},\n\n /**\n * Used to bring the previous situation before start moving the component\n * @param {Event} e\n * @param {Boolean} Indicates if rollback in anycase\n * @private\n * */\n rollback(e, force) {\n var key = e.which || e.keyCode;\n if (key == this.opt.ESCAPE_KEY || force) {\n this.sorter.moved = false;\n this.sorter.endMove();\n }\n return;\n },\n\n /**\n * Returns badge element\n * @return {HTMLElement}\n * @private\n */\n getBadgeEl() {\n if (!this.$badge) this.$badge = $(this.getBadge());\n return this.$badge;\n },\n\n /**\n * Returns highlighter element\n * @return {HTMLElement}\n * @private\n */\n getHighlighterEl() {\n if (!this.$hl) this.$hl = $(this.canvas.getHighlighter());\n return this.$hl;\n },\n\n stop(...args) {\n SelectComponent.stop.apply(this, args);\n this.getBadgeEl().removeClass(this.badgeClass);\n this.getHighlighterEl().removeClass(this.hoverClass);\n var wp = this.$wrapper;\n wp.css('cursor', '')\n .unbind()\n .removeClass(this.noSelClass);\n }\n});\n","import _ from 'underscore';\nimport Backbone from 'backbone';\nvar InsertCustom = require('./InsertCustom');\n\nmodule.exports = _.extend({}, InsertCustom, {\n /**\n * Trigger before insert\n * @param {Object} object\n * @private\n *\n * */\n beforeInsert(object) {\n object.type = 'image';\n object.style = {};\n object.attributes = {};\n object.attributes.onmousedown = 'return false';\n if (\n this.config.firstCentered &&\n this.getCanvasWrapper() == this.sorter.target\n ) {\n object.style.margin = '0 auto';\n }\n },\n\n /**\n * Trigger after insert\n * @param {Object} model Model created after insert\n * @private\n * */\n afterInsert(model) {\n model.trigger('dblclick');\n if (this.sender) this.sender.set('active', false);\n }\n});\n","import _ from 'underscore';\nimport Backbone from 'backbone';\nconst SelectComponent = require('./SelectComponent');\nconst $ = Backbone.$;\n\nmodule.exports = _.extend({}, SelectComponent, {\n init(o) {\n _.bindAll(this, 'startDelete', 'stopDelete', 'onDelete');\n this.hoverClass = this.pfx + 'hover-delete';\n this.badgeClass = this.pfx + 'badge-red';\n },\n\n enable() {\n var that = this;\n this.$el\n .find('*')\n .mouseover(this.startDelete)\n .mouseout(this.stopDelete)\n .click(this.onDelete);\n },\n\n /**\n * Start command\n * @param {Object} e\n * @private\n */\n startDelete(e) {\n e.stopPropagation();\n var $this = $(e.target);\n\n // Show badge if possible\n if ($this.data('model').get('removable')) {\n $this.addClass(this.hoverClass);\n this.attachBadge($this.get(0));\n }\n },\n\n /**\n * Stop command\n * @param {Object} e\n * @private\n */\n stopDelete(e) {\n e.stopPropagation();\n var $this = $(e.target);\n $this.removeClass(this.hoverClass);\n\n // Hide badge if possible\n if (this.badge) this.badge.css({ left: -1000, top: -1000 });\n },\n\n /**\n * Delete command\n * @param {Object} e\n * @private\n */\n onDelete(e) {\n e.stopPropagation();\n var $this = $(e.target);\n\n // Do nothing in case can't remove\n if (!$this.data('model').get('removable')) return;\n\n $this.data('model').destroy();\n this.removeBadge();\n this.clean();\n },\n\n /**\n * Updates badge label\n * @param {Object} model\n * @private\n * */\n updateBadgeLabel(model) {\n this.badge.html('Remove ' + model.getName());\n }\n});\n","import Backbone from 'backbone';\nconst $ = Backbone.$;\n\nmodule.exports = {\n run(editor, sender, opts = {}) {\n sender && sender.set && sender.set('active', 0);\n const config = editor.getConfig();\n const modal = editor.Modal;\n const pfx = config.stylePrefix;\n this.cm = editor.CodeManager || null;\n\n if (!this.$editors) {\n const oHtmlEd = this.buildEditor('htmlmixed', 'hopscotch', 'HTML');\n const oCsslEd = this.buildEditor('css', 'hopscotch', 'CSS');\n this.htmlEditor = oHtmlEd.el;\n this.cssEditor = oCsslEd.el;\n const $editors = $(`
`);\n $editors.append(oHtmlEd.$el).append(oCsslEd.$el);\n this.$editors = $editors;\n }\n\n modal.setTitle(config.textViewCode);\n modal.setContent(this.$editors);\n modal.open();\n this.htmlEditor.setContent(editor.getHtml());\n this.cssEditor.setContent(editor.getCss());\n },\n\n stop(editor) {\n const modal = editor.Modal;\n modal && modal.close();\n },\n\n buildEditor(codeName, theme, label) {\n const input = document.createElement('textarea');\n !this.codeMirror && (this.codeMirror = this.cm.getViewer('CodeMirror'));\n\n const el = this.codeMirror.clone().set({\n label,\n codeName,\n theme,\n input\n });\n\n const $el = new this.cm.EditorView({\n model: el,\n config: this.cm.getConfig()\n }).render().$el;\n\n el.init(input);\n\n return { el, $el };\n }\n};\n","import Backbone from 'backbone';\nconst $ = Backbone.$;\n\nmodule.exports = Backbone.View.extend({\n /**\n * Initialize method that can't be removed\n * @param {Object} o Options\n * @private\n * */\n initialize(o) {\n this.config = o || {};\n this.editorModel = this.em = this.config.em || {};\n this.pfx = this.config.stylePrefix;\n this.ppfx = this.config.pStylePrefix;\n this.hoverClass = this.pfx + 'hover';\n this.badgeClass = this.pfx + 'badge';\n this.plhClass = this.pfx + 'placeholder';\n this.freezClass = this.ppfx + 'freezed';\n\n this.canvas = this.em.get && this.em.get('Canvas');\n\n if (this.em.get) this.setElement(this.getCanvas());\n\n if (this.canvas) {\n this.$canvas = this.$el;\n this.$wrapper = $(this.getCanvasWrapper());\n this.frameEl = this.canvas.getFrameEl();\n this.canvasTool = this.getCanvasTools();\n this.bodyEl = this.getCanvasBody();\n }\n\n this.init(this.config);\n },\n\n /**\n * On frame scroll callback\n * @param {[type]} e [description]\n * @return {[type]} [description]\n */\n onFrameScroll(e) {},\n\n /**\n * Returns canval element\n * @return {HTMLElement}\n */\n getCanvas() {\n return this.canvas.getElement();\n },\n\n /**\n * Get canvas body element\n * @return {HTMLElement}\n */\n getCanvasBody() {\n return this.canvas.getBody();\n },\n\n /**\n * Get canvas wrapper element\n * @return {HTMLElement}\n */\n getCanvasWrapper() {\n return this.canvas.getWrapperEl();\n },\n\n /**\n * Get canvas wrapper element\n * @return {HTMLElement}\n */\n getCanvasTools() {\n return this.canvas.getToolsEl();\n },\n\n /**\n * Get the offset of the element\n * @param {HTMLElement} el\n * @return {Object}\n */\n offset(el) {\n var rect = el.getBoundingClientRect();\n return {\n top: rect.top + el.ownerDocument.body.scrollTop,\n left: rect.left + el.ownerDocument.body.scrollLeft\n };\n },\n\n /**\n * Callback triggered after initialize\n * @param {Object} o Options\n * @private\n * */\n init(o) {},\n\n /**\n * Method that run command\n * @param {Object} editor Editor instance\n * @param {Object} [options={}] Options\n * @private\n * */\n callRun(editor, options = {}) {\n const id = this.id;\n editor.trigger(`run:${id}:before`, options);\n\n if (options && options.abort) {\n editor.trigger(`abort:${id}`, options);\n return;\n }\n\n const sender = options.sender || editor;\n const result = this.run(editor, sender, options);\n editor.trigger(`run:${id}`, result, options);\n return result;\n },\n\n /**\n * Method that run command\n * @param {Object} editor Editor instance\n * @param {Object} [options={}] Options\n * @private\n * */\n callStop(editor, options = {}) {\n const id = this.id;\n const sender = options.sender || editor;\n editor.trigger(`stop:${id}:before`, options);\n const result = this.stop(editor, sender, options);\n editor.trigger(`stop:${id}`, result, options);\n return result;\n },\n\n /**\n * Method that run command\n * @param {Object} em Editor model\n * @param {Object} sender Button sender\n * @private\n * */\n run(em, sender) {},\n\n /**\n * Method that stop command\n * @param {Object} em Editor model\n * @param {Object} sender Button sender\n * @private\n * */\n stop(em, sender) {}\n});\n","const Component = require('./Component');\n\nmodule.exports = Component.extend({\n defaults: {\n ...Component.prototype.defaults,\n type: 'text',\n droppable: false,\n editable: true\n }\n});\n","var Component = require('./Component');\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n type: 'image',\n tagName: 'img',\n src: '',\n void: 1,\n droppable: 0,\n editable: 1,\n highlightable: 0,\n resizable: 1,\n traits: ['alt'],\n\n // File to load asynchronously once the model is rendered\n file: ''\n },\n\n initialize(o, opt) {\n Component.prototype.initialize.apply(this, arguments);\n var attr = this.get('attributes');\n if (attr.src) this.set('src', attr.src);\n },\n\n initToolbar(...args) {\n Component.prototype.initToolbar.apply(this, args);\n const em = this.em;\n\n if (em) {\n var cmd = em.get('Commands');\n var cmdName = 'image-editor';\n\n // Add Image Editor button only if the default command exists\n if (cmd.has(cmdName)) {\n let hasButtonBool = false;\n var tb = this.get('toolbar');\n\n for (let i = 0; i < tb.length; i++) {\n if (tb[i].command === 'image-editor') {\n hasButtonBool = true;\n break;\n }\n }\n\n if (!hasButtonBool) {\n tb.push({\n attributes: { class: 'fa fa-pencil' },\n command: cmdName\n });\n this.set('toolbar', tb);\n }\n }\n }\n },\n\n /**\n * Returns object of attributes for HTML\n * @return {Object}\n * @private\n */\n getAttrToHTML(...args) {\n var attr = Component.prototype.getAttrToHTML.apply(this, args);\n delete attr.onmousedown;\n var src = this.get('src');\n if (src) attr.src = src;\n return attr;\n },\n\n /**\n * Parse uri\n * @param {string} uri\n * @return {object}\n * @private\n */\n parseUri(uri) {\n var el = document.createElement('a');\n el.href = uri;\n var query = {};\n var qrs = el.search.substring(1).split('&');\n for (var i = 0; i < qrs.length; i++) {\n var pair = qrs[i].split('=');\n var name = decodeURIComponent(pair[0]);\n if (name) query[name] = decodeURIComponent(pair[1]);\n }\n return {\n hostname: el.hostname,\n pathname: el.pathname,\n protocol: el.protocol,\n search: el.search,\n hash: el.hash,\n port: el.port,\n query\n };\n }\n },\n {\n /**\n * Detect if the passed element is a valid component.\n * In case the element is valid an object abstracted\n * from the element will be returned\n * @param {HTMLElement}\n * @return {Object}\n * @private\n */\n isComponent(el) {\n var result = '';\n if (el.tagName == 'IMG') {\n result = { type: 'image' };\n }\n return result;\n }\n }\n);\n","const Component = require('./Component');\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n type: 'tbody',\n tagName: 'tbody',\n draggable: ['table'],\n droppable: ['tr'],\n columns: 1,\n rows: 1\n },\n\n initialize(o, opt) {\n Component.prototype.initialize.apply(this, arguments);\n const components = this.get('components');\n let columns = this.get('columns');\n let rows = this.get('rows');\n\n // Init components if empty\n if (!components.length) {\n const rowsToAdd = [];\n\n while (rows--) {\n const columnsToAdd = [];\n let clm = columns;\n\n while (clm--) {\n columnsToAdd.push({\n type: 'cell',\n classes: ['cell']\n });\n }\n\n rowsToAdd.push({\n type: 'row',\n classes: ['row'],\n components: columnsToAdd\n });\n }\n\n components.add(rowsToAdd);\n }\n }\n },\n {\n isComponent(el) {\n let result = '';\n\n if (el.tagName == 'TBODY') {\n result = { type: 'tbody' };\n }\n\n return result;\n }\n }\n);\n","import { bindAll, isUndefined } from 'underscore';\nimport { on, off } from 'utils/mixins';\nconst Input = require('./Input');\nconst Backbone = require('backbone');\nconst $ = Backbone.$;\n\nmodule.exports = Input.extend({\n events: {\n 'change input': 'handleChange',\n 'change select': 'handleUnitChange',\n 'click [data-arrow-up]': 'upArrowClick',\n 'click [data-arrow-down]': 'downArrowClick',\n 'mousedown [data-arrows]': 'downIncrement'\n },\n\n template() {\n const ppfx = this.ppfx;\n return `\n \n \n
\n
\n
\n
\n `;\n },\n\n inputClass() {\n const ppfx = this.ppfx;\n return this.opts.contClass || `${ppfx}field ${ppfx}field-integer`;\n },\n\n initialize(opts = {}) {\n Input.prototype.initialize.apply(this, arguments);\n bindAll(this, 'moveIncrement', 'upIncrement');\n this.doc = document;\n this.listenTo(this.model, 'change:unit', this.handleModelChange);\n },\n\n /**\n * Set value to the model\n * @param {string} value\n * @param {Object} opts\n */\n setValue(value, opts) {\n var opt = opts || {};\n var valid = this.validateInputValue(value, { deepCheck: 1 });\n var validObj = { value: valid.value };\n\n // If found some unit value\n if (valid.unit || valid.force) {\n validObj.unit = valid.unit;\n }\n\n this.model.set(validObj, opt);\n\n // Generally I get silent when I need to reflect data to view without\n // reupdating the target\n if (opt.silent) {\n this.handleModelChange();\n }\n },\n\n /**\n * Handled when the view is changed\n */\n handleChange(e) {\n e.stopPropagation();\n this.setValue(this.getInputEl().value);\n this.elementUpdated();\n },\n\n /**\n * Handled when the view is changed\n */\n handleUnitChange(e) {\n e.stopPropagation();\n var value = this.getUnitEl().value;\n this.model.set('unit', value);\n this.elementUpdated();\n },\n\n /**\n * Fired when the element of the property is updated\n */\n elementUpdated() {\n this.model.trigger('el:change');\n },\n\n /**\n * Updates the view when the model is changed\n * */\n handleModelChange() {\n const model = this.model;\n this.getInputEl().value = model.get('value');\n const unitEl = this.getUnitEl();\n unitEl && (unitEl.value = model.get('unit') || '');\n },\n\n /**\n * Get the unit element\n * @return {HTMLElement}\n */\n getUnitEl() {\n if (!this.unitEl) {\n const model = this.model;\n const units = model.get('units') || [];\n\n if (units.length) {\n const options = [];\n\n units.forEach(unit => {\n const selected = unit == model.get('unit') ? 'selected' : '';\n options.push(``);\n });\n\n const temp = document.createElement('div');\n temp.innerHTML = ``;\n this.unitEl = temp.firstChild;\n }\n }\n\n return this.unitEl;\n },\n\n /**\n * Invoked when the up arrow is clicked\n * */\n upArrowClick() {\n const model = this.model;\n const step = model.get('step');\n let value = parseInt(model.get('value'), 10);\n value = this.normalizeValue(value + step);\n var valid = this.validateInputValue(value);\n model.set('value', valid.value);\n this.elementUpdated();\n },\n\n /**\n * Invoked when the down arrow is clicked\n * */\n downArrowClick() {\n const model = this.model;\n const step = model.get('step');\n const value = parseInt(model.get('value'), 10);\n const val = this.normalizeValue(value - step);\n var valid = this.validateInputValue(val);\n model.set('value', valid.value);\n this.elementUpdated();\n },\n\n /**\n * Change easily integer input value with click&drag method\n * @param Event\n *\n * @return void\n * */\n downIncrement(e) {\n e.preventDefault();\n this.moved = 0;\n var value = this.model.get('value');\n value = this.normalizeValue(value);\n this.current = { y: e.pageY, val: value };\n on(this.doc, 'mousemove', this.moveIncrement);\n on(this.doc, 'mouseup', this.upIncrement);\n },\n\n /** While the increment is clicked, moving the mouse will update input value\n * @param Object\n *\n * @return bool\n * */\n moveIncrement(ev) {\n this.moved = 1;\n const model = this.model;\n const step = model.get('step');\n const data = this.current;\n var pos = this.normalizeValue(data.val + (data.y - ev.pageY) * step);\n this.prValue = this.validateInputValue(pos).value;\n model.set('value', this.prValue, { avoidStore: 1 });\n return false;\n },\n\n /**\n * Stop moveIncrement method\n * */\n upIncrement() {\n const model = this.model;\n const step = model.get('step');\n off(this.doc, 'mouseup', this.upIncrement);\n off(this.doc, 'mousemove', this.moveIncrement);\n\n if (this.prValue && this.moved) {\n var value = this.prValue - step;\n model.set('value', value, { avoidStore: 1 }).set('value', value + step);\n this.elementUpdated();\n }\n },\n\n normalizeValue(value, defValue = 0) {\n const model = this.model;\n const step = model.get('step');\n let stepDecimals = 0;\n\n if (isNaN(value)) {\n return defValue;\n }\n\n value = parseFloat(value);\n\n if (Math.floor(value) !== value) {\n const side = step.toString().split('.')[1];\n stepDecimals = side ? side.length : 0;\n }\n\n return stepDecimals ? parseFloat(value.toFixed(stepDecimals)) : value;\n },\n\n /**\n * Validate input value\n * @param {String} value Raw value\n * @param {Object} opts Options\n * @return {Object} Validated string\n */\n validateInputValue(value, opts) {\n var force = 0;\n var opt = opts || {};\n var model = this.model;\n const defValue = ''; //model.get('defaults');\n var val = !isUndefined(value) ? value : defValue;\n var units = model.get('units') || [];\n var unit = model.get('unit') || (units.length && units[0]) || '';\n var max = model.get('max');\n var min = model.get('min');\n\n if (opt.deepCheck) {\n var fixed = model.get('fixedValues') || [];\n\n if (val) {\n // If the value is one of the fixed values I leave it as it is\n var regFixed = new RegExp('^' + fixed.join('|'), 'g');\n if (fixed.length && regFixed.test(val)) {\n val = val.match(regFixed)[0];\n unit = '';\n force = 1;\n } else {\n var valCopy = val + '';\n val += ''; // Make it suitable for replace\n val = parseFloat(val.replace(',', '.'));\n val = !isNaN(val) ? val : defValue;\n var uN = valCopy.replace(val, '');\n // Check if exists as unit\n if (_.indexOf(units, uN) >= 0) unit = uN;\n }\n }\n }\n\n if (!isUndefined(max) && max !== '') val = val > max ? max : val;\n if (!isUndefined(min) && min !== '') val = val < min ? min : val;\n\n return {\n force,\n value: val,\n unit\n };\n },\n\n render() {\n Input.prototype.render.call(this);\n const unit = this.getUnitEl();\n unit &&\n this.$el\n .find(`.${this.ppfx}field-units`)\n .get(0)\n .appendChild(unit);\n return this;\n }\n});\n","import Backbone from 'backbone';\nconst PropertyView = require('./PropertyView');\nconst $ = Backbone.$;\n\nmodule.exports = PropertyView.extend({\n templateInput() {\n const pfx = this.pfx;\n return `\n
\n \n
\n `;\n },\n\n inputValueChanged(...args) {\n // If it's not detached (eg. 'padding: 1px 2px 3px 4px;') it will follow\n // the same flow of PropertyView\n if (!this.model.get('detached')) {\n PropertyView.prototype.inputValueChanged.apply(this, args);\n }\n },\n\n clear(e) {\n const props = this.properties;\n props && props.forEach(propView => propView.clear());\n PropertyView.prototype.clear.apply(this, arguments);\n },\n\n /**\n * Renders input\n * */\n onRender() {\n var model = this.model;\n var props = model.get('properties') || [];\n var self = this;\n this.properties = [];\n\n if (props.length) {\n if (!this.$input) {\n this.$input = $('');\n this.input = this.$input.get(0);\n }\n\n if (!this.props) {\n this.props = model.get('properties');\n }\n\n if (!this.$props) {\n //Not yet supported nested composite\n this.props.each(function(prop, index) {\n if (prop && prop.get('type') == 'composite') {\n this.props.remove(prop);\n console.warn('Nested composite types not yet allowed.');\n }\n prop.parent = model;\n }, this);\n\n var PropertiesView = require('./PropertiesView');\n var propsView = new PropertiesView(this.getPropsConfig());\n this.$props = propsView.render().$el;\n this.properties = propsView.properties;\n this.$el.find(`#${this.pfx}input-holder`).append(this.$props);\n }\n }\n },\n\n /**\n * Returns configurations that should be past to properties\n * @param {Object} opts\n * @return {Object}\n */\n getPropsConfig(opts) {\n var that = this;\n const model = this.model;\n\n var result = {\n config: this.config,\n collection: this.props,\n target: this.target,\n propTarget: this.propTarget,\n // On any change made to children I need to update composite value\n onChange(el, view, opts) {\n model.set('value', model.getFullValue(), opts);\n },\n // Each child property will receive a full composite string, eg. '0px 0px 10px 0px'\n // I need to extract from that string the corresponding one to that property.\n customValue(property, mIndex) {\n return that.valueOnIndex(mIndex, property);\n }\n };\n\n // If detached let follow its standard flow\n if (model.get('detached')) {\n delete result.onChange;\n }\n\n return result;\n },\n\n /**\n * Extract string from composite value\n * @param {number} index Index\n * @param {Object} view Property view\n * @return {string}\n * */\n valueOnIndex(index, view) {\n let value;\n const targetValue = this.getTargetValue({ ignoreDefault: 1 });\n\n // If the target value of the composite is not empty I'll fetch\n // the corresponding value from the requested index, otherwise try\n // to get the value of the sub-property\n if (targetValue) {\n const values = targetValue.split(' ');\n value = values[index];\n } else {\n value =\n view && view.getTargetValue({ ignoreCustomValue: 1, ignoreDefault: 1 });\n }\n\n if (view) {\n value = view.model.parseValue(value).value;\n }\n\n return value;\n }\n});\n","import Backbone from 'backbone';\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n id: '',\n label: '',\n open: true,\n attributes: {}\n }\n});\n","import { isArray, contains } from 'underscore';\n\nmodule.exports = {\n run(ed) {\n const em = ed.getModel();\n const clp = em.get('clipboard');\n const selected = ed.getSelected();\n\n if (clp && selected && !em.isEditing()) {\n ed.getSelectedAll().forEach(comp => {\n if (!comp) return;\n const coll = comp.collection;\n const at = coll.indexOf(comp) + 1;\n const copyable = clp.filter(cop => cop.get('copyable'));\n let added;\n\n if (contains(clp, comp) && comp.get('copyable')) {\n added = coll.add(comp.clone(), { at });\n } else {\n added = coll.add(copyable.map(cop => cop.clone()), { at });\n }\n\n added = isArray(added) ? added : [added];\n added.forEach(add => ed.trigger('component:clone', add));\n });\n\n selected.emitUpdate();\n }\n }\n};\n","module.exports = {\n run(ed) {\n const em = ed.getModel();\n const models = [...ed.getSelectedAll()];\n\n if (models.length && !em.isEditing()) {\n em.set('clipboard', models);\n }\n }\n};\n","module.exports = {\n run(ed) {\n if (!ed.Canvas.hasFocus() || ed.getModel().isEditing()) return;\n const toSelect = [];\n\n ed.getSelectedAll().forEach(component => {\n const coll = component.collection;\n const at = coll.indexOf(component);\n const next = coll.at(at - 1);\n toSelect.push(next && at - 1 >= 0 ? next : component);\n });\n\n toSelect.length && ed.select(toSelect);\n }\n};\n","module.exports = {\n run(ed) {\n if (!ed.Canvas.hasFocus() || ed.getModel().isEditing()) return;\n const toSelect = [];\n\n ed.getSelectedAll().forEach(component => {\n const coll = component.collection;\n const at = coll.indexOf(component);\n const next = coll.at(at + 1);\n toSelect.push(next || component);\n });\n\n toSelect.length && ed.select(toSelect);\n }\n};\n","module.exports = {\n run(ed) {\n if (!ed.Canvas.hasFocus() || ed.getModel().isEditing()) return;\n const toSelect = [];\n\n ed.getSelectedAll().forEach(component => {\n const next = component.parent();\n next && toSelect.push(next);\n });\n\n toSelect.length && ed.select(toSelect);\n }\n};\n","module.exports = {\n run(ed) {\n if (!ed.Canvas.hasFocus() || ed.getModel().isEditing()) return;\n const toSelect = [];\n\n ed.getSelectedAll().forEach(component => {\n const coll = component.components();\n const next = coll && coll.at(0);\n next && toSelect.push(next);\n });\n\n toSelect.length && ed.select(toSelect);\n }\n};\n","import { isArray } from 'underscore';\n\nmodule.exports = {\n run(ed, sender, opts = {}) {\n if (!ed.Canvas.hasFocus() || ed.getModel().isEditing()) return;\n let components = opts.component || ed.getSelectedAll();\n components = isArray(components) ? [...components] : [components];\n\n // It's important to deselect components first otherwise,\n // with undo, the component will be set with the wrong `collection`\n ed.select(null);\n\n components.forEach(component => {\n if (!component || !component.get('removable')) {\n console.warn('The element is not removable', component);\n return;\n }\n if (component) {\n const coll = component.collection;\n coll && coll.remove(component);\n }\n });\n\n return components;\n }\n};\n","module.exports = {\n run(ed) {\n ed.DomComponents.clear();\n ed.CssComposer.clear();\n }\n};\n","import { isUndefined, isString } from 'underscore';\nimport { getModel } from 'utils/mixins';\nimport Backbone from 'backbone';\nconst ComponentView = require('dom_components/view/ComponentView');\nconst inputProp = 'contentEditable';\nconst $ = Backbone.$;\nlet ItemsView;\n\nmodule.exports = Backbone.View.extend({\n events: {\n 'mousedown [data-toggle-move]': 'startSort',\n 'click [data-toggle-visible]': 'toggleVisibility',\n 'click [data-toggle-select]': 'handleSelect',\n 'mouseover [data-toggle-select]': 'handleHover',\n 'click [data-toggle-open]': 'toggleOpening',\n 'dblclick [data-name]': 'handleEdit',\n 'focusout [data-name]': 'handleEditEnd'\n },\n\n template(model) {\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const hidable = this.config.hidable;\n const count = this.countChildren(model);\n const addClass = !count ? this.clsNoChild : '';\n const clsTitle = `${this.clsTitle} ${addClass}`;\n const clsTitleC = `${this.clsTitleC} ${ppfx}one-bg`;\n const clsCaret = `${this.clsCaret} fa fa-chevron-right`;\n const clsInput = `${this.inputNameCls} ${ppfx}no-app`;\n const level = this.level + 1;\n const gut = `${30 + level * 10}px`;\n const name = model.getName();\n\n return `\n ${\n hidable\n ? ``\n : ''\n }\n
\n
\n
\n \n ${model.getIcon()}\n ${name}\n
\n
\n
\n
${count || ''}
\n
\n \n
\n
`;\n },\n\n initialize(o = {}) {\n this.opt = o;\n this.level = o.level;\n this.config = o.config;\n this.em = o.config.em;\n this.ppfx = this.em.get('Config').stylePrefix;\n this.sorter = o.sorter || '';\n this.pfx = this.config.stylePrefix;\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const model = this.model;\n const components = model.get('components');\n model.set('open', false);\n this.listenTo(components, 'remove add change reset', this.checkChildren);\n this.listenTo(model, 'change:status', this.updateStatus);\n this.listenTo(model, 'change:open', this.updateOpening);\n this.listenTo(model, 'change:style:display', this.updateVisibility);\n this.className = `${pfx}layer no-select ${ppfx}two-color`;\n this.inputNameCls = `${ppfx}layer-name`;\n this.clsTitleC = `${pfx}layer-title-c`;\n this.clsTitle = `${pfx}layer-title`;\n this.clsCaret = `${pfx}layer-caret`;\n this.clsCount = `${pfx}layer-count`;\n this.clsMove = `${pfx}layer-move`;\n this.clsChildren = `${pfx}layer-children`;\n this.clsNoChild = `${pfx}layer-no-chld`;\n this.$el.data('model', model);\n this.$el.data('collection', components);\n model.viewLayer = this;\n },\n\n getVisibilityEl() {\n if (!this.eyeEl) {\n this.eyeEl = this.$el.children(`.${this.pfx}layer-vis`);\n }\n\n return this.eyeEl;\n },\n\n updateVisibility() {\n const pfx = this.pfx;\n const model = this.model;\n const hClass = `${pfx}layer-hidden`;\n const hideIcon = 'fa-eye-slash';\n const hidden = model.getStyle().display == 'none';\n const method = hidden ? 'addClass' : 'removeClass';\n this.$el[method](hClass);\n this.getVisibilityEl()[method](hideIcon);\n },\n\n /**\n * Toggle visibility\n * @param\tEvent\n *\n * @return \tvoid\n * */\n toggleVisibility(e) {\n e && e.stopPropagation();\n const model = this.model;\n const style = model.getStyle();\n const hidden = style.display == 'none';\n\n if (hidden) {\n delete style.display;\n } else {\n style.display = 'none';\n }\n\n model.setStyle(style);\n },\n\n /**\n * Handle the edit of the component name\n */\n handleEdit(e) {\n e && e.stopPropagation();\n const inputEl = this.getInputName();\n inputEl[inputProp] = true;\n inputEl.focus();\n },\n\n /**\n * Handle with the end of editing of the component name\n */\n handleEditEnd(e) {\n e && e.stopPropagation();\n const inputEl = this.getInputName();\n const name = inputEl.textContent;\n inputEl[inputProp] = false;\n this.model.set({ name });\n },\n\n /**\n * Get the input containing the name of the component\n * @return {HTMLElement}\n */\n getInputName() {\n if (!this.inputName) {\n this.inputName = this.el.querySelector(`.${this.inputNameCls}`);\n }\n return this.inputName;\n },\n\n /**\n * Update item opening\n *\n * @return void\n * */\n updateOpening() {\n var opened = this.opt.opened || {};\n var model = this.model;\n const chvDown = 'fa-chevron-down';\n\n if (model.get('open')) {\n this.$el.addClass('open');\n this.getCaret().addClass(chvDown);\n opened[model.cid] = model;\n } else {\n this.$el.removeClass('open');\n this.getCaret().removeClass(chvDown);\n delete opened[model.cid];\n }\n },\n\n /**\n * Toggle item opening\n * @param {Object}\te\n *\n * @return void\n * */\n toggleOpening(e) {\n e.stopPropagation();\n\n if (!this.model.get('components').length) return;\n\n this.model.set('open', !this.model.get('open'));\n },\n\n /**\n * Handle component selection\n */\n handleSelect(e) {\n e.stopPropagation();\n const { em, config } = this;\n\n if (em) {\n const model = this.model;\n em.setSelected(model, { fromLayers: 1 });\n const scroll = config.scrollCanvas;\n scroll && em.get('Canvas').scrollTo(model, scroll);\n }\n },\n\n /**\n * Handle component selection\n */\n handleHover(e) {\n e.stopPropagation();\n const { em, config, model } = this;\n em && config.showHover && em.setHovered(model, { fromLayers: 1 });\n },\n\n /**\n * Delegate to sorter\n * @param\tEvent\n * */\n startSort(e) {\n e.stopPropagation();\n const sorter = this.sorter;\n // Right or middel click\n if (e.button !== 0) return;\n sorter && sorter.startSort(e.target);\n },\n\n /**\n * Freeze item\n * @return\tvoid\n * */\n freeze() {\n this.$el.addClass(this.pfx + 'opac50');\n this.model.set('open', 0);\n },\n\n /**\n * Unfreeze item\n * @return\tvoid\n * */\n unfreeze() {\n this.$el.removeClass(this.pfx + 'opac50');\n },\n\n /**\n * Update item on status change\n * @param\tEvent\n * */\n updateStatus(e) {\n ComponentView.prototype.updateStatus.apply(this, [\n {\n avoidHover: !this.config.highlightHover\n }\n ]);\n },\n\n /**\n * Check if component is visible\n *\n * @return bool\n * */\n isVisible() {\n var css = this.model.get('style'),\n pr = css.display;\n if (pr && pr == 'none') return;\n return 1;\n },\n\n /**\n * Update item aspect after children changes\n *\n * @return void\n * */\n checkChildren() {\n const model = this.model;\n const c = this.countChildren(model);\n const pfx = this.pfx;\n const noChildCls = this.clsNoChild;\n const title = this.$el\n .children(`.${this.clsTitleC}`)\n .children(`.${this.clsTitle}`);\n\n if (!this.cnt) {\n this.cnt = this.$el.children(`.${this.clsCount}`);\n }\n\n if (c) {\n title.removeClass(noChildCls);\n this.cnt.html(c);\n } else {\n title.addClass(noChildCls);\n this.cnt.empty();\n model.set('open', 0);\n }\n },\n\n /**\n * Count children inside model\n * @param {Object} model\n * @return {number}\n * @private\n */\n countChildren(model) {\n var count = 0;\n model.get('components').each(function(m) {\n var isCountable = this.opt.isCountable;\n var hide = this.config.hideTextnode;\n if (isCountable && !isCountable(m, hide)) return;\n count++;\n }, this);\n return count;\n },\n\n getCaret() {\n if (!this.caret || !this.caret.length) {\n const pfx = this.pfx;\n this.caret = this.$el\n .children(`.${this.clsTitleC}`)\n .find(`.${this.clsCaret}`);\n }\n\n return this.caret;\n },\n\n setRoot(el) {\n el = isString(el) ? this.em.getWrapper().find(el)[0] : el;\n const model = getModel(el, $);\n if (!model) return;\n this.stopListening();\n this.model = model;\n this.initialize(this.opt);\n this.render();\n },\n\n render() {\n const model = this.model;\n var pfx = this.pfx;\n var vis = this.isVisible();\n const el = this.$el.empty();\n const level = this.level + 1;\n\n if (isUndefined(ItemsView)) {\n ItemsView = require('./ItemsView');\n }\n\n const children = new ItemsView({\n collection: model.get('components'),\n config: this.config,\n sorter: this.sorter,\n opened: this.opt.opened,\n parent: model,\n level\n }).render().$el;\n\n if (!this.config.showWrapper && level === 1) {\n el.append(children);\n } else {\n el.html(this.template(model));\n el.find(`.${this.clsChildren}`).append(children);\n }\n\n if (!model.get('draggable') || !this.config.sortable) {\n el.children(`.${this.clsMove}`).remove();\n }\n\n !vis && (this.className += ` ${pfx}hide`);\n el.attr('class', this.className);\n this.updateOpening();\n this.updateStatus();\n this.updateVisibility();\n return this;\n }\n});\n","import defaults from './config/config';\nimport ItemView from './view/ItemView';\nimport { isElement } from 'underscore';\n\nmodule.exports = () => {\n let em;\n let layers;\n let config = {};\n\n return {\n name: 'LayerManager',\n\n init(opts = {}) {\n config = { ...defaults, ...opts };\n config.stylePrefix = opts.pStylePrefix;\n em = config.em;\n\n return this;\n },\n\n getConfig() {\n return config;\n },\n\n onLoad() {\n layers = new ItemView({\n level: 0,\n config,\n opened: config.opened || {},\n model: em.get('DomComponents').getWrapper()\n });\n em && em.on('component:selected', this.componentChanged);\n this.componentChanged();\n },\n\n postRender() {\n const elTo = config.appendTo;\n const root = config.root;\n root && this.setRoot(root);\n\n if (elTo) {\n const el = isElement(elTo) ? elTo : document.querySelector(elTo);\n el.appendChild(this.render());\n }\n },\n\n /**\n * Set new root for layers\n * @param {HTMLElement|Component|String} el Component to be set as the root\n * @return {self}\n */\n setRoot(el) {\n layers.setRoot(el);\n return this;\n },\n\n /**\n * Get the root of layers\n * @return {Component}\n */\n getRoot() {\n return layers.model;\n },\n\n /**\n * Return the view of layers\n * @return {View}\n */\n getAll() {\n return layers;\n },\n\n /**\n * Triggered when the selected component is changed\n * @private\n */\n componentChanged(selected, opts = {}) {\n if (opts.fromLayers) return;\n const opened = em.get('opened');\n const model = em.getSelected();\n const scroll = config.scrollLayers;\n let parent = model && model.collection ? model.collection.parent : null;\n for (let cid in opened) opened[cid].set('open', 0);\n\n while (parent) {\n parent.set('open', 1);\n opened[parent.cid] = parent;\n parent = parent.collection ? parent.collection.parent : null;\n }\n\n if (model && scroll) {\n const el = model.viewLayer && model.viewLayer.el;\n el && el.scrollIntoView(scroll);\n }\n },\n\n render() {\n return layers.render().el;\n }\n };\n};\n","import { on, off } from 'utils/mixins';\n\nconst ComponentView = require('./ComponentView');\n\nmodule.exports = ComponentView.extend({\n events: {\n dblclick: 'enableEditing',\n input: 'onInput'\n },\n\n initialize(o) {\n ComponentView.prototype.initialize.apply(this, arguments);\n this.disableEditing = this.disableEditing.bind(this);\n const model = this.model;\n const em = this.em;\n this.listenTo(model, 'focus active', this.enableEditing);\n this.listenTo(model, 'change:content', this.updateContent);\n this.rte = em && em.get('RichTextEditor');\n },\n\n /**\n * Enable element content editing\n * @private\n * */\n enableEditing(e) {\n e && e.stopPropagation && e.stopPropagation();\n const rte = this.rte;\n\n if (this.rteEnabled || !this.model.get('editable')) {\n return;\n }\n\n if (rte) {\n try {\n this.activeRte = rte.enable(this, this.activeRte);\n } catch (err) {\n console.error(err);\n }\n }\n\n this.rteEnabled = 1;\n this.toggleEvents(1);\n },\n\n /**\n * Disable element content editing\n * @private\n * */\n disableEditing() {\n const model = this.model;\n const editable = model.get('editable');\n const rte = this.rte;\n\n if (rte && editable) {\n try {\n rte.disable(this, this.activeRte);\n } catch (err) {\n console.error(err);\n }\n\n const content = this.getChildrenContainer().innerHTML;\n const comps = model.get('components');\n comps.length && comps.reset();\n model.set('content', '');\n\n // If there is a custom RTE the content is just baked staticly\n // inside 'content'\n if (rte.customRte) {\n // Avoid double content by removing its children components\n // and force to trigger change\n model.set('content', content);\n } else {\n const clean = model => {\n model.set({\n editable: 0,\n highlightable: 0,\n removable: 0,\n draggable: 0,\n copyable: 0,\n toolbar: ''\n });\n model.get('components').each(model => clean(model));\n };\n\n // Avoid re-render on reset with silent option\n model.trigger('change:content', model);\n comps.add(content);\n comps.each(model => clean(model));\n comps.trigger('resetNavigator');\n }\n }\n\n this.rteEnabled = 0;\n this.toggleEvents();\n },\n\n /**\n * Callback on input event\n * @param {Event} e\n */\n onInput(e) {\n const { em } = this;\n\n // Update toolbars\n em && em.trigger('change:canvasOffset');\n },\n\n /**\n * Isolate disable propagation method\n * @param {Event}\n * @private\n * */\n disablePropagation(e) {\n e.stopPropagation();\n },\n\n /**\n * Enable/Disable events\n * @param {Boolean} enable\n */\n toggleEvents(enable) {\n var method = enable ? 'on' : 'off';\n const mixins = { on, off };\n this.em.setEditing(enable);\n\n // The ownerDocument is from the frame\n var elDocs = [this.el.ownerDocument, document];\n mixins.off(elDocs, 'mousedown', this.disableEditing);\n mixins[method](elDocs, 'mousedown', this.disableEditing);\n\n // Avoid closing edit mode on component click\n this.$el.off('mousedown', this.disablePropagation);\n this.$el[method]('mousedown', this.disablePropagation);\n }\n});\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentTextView');\n\nmodule.exports = ComponentView.extend({\n render(...args) {\n ComponentView.prototype.render.apply(this, args);\n\n // I need capturing instead of bubbling as bubbled clicks from other\n // children will execute the link event\n this.el.addEventListener('click', this.prevDef, true);\n\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport { isUndefined } from 'underscore';\n\nmodule.exports = Backbone.View.extend({\n initialize(o) {\n this.opts = o || {};\n this.config = o.config || {};\n const coll = this.collection;\n this.listenTo(coll, 'add', this.addTo);\n this.listenTo(coll, 'reset', this.resetChildren);\n this.listenTo(coll, 'remove', this.removeChildren);\n },\n\n removeChildren(removed) {\n const em = this.config.em;\n const view = removed.view;\n if (!view) return;\n view.remove.apply(view);\n const children = view.childrenView;\n children && children.stopListening();\n em && em.trigger('component:remove', removed);\n },\n\n /**\n * Add to collection\n * @param {Model} model\n * @param {Collection} coll\n * @param {Object} opts\n * @private\n * */\n addTo(model, coll = {}, opts = {}) {\n const em = this.config.em;\n const i = this.collection.indexOf(model);\n this.addToCollection(model, null, i);\n\n if (em && !opts.temporary) {\n em.trigger('component:add', model);\n }\n },\n\n /**\n * Add new object to collection\n * @param {Object} Model\n * @param {Object} Fragment collection\n * @param {Integer} Index of append\n *\n * @return {Object} Object rendered\n * @private\n * */\n addToCollection(model, fragmentEl, index) {\n if (!this.compView) this.compView = require('./ComponentView');\n var fragment = fragmentEl || null,\n viewObject = this.compView;\n\n var dt = this.opts.componentTypes;\n\n var type = model.get('type');\n\n for (var it = 0; it < dt.length; it++) {\n var dtId = dt[it].id;\n if (dtId == type) {\n viewObject = dt[it].view;\n break;\n }\n }\n //viewObject = dt[type] ? dt[type].view : dt.default.view;\n\n var view = new viewObject({\n model,\n config: this.config,\n componentTypes: dt\n });\n var rendered = view.render().el;\n if (view.model.get('type') == 'textnode')\n rendered = document.createTextNode(view.model.get('content'));\n\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n const parent = this.parentEl;\n const children = parent.childNodes;\n\n if (!isUndefined(index)) {\n const lastIndex = children.length == index;\n\n // If the added model is the last of collection\n // need to change the logic of append\n if (lastIndex) {\n index--;\n }\n\n // In case the added is new in the collection index will be -1\n if (lastIndex || !children.length) {\n parent.appendChild(rendered);\n } else {\n parent.insertBefore(rendered, children[index]);\n }\n } else {\n parent.appendChild(rendered);\n }\n }\n\n return rendered;\n },\n\n resetChildren() {\n this.parentEl.innerHTML = '';\n this.collection.each(model => this.addToCollection(model));\n },\n\n render(parent) {\n const el = this.el;\n const frag = document.createDocumentFragment();\n this.parentEl = parent || this.el;\n this.collection.each(model => this.addToCollection(model, frag));\n el.innerHTML = '';\n el.appendChild(frag);\n return this;\n }\n});\n","import { isEmpty } from 'underscore';\n\nconst Backbone = require('backbone');\n\nmodule.exports = Backbone.Collection.extend({\n initialize(models, opt = {}) {\n this.listenTo(this, 'add', this.onAdd);\n this.config = opt.config;\n this.em = opt.em;\n\n this.model = (attrs, options) => {\n var model;\n var df = opt.componentTypes;\n options.em = opt.em;\n options.config = opt.config;\n options.componentTypes = df;\n\n for (var it = 0; it < df.length; it++) {\n var dfId = df[it].id;\n if (dfId == attrs.type) {\n model = df[it].model;\n break;\n }\n }\n\n if (!model) {\n // get the last one\n model = df[df.length - 1].model;\n }\n\n return new model(attrs, options);\n };\n },\n\n add(models, opt = {}) {\n if (typeof models === 'string') {\n const cssc = this.em.get('CssComposer');\n const parsed = this.em.get('Parser').parseHtml(models);\n models = parsed.html;\n\n if (parsed.css && cssc) {\n const { avoidUpdateStyle } = opt;\n const added = cssc.addCollection(parsed.css, {\n extend: 1,\n avoidUpdateStyle\n });\n }\n }\n\n return Backbone.Collection.prototype.add.apply(this, [models, opt]);\n },\n\n onAdd(model, c, opts) {\n const em = this.em;\n const style = model.getStyle();\n const avoidInline = em && em.getConfig('avoidInlineStyle');\n\n if (\n !isEmpty(style) &&\n !avoidInline &&\n em &&\n em.get &&\n em.getConfig('forceClass')\n ) {\n const name = model.cid;\n const rule = em.get('CssComposer').setClassRule(name, style);\n model.setStyle({});\n model.addClass(name);\n }\n }\n});\n","var Backbone = require('backbone');\n\nmodule.exports = Backbone.View.extend({\n // Default view\n itemView: '',\n\n // Defines the View per type\n itemsView: '',\n\n itemType: 'type',\n\n initialize(opts, config) {\n this.config = config || {};\n },\n\n /**\n * Add new model to the collection\n * @param {Model} model\n * @private\n * */\n addTo(model) {\n this.add(model);\n },\n\n /**\n * Render new model inside the view\n * @param {Model} model\n * @param {Object} fragment Fragment collection\n * @private\n * */\n add(model, fragment) {\n var frag = fragment || null;\n var itemView = this.itemView;\n var typeField = model.get(this.itemType);\n if (this.itemsView && this.itemsView[typeField]) {\n itemView = this.itemsView[typeField];\n }\n var view = new itemView(\n {\n model,\n config: this.config\n },\n this.config\n );\n var rendered = view.render().el;\n\n if (frag) frag.appendChild(rendered);\n else this.$el.append(rendered);\n },\n\n render() {\n var frag = document.createDocumentFragment();\n this.$el.empty();\n\n if (this.collection.length)\n this.collection.each(function(model) {\n this.add(model, frag);\n }, this);\n\n this.$el.append(frag);\n return this;\n }\n});\n","module.exports = require('backbone').View.extend({\n tagName: 'style',\n\n initialize(o = {}) {\n this.config = o.config || {};\n const model = this.model;\n const toTrack = 'change:style change:state change:mediaText';\n this.listenTo(model, toTrack, this.render);\n this.listenTo(model, 'destroy remove', this.remove);\n this.listenTo(model.get('selectors'), 'change', this.render);\n },\n\n render() {\n const model = this.model;\n const important = model.get('important');\n this.el.innerHTML = this.model.toCSS({ important });\n return this;\n }\n});\n","import { isString, isArray, keys } from 'underscore';\nimport { shallowDiff } from 'utils/mixins';\nimport ParserHtml from 'parser/model/ParserHtml';\n\nconst parseStyle = ParserHtml().parseStyle;\nexport default {\n parseStyle,\n\n /**\n * To trigger the style change event on models I have to\n * pass a new object instance\n * @param {Object} prop\n * @return {Object}\n */\n extendStyle(prop) {\n return { ...this.getStyle(), ...prop };\n },\n\n /**\n * Get style object\n * @return {Object}\n */\n getStyle() {\n return { ...this.get('style') };\n },\n\n /**\n * Set new style object\n * @param {Object|string} prop\n * @param {Object} opts\n * @return {Object} Applied properties\n */\n setStyle(prop = {}, opts = {}) {\n if (isString(prop)) {\n prop = parseStyle(prop);\n }\n\n const propOrig = this.getStyle();\n const propNew = { ...prop };\n this.set('style', propNew, opts);\n const diff = shallowDiff(propOrig, propNew);\n keys(diff).forEach(pr => {\n const em = this.em;\n this.trigger(`change:style:${pr}`);\n if (em) {\n em.trigger(`styleable:change`, this, pr);\n em.trigger(`styleable:change:${pr}`, this, pr);\n }\n });\n\n return propNew;\n },\n\n /**\n * Add style property\n * @param {Object|string} prop\n * @param {string} value\n * @example\n * this.addStyle({color: 'red'});\n * this.addStyle('color', 'blue');\n */\n addStyle(prop, value = '', opts = {}) {\n if (typeof prop == 'string') {\n prop = {\n prop: value\n };\n } else {\n opts = value || {};\n }\n\n prop = this.extendStyle(prop);\n this.setStyle(prop, opts);\n },\n\n /**\n * Remove style property\n * @param {string} prop\n */\n removeStyle(prop) {\n let style = this.getStyle();\n delete style[prop];\n this.setStyle(style);\n },\n\n /**\n * Returns string of style properties\n * @param {Object} [opts={}] Options\n * @return {String}\n */\n styleToString(opts = {}) {\n const result = [];\n const style = this.getStyle();\n\n for (let prop in style) {\n const imp = opts.important;\n const important = isArray(imp) ? imp.indexOf(prop) >= 0 : imp;\n const value = `${style[prop]}${important ? ' !important' : ''}`;\n value && result.push(`${prop}:${value};`);\n }\n\n return result.join('');\n }\n};\n","import _ from 'underscore';\nimport Backbone from 'backbone';\nimport Styleable from 'domain_abstract/model/Styleable';\nimport { isEmpty, forEach } from 'underscore';\n\nvar Selectors = require('selector_manager/model/Selectors');\n\nmodule.exports = Backbone.Model.extend(Styleable).extend({\n defaults: {\n // Css selectors\n selectors: {},\n\n // Additional string css selectors\n selectorsAdd: '',\n\n // Css properties style\n style: {},\n\n // On which device width this rule should be rendered, eg. @media (max-width: 1000px)\n mediaText: '',\n\n // State of the rule, eg: hover | pressed | focused\n state: '',\n\n // Indicates if the rule is stylable\n stylable: true,\n\n // Type of at-rule, eg. 'media', 'font-face', etc.\n atRuleType: '',\n\n // This particolar property is used only on at-rules, like 'page' or\n // 'font-face', where the block containes only style declarations\n singleAtRule: 0,\n\n // If true, sets '!important' on all properties\n // You can use an array to specify properties to set important\n // Used in view\n important: 0\n },\n\n initialize(c, opt = {}) {\n this.config = c || {};\n const em = opt.em;\n let selectors = this.config.selectors || [];\n this.em = em;\n\n if (em) {\n const sm = em.get('SelectorManager');\n const slct = [];\n selectors.forEach(selector => {\n slct.push(sm.add(selector));\n });\n selectors = slct;\n }\n\n this.set('selectors', new Selectors(selectors));\n },\n\n /**\n * Returns an at-rule statement if possible, eg. '@media (...)', '@keyframes'\n * @return {string}\n */\n getAtRule() {\n const type = this.get('atRuleType');\n const condition = this.get('mediaText');\n // Avoid breaks with the last condition\n const typeStr = type ? `@${type}` : condition ? '@media' : '';\n\n return typeStr + (condition && typeStr ? ` ${condition}` : '');\n },\n\n /**\n * Return selectors fo the rule as a string\n * @return {string}\n */\n selectorsToString(opts = {}) {\n const result = [];\n const state = this.get('state');\n const addSelector = this.get('selectorsAdd');\n const selectors = this.get('selectors').getFullString();\n const stateStr = state ? `:${state}` : '';\n selectors && result.push(`${selectors}${stateStr}`);\n addSelector && !opts.skipAdd && result.push(addSelector);\n return result.join(', ');\n },\n\n /**\n * Get declaration block\n * @param {Object} [opts={}] Options\n * @return {string}\n */\n getDeclaration(opts = {}) {\n let result = '';\n const selectors = this.selectorsToString();\n const style = this.styleToString(opts);\n const singleAtRule = this.get('singleAtRule');\n\n if ((selectors || singleAtRule) && style) {\n result = singleAtRule ? style : `${selectors}{${style}}`;\n }\n\n return result;\n },\n\n /**\n * Returns CSS string of the rule\n * @param {Object} [opts={}] Options\n * @return {string}\n */\n toCSS(opts = {}) {\n let result = '';\n const atRule = this.getAtRule();\n const block = this.getDeclaration(opts);\n block && (result = block);\n\n if (atRule && result) {\n result = `${atRule}{${result}}`;\n }\n\n return result;\n },\n\n toJSON(...args) {\n const obj = Backbone.Model.prototype.toJSON.apply(this, args);\n\n if (this.em.getConfig('avoidDefaults')) {\n const defaults = this.defaults;\n\n forEach(defaults, (value, key) => {\n if (obj[key] === value) {\n delete obj[key];\n }\n });\n\n if (isEmpty(obj.selectors)) delete obj.selectors;\n if (isEmpty(obj.style)) delete obj.style;\n }\n\n return obj;\n },\n\n /**\n * Compare the actual model with parameters\n * @param {Object} selectors Collection of selectors\n * @param {String} state Css rule state\n * @param {String} width For which device this style is oriented\n * @param {Object} ruleProps Other rule props\n * @return {Boolean}\n * @private\n */\n compare(selectors, state, width, ruleProps = {}) {\n var st = state || '';\n var wd = width || '';\n var selectorsAdd = ruleProps.selectorsAdd || '';\n var atRuleType = ruleProps.atRuleType || '';\n var cId = 'cid';\n //var a1 = _.pluck(selectors.models || selectors, cId);\n //var a2 = _.pluck(this.get('selectors').models, cId);\n if (!(selectors instanceof Array) && !selectors.models)\n selectors = [selectors];\n var a1 = _.map(selectors.models || selectors, model => model.get('name'));\n var a2 = _.map(this.get('selectors').models, model => model.get('name'));\n var f = false;\n\n if (a1.length !== a2.length) return f;\n\n for (var i = 0; i < a1.length; i++) {\n var re = 0;\n for (var j = 0; j < a2.length; j++) {\n if (a1[i] === a2[j]) re = 1;\n }\n if (re === 0) return f;\n }\n\n if (\n this.get('state') !== st ||\n this.get('mediaText') !== wd ||\n this.get('selectorsAdd') !== selectorsAdd ||\n this.get('atRuleType') !== atRuleType\n ) {\n return f;\n }\n\n return true;\n }\n});\n","import _ from 'underscore';\nimport Backbone from 'backbone';\nimport fetch from 'utils/fetch';\n\nmodule.exports = Backbone.View.extend(\n {\n template: _.template(`\n
\n
title\"><%= title %>
\n \" name=\"file\" accept=\"*/*\" <%= disabled ? 'disabled' : '' %> multiple/>\n
\n
\n `),\n\n events: {},\n\n initialize(opts = {}) {\n this.options = opts;\n const c = opts.config || {};\n this.config = c;\n this.pfx = c.stylePrefix || '';\n this.ppfx = c.pStylePrefix || '';\n this.target = this.options.globalCollection || {};\n this.uploadId = this.pfx + 'uploadFile';\n this.disabled =\n c.disableUpload !== undefined\n ? c.disableUpload\n : !c.upload && !c.embedAsBase64;\n this.events['change #' + this.uploadId] = 'uploadFile';\n let uploadFile = c.uploadFile;\n\n if (uploadFile) {\n this.uploadFile = uploadFile.bind(this);\n } else if (c.embedAsBase64) {\n this.uploadFile = this.constructor.embedAsBase64;\n }\n\n this.delegateEvents();\n },\n\n /**\n * Triggered before the upload is started\n * @private\n */\n onUploadStart() {\n const em = this.config.em;\n em && em.trigger('asset:upload:start');\n },\n\n /**\n * Triggered after the upload is ended\n * @param {Object|string} res End result\n * @private\n */\n onUploadEnd(res) {\n const em = this.config.em;\n em && em.trigger('asset:upload:end', res);\n },\n\n /**\n * Triggered on upload error\n * @param {Object} err Error\n * @private\n */\n onUploadError(err) {\n const em = this.config.em;\n console.error(err);\n this.onUploadEnd(err);\n em && em.trigger('asset:upload:error', err);\n },\n\n /**\n * Triggered on upload response\n * @param {string} text Response text\n * @private\n */\n onUploadResponse(text, clb) {\n const em = this.config.em;\n const config = this.config;\n const target = this.target;\n const json = typeof text === 'string' ? JSON.parse(text) : text;\n em && em.trigger('asset:upload:response', json);\n\n if (config.autoAdd && target) {\n target.add(json.data, { at: 0 });\n }\n\n this.onUploadEnd(text);\n clb && clb(json);\n },\n\n /**\n * Upload files\n * @param {Object} e Event\n * @return {Promise}\n * @private\n * */\n uploadFile(e, clb) {\n const files = e.dataTransfer ? e.dataTransfer.files : e.target.files;\n const body = new FormData();\n const config = this.config;\n const params = config.params;\n\n for (let i = 0; i < files.length; i++) {\n body.append(`${config.uploadName}[]`, files[i]);\n }\n\n for (let param in params) {\n body.append(param, params[param]);\n }\n\n var target = this.target;\n const url = config.upload;\n const headers = config.headers;\n const reqHead = 'X-Requested-With';\n\n if (typeof headers[reqHead] == 'undefined') {\n headers[reqHead] = 'XMLHttpRequest';\n }\n\n if (url) {\n this.onUploadStart();\n return fetch(url, {\n method: 'post',\n credentials: 'include',\n headers,\n body\n })\n .then(\n res =>\n ((res.status / 200) | 0) == 1\n ? res.text()\n : res.text().then(text => Promise.reject(text))\n )\n .then(text => this.onUploadResponse(text, clb))\n .catch(err => this.onUploadError(err));\n }\n },\n\n /**\n * Make input file droppable\n * @private\n * */\n initDrop() {\n var that = this;\n if (!this.uploadForm) {\n this.uploadForm = this.$el.find('form').get(0);\n if ('draggable' in this.uploadForm) {\n var uploadFile = this.uploadFile;\n this.uploadForm.ondragover = function() {\n this.className = that.pfx + 'hover';\n return false;\n };\n this.uploadForm.ondragleave = function() {\n this.className = '';\n return false;\n };\n this.uploadForm.ondrop = function(e) {\n this.className = '';\n e.preventDefault();\n that.uploadFile(e);\n return;\n };\n }\n }\n },\n\n initDropzone(ev) {\n let addedCls = 0;\n const c = this.config;\n const em = ev.model;\n const edEl = ev.el;\n const editor = em.get('Editor');\n const container = em.get('Config').el;\n const frameEl = em.get('Canvas').getBody();\n const ppfx = this.ppfx;\n const updatedCls = `${ppfx}dropzone-active`;\n const dropzoneCls = `${ppfx}dropzone`;\n const cleanEditorElCls = () => {\n edEl.className = edEl.className.replace(updatedCls, '').trim();\n addedCls = 0;\n };\n const onDragOver = () => {\n if (!addedCls) {\n edEl.className += ` ${updatedCls}`;\n addedCls = 1;\n }\n return false;\n };\n const onDragLeave = () => {\n cleanEditorElCls();\n return false;\n };\n const onDrop = e => {\n cleanEditorElCls();\n e.preventDefault();\n e.stopPropagation();\n this.uploadFile(e);\n\n if (c.openAssetsOnDrop && editor) {\n const target = editor.getSelected();\n editor.runCommand('open-assets', {\n target,\n onSelect() {\n editor.Modal.close();\n editor.AssetManager.setTarget(null);\n }\n });\n }\n\n return false;\n };\n\n ev.$el.append(`
${c.dropzoneContent}
`);\n cleanEditorElCls();\n\n if ('draggable' in edEl) {\n [edEl, frameEl].forEach(item => {\n item.ondragover = onDragOver;\n item.ondragleave = onDragLeave;\n item.ondrop = onDrop;\n });\n }\n },\n\n render() {\n this.$el.html(\n this.template({\n title: this.config.uploadText,\n uploadId: this.uploadId,\n disabled: this.disabled,\n pfx: this.pfx\n })\n );\n this.initDrop();\n this.$el.attr('class', this.pfx + 'file-uploader');\n return this;\n }\n },\n {\n embedAsBase64: function(e, clb) {\n // List files dropped\n const files = e.dataTransfer ? e.dataTransfer.files : e.target.files;\n const response = { data: [] };\n\n // Unlikely, widely supported now\n if (!FileReader) {\n this.onUploadError(\n new Error('Unsupported platform, FileReader is not defined')\n );\n return;\n }\n\n const promises = [];\n const mimeTypeMatcher = /^(.+)\\/(.+)$/;\n\n for (const file of files) {\n // For each file a reader (to read the base64 URL)\n // and a promise (to track and merge results and errors)\n const promise = new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.addEventListener('load', event => {\n let type;\n const name = file.name;\n\n // Try to find the MIME type of the file.\n const match = mimeTypeMatcher.exec(file.type);\n if (match) {\n type = match[1]; // The first part in the MIME, \"image\" in image/png\n } else {\n type = file.type;\n }\n\n /*\n // Show local video files, http://jsfiddle.net/dsbonev/cCCZ2/embedded/result,js,html,css/\n var URL = window.URL || window.webkitURL\n var file = this.files[0]\n var type = file.type\n var videoNode = document.createElement('video');\n var canPlay = videoNode.canPlayType(type) // can use also for 'audio' types\n if (canPlay === '') canPlay = 'no'\n var message = 'Can play type \"' + type + '\": ' + canPlay\n var isError = canPlay === 'no'\n displayMessage(message, isError)\n\n if (isError) {\n return\n }\n\n var fileURL = URL.createObjectURL(file)\n videoNode.src = fileURL\n */\n\n // If it's an image, try to find its size\n if (type === 'image') {\n const data = {\n src: reader.result,\n name,\n type,\n height: 0,\n width: 0\n };\n\n const image = new Image();\n image.addEventListener('error', error => {\n reject(error);\n });\n image.addEventListener('load', () => {\n data.height = image.height;\n data.width = image.width;\n resolve(data);\n });\n image.src = data.src;\n } else if (type) {\n // Not an image, but has a type\n resolve({\n src: reader.result,\n name,\n type\n });\n } else {\n // No type found, resolve with the URL only\n resolve(reader.result);\n }\n });\n reader.addEventListener('error', error => {\n reject(error);\n });\n reader.addEventListener('abort', error => {\n reject('Aborted');\n });\n\n reader.readAsDataURL(file);\n });\n\n promises.push(promise);\n }\n\n Promise.all(promises).then(\n data => {\n response.data = data;\n this.onUploadResponse(response, clb);\n },\n error => {\n this.onUploadError(error);\n }\n );\n }\n }\n);\n","import Backbone from 'backbone';\n\nmodule.exports = Backbone.View.extend({\n initialize(o = {}) {\n this.options = o;\n this.collection = o.collection;\n const config = o.config || {};\n this.config = config;\n this.pfx = config.stylePrefix || '';\n this.ppfx = config.pStylePrefix || '';\n this.em = config.em;\n this.className = this.pfx + 'asset';\n this.listenTo(this.model, 'destroy remove', this.remove);\n this.model.view = this;\n const init = this.init && this.init.bind(this);\n init && init(o);\n },\n\n template() {\n const pfx = this.pfx;\n return `\n
\n ${this.getPreview()}\n
\n
\n ${this.getInfo()}\n
\n
\n ⨯\n
\n `;\n },\n\n /**\n * Update target if exists\n * @param {Model} target\n * @private\n * */\n updateTarget(target) {\n if (target && target.set) {\n target.set('attributes', _.clone(target.get('attributes')));\n target.set('src', this.model.get('src'));\n }\n },\n\n getPreview() {\n return '';\n },\n\n getInfo() {\n return '';\n },\n\n render() {\n const el = this.el;\n el.innerHTML = this.template(this, this.model);\n el.className = this.className;\n return this;\n }\n});\n","module.exports = require('./AssetView').extend({\n events: {\n 'click [data-toggle=asset-remove]': 'onRemove',\n click: 'onClick',\n dblclick: 'onDblClick'\n },\n\n getPreview() {\n const pfx = this.pfx;\n const src = this.model.get('src');\n return `\n
\n
\n `;\n },\n\n getInfo() {\n const pfx = this.pfx;\n const model = this.model;\n let name = model.get('name');\n let width = model.get('width');\n let height = model.get('height');\n let unit = model.get('unitDim');\n let dim = width && height ? `${width}x${height}${unit}` : '';\n name = name || model.getFilename();\n return `\n
${name}
\n
${dim}
\n `;\n },\n\n init(o) {\n const pfx = this.pfx;\n this.className += ` ${pfx}asset-image`;\n },\n\n /**\n * Triggered when the asset is clicked\n * @private\n * */\n onClick() {\n var onClick = this.config.onClick;\n var model = this.model;\n this.collection.trigger('deselectAll');\n this.$el.addClass(this.pfx + 'highlight');\n\n if (typeof onClick === 'function') {\n onClick(model);\n } else {\n this.updateTarget(this.collection.target);\n }\n },\n\n /**\n * Triggered when the asset is double clicked\n * @private\n * */\n onDblClick() {\n const em = this.em;\n var onDblClick = this.config.onDblClick;\n var model = this.model;\n\n if (typeof onDblClick === 'function') {\n onDblClick(model);\n } else {\n this.updateTarget(this.collection.target);\n em && em.get('Modal').close();\n }\n\n var onSelect = this.collection.onSelect;\n if (typeof onSelect == 'function') {\n onSelect(this.model);\n }\n },\n\n /**\n * Remove asset from collection\n * @private\n * */\n onRemove(e) {\n e.stopImmediatePropagation();\n this.model.collection.remove(this.model);\n }\n});\n","import { isUndefined } from 'underscore';\n\nconst Property = require('./Property');\nconst InputNumber = require('domain_abstract/ui/InputNumber');\n\nmodule.exports = Property.extend({\n defaults: {\n ...Property.prototype.defaults,\n // Array of units, eg. ['px', '%']\n units: [],\n\n // Selected unit, eg. 'px'\n unit: '',\n\n // Integer value steps\n step: 1,\n\n // Minimum value\n min: '',\n\n // Maximum value\n max: ''\n },\n\n init() {\n const unit = this.get('unit');\n const units = this.get('units');\n this.input = new InputNumber({ model: this });\n\n if (units.length && !unit) {\n this.set('unit', units[0]);\n }\n },\n\n clearValue(opts = {}) {\n this.set({ value: undefined, unit: undefined }, opts);\n return this;\n },\n\n parseValue(val) {\n const parsed = Property.prototype.parseValue.apply(this, arguments);\n const { value, unit } = this.input.validateInputValue(parsed.value, {\n deepCheck: 1\n });\n parsed.value = value;\n parsed.unit = unit;\n return parsed;\n },\n\n getFullValue() {\n let value = this.get('value');\n let unit = this.get('unit');\n value = !isUndefined(value) ? value : '';\n unit = !isUndefined(unit) && value ? unit : '';\n value = `${value}${unit}`;\n return Property.prototype.getFullValue.apply(this, [value]);\n }\n});\n","const Property = require('./Property');\n\nmodule.exports = Property.extend({\n defaults: () => ({\n ...Property.prototype.defaults,\n // Array of options, eg. [{name: 'Label ', value: '100'}]\n options: []\n }),\n\n initialize(...args) {\n Property.prototype.initialize.apply(this, args);\n this.listenTo(this, 'change:options', this.onOptionChange);\n },\n\n onOptionChange() {\n this.set('list', this.get('options'));\n },\n\n getOptions() {\n const { options, list } = this.attributes;\n return options && options.length ? options : list;\n },\n\n setOptions(opts = []) {\n this.set('options', opts);\n return this;\n },\n\n addOption(opt) {\n if (opt) {\n const opts = this.getOptions();\n this.setOptions([...opts, opt]);\n }\n return this;\n }\n});\n","import Backbone from 'backbone';\nconst PropertyView = require('./PropertyView');\nconst $ = Backbone.$;\n\nmodule.exports = PropertyView.extend({\n templateInput() {\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const assetsLabel = this.config.assetsLabel || 'Images';\n return `\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n `;\n },\n\n init() {\n const em = this.em;\n this.modal = em.get('Modal');\n this.am = em.get('AssetManager');\n this.events['click #' + this.pfx + 'close'] = 'removeFile';\n this.events['click #' + this.pfx + 'images'] = 'openAssetManager';\n this.delegateEvents();\n },\n\n onRender() {\n if (!this.$input) {\n const plh = this.model.getDefaultValue();\n this.$input = $(``);\n }\n\n if (!this.$preview) {\n this.$preview = this.$el.find('#' + this.pfx + 'preview-file');\n }\n\n if (!this.$previewBox) {\n this.$previewBox = this.$el.find('#' + this.pfx + 'preview-box');\n }\n\n this.setValue(this.componentValue, 0);\n },\n\n setValue(value, f) {\n PropertyView.prototype.setValue.apply(this, arguments);\n this.setPreviewView(value && value != this.model.getDefaultValue());\n this.setPreview(value);\n },\n\n /**\n * Change visibility of the preview box\n * @param bool Visibility\n *\n * @return void\n * */\n setPreviewView(v) {\n const pv = this.$previewBox;\n pv && pv[v ? 'addClass' : 'removeClass'](`${this.pfx}show`);\n },\n\n /**\n * Spread url\n * @param string Url\n *\n * @return void\n * */\n spreadUrl(url) {\n this.model.set('value', url);\n this.setPreviewView(1);\n },\n\n /**\n * Shows file preview\n * @param string Value\n * */\n setPreview(value) {\n const preview = this.$preview;\n value = value && value.indexOf('url(') < 0 ? `url(${value})` : value;\n preview && preview.css('background-image', value);\n },\n\n /** @inheritdoc */\n cleanValue() {\n this.setPreviewView(0);\n this.model.set({ value: '' }, { silent: true });\n },\n\n /**\n * Remove file from input\n *\n * @return void\n * */\n removeFile(...args) {\n this.model.set('value', this.model.getDefaultValue());\n PropertyView.prototype.cleanValue.apply(this, args);\n this.setPreviewView(0);\n },\n\n /**\n * Open dialog for image selecting\n * @param {Object} e Event\n *\n * @return void\n * */\n openAssetManager(e) {\n var that = this;\n var em = this.em;\n var editor = em ? em.get('Editor') : '';\n\n if (editor) {\n this.modal.setTitle('Select image');\n this.modal.setContent(this.am.getContainer());\n this.am.setTarget(null);\n editor.runCommand('open-assets', {\n target: this.model,\n onSelect(target) {\n that.modal.close();\n that.spreadUrl(target.get('src'));\n }\n });\n }\n }\n});\n","import Backbone from 'backbone';\nimport { isUndefined } from 'underscore';\nimport ColorPicker from 'utils/ColorPicker';\n\nconst Input = require('./Input');\nconst $ = Backbone.$;\nColorPicker($);\n\nmodule.exports = Input.extend({\n template() {\n const ppfx = this.ppfx;\n return `\n
\n
\n
\n
\n
\n
\n `;\n },\n\n inputClass() {\n const ppfx = this.ppfx;\n return `${ppfx}field ${ppfx}field-color`;\n },\n\n holderClass() {\n return `${this.ppfx}input-holder`;\n },\n\n /**\n * Set value to the model\n * @param {string} val\n * @param {Object} opts\n */\n setValue(val, opts = {}) {\n const model = this.model;\n const def = model.get('defaults');\n const value = !isUndefined(val) ? val : !isUndefined(def) ? def : '';\n const inputEl = this.getInputEl();\n const colorEl = this.getColorEl();\n const valueClr = value != 'none' ? value : '';\n inputEl.value = value;\n colorEl.get(0).style.backgroundColor = valueClr;\n\n // This prevents from adding multiple thumbs in spectrum\n if (opts.fromTarget) {\n colorEl.spectrum('set', valueClr);\n this.noneColor = value == 'none';\n }\n },\n\n /**\n * Get the color input element\n * @return {HTMLElement}\n */\n getColorEl() {\n if (!this.colorEl) {\n const self = this;\n const ppfx = this.ppfx;\n var model = this.model;\n\n var colorEl = $(`
`);\n var cpStyle = colorEl.get(0).style;\n var elToAppend = this.em && this.em.config ? this.em.config.el : '';\n var colorPickerConfig =\n (this.em && this.em.getConfig && this.em.getConfig('colorPicker')) ||\n {};\n const getColor = color => {\n let cl =\n color.getAlpha() == 1 ? color.toHexString() : color.toRgbString();\n return cl.replace(/ /g, '');\n };\n\n let changed = 0;\n let previousColor;\n this.$el.find(`[data-colorp-c]`).append(colorEl);\n colorEl.spectrum({\n containerClassName: `${ppfx}one-bg ${ppfx}two-color`,\n appendTo: elToAppend || 'body',\n maxSelectionSize: 8,\n showPalette: true,\n showAlpha: true,\n chooseText: 'Ok',\n cancelText: '⨯',\n palette: [],\n\n // config expanded here so that the functions below are not overridden\n ...colorPickerConfig,\n\n move(color) {\n const cl = getColor(color);\n cpStyle.backgroundColor = cl;\n model.setValueFromInput(cl, 0);\n },\n change(color) {\n changed = 1;\n const cl = getColor(color);\n cpStyle.backgroundColor = cl;\n model.setValueFromInput(cl);\n self.noneColor = 0;\n },\n show(color) {\n changed = 0;\n previousColor = getColor(color);\n },\n hide(color) {\n if (!changed && previousColor) {\n if (self.noneColor) {\n previousColor = '';\n }\n cpStyle.backgroundColor = previousColor;\n colorEl.spectrum('set', previousColor);\n model.setValueFromInput(previousColor, 0);\n }\n }\n });\n\n this.colorEl = colorEl;\n }\n return this.colorEl;\n },\n\n render() {\n Input.prototype.render.call(this);\n // This will make the color input available on render\n this.getColorEl();\n return this;\n }\n});\n","const InputColor = require('domain_abstract/ui/InputColor');\n\nmodule.exports = require('./PropertyIntegerView').extend({\n setValue(value, opts = {}) {\n opts = { ...opts, silent: 1 };\n this.inputInst.setValue(value, opts);\n },\n\n onRender() {\n if (!this.input) {\n const ppfx = this.ppfx;\n const inputColor = new InputColor({\n target: this.target,\n model: this.model,\n ppfx\n });\n const input = inputColor.render();\n this.el.querySelector(`.${ppfx}fields`).appendChild(input.el);\n this.$input = input.inputEl;\n this.$color = input.colorEl;\n this.input = this.$input.get(0);\n this.inputInst = input;\n }\n }\n});\n","import Backbone from 'backbone';\nimport PropertyView from './PropertyView';\nconst $ = Backbone.$;\n\nmodule.exports = PropertyView.extend({\n templateInput() {\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n return `\n
\n \n
\n
\n
\n
\n `;\n },\n\n initialize(...args) {\n PropertyView.prototype.initialize.apply(this, args);\n this.listenTo(this.model, 'change:options', this.updateOptions);\n },\n\n updateOptions() {\n this.input = null;\n this.onRender();\n },\n\n onRender() {\n var pfx = this.pfx;\n const options = this.model.getOptions();\n\n if (!this.input) {\n let optionsStr = '';\n\n options.forEach(option => {\n let name = option.name || option.value;\n let style = option.style ? option.style.replace(/\"/g, '"') : '';\n let styleAttr = style ? `style=\"${style}\"` : '';\n let value = option.value.replace(/\"/g, '"');\n optionsStr += ``;\n });\n\n const inputH = this.el.querySelector(`#${pfx}input-holder`);\n inputH.innerHTML = ``;\n this.input = inputH.firstChild;\n }\n }\n});\n","module.exports = require('./PropertyView').extend({\n templateInput() {\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n return `\n
\n
\n `;\n },\n\n onRender() {\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const itemCls = `${ppfx}radio-item-label`;\n const model = this.model;\n const prop = model.get('property');\n const options = model.get('list') || model.get('options') || [];\n\n if (!this.input) {\n if (options && options.length) {\n let inputStr = '';\n\n options.forEach(el => {\n let cl = el.className ? `${el.className} ${pfx}icon ${itemCls}` : '';\n let id = `${prop}-${el.value}`;\n let labelTxt = el.name || el.value;\n let titleAttr = el.title ? `title=\"${el.title}\"` : '';\n inputStr += `\n
\n \n \n
\n `;\n });\n\n const inputHld = this.el.querySelector(`.${ppfx}field`);\n inputHld.innerHTML = `
${inputStr}
`;\n this.input = inputHld.firstChild;\n }\n }\n },\n\n getInputValue() {\n const inputChk = this.getCheckedEl();\n return inputChk ? inputChk.value : '';\n },\n\n getCheckedEl() {\n const input = this.getInputEl();\n return input ? input.querySelector('input:checked') : '';\n },\n\n setValue(value) {\n const model = this.model;\n let val = value || model.get('value') || model.getDefaultValue();\n const input = this.getInputEl();\n const inputIn = input ? input.querySelector(`[value=\"${val}\"]`) : '';\n\n if (inputIn) {\n inputIn.checked = true;\n } else {\n const inputChk = this.getCheckedEl();\n inputChk && (inputChk.checked = false);\n }\n }\n});\n","const Backbone = require('backbone');\nconst $ = Backbone.$;\n\nmodule.exports = Backbone.View.extend({\n events: {\n change: 'handleChange'\n },\n\n template() {\n return ``;\n },\n\n inputClass() {\n return `${this.ppfx}field`;\n },\n\n holderClass() {\n return `${this.ppfx}input-holder`;\n },\n\n initialize(opts = {}) {\n const ppfx = opts.ppfx || '';\n this.opts = opts;\n this.ppfx = ppfx;\n this.em = opts.target || {};\n this.listenTo(this.model, 'change:value', this.handleModelChange);\n },\n\n /**\n * Fired when the element of the property is updated\n */\n elementUpdated() {\n this.model.trigger('el:change');\n },\n\n /**\n * Set value to the input element\n * @param {string} value\n */\n setValue(value) {\n const model = this.model;\n let val = value || model.get('defaults');\n const input = this.getInputEl();\n input && (input.value = val);\n },\n\n /**\n * Updates the view when the model is changed\n * */\n handleModelChange(model, value, opts) {\n this.setValue(value, opts);\n },\n\n /**\n * Handled when the view is changed\n */\n handleChange(e) {\n e.stopPropagation();\n const value = this.getInputEl().value;\n this.model.set({ value }, { fromInput: 1 });\n this.elementUpdated();\n },\n\n /**\n * Get the input element\n * @return {HTMLElement}\n */\n getInputEl() {\n if (!this.inputEl) {\n const plh = this.model.get('defaults') || '';\n this.inputEl = $(``);\n }\n\n return this.inputEl.get(0);\n },\n\n render() {\n const el = this.$el;\n el.addClass(this.inputClass());\n el.html(this.template());\n el.find(`.${this.holderClass()}`).append(this.getInputEl());\n return this;\n }\n});\n","const PropertyCompositeView = require('./PropertyCompositeView');\nconst LayersView = require('./LayersView');\n\nmodule.exports = PropertyCompositeView.extend({\n templateInput() {\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n return `\n
\n \n
\n
\n `;\n },\n\n init() {\n const model = this.model;\n const pfx = this.pfx;\n model.set('stackIndex', null);\n this.events[`click [data-add-layer]`] = 'addLayer';\n this.listenTo(model, 'change:stackIndex', this.indexChanged);\n this.listenTo(model, 'updateValue', this.inputValueChanged);\n this.delegateEvents();\n },\n\n clear(e) {\n e && e.stopPropagation();\n this.model.get('layers').reset();\n this.model.clearValue();\n this.targetUpdated();\n },\n\n /**\n * Fired when the target is updated.\n * With detached mode the component will be always empty as its value\n * so we gonna check all props and find if it has any difference\n * */\n targetUpdated(...args) {\n if (!this.model.get('detached')) {\n PropertyCompositeView.prototype.targetUpdated.apply(this, args);\n } else {\n this.checkVisibility();\n }\n\n this.refreshLayers();\n },\n\n /**\n * Returns the collection of layers\n * @return {Collection}\n */\n getLayers() {\n return this.model.get('layers');\n },\n\n /**\n * Triggered when another layer has been selected.\n * This allow to move all rendered properties to a new\n * selected layer\n * @param {Event}\n *\n * @return {Object}\n * */\n indexChanged(e) {\n const model = this.model;\n this.getLayers().active(model.get('stackIndex'));\n },\n\n addLayer() {\n const model = this.model;\n const layers = this.getLayers();\n const properties = model.get('properties').deepClone();\n properties.each(property => property.set('value', ''));\n const layer = layers.add({ properties });\n\n // In detached mode inputValueChanged will add new 'layer value'\n // to all subprops\n this.inputValueChanged();\n\n // This will set subprops with a new default values\n model.set('stackIndex', layers.indexOf(layer));\n },\n\n inputValueChanged() {\n const model = this.model;\n this.elementUpdated();\n\n // If not detached I'll just put all the values from layers to property\n // eg. background: layer1Value, layer2Value, layer3Value, ...\n if (!model.get('detached')) {\n model.set('value', this.getLayerValues());\n } else {\n model.get('properties').each(prop => prop.trigger('change:value'));\n }\n },\n\n /**\n * There is no need to handle input update by the property itself,\n * this will be done by layers\n * @private\n */\n setValue() {},\n\n /**\n * Create value by layers\n * @return string\n * */\n getLayerValues() {\n return this.getLayers().getFullValue();\n },\n\n /**\n * Refresh layers\n * */\n refreshLayers() {\n let layersObj = [];\n const model = this.model;\n const layers = this.getLayers();\n const detached = model.get('detached');\n\n // With detached layers values will be assigned to their properties\n if (detached) {\n const target = this.getTarget();\n const style = target ? target.getStyle() : {};\n layersObj = layers.getLayersFromStyle(style);\n } else {\n let value = this.getTargetValue();\n value = value == model.getDefaultValue() ? '' : value;\n layersObj = layers.getLayersFromValue(value);\n }\n\n layers.reset();\n layers.add(layersObj);\n model.set({ stackIndex: null }, { silent: true });\n },\n\n onRender() {\n const self = this;\n const model = this.model;\n const fieldEl = this.el.querySelector('[data-layers-wrapper]');\n const PropertiesView = require('./PropertiesView');\n const propsConfig = {\n target: this.target,\n propTarget: this.propTarget,\n\n // Things to do when a single sub-property is changed\n onChange(el, view, opt) {\n const subModel = view.model;\n\n if (model.get('detached')) {\n const subProp = subModel.get('property');\n const values = self.getLayers().getPropertyValues(subProp);\n view.updateTargetStyle(values, null, opt);\n } else {\n model.set('value', model.getFullValue(), opt);\n }\n }\n };\n const layers = new LayersView({\n collection: this.getLayers(),\n stackModel: model,\n preview: model.get('preview'),\n config: this.config,\n propsConfig\n }).render().el;\n\n // Will use it to propogate changes\n new PropertiesView({\n target: this.target,\n collection: this.model.get('properties'),\n stackModel: model,\n config: this.config,\n onChange: propsConfig.onChange,\n propTarget: propsConfig.propTarget,\n customValue: propsConfig.customValue\n }).render();\n\n //model.get('properties')\n fieldEl.appendChild(layers);\n }\n});\n","const Property = require('./Property');\n\nmodule.exports = Property.extend({\n defaults: {\n ...Property.prototype.defaults,\n // 'background' is a good example where to make a difference\n // between detached and not\n //\n // - NOT detached (default)\n // background: url(..) no-repeat center ...;\n // - Detached\n // background-image: url();\n // background-repeat: repeat;\n // ...\n detached: 0,\n\n // Array of sub properties\n properties: [],\n\n // Separator between properties\n separator: ' '\n },\n\n init() {\n const properties = this.get('properties') || [];\n const Properties = require('./Properties');\n this.set('properties', new Properties(properties));\n this.listenTo(this, 'change:value', this.updateValues);\n },\n\n /**\n * Clear the value\n * @return {this}\n */\n clearValue(opts = {}) {\n this.get('properties').each(property => property.clearValue());\n return Property.prototype.clearValue.apply(this, arguments);\n },\n\n /**\n * Update property values\n */\n updateValues() {\n const values = this.getFullValue().split(this.get('separator'));\n this.get('properties').each((property, i) => {\n const len = values.length;\n // Try to get value from a shorthand:\n // 11px -> 11px 11px 11px 11xp\n // 11px 22px -> 11px 22px 11px 22xp\n const value =\n values[i] || values[i % len + (len != 1 && len % 2 ? 1 : 0)];\n // There some issue with UndoManager\n //property.setValue(value, 0, {fromParent: 1});\n });\n },\n\n /**\n * Returns default value\n * @param {Boolean} defaultProps Force to get defaults from properties\n * @return {string}\n */\n getDefaultValue(defaultProps) {\n let value = this.get('defaults');\n\n if (value && !defaultProps) {\n return value;\n }\n\n value = '';\n const properties = this.get('properties');\n properties.each((prop, index) => (value += `${prop.getDefaultValue()} `));\n return value.trim();\n },\n\n getFullValue() {\n if (this.get('detached')) {\n return '';\n }\n\n return this.get('properties').getFullValue();\n }\n});\n","const Model = Backbone.Model;\nconst View = Backbone.View;\n\nexport default {\n types: [],\n\n initialize(models, opts) {\n this.model = (attrs = {}, options = {}) => {\n let Model, View, type;\n\n if (attrs && attrs.type) {\n const baseType = this.getBaseType();\n type = this.getType(attrs.type);\n Model = type ? type.model : baseType.model;\n View = type ? type.view : baseType.view;\n } else {\n const typeFound = this.recognizeType(attrs);\n type = typeFound.type;\n Model = type.model;\n View = type.view;\n attrs = typeFound.attributes;\n }\n\n const model = new Model(attrs, options);\n model.typeView = View;\n return model;\n };\n const init = this.init && this.init.bind(this);\n init && init();\n },\n\n /**\n * Recognize type by any value\n * @param {mixed} value\n * @return {Object} Found type\n */\n recognizeType(value) {\n const types = this.getTypes();\n\n for (let i = 0; i < types.length; i++) {\n const type = types[i];\n let typeFound = type.isType(value);\n typeFound =\n typeof typeFound == 'boolean' && typeFound\n ? { type: type.id }\n : typeFound;\n\n if (typeFound) {\n return {\n type,\n attributes: typeFound\n };\n }\n }\n\n // If, for any reason, the type is not found it'll return the base one\n return {\n type: this.getBaseType(),\n attributes: value\n };\n },\n\n /**\n * Returns the base type (last object in the stack)\n * @return {Object}\n */\n getBaseType() {\n const types = this.getTypes();\n return types[types.length - 1];\n },\n\n /**\n * Get types\n * @return {Array}\n */\n getTypes() {\n return this.types;\n },\n\n /**\n * Get type\n * @param {string} id Type ID\n * @return {Object} Type definition\n */\n getType(id) {\n const types = this.getTypes();\n\n for (let i = 0; i < types.length; i++) {\n const type = types[i];\n if (type.id === id) {\n return type;\n }\n }\n },\n\n /**\n * Add new type\n * @param {string} id Type ID\n * @param {Object} definition Definition of the type. Each definition contains\n * `model` (business logic), `view` (presentation logic)\n * and `isType` function which recognize the type of the\n * passed entity\n * addType('my-type', {\n * model: {},\n * view: {},\n * isType: (value) => {},\n * })\n */\n addType(id, definition) {\n const type = this.getType(id);\n const baseType = this.getBaseType();\n const ModelInst = type ? type.model : baseType.model;\n const ViewInst = type ? type.view : baseType.view;\n let { model, view, isType } = definition;\n model = model instanceof Model ? model : ModelInst.extend(model || {});\n view = view instanceof View ? view : ViewInst.extend(view || {});\n\n if (type) {\n type.model = model;\n type.view = view;\n type.isType = isType || type.isType;\n } else {\n definition.id = id;\n definition.model = model;\n definition.view = view;\n definition.isType =\n isType ||\n function(value) {\n if (value && value.type == id) {\n return true;\n }\n };\n this.getTypes().unshift(definition);\n }\n }\n};\n","/**\n * With Style Manager you build categories (called sectors) of CSS properties which could be used to customize the style of components.\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/style_manager/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * styleManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const styleManager = editor.StyleManager;\n * ```\n *\n * * [getConfig](#getconfig)\n * * [addSector](#addsector)\n * * [getSector](#getsector)\n * * [removeSector](#removesector)\n * * [getSectors](#getsectors)\n * * [addProperty](#addproperty)\n * * [getProperty](#getproperty)\n * * [removeProperty](#removeproperty)\n * * [getProperties](#getproperties)\n * * [getModelToStyle](#getmodeltostyle)\n * * [getModelToStyle](#getmodeltostyle)\n * * [addType](#addtype)\n * * [getType](#gettype)\n * * [getTypes](#gettypes)\n * * [createType](#createtype)\n *\n * @module StyleManager\n */\n\nimport { isElement } from 'underscore';\n\nmodule.exports = () => {\n var c = {},\n defaults = require('./config/config'),\n Sectors = require('./model/Sectors'),\n Properties = require('./model/Properties'),\n SectorsView = require('./view/SectorsView');\n let properties;\n var sectors, SectView;\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'StyleManager',\n\n /**\n * Get configuration object\n * @return {Object}\n */\n getConfig() {\n return c;\n },\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n properties = new Properties();\n sectors = new Sectors(c.sectors, c);\n SectView = new SectorsView({\n collection: sectors,\n target: c.em,\n config: c\n });\n return this;\n },\n\n postRender() {\n const elTo = this.getConfig().appendTo;\n\n if (elTo) {\n const el = isElement(elTo) ? elTo : document.querySelector(elTo);\n el.appendChild(this.render());\n }\n },\n\n /**\n * Add new sector to the collection. If the sector with the same id already exists,\n * that one will be returned\n * @param {string} id Sector id\n * @param {Object} sector Object representing sector\n * @param {string} [sector.name=''] Sector's label\n * @param {Boolean} [sector.open=true] Indicates if the sector should be opened\n * @param {Array} [sector.properties=[]] Array of properties\n * @return {Sector} Added Sector\n * @example\n * var sector = styleManager.addSector('mySector',{\n * name: 'My sector',\n * open: true,\n * properties: [{ name: 'My property'}]\n * });\n * */\n addSector(id, sector) {\n var result = this.getSector(id);\n if (!result) {\n sector.id = id;\n result = sectors.add(sector);\n }\n return result;\n },\n\n /**\n * Get sector by id\n * @param {string} id Sector id\n * @return {Sector|null}\n * @example\n * var sector = styleManager.getSector('mySector');\n * */\n getSector(id) {\n var res = sectors.where({ id });\n return res.length ? res[0] : null;\n },\n\n /**\n * Remove a sector by id\n * @param {string} id Sector id\n * @return {Sector} Removed sector\n * @example\n * const removed = styleManager.removeSector('mySector');\n */\n removeSector(id) {\n return this.getSectors().remove(this.getSector(id));\n },\n\n /**\n * Get all sectors\n * @return {Sectors} Collection of sectors\n * */\n getSectors() {\n return sectors;\n },\n\n /**\n * Add property to the sector identified by id\n * @param {string} sectorId Sector id\n * @param {Object} property Property object\n * @param {string} [property.name=''] Name of the property\n * @param {string} [property.property=''] CSS property, eg. `min-height`\n * @param {string} [property.type=''] Type of the property: integer | radio | select | color | file | composite | stack\n * @param {Array} [property.units=[]] Unit of measure available, eg. ['px','%','em']. Only for integer type\n * @param {string} [property.unit=''] Default selected unit from `units`. Only for integer type\n * @param {number} [property.min=null] Min possible value. Only for integer type\n * @param {number} [property.max=null] Max possible value. Only for integer type\n * @param {string} [property.defaults=''] Default value\n * @param {string} [property.info=''] Some description\n * @param {string} [property.icon=''] Class name. If exists no text will be displayed\n * @param {Boolean} [property.preview=false] Show layers preview. Only for stack type\n * @param {string} [property.functionName=''] Indicates if value need to be wrapped in some function, for istance `transform: rotate(90deg)`\n * @param {Array} [property.properties=[]] Nested properties for composite and stack type\n * @param {Array} [property.layers=[]] Layers for stack properties\n * @param {Array} [property.list=[]] List of possible options for radio and select types\n * @return {Property|null} Added Property or `null` in case sector doesn't exist\n * @example\n * var property = styleManager.addProperty('mySector',{\n * name: 'Minimum height',\n * property: 'min-height',\n * type: 'select',\n * defaults: '100px',\n * list: [{\n * value: '100px',\n * name: '100',\n * },{\n * value: '200px',\n * name: '200',\n * }],\n * });\n */\n addProperty(sectorId, property) {\n var prop = null;\n var sector = this.getSector(sectorId);\n\n if (sector) prop = sector.get('properties').add(property);\n\n return prop;\n },\n\n /**\n * Get property by its CSS name and sector id\n * @param {string} sectorId Sector id\n * @param {string} name CSS property name, eg. 'min-height'\n * @return {Property|null}\n * @example\n * var property = styleManager.getProperty('mySector','min-height');\n */\n getProperty(sectorId, name) {\n var prop = null;\n var sector = this.getSector(sectorId);\n\n if (sector) {\n prop = sector.get('properties').where({ property: name });\n prop = prop.length == 1 ? prop[0] : prop;\n }\n\n return prop;\n },\n\n /**\n * Remove a property from the sector\n * @param {string} sectorId Sector id\n * @param {string} name CSS property name, eg. 'min-height'\n * @return {Property} Removed property\n * @example\n * const property = styleManager.removeProperty('mySector', 'min-height');\n */\n removeProperty(sectorId, name) {\n const props = this.getProperties(sectorId);\n return props && props.remove(this.getProperty(sectorId, name));\n },\n\n /**\n * Get properties of the sector\n * @param {string} sectorId Sector id\n * @return {Properties} Collection of properties\n * @example\n * var properties = styleManager.getProperties('mySector');\n */\n getProperties(sectorId) {\n var props = null;\n var sector = this.getSector(sectorId);\n\n if (sector) props = sector.get('properties');\n\n return props;\n },\n\n /**\n * Get what to style inside Style Manager. If you select the component\n * without classes the entity is the Component itself and all changes will\n * go inside its 'style' property. Otherwise, if the selected component has\n * one or more classes, the function will return the corresponding CSS Rule\n * @param {Model} model\n * @return {Model}\n */\n getModelToStyle(model) {\n const em = c.em;\n const classes = model.get('classes');\n const id = model.getId();\n\n if (em) {\n const config = em.getConfig();\n const um = em.get('UndoManager');\n const cssC = em.get('CssComposer');\n const state = !config.devicePreviewMode ? model.get('state') : '';\n const valid = classes.getStyleable();\n const hasClasses = valid.length;\n const opts = { state };\n let rule;\n\n // I stop undo manager here as after adding the CSSRule (generally after\n // selecting the component) and calling undo() it will remove the rule from\n // the collection, therefore updating it in style manager will not affect it\n // #268\n um.stop();\n\n if (hasClasses) {\n const deviceW = em.getCurrentMedia();\n rule = cssC.get(valid, state, deviceW);\n\n if (!rule) {\n rule = cssC.add(valid, state, deviceW);\n rule.setStyle(model.getStyle());\n model.setStyle({});\n }\n } else if (config.avoidInlineStyle) {\n rule = cssC.getIdRule(id, opts);\n !rule && (rule = cssC.setIdRule(id, {}, opts));\n }\n\n rule && (model = rule);\n um.start();\n }\n\n return model;\n },\n\n /**\n * Add new property type\n * @param {string} id Type ID\n * @param {Object} definition Definition of the type. Each definition contains\n * `model` (business logic), `view` (presentation logic)\n * and `isType` function which recognize the type of the\n * passed entity\n *@example\n * styleManager.addType('my-type', {\n * model: {},\n * view: {},\n * isType: (value) => {\n * if (value && value.type == 'my-type') {\n * return value;\n * }\n * },\n * })\n */\n addType(id, definition) {\n properties.addType(id, definition);\n },\n\n /**\n * Get type\n * @param {string} id Type ID\n * @return {Object} Type definition\n */\n getType(id) {\n return properties.getType(id);\n },\n\n /**\n * Get all types\n * @return {Array}\n */\n getTypes() {\n return properties.getTypes();\n },\n\n /**\n * Create new property from type\n * @param {string} id Type ID\n * @param {Object} [options={}] Options\n * @param {Object} [options.model={}] Custom model object\n * @param {Object} [options.view={}] Custom view object\n * @return {PropertyView}\n * @example\n * const propView = styleManager.createType('integer', {\n * model: {units: ['px', 'rem']}\n * });\n * propView.render();\n * propView.model.on('change:value', ...);\n * someContainer.appendChild(propView.el);\n */\n createType(id, { model = {}, view = {} } = {}) {\n const type = this.getType(id);\n\n if (type) {\n return new type.view({\n model: new type.model(model),\n config: c,\n ...view\n });\n }\n },\n\n /**\n * Render sectors and properties\n * @return {HTMLElement}\n * @private\n * */\n render() {\n return SectView.render().el;\n }\n };\n};\n","var Backbone = require('backbone');\nvar ButtonsView = require('./ButtonsView');\n\nmodule.exports = Backbone.View.extend({\n initialize(o) {\n const config = o.config || {};\n const model = this.model;\n this.config = config;\n this.pfx = config.stylePrefix || '';\n this.ppfx = config.pStylePrefix || '';\n this.buttons = model.get('buttons');\n this.className = this.pfx + 'panel';\n this.id = this.pfx + model.get('id');\n this.listenTo(model, 'change:appendContent', this.appendContent);\n this.listenTo(model, 'change:content', this.updateContent);\n model.view = this;\n },\n\n /**\n * Append content of the panel\n * */\n appendContent() {\n this.$el.append(this.model.get('appendContent'));\n },\n\n /**\n * Update content\n * */\n updateContent() {\n this.$el.html(this.model.get('content'));\n },\n\n attributes() {\n return this.model.get('attributes');\n },\n\n initResize() {\n const em = this.config.em;\n const editor = em ? em.get('Editor') : '';\n const resizable = this.model.get('resizable');\n\n if (editor && resizable) {\n var resz = resizable === true ? [1, 1, 1, 1] : resizable;\n var resLen = resz.length;\n var tc,\n cr,\n bc,\n cl = 0;\n\n // Choose which sides of the panel are resizable\n if (resLen == 2) {\n tc = resz[0];\n bc = resz[0];\n cr = resz[1];\n cl = resz[1];\n } else if (resLen == 4) {\n tc = resz[0];\n cr = resz[1];\n bc = resz[2];\n cl = resz[3];\n }\n\n var resizer = editor.Utils.Resizer.init({\n tc,\n cr,\n bc,\n cl,\n tl: 0,\n tr: 0,\n bl: 0,\n br: 0,\n appendTo: this.el,\n silentFrames: 1,\n avoidContainerUpdate: 1,\n prefix: editor.getConfig().stylePrefix,\n onEnd() {\n em && em.trigger('change:canvasOffset');\n },\n posFetcher: (el, { target }) => {\n const style = el.style;\n const config = resizer.getConfig();\n const keyWidth = config.keyWidth;\n const keyHeight = config.keyHeight;\n const rect = el.getBoundingClientRect();\n const forContainer = target == 'container';\n const styleWidth = style[keyWidth];\n const styleHeight = style[keyHeight];\n const width =\n styleWidth && !forContainer ? parseFloat(styleWidth) : rect.width;\n const height =\n styleHeight && !forContainer\n ? parseFloat(styleHeight)\n : rect.height;\n return {\n left: 0,\n top: 0,\n width,\n height\n };\n },\n ...resizable\n });\n resizer.blur = () => {};\n resizer.focus(this.el);\n }\n },\n\n render() {\n const $el = this.$el;\n const ppfx = this.ppfx;\n const cls = `${this.className} ${this.id} ${ppfx}one-bg ${ppfx}two-color`;\n $el.addClass(cls);\n\n if (this.buttons.length) {\n var buttons = new ButtonsView({\n collection: this.buttons,\n config: this.config\n });\n $el.append(buttons.render().el);\n }\n\n $el.append(this.model.get('content'));\n return this;\n }\n});\n","var Backbone = require('backbone');\nvar Button = require('./Button');\n\nmodule.exports = Backbone.Collection.extend({\n model: Button,\n\n /**\n * Deactivate all buttons, except one passed\n * @param {Object} except Model to ignore\n * @param {Boolean} r Recursive flag\n *\n * @return void\n * */\n deactivateAllExceptOne(except, r) {\n this.forEach((model, index) => {\n if (model !== except) {\n model.set('active', false);\n if (r && model.get('buttons').length)\n model.get('buttons').deactivateAllExceptOne(except, r);\n }\n });\n },\n\n /**\n * Deactivate all buttons\n * @param {String} ctx Context string\n *\n * @return void\n * */\n deactivateAll(ctx) {\n var context = ctx || '';\n this.forEach((model, index) => {\n if (model.get('context') == context) {\n model.set('active', false);\n if (model.get('buttons').length)\n model.get('buttons').deactivateAll(context);\n }\n });\n },\n\n /**\n * Disables all buttons\n * @param {String} ctx Context string\n *\n * @return void\n * */\n disableAllButtons(ctx) {\n var context = ctx || '';\n this.forEach((model, index) => {\n if (model.get('context') == context) {\n model.set('disable', true);\n if (model.get('buttons').length)\n model.get('buttons').disableAllButtons(context);\n }\n });\n },\n\n /**\n * Disables all buttons, except one passed\n * @param {Object} except Model to ignore\n * @param {Boolean} r Recursive flag\n *\n * @return void\n * */\n disableAllButtonsExceptOne(except, r) {\n this.forEach((model, index) => {\n if (model !== except) {\n model.set('disable', true);\n if (r && model.get('buttons').length)\n model.get('buttons').disableAllButtonsExceptOne(except, r);\n }\n });\n }\n});\n","var Backbone = require('backbone');\nvar Buttons = require('./Buttons');\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n id: '',\n content: '',\n visible: true,\n buttons: [],\n attributes: {}\n },\n\n initialize(options) {\n this.btn = this.get('buttons') || [];\n this.buttons = new Buttons(this.btn);\n this.set('buttons', this.buttons);\n }\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"css\", function(config, parserConfig) {\n var inline = parserConfig.inline\n if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode(\"text/css\");\n\n var indentUnit = config.indentUnit,\n tokenHooks = parserConfig.tokenHooks,\n documentTypes = parserConfig.documentTypes || {},\n mediaTypes = parserConfig.mediaTypes || {},\n mediaFeatures = parserConfig.mediaFeatures || {},\n mediaValueKeywords = parserConfig.mediaValueKeywords || {},\n propertyKeywords = parserConfig.propertyKeywords || {},\n nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {},\n fontProperties = parserConfig.fontProperties || {},\n counterDescriptors = parserConfig.counterDescriptors || {},\n colorKeywords = parserConfig.colorKeywords || {},\n valueKeywords = parserConfig.valueKeywords || {},\n allowNested = parserConfig.allowNested,\n lineComment = parserConfig.lineComment,\n supportsAtComponent = parserConfig.supportsAtComponent === true;\n\n var type, override;\n function ret(style, tp) { type = tp; return style; }\n\n // Tokenizers\n\n function tokenBase(stream, state) {\n var ch = stream.next();\n if (tokenHooks[ch]) {\n var result = tokenHooks[ch](stream, state);\n if (result !== false) return result;\n }\n if (ch == \"@\") {\n stream.eatWhile(/[\\w\\\\\\-]/);\n return ret(\"def\", stream.current());\n } else if (ch == \"=\" || (ch == \"~\" || ch == \"|\") && stream.eat(\"=\")) {\n return ret(null, \"compare\");\n } else if (ch == \"\\\"\" || ch == \"'\") {\n state.tokenize = tokenString(ch);\n return state.tokenize(stream, state);\n } else if (ch == \"#\") {\n stream.eatWhile(/[\\w\\\\\\-]/);\n return ret(\"atom\", \"hash\");\n } else if (ch == \"!\") {\n stream.match(/^\\s*\\w*/);\n return ret(\"keyword\", \"important\");\n } else if (/\\d/.test(ch) || ch == \".\" && stream.eat(/\\d/)) {\n stream.eatWhile(/[\\w.%]/);\n return ret(\"number\", \"unit\");\n } else if (ch === \"-\") {\n if (/[\\d.]/.test(stream.peek())) {\n stream.eatWhile(/[\\w.%]/);\n return ret(\"number\", \"unit\");\n } else if (stream.match(/^-[\\w\\\\\\-]+/)) {\n stream.eatWhile(/[\\w\\\\\\-]/);\n if (stream.match(/^\\s*:/, false))\n return ret(\"variable-2\", \"variable-definition\");\n return ret(\"variable-2\", \"variable\");\n } else if (stream.match(/^\\w+-/)) {\n return ret(\"meta\", \"meta\");\n }\n } else if (/[,+>*\\/]/.test(ch)) {\n return ret(null, \"select-op\");\n } else if (ch == \".\" && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {\n return ret(\"qualifier\", \"qualifier\");\n } else if (/[:;{}\\[\\]\\(\\)]/.test(ch)) {\n return ret(null, ch);\n } else if (((ch == \"u\" || ch == \"U\") && stream.match(/rl(-prefix)?\\(/i)) ||\n ((ch == \"d\" || ch == \"D\") && stream.match(\"omain(\", true, true)) ||\n ((ch == \"r\" || ch == \"R\") && stream.match(\"egexp(\", true, true))) {\n stream.backUp(1);\n state.tokenize = tokenParenthesized;\n return ret(\"property\", \"word\");\n } else if (/[\\w\\\\\\-]/.test(ch)) {\n stream.eatWhile(/[\\w\\\\\\-]/);\n return ret(\"property\", \"word\");\n } else {\n return ret(null, null);\n }\n }\n\n function tokenString(quote) {\n return function(stream, state) {\n var escaped = false, ch;\n while ((ch = stream.next()) != null) {\n if (ch == quote && !escaped) {\n if (quote == \")\") stream.backUp(1);\n break;\n }\n escaped = !escaped && ch == \"\\\\\";\n }\n if (ch == quote || !escaped && quote != \")\") state.tokenize = null;\n return ret(\"string\", \"string\");\n };\n }\n\n function tokenParenthesized(stream, state) {\n stream.next(); // Must be '('\n if (!stream.match(/\\s*[\\\"\\')]/, false))\n state.tokenize = tokenString(\")\");\n else\n state.tokenize = null;\n return ret(null, \"(\");\n }\n\n // Context management\n\n function Context(type, indent, prev) {\n this.type = type;\n this.indent = indent;\n this.prev = prev;\n }\n\n function pushContext(state, stream, type, indent) {\n state.context = new Context(type, stream.indentation() + (indent === false ? 0 : indentUnit), state.context);\n return type;\n }\n\n function popContext(state) {\n if (state.context.prev)\n state.context = state.context.prev;\n return state.context.type;\n }\n\n function pass(type, stream, state) {\n return states[state.context.type](type, stream, state);\n }\n function popAndPass(type, stream, state, n) {\n for (var i = n || 1; i > 0; i--)\n state.context = state.context.prev;\n return pass(type, stream, state);\n }\n\n // Parser\n\n function wordAsValue(stream) {\n var word = stream.current().toLowerCase();\n if (valueKeywords.hasOwnProperty(word))\n override = \"atom\";\n else if (colorKeywords.hasOwnProperty(word))\n override = \"keyword\";\n else\n override = \"variable\";\n }\n\n var states = {};\n\n states.top = function(type, stream, state) {\n if (type == \"{\") {\n return pushContext(state, stream, \"block\");\n } else if (type == \"}\" && state.context.prev) {\n return popContext(state);\n } else if (supportsAtComponent && /@component/i.test(type)) {\n return pushContext(state, stream, \"atComponentBlock\");\n } else if (/^@(-moz-)?document$/i.test(type)) {\n return pushContext(state, stream, \"documentTypes\");\n } else if (/^@(media|supports|(-moz-)?document|import)$/i.test(type)) {\n return pushContext(state, stream, \"atBlock\");\n } else if (/^@(font-face|counter-style)/i.test(type)) {\n state.stateArg = type;\n return \"restricted_atBlock_before\";\n } else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(type)) {\n return \"keyframes\";\n } else if (type && type.charAt(0) == \"@\") {\n return pushContext(state, stream, \"at\");\n } else if (type == \"hash\") {\n override = \"builtin\";\n } else if (type == \"word\") {\n override = \"tag\";\n } else if (type == \"variable-definition\") {\n return \"maybeprop\";\n } else if (type == \"interpolation\") {\n return pushContext(state, stream, \"interpolation\");\n } else if (type == \":\") {\n return \"pseudo\";\n } else if (allowNested && type == \"(\") {\n return pushContext(state, stream, \"parens\");\n }\n return state.context.type;\n };\n\n states.block = function(type, stream, state) {\n if (type == \"word\") {\n var word = stream.current().toLowerCase();\n if (propertyKeywords.hasOwnProperty(word)) {\n override = \"property\";\n return \"maybeprop\";\n } else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {\n override = \"string-2\";\n return \"maybeprop\";\n } else if (allowNested) {\n override = stream.match(/^\\s*:(?:\\s|$)/, false) ? \"property\" : \"tag\";\n return \"block\";\n } else {\n override += \" error\";\n return \"maybeprop\";\n }\n } else if (type == \"meta\") {\n return \"block\";\n } else if (!allowNested && (type == \"hash\" || type == \"qualifier\")) {\n override = \"error\";\n return \"block\";\n } else {\n return states.top(type, stream, state);\n }\n };\n\n states.maybeprop = function(type, stream, state) {\n if (type == \":\") return pushContext(state, stream, \"prop\");\n return pass(type, stream, state);\n };\n\n states.prop = function(type, stream, state) {\n if (type == \";\") return popContext(state);\n if (type == \"{\" && allowNested) return pushContext(state, stream, \"propBlock\");\n if (type == \"}\" || type == \"{\") return popAndPass(type, stream, state);\n if (type == \"(\") return pushContext(state, stream, \"parens\");\n\n if (type == \"hash\" && !/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(stream.current())) {\n override += \" error\";\n } else if (type == \"word\") {\n wordAsValue(stream);\n } else if (type == \"interpolation\") {\n return pushContext(state, stream, \"interpolation\");\n }\n return \"prop\";\n };\n\n states.propBlock = function(type, _stream, state) {\n if (type == \"}\") return popContext(state);\n if (type == \"word\") { override = \"property\"; return \"maybeprop\"; }\n return state.context.type;\n };\n\n states.parens = function(type, stream, state) {\n if (type == \"{\" || type == \"}\") return popAndPass(type, stream, state);\n if (type == \")\") return popContext(state);\n if (type == \"(\") return pushContext(state, stream, \"parens\");\n if (type == \"interpolation\") return pushContext(state, stream, \"interpolation\");\n if (type == \"word\") wordAsValue(stream);\n return \"parens\";\n };\n\n states.pseudo = function(type, stream, state) {\n if (type == \"meta\") return \"pseudo\";\n\n if (type == \"word\") {\n override = \"variable-3\";\n return state.context.type;\n }\n return pass(type, stream, state);\n };\n\n states.documentTypes = function(type, stream, state) {\n if (type == \"word\" && documentTypes.hasOwnProperty(stream.current())) {\n override = \"tag\";\n return state.context.type;\n } else {\n return states.atBlock(type, stream, state);\n }\n };\n\n states.atBlock = function(type, stream, state) {\n if (type == \"(\") return pushContext(state, stream, \"atBlock_parens\");\n if (type == \"}\" || type == \";\") return popAndPass(type, stream, state);\n if (type == \"{\") return popContext(state) && pushContext(state, stream, allowNested ? \"block\" : \"top\");\n\n if (type == \"interpolation\") return pushContext(state, stream, \"interpolation\");\n\n if (type == \"word\") {\n var word = stream.current().toLowerCase();\n if (word == \"only\" || word == \"not\" || word == \"and\" || word == \"or\")\n override = \"keyword\";\n else if (mediaTypes.hasOwnProperty(word))\n override = \"attribute\";\n else if (mediaFeatures.hasOwnProperty(word))\n override = \"property\";\n else if (mediaValueKeywords.hasOwnProperty(word))\n override = \"keyword\";\n else if (propertyKeywords.hasOwnProperty(word))\n override = \"property\";\n else if (nonStandardPropertyKeywords.hasOwnProperty(word))\n override = \"string-2\";\n else if (valueKeywords.hasOwnProperty(word))\n override = \"atom\";\n else if (colorKeywords.hasOwnProperty(word))\n override = \"keyword\";\n else\n override = \"error\";\n }\n return state.context.type;\n };\n\n states.atComponentBlock = function(type, stream, state) {\n if (type == \"}\")\n return popAndPass(type, stream, state);\n if (type == \"{\")\n return popContext(state) && pushContext(state, stream, allowNested ? \"block\" : \"top\", false);\n if (type == \"word\")\n override = \"error\";\n return state.context.type;\n };\n\n states.atBlock_parens = function(type, stream, state) {\n if (type == \")\") return popContext(state);\n if (type == \"{\" || type == \"}\") return popAndPass(type, stream, state, 2);\n return states.atBlock(type, stream, state);\n };\n\n states.restricted_atBlock_before = function(type, stream, state) {\n if (type == \"{\")\n return pushContext(state, stream, \"restricted_atBlock\");\n if (type == \"word\" && state.stateArg == \"@counter-style\") {\n override = \"variable\";\n return \"restricted_atBlock_before\";\n }\n return pass(type, stream, state);\n };\n\n states.restricted_atBlock = function(type, stream, state) {\n if (type == \"}\") {\n state.stateArg = null;\n return popContext(state);\n }\n if (type == \"word\") {\n if ((state.stateArg == \"@font-face\" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) ||\n (state.stateArg == \"@counter-style\" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase())))\n override = \"error\";\n else\n override = \"property\";\n return \"maybeprop\";\n }\n return \"restricted_atBlock\";\n };\n\n states.keyframes = function(type, stream, state) {\n if (type == \"word\") { override = \"variable\"; return \"keyframes\"; }\n if (type == \"{\") return pushContext(state, stream, \"top\");\n return pass(type, stream, state);\n };\n\n states.at = function(type, stream, state) {\n if (type == \";\") return popContext(state);\n if (type == \"{\" || type == \"}\") return popAndPass(type, stream, state);\n if (type == \"word\") override = \"tag\";\n else if (type == \"hash\") override = \"builtin\";\n return \"at\";\n };\n\n states.interpolation = function(type, stream, state) {\n if (type == \"}\") return popContext(state);\n if (type == \"{\" || type == \";\") return popAndPass(type, stream, state);\n if (type == \"word\") override = \"variable\";\n else if (type != \"variable\" && type != \"(\" && type != \")\") override = \"error\";\n return \"interpolation\";\n };\n\n return {\n startState: function(base) {\n return {tokenize: null,\n state: inline ? \"block\" : \"top\",\n stateArg: null,\n context: new Context(inline ? \"block\" : \"top\", base || 0, null)};\n },\n\n token: function(stream, state) {\n if (!state.tokenize && stream.eatSpace()) return null;\n var style = (state.tokenize || tokenBase)(stream, state);\n if (style && typeof style == \"object\") {\n type = style[1];\n style = style[0];\n }\n override = style;\n if (type != \"comment\")\n state.state = states[state.state](type, stream, state);\n return override;\n },\n\n indent: function(state, textAfter) {\n var cx = state.context, ch = textAfter && textAfter.charAt(0);\n var indent = cx.indent;\n if (cx.type == \"prop\" && (ch == \"}\" || ch == \")\")) cx = cx.prev;\n if (cx.prev) {\n if (ch == \"}\" && (cx.type == \"block\" || cx.type == \"top\" ||\n cx.type == \"interpolation\" || cx.type == \"restricted_atBlock\")) {\n // Resume indentation from parent context.\n cx = cx.prev;\n indent = cx.indent;\n } else if (ch == \")\" && (cx.type == \"parens\" || cx.type == \"atBlock_parens\") ||\n ch == \"{\" && (cx.type == \"at\" || cx.type == \"atBlock\")) {\n // Dedent relative to current context.\n indent = Math.max(0, cx.indent - indentUnit);\n }\n }\n return indent;\n },\n\n electricChars: \"}\",\n blockCommentStart: \"/*\",\n blockCommentEnd: \"*/\",\n blockCommentContinue: \" * \",\n lineComment: lineComment,\n fold: \"brace\"\n };\n});\n\n function keySet(array) {\n var keys = {};\n for (var i = 0; i < array.length; ++i) {\n keys[array[i].toLowerCase()] = true;\n }\n return keys;\n }\n\n var documentTypes_ = [\n \"domain\", \"regexp\", \"url\", \"url-prefix\"\n ], documentTypes = keySet(documentTypes_);\n\n var mediaTypes_ = [\n \"all\", \"aural\", \"braille\", \"handheld\", \"print\", \"projection\", \"screen\",\n \"tty\", \"tv\", \"embossed\"\n ], mediaTypes = keySet(mediaTypes_);\n\n var mediaFeatures_ = [\n \"width\", \"min-width\", \"max-width\", \"height\", \"min-height\", \"max-height\",\n \"device-width\", \"min-device-width\", \"max-device-width\", \"device-height\",\n \"min-device-height\", \"max-device-height\", \"aspect-ratio\",\n \"min-aspect-ratio\", \"max-aspect-ratio\", \"device-aspect-ratio\",\n \"min-device-aspect-ratio\", \"max-device-aspect-ratio\", \"color\", \"min-color\",\n \"max-color\", \"color-index\", \"min-color-index\", \"max-color-index\",\n \"monochrome\", \"min-monochrome\", \"max-monochrome\", \"resolution\",\n \"min-resolution\", \"max-resolution\", \"scan\", \"grid\", \"orientation\",\n \"device-pixel-ratio\", \"min-device-pixel-ratio\", \"max-device-pixel-ratio\",\n \"pointer\", \"any-pointer\", \"hover\", \"any-hover\"\n ], mediaFeatures = keySet(mediaFeatures_);\n\n var mediaValueKeywords_ = [\n \"landscape\", \"portrait\", \"none\", \"coarse\", \"fine\", \"on-demand\", \"hover\",\n \"interlace\", \"progressive\"\n ], mediaValueKeywords = keySet(mediaValueKeywords_);\n\n var propertyKeywords_ = [\n \"align-content\", \"align-items\", \"align-self\", \"alignment-adjust\",\n \"alignment-baseline\", \"anchor-point\", \"animation\", \"animation-delay\",\n \"animation-direction\", \"animation-duration\", \"animation-fill-mode\",\n \"animation-iteration-count\", \"animation-name\", \"animation-play-state\",\n \"animation-timing-function\", \"appearance\", \"azimuth\", \"backface-visibility\",\n \"background\", \"background-attachment\", \"background-blend-mode\", \"background-clip\",\n \"background-color\", \"background-image\", \"background-origin\", \"background-position\",\n \"background-repeat\", \"background-size\", \"baseline-shift\", \"binding\",\n \"bleed\", \"bookmark-label\", \"bookmark-level\", \"bookmark-state\",\n \"bookmark-target\", \"border\", \"border-bottom\", \"border-bottom-color\",\n \"border-bottom-left-radius\", \"border-bottom-right-radius\",\n \"border-bottom-style\", \"border-bottom-width\", \"border-collapse\",\n \"border-color\", \"border-image\", \"border-image-outset\",\n \"border-image-repeat\", \"border-image-slice\", \"border-image-source\",\n \"border-image-width\", \"border-left\", \"border-left-color\",\n \"border-left-style\", \"border-left-width\", \"border-radius\", \"border-right\",\n \"border-right-color\", \"border-right-style\", \"border-right-width\",\n \"border-spacing\", \"border-style\", \"border-top\", \"border-top-color\",\n \"border-top-left-radius\", \"border-top-right-radius\", \"border-top-style\",\n \"border-top-width\", \"border-width\", \"bottom\", \"box-decoration-break\",\n \"box-shadow\", \"box-sizing\", \"break-after\", \"break-before\", \"break-inside\",\n \"caption-side\", \"caret-color\", \"clear\", \"clip\", \"color\", \"color-profile\", \"column-count\",\n \"column-fill\", \"column-gap\", \"column-rule\", \"column-rule-color\",\n \"column-rule-style\", \"column-rule-width\", \"column-span\", \"column-width\",\n \"columns\", \"content\", \"counter-increment\", \"counter-reset\", \"crop\", \"cue\",\n \"cue-after\", \"cue-before\", \"cursor\", \"direction\", \"display\",\n \"dominant-baseline\", \"drop-initial-after-adjust\",\n \"drop-initial-after-align\", \"drop-initial-before-adjust\",\n \"drop-initial-before-align\", \"drop-initial-size\", \"drop-initial-value\",\n \"elevation\", \"empty-cells\", \"fit\", \"fit-position\", \"flex\", \"flex-basis\",\n \"flex-direction\", \"flex-flow\", \"flex-grow\", \"flex-shrink\", \"flex-wrap\",\n \"float\", \"float-offset\", \"flow-from\", \"flow-into\", \"font\", \"font-feature-settings\",\n \"font-family\", \"font-kerning\", \"font-language-override\", \"font-size\", \"font-size-adjust\",\n \"font-stretch\", \"font-style\", \"font-synthesis\", \"font-variant\",\n \"font-variant-alternates\", \"font-variant-caps\", \"font-variant-east-asian\",\n \"font-variant-ligatures\", \"font-variant-numeric\", \"font-variant-position\",\n \"font-weight\", \"grid\", \"grid-area\", \"grid-auto-columns\", \"grid-auto-flow\",\n \"grid-auto-rows\", \"grid-column\", \"grid-column-end\", \"grid-column-gap\",\n \"grid-column-start\", \"grid-gap\", \"grid-row\", \"grid-row-end\", \"grid-row-gap\",\n \"grid-row-start\", \"grid-template\", \"grid-template-areas\", \"grid-template-columns\",\n \"grid-template-rows\", \"hanging-punctuation\", \"height\", \"hyphens\",\n \"icon\", \"image-orientation\", \"image-rendering\", \"image-resolution\",\n \"inline-box-align\", \"justify-content\", \"justify-items\", \"justify-self\", \"left\", \"letter-spacing\",\n \"line-break\", \"line-height\", \"line-stacking\", \"line-stacking-ruby\",\n \"line-stacking-shift\", \"line-stacking-strategy\", \"list-style\",\n \"list-style-image\", \"list-style-position\", \"list-style-type\", \"margin\",\n \"margin-bottom\", \"margin-left\", \"margin-right\", \"margin-top\",\n \"marks\", \"marquee-direction\", \"marquee-loop\",\n \"marquee-play-count\", \"marquee-speed\", \"marquee-style\", \"max-height\",\n \"max-width\", \"min-height\", \"min-width\", \"move-to\", \"nav-down\", \"nav-index\",\n \"nav-left\", \"nav-right\", \"nav-up\", \"object-fit\", \"object-position\",\n \"opacity\", \"order\", \"orphans\", \"outline\",\n \"outline-color\", \"outline-offset\", \"outline-style\", \"outline-width\",\n \"overflow\", \"overflow-style\", \"overflow-wrap\", \"overflow-x\", \"overflow-y\",\n \"padding\", \"padding-bottom\", \"padding-left\", \"padding-right\", \"padding-top\",\n \"page\", \"page-break-after\", \"page-break-before\", \"page-break-inside\",\n \"page-policy\", \"pause\", \"pause-after\", \"pause-before\", \"perspective\",\n \"perspective-origin\", \"pitch\", \"pitch-range\", \"place-content\", \"place-items\", \"place-self\", \"play-during\", \"position\",\n \"presentation-level\", \"punctuation-trim\", \"quotes\", \"region-break-after\",\n \"region-break-before\", \"region-break-inside\", \"region-fragment\",\n \"rendering-intent\", \"resize\", \"rest\", \"rest-after\", \"rest-before\", \"richness\",\n \"right\", \"rotation\", \"rotation-point\", \"ruby-align\", \"ruby-overhang\",\n \"ruby-position\", \"ruby-span\", \"shape-image-threshold\", \"shape-inside\", \"shape-margin\",\n \"shape-outside\", \"size\", \"speak\", \"speak-as\", \"speak-header\",\n \"speak-numeral\", \"speak-punctuation\", \"speech-rate\", \"stress\", \"string-set\",\n \"tab-size\", \"table-layout\", \"target\", \"target-name\", \"target-new\",\n \"target-position\", \"text-align\", \"text-align-last\", \"text-decoration\",\n \"text-decoration-color\", \"text-decoration-line\", \"text-decoration-skip\",\n \"text-decoration-style\", \"text-emphasis\", \"text-emphasis-color\",\n \"text-emphasis-position\", \"text-emphasis-style\", \"text-height\",\n \"text-indent\", \"text-justify\", \"text-outline\", \"text-overflow\", \"text-shadow\",\n \"text-size-adjust\", \"text-space-collapse\", \"text-transform\", \"text-underline-position\",\n \"text-wrap\", \"top\", \"transform\", \"transform-origin\", \"transform-style\",\n \"transition\", \"transition-delay\", \"transition-duration\",\n \"transition-property\", \"transition-timing-function\", \"unicode-bidi\",\n \"user-select\", \"vertical-align\", \"visibility\", \"voice-balance\", \"voice-duration\",\n \"voice-family\", \"voice-pitch\", \"voice-range\", \"voice-rate\", \"voice-stress\",\n \"voice-volume\", \"volume\", \"white-space\", \"widows\", \"width\", \"will-change\", \"word-break\",\n \"word-spacing\", \"word-wrap\", \"z-index\",\n // SVG-specific\n \"clip-path\", \"clip-rule\", \"mask\", \"enable-background\", \"filter\", \"flood-color\",\n \"flood-opacity\", \"lighting-color\", \"stop-color\", \"stop-opacity\", \"pointer-events\",\n \"color-interpolation\", \"color-interpolation-filters\",\n \"color-rendering\", \"fill\", \"fill-opacity\", \"fill-rule\", \"image-rendering\",\n \"marker\", \"marker-end\", \"marker-mid\", \"marker-start\", \"shape-rendering\", \"stroke\",\n \"stroke-dasharray\", \"stroke-dashoffset\", \"stroke-linecap\", \"stroke-linejoin\",\n \"stroke-miterlimit\", \"stroke-opacity\", \"stroke-width\", \"text-rendering\",\n \"baseline-shift\", \"dominant-baseline\", \"glyph-orientation-horizontal\",\n \"glyph-orientation-vertical\", \"text-anchor\", \"writing-mode\"\n ], propertyKeywords = keySet(propertyKeywords_);\n\n var nonStandardPropertyKeywords_ = [\n \"scrollbar-arrow-color\", \"scrollbar-base-color\", \"scrollbar-dark-shadow-color\",\n \"scrollbar-face-color\", \"scrollbar-highlight-color\", \"scrollbar-shadow-color\",\n \"scrollbar-3d-light-color\", \"scrollbar-track-color\", \"shape-inside\",\n \"searchfield-cancel-button\", \"searchfield-decoration\", \"searchfield-results-button\",\n \"searchfield-results-decoration\", \"zoom\"\n ], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);\n\n var fontProperties_ = [\n \"font-family\", \"src\", \"unicode-range\", \"font-variant\", \"font-feature-settings\",\n \"font-stretch\", \"font-weight\", \"font-style\"\n ], fontProperties = keySet(fontProperties_);\n\n var counterDescriptors_ = [\n \"additive-symbols\", \"fallback\", \"negative\", \"pad\", \"prefix\", \"range\",\n \"speak-as\", \"suffix\", \"symbols\", \"system\"\n ], counterDescriptors = keySet(counterDescriptors_);\n\n var colorKeywords_ = [\n \"aliceblue\", \"antiquewhite\", \"aqua\", \"aquamarine\", \"azure\", \"beige\",\n \"bisque\", \"black\", \"blanchedalmond\", \"blue\", \"blueviolet\", \"brown\",\n \"burlywood\", \"cadetblue\", \"chartreuse\", \"chocolate\", \"coral\", \"cornflowerblue\",\n \"cornsilk\", \"crimson\", \"cyan\", \"darkblue\", \"darkcyan\", \"darkgoldenrod\",\n \"darkgray\", \"darkgreen\", \"darkkhaki\", \"darkmagenta\", \"darkolivegreen\",\n \"darkorange\", \"darkorchid\", \"darkred\", \"darksalmon\", \"darkseagreen\",\n \"darkslateblue\", \"darkslategray\", \"darkturquoise\", \"darkviolet\",\n \"deeppink\", \"deepskyblue\", \"dimgray\", \"dodgerblue\", \"firebrick\",\n \"floralwhite\", \"forestgreen\", \"fuchsia\", \"gainsboro\", \"ghostwhite\",\n \"gold\", \"goldenrod\", \"gray\", \"grey\", \"green\", \"greenyellow\", \"honeydew\",\n \"hotpink\", \"indianred\", \"indigo\", \"ivory\", \"khaki\", \"lavender\",\n \"lavenderblush\", \"lawngreen\", \"lemonchiffon\", \"lightblue\", \"lightcoral\",\n \"lightcyan\", \"lightgoldenrodyellow\", \"lightgray\", \"lightgreen\", \"lightpink\",\n \"lightsalmon\", \"lightseagreen\", \"lightskyblue\", \"lightslategray\",\n \"lightsteelblue\", \"lightyellow\", \"lime\", \"limegreen\", \"linen\", \"magenta\",\n \"maroon\", \"mediumaquamarine\", \"mediumblue\", \"mediumorchid\", \"mediumpurple\",\n \"mediumseagreen\", \"mediumslateblue\", \"mediumspringgreen\", \"mediumturquoise\",\n \"mediumvioletred\", \"midnightblue\", \"mintcream\", \"mistyrose\", \"moccasin\",\n \"navajowhite\", \"navy\", \"oldlace\", \"olive\", \"olivedrab\", \"orange\", \"orangered\",\n \"orchid\", \"palegoldenrod\", \"palegreen\", \"paleturquoise\", \"palevioletred\",\n \"papayawhip\", \"peachpuff\", \"peru\", \"pink\", \"plum\", \"powderblue\",\n \"purple\", \"rebeccapurple\", \"red\", \"rosybrown\", \"royalblue\", \"saddlebrown\",\n \"salmon\", \"sandybrown\", \"seagreen\", \"seashell\", \"sienna\", \"silver\", \"skyblue\",\n \"slateblue\", \"slategray\", \"snow\", \"springgreen\", \"steelblue\", \"tan\",\n \"teal\", \"thistle\", \"tomato\", \"turquoise\", \"violet\", \"wheat\", \"white\",\n \"whitesmoke\", \"yellow\", \"yellowgreen\"\n ], colorKeywords = keySet(colorKeywords_);\n\n var valueKeywords_ = [\n \"above\", \"absolute\", \"activeborder\", \"additive\", \"activecaption\", \"afar\",\n \"after-white-space\", \"ahead\", \"alias\", \"all\", \"all-scroll\", \"alphabetic\", \"alternate\",\n \"always\", \"amharic\", \"amharic-abegede\", \"antialiased\", \"appworkspace\",\n \"arabic-indic\", \"armenian\", \"asterisks\", \"attr\", \"auto\", \"auto-flow\", \"avoid\", \"avoid-column\", \"avoid-page\",\n \"avoid-region\", \"background\", \"backwards\", \"baseline\", \"below\", \"bidi-override\", \"binary\",\n \"bengali\", \"blink\", \"block\", \"block-axis\", \"bold\", \"bolder\", \"border\", \"border-box\",\n \"both\", \"bottom\", \"break\", \"break-all\", \"break-word\", \"bullets\", \"button\", \"button-bevel\",\n \"buttonface\", \"buttonhighlight\", \"buttonshadow\", \"buttontext\", \"calc\", \"cambodian\",\n \"capitalize\", \"caps-lock-indicator\", \"caption\", \"captiontext\", \"caret\",\n \"cell\", \"center\", \"checkbox\", \"circle\", \"cjk-decimal\", \"cjk-earthly-branch\",\n \"cjk-heavenly-stem\", \"cjk-ideographic\", \"clear\", \"clip\", \"close-quote\",\n \"col-resize\", \"collapse\", \"color\", \"color-burn\", \"color-dodge\", \"column\", \"column-reverse\",\n \"compact\", \"condensed\", \"contain\", \"content\", \"contents\",\n \"content-box\", \"context-menu\", \"continuous\", \"copy\", \"counter\", \"counters\", \"cover\", \"crop\",\n \"cross\", \"crosshair\", \"currentcolor\", \"cursive\", \"cyclic\", \"darken\", \"dashed\", \"decimal\",\n \"decimal-leading-zero\", \"default\", \"default-button\", \"dense\", \"destination-atop\",\n \"destination-in\", \"destination-out\", \"destination-over\", \"devanagari\", \"difference\",\n \"disc\", \"discard\", \"disclosure-closed\", \"disclosure-open\", \"document\",\n \"dot-dash\", \"dot-dot-dash\",\n \"dotted\", \"double\", \"down\", \"e-resize\", \"ease\", \"ease-in\", \"ease-in-out\", \"ease-out\",\n \"element\", \"ellipse\", \"ellipsis\", \"embed\", \"end\", \"ethiopic\", \"ethiopic-abegede\",\n \"ethiopic-abegede-am-et\", \"ethiopic-abegede-gez\", \"ethiopic-abegede-ti-er\",\n \"ethiopic-abegede-ti-et\", \"ethiopic-halehame-aa-er\",\n \"ethiopic-halehame-aa-et\", \"ethiopic-halehame-am-et\",\n \"ethiopic-halehame-gez\", \"ethiopic-halehame-om-et\",\n \"ethiopic-halehame-sid-et\", \"ethiopic-halehame-so-et\",\n \"ethiopic-halehame-ti-er\", \"ethiopic-halehame-ti-et\", \"ethiopic-halehame-tig\",\n \"ethiopic-numeric\", \"ew-resize\", \"exclusion\", \"expanded\", \"extends\", \"extra-condensed\",\n \"extra-expanded\", \"fantasy\", \"fast\", \"fill\", \"fixed\", \"flat\", \"flex\", \"flex-end\", \"flex-start\", \"footnotes\",\n \"forwards\", \"from\", \"geometricPrecision\", \"georgian\", \"graytext\", \"grid\", \"groove\",\n \"gujarati\", \"gurmukhi\", \"hand\", \"hangul\", \"hangul-consonant\", \"hard-light\", \"hebrew\",\n \"help\", \"hidden\", \"hide\", \"higher\", \"highlight\", \"highlighttext\",\n \"hiragana\", \"hiragana-iroha\", \"horizontal\", \"hsl\", \"hsla\", \"hue\", \"icon\", \"ignore\",\n \"inactiveborder\", \"inactivecaption\", \"inactivecaptiontext\", \"infinite\",\n \"infobackground\", \"infotext\", \"inherit\", \"initial\", \"inline\", \"inline-axis\",\n \"inline-block\", \"inline-flex\", \"inline-grid\", \"inline-table\", \"inset\", \"inside\", \"intrinsic\", \"invert\",\n \"italic\", \"japanese-formal\", \"japanese-informal\", \"justify\", \"kannada\",\n \"katakana\", \"katakana-iroha\", \"keep-all\", \"khmer\",\n \"korean-hangul-formal\", \"korean-hanja-formal\", \"korean-hanja-informal\",\n \"landscape\", \"lao\", \"large\", \"larger\", \"left\", \"level\", \"lighter\", \"lighten\",\n \"line-through\", \"linear\", \"linear-gradient\", \"lines\", \"list-item\", \"listbox\", \"listitem\",\n \"local\", \"logical\", \"loud\", \"lower\", \"lower-alpha\", \"lower-armenian\",\n \"lower-greek\", \"lower-hexadecimal\", \"lower-latin\", \"lower-norwegian\",\n \"lower-roman\", \"lowercase\", \"ltr\", \"luminosity\", \"malayalam\", \"match\", \"matrix\", \"matrix3d\",\n \"media-controls-background\", \"media-current-time-display\",\n \"media-fullscreen-button\", \"media-mute-button\", \"media-play-button\",\n \"media-return-to-realtime-button\", \"media-rewind-button\",\n \"media-seek-back-button\", \"media-seek-forward-button\", \"media-slider\",\n \"media-sliderthumb\", \"media-time-remaining-display\", \"media-volume-slider\",\n \"media-volume-slider-container\", \"media-volume-sliderthumb\", \"medium\",\n \"menu\", \"menulist\", \"menulist-button\", \"menulist-text\",\n \"menulist-textfield\", \"menutext\", \"message-box\", \"middle\", \"min-intrinsic\",\n \"mix\", \"mongolian\", \"monospace\", \"move\", \"multiple\", \"multiply\", \"myanmar\", \"n-resize\",\n \"narrower\", \"ne-resize\", \"nesw-resize\", \"no-close-quote\", \"no-drop\",\n \"no-open-quote\", \"no-repeat\", \"none\", \"normal\", \"not-allowed\", \"nowrap\",\n \"ns-resize\", \"numbers\", \"numeric\", \"nw-resize\", \"nwse-resize\", \"oblique\", \"octal\", \"opacity\", \"open-quote\",\n \"optimizeLegibility\", \"optimizeSpeed\", \"oriya\", \"oromo\", \"outset\",\n \"outside\", \"outside-shape\", \"overlay\", \"overline\", \"padding\", \"padding-box\",\n \"painted\", \"page\", \"paused\", \"persian\", \"perspective\", \"plus-darker\", \"plus-lighter\",\n \"pointer\", \"polygon\", \"portrait\", \"pre\", \"pre-line\", \"pre-wrap\", \"preserve-3d\",\n \"progress\", \"push-button\", \"radial-gradient\", \"radio\", \"read-only\",\n \"read-write\", \"read-write-plaintext-only\", \"rectangle\", \"region\",\n \"relative\", \"repeat\", \"repeating-linear-gradient\",\n \"repeating-radial-gradient\", \"repeat-x\", \"repeat-y\", \"reset\", \"reverse\",\n \"rgb\", \"rgba\", \"ridge\", \"right\", \"rotate\", \"rotate3d\", \"rotateX\", \"rotateY\",\n \"rotateZ\", \"round\", \"row\", \"row-resize\", \"row-reverse\", \"rtl\", \"run-in\", \"running\",\n \"s-resize\", \"sans-serif\", \"saturation\", \"scale\", \"scale3d\", \"scaleX\", \"scaleY\", \"scaleZ\", \"screen\",\n \"scroll\", \"scrollbar\", \"scroll-position\", \"se-resize\", \"searchfield\",\n \"searchfield-cancel-button\", \"searchfield-decoration\",\n \"searchfield-results-button\", \"searchfield-results-decoration\", \"self-start\", \"self-end\",\n \"semi-condensed\", \"semi-expanded\", \"separate\", \"serif\", \"show\", \"sidama\",\n \"simp-chinese-formal\", \"simp-chinese-informal\", \"single\",\n \"skew\", \"skewX\", \"skewY\", \"skip-white-space\", \"slide\", \"slider-horizontal\",\n \"slider-vertical\", \"sliderthumb-horizontal\", \"sliderthumb-vertical\", \"slow\",\n \"small\", \"small-caps\", \"small-caption\", \"smaller\", \"soft-light\", \"solid\", \"somali\",\n \"source-atop\", \"source-in\", \"source-out\", \"source-over\", \"space\", \"space-around\", \"space-between\", \"space-evenly\", \"spell-out\", \"square\",\n \"square-button\", \"start\", \"static\", \"status-bar\", \"stretch\", \"stroke\", \"sub\",\n \"subpixel-antialiased\", \"super\", \"sw-resize\", \"symbolic\", \"symbols\", \"system-ui\", \"table\",\n \"table-caption\", \"table-cell\", \"table-column\", \"table-column-group\",\n \"table-footer-group\", \"table-header-group\", \"table-row\", \"table-row-group\",\n \"tamil\",\n \"telugu\", \"text\", \"text-bottom\", \"text-top\", \"textarea\", \"textfield\", \"thai\",\n \"thick\", \"thin\", \"threeddarkshadow\", \"threedface\", \"threedhighlight\",\n \"threedlightshadow\", \"threedshadow\", \"tibetan\", \"tigre\", \"tigrinya-er\",\n \"tigrinya-er-abegede\", \"tigrinya-et\", \"tigrinya-et-abegede\", \"to\", \"top\",\n \"trad-chinese-formal\", \"trad-chinese-informal\", \"transform\",\n \"translate\", \"translate3d\", \"translateX\", \"translateY\", \"translateZ\",\n \"transparent\", \"ultra-condensed\", \"ultra-expanded\", \"underline\", \"unset\", \"up\",\n \"upper-alpha\", \"upper-armenian\", \"upper-greek\", \"upper-hexadecimal\",\n \"upper-latin\", \"upper-norwegian\", \"upper-roman\", \"uppercase\", \"urdu\", \"url\",\n \"var\", \"vertical\", \"vertical-text\", \"visible\", \"visibleFill\", \"visiblePainted\",\n \"visibleStroke\", \"visual\", \"w-resize\", \"wait\", \"wave\", \"wider\",\n \"window\", \"windowframe\", \"windowtext\", \"words\", \"wrap\", \"wrap-reverse\", \"x-large\", \"x-small\", \"xor\",\n \"xx-large\", \"xx-small\"\n ], valueKeywords = keySet(valueKeywords_);\n\n var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_)\n .concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_)\n .concat(valueKeywords_);\n CodeMirror.registerHelper(\"hintWords\", \"css\", allWords);\n\n function tokenCComment(stream, state) {\n var maybeEnd = false, ch;\n while ((ch = stream.next()) != null) {\n if (maybeEnd && ch == \"/\") {\n state.tokenize = null;\n break;\n }\n maybeEnd = (ch == \"*\");\n }\n return [\"comment\", \"comment\"];\n }\n\n CodeMirror.defineMIME(\"text/css\", {\n documentTypes: documentTypes,\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n mediaValueKeywords: mediaValueKeywords,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n fontProperties: fontProperties,\n counterDescriptors: counterDescriptors,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n tokenHooks: {\n \"/\": function(stream, state) {\n if (!stream.eat(\"*\")) return false;\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n }\n },\n name: \"css\"\n });\n\n CodeMirror.defineMIME(\"text/x-scss\", {\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n mediaValueKeywords: mediaValueKeywords,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n fontProperties: fontProperties,\n allowNested: true,\n lineComment: \"//\",\n tokenHooks: {\n \"/\": function(stream, state) {\n if (stream.eat(\"/\")) {\n stream.skipToEnd();\n return [\"comment\", \"comment\"];\n } else if (stream.eat(\"*\")) {\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n } else {\n return [\"operator\", \"operator\"];\n }\n },\n \":\": function(stream) {\n if (stream.match(/\\s*\\{/, false))\n return [null, null]\n return false;\n },\n \"$\": function(stream) {\n stream.match(/^[\\w-]+/);\n if (stream.match(/^\\s*:/, false))\n return [\"variable-2\", \"variable-definition\"];\n return [\"variable-2\", \"variable\"];\n },\n \"#\": function(stream) {\n if (!stream.eat(\"{\")) return false;\n return [null, \"interpolation\"];\n }\n },\n name: \"css\",\n helperType: \"scss\"\n });\n\n CodeMirror.defineMIME(\"text/x-less\", {\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n mediaValueKeywords: mediaValueKeywords,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n fontProperties: fontProperties,\n allowNested: true,\n lineComment: \"//\",\n tokenHooks: {\n \"/\": function(stream, state) {\n if (stream.eat(\"/\")) {\n stream.skipToEnd();\n return [\"comment\", \"comment\"];\n } else if (stream.eat(\"*\")) {\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n } else {\n return [\"operator\", \"operator\"];\n }\n },\n \"@\": function(stream) {\n if (stream.eat(\"{\")) return [null, \"interpolation\"];\n if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\\b/i, false)) return false;\n stream.eatWhile(/[\\w\\\\\\-]/);\n if (stream.match(/^\\s*:/, false))\n return [\"variable-2\", \"variable-definition\"];\n return [\"variable-2\", \"variable\"];\n },\n \"&\": function() {\n return [\"atom\", \"atom\"];\n }\n },\n name: \"css\",\n helperType: \"less\"\n });\n\n CodeMirror.defineMIME(\"text/x-gss\", {\n documentTypes: documentTypes,\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n fontProperties: fontProperties,\n counterDescriptors: counterDescriptors,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n supportsAtComponent: true,\n tokenHooks: {\n \"/\": function(stream, state) {\n if (!stream.eat(\"*\")) return false;\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n }\n },\n name: \"css\",\n helperType: \"gss\"\n });\n\n});\n","module.exports = config => {\n var TEXT_NODE = 'span';\n var c = config;\n var modelAttrStart = 'data-gjs-';\n\n return {\n compTypes: '',\n\n /**\n * Parse style string to object\n * @param {string} str\n * @return {Object}\n * @example\n * var stl = ParserHtml.parseStyle('color:black; width:100px; test:value;');\n * console.log(stl);\n * // {color: 'black', width: '100px', test: 'value'}\n */\n parseStyle(str) {\n var result = {};\n var decls = str.split(';');\n for (var i = 0, len = decls.length; i < len; i++) {\n var decl = decls[i].trim();\n if (!decl) continue;\n var prop = decl.split(':');\n result[prop[0].trim()] = prop\n .slice(1)\n .join(':')\n .trim();\n }\n return result;\n },\n\n /**\n * Parse class string to array\n * @param {string} str\n * @return {Array}\n * @example\n * var res = ParserHtml.parseClass('test1 test2 test3');\n * console.log(res);\n * // ['test1', 'test2', 'test3']\n */\n parseClass(str) {\n const result = [];\n const cls = str.split(' ');\n for (let i = 0, len = cls.length; i < len; i++) {\n const cl = cls[i].trim();\n if (!cl) continue;\n result.push(cl);\n }\n return result;\n },\n\n /**\n * Get data from the node element\n * @param {HTMLElement} el DOM element to traverse\n * @return {Array}\n */\n parseNode(el) {\n const result = [];\n const nodes = el.childNodes;\n\n for (var i = 0, len = nodes.length; i < len; i++) {\n const node = nodes[i];\n const attrs = node.attributes || [];\n const attrsLen = attrs.length;\n const nodePrev = result[result.length - 1];\n const nodeChild = node.childNodes.length;\n const ct = this.compTypes;\n let model = {};\n\n // Start with understanding what kind of component it is\n if (ct) {\n let obj = '';\n let type =\n node.getAttribute && node.getAttribute(`${modelAttrStart}type`);\n\n // If the type is already defined, use it\n if (type) {\n model = { type };\n } else {\n // Iterate over all available Component Types and\n // the first with a valid result will be that component\n for (let it = 0; it < ct.length; it++) {\n obj = ct[it].model.isComponent(node);\n if (obj) break;\n }\n\n model = obj;\n }\n }\n\n // Set tag name if not yet done\n if (!model.tagName) {\n model.tagName = node.tagName ? node.tagName.toLowerCase() : '';\n }\n\n if (attrsLen) {\n model.attributes = {};\n }\n\n // Parse attributes\n for (let j = 0; j < attrsLen; j++) {\n const nodeName = attrs[j].nodeName;\n let nodeValue = attrs[j].nodeValue;\n\n // Isolate attributes\n if (nodeName == 'style') {\n model.style = this.parseStyle(nodeValue);\n } else if (nodeName == 'class') {\n model.classes = this.parseClass(nodeValue);\n } else if (nodeName == 'contenteditable') {\n continue;\n } else if (nodeName.indexOf(modelAttrStart) === 0) {\n const modelAttr = nodeName.replace(modelAttrStart, '');\n const valueLen = nodeValue.length;\n const firstChar = nodeValue && nodeValue.substr(0, 1);\n const lastChar = nodeValue && nodeValue.substr(valueLen - 1);\n nodeValue = nodeValue === 'true' ? true : nodeValue;\n nodeValue = nodeValue === 'false' ? false : nodeValue;\n\n // Try to parse JSON where it's possible\n // I can get false positive here (eg. a selector '[data-attr]')\n // so put it under try/catch and let fail silently\n try {\n nodeValue =\n (firstChar == '{' && lastChar == '}') ||\n (firstChar == '[' && lastChar == ']')\n ? JSON.parse(nodeValue)\n : nodeValue;\n } catch (e) {}\n\n model[modelAttr] = nodeValue;\n } else {\n model.attributes[nodeName] = nodeValue;\n }\n }\n\n // Check for nested elements but avoid it if already provided\n if (nodeChild && !model.components) {\n // Avoid infinite nested text nodes\n const firstChild = node.childNodes[0];\n\n // If there is only one child and it's a TEXTNODE\n // just make it content of the current node\n if (nodeChild === 1 && firstChild.nodeType === 3) {\n !model.type && (model.type = 'text');\n model.content = firstChild.nodeValue;\n } else {\n model.components = this.parseNode(node);\n }\n }\n\n // Check if it's a text node and if could be moved to the prevous model\n if (model.type == 'textnode') {\n if (nodePrev && nodePrev.type == 'textnode') {\n nodePrev.content += model.content;\n continue;\n }\n\n // Throw away empty nodes (keep spaces)\n if (!config.keepEmptyTextNodes) {\n const content = node.nodeValue;\n if (content != ' ' && !content.trim()) {\n continue;\n }\n }\n }\n\n // If all children are texts and there is some textnode the parent should\n // be text too otherwise I'm unable to edit texnodes\n const comps = model.components;\n if (!model.type && comps) {\n let allTxt = 1;\n let foundTextNode = 0;\n\n for (let ci = 0; ci < comps.length; ci++) {\n const comp = comps[ci];\n const cType = comp.type;\n\n if (\n ['text', 'textnode'].indexOf(cType) < 0 &&\n c.textTags.indexOf(comp.tagName) < 0\n ) {\n allTxt = 0;\n break;\n }\n\n if (cType == 'textnode') {\n foundTextNode = 1;\n }\n }\n\n if (allTxt && foundTextNode) {\n model.type = 'text';\n }\n }\n\n // If tagName is still empty and is not a textnode, do not push it\n if (!model.tagName && model.type != 'textnode') {\n continue;\n }\n\n result.push(model);\n }\n\n return result;\n },\n\n /**\n * Parse HTML string to a desired model object\n * @param {string} str HTML string\n * @param {ParserCss} parserCss In case there is style tags inside HTML\n * @return {Object}\n */\n parse(str, parserCss) {\n var config = (c.em && c.em.get('Config')) || {};\n var res = { html: '', css: '' };\n var el = document.createElement('div');\n el.innerHTML = str;\n var scripts = el.querySelectorAll('script');\n var i = scripts.length;\n\n // Remove all scripts\n if (!config.allowScripts) {\n while (i--) scripts[i].parentNode.removeChild(scripts[i]);\n }\n\n // Detach style tags and parse them\n if (parserCss) {\n var styleStr = '';\n var styles = el.querySelectorAll('style');\n var j = styles.length;\n\n while (j--) {\n styleStr = styles[j].innerHTML + styleStr;\n styles[j].parentNode.removeChild(styles[j]);\n }\n\n if (styleStr) res.css = parserCss.parse(styleStr);\n }\n\n var result = this.parseNode(el);\n\n if (result.length == 1) result = result[0];\n\n res.html = result;\n\n return res;\n }\n };\n};\n","import Promise from 'promise-polyfill';\n\nwindow.Promise = window.Promise || Promise;\n\nexport default (typeof fetch == 'function'\n ? fetch.bind()\n : (url, options) => {\n return new Promise((res, rej) => {\n const req = new XMLHttpRequest();\n req.open(options.method || 'get', url);\n req.withCredentials = options.credentials == 'include';\n\n for (let k in options.headers || {}) {\n req.setRequestHeader(k, options.headers[k]);\n }\n\n req.onload = e =>\n res({\n status: req.status,\n statusText: req.statusText,\n text: () => Promise.resolve(req.responseText)\n });\n req.onerror = rej;\n\n // Actually, fetch doesn't support onProgress feature\n if (req.upload && options.onProgress) {\n req.upload.onprogress = options.onProgress;\n }\n\n // Include body only if present\n options.body ? req.send(options.body) : req.send();\n });\n });\n","// Underscore.js 1.8.3\n// http://underscorejs.org\n// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n// Underscore may be freely distributed under the MIT license.\n\n(function() {\n\n // Baseline setup\n // --------------\n\n // Establish the root object, `window` in the browser, or `exports` on the server.\n var root = this;\n\n // Save the previous value of the `_` variable.\n var previousUnderscore = root._;\n\n // Save bytes in the minified (but not gzipped) version:\n var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;\n\n // Create quick reference variables for speed access to core prototypes.\n var\n push = ArrayProto.push,\n slice = ArrayProto.slice,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n // All **ECMAScript 5** native function implementations that we hope to use\n // are declared here.\n var\n nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeBind = FuncProto.bind,\n nativeCreate = Object.create;\n\n // Naked function reference for surrogate-prototype-swapping.\n var Ctor = function(){};\n\n // Create a safe reference to the Underscore object for use below.\n var _ = function(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n };\n\n // Export the Underscore object for **Node.js**, with\n // backwards-compatibility for the old `require()` API. If we're in\n // the browser, add `_` as a global object.\n if (typeof exports !== 'undefined') {\n if (typeof module !== 'undefined' && module.exports) {\n exports = module.exports = _;\n }\n exports._ = _;\n } else {\n root._ = _;\n }\n\n // Current version.\n _.VERSION = '1.8.3';\n\n // Internal function that returns an efficient (for current engines) version\n // of the passed-in callback, to be repeatedly applied in other Underscore\n // functions.\n var optimizeCb = function(func, context, argCount) {\n if (context === void 0) return func;\n switch (argCount == null ? 3 : argCount) {\n case 1: return function(value) {\n return func.call(context, value);\n };\n case 2: return function(value, other) {\n return func.call(context, value, other);\n };\n case 3: return function(value, index, collection) {\n return func.call(context, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(context, accumulator, value, index, collection);\n };\n }\n return function() {\n return func.apply(context, arguments);\n };\n };\n\n // A mostly-internal function to generate callbacks that can be applied\n // to each element in a collection, returning the desired result — either\n // identity, an arbitrary callback, a property matcher, or a property accessor.\n var cb = function(value, context, argCount) {\n if (value == null) return _.identity;\n if (_.isFunction(value)) return optimizeCb(value, context, argCount);\n if (_.isObject(value)) return _.matcher(value);\n return _.property(value);\n };\n _.iteratee = function(value, context) {\n return cb(value, context, Infinity);\n };\n\n // An internal function for creating assigner functions.\n var createAssigner = function(keysFunc, undefinedOnly) {\n return function(obj) {\n var length = arguments.length;\n if (length < 2 || obj == null) return obj;\n for (var index = 1; index < length; index++) {\n var source = arguments[index],\n keys = keysFunc(source),\n l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key];\n }\n }\n return obj;\n };\n };\n\n // An internal function for creating a new object that inherits from another.\n var baseCreate = function(prototype) {\n if (!_.isObject(prototype)) return {};\n if (nativeCreate) return nativeCreate(prototype);\n Ctor.prototype = prototype;\n var result = new Ctor;\n Ctor.prototype = null;\n return result;\n };\n\n var property = function(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n };\n\n // Helper for collection methods to determine whether a collection\n // should be iterated as an array or as an object\n // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\n var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\n var getLength = property('length');\n var isArrayLike = function(collection) {\n var length = getLength(collection);\n return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;\n };\n\n // Collection Functions\n // --------------------\n\n // The cornerstone, an `each` implementation, aka `forEach`.\n // Handles raw objects in addition to array-likes. Treats all\n // sparse array-likes as if they were dense.\n _.each = _.forEach = function(obj, iteratee, context) {\n iteratee = optimizeCb(iteratee, context);\n var i, length;\n if (isArrayLike(obj)) {\n for (i = 0, length = obj.length; i < length; i++) {\n iteratee(obj[i], i, obj);\n }\n } else {\n var keys = _.keys(obj);\n for (i = 0, length = keys.length; i < length; i++) {\n iteratee(obj[keys[i]], keys[i], obj);\n }\n }\n return obj;\n };\n\n // Return the results of applying the iteratee to each element.\n _.map = _.collect = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n results = Array(length);\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n results[index] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Create a reducing function iterating left or right.\n function createReduce(dir) {\n // Optimized iterator function as using arguments.length\n // in the main function will deoptimize the, see #1991.\n function iterator(obj, iteratee, memo, keys, index, length) {\n for (; index >= 0 && index < length; index += dir) {\n var currentKey = keys ? keys[index] : index;\n memo = iteratee(memo, obj[currentKey], currentKey, obj);\n }\n return memo;\n }\n\n return function(obj, iteratee, memo, context) {\n iteratee = optimizeCb(iteratee, context, 4);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n index = dir > 0 ? 0 : length - 1;\n // Determine the initial value if none is provided.\n if (arguments.length < 3) {\n memo = obj[keys ? keys[index] : index];\n index += dir;\n }\n return iterator(obj, iteratee, memo, keys, index, length);\n };\n }\n\n // **Reduce** builds up a single result from a list of values, aka `inject`,\n // or `foldl`.\n _.reduce = _.foldl = _.inject = createReduce(1);\n\n // The right-associative version of reduce, also known as `foldr`.\n _.reduceRight = _.foldr = createReduce(-1);\n\n // Return the first value which passes a truth test. Aliased as `detect`.\n _.find = _.detect = function(obj, predicate, context) {\n var key;\n if (isArrayLike(obj)) {\n key = _.findIndex(obj, predicate, context);\n } else {\n key = _.findKey(obj, predicate, context);\n }\n if (key !== void 0 && key !== -1) return obj[key];\n };\n\n // Return all the elements that pass a truth test.\n // Aliased as `select`.\n _.filter = _.select = function(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n _.each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n };\n\n // Return all the elements for which a truth test fails.\n _.reject = function(obj, predicate, context) {\n return _.filter(obj, _.negate(cb(predicate)), context);\n };\n\n // Determine whether all of the elements match a truth test.\n // Aliased as `all`.\n _.every = _.all = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (!predicate(obj[currentKey], currentKey, obj)) return false;\n }\n return true;\n };\n\n // Determine if at least one element in the object matches a truth test.\n // Aliased as `any`.\n _.some = _.any = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (predicate(obj[currentKey], currentKey, obj)) return true;\n }\n return false;\n };\n\n // Determine if the array or object contains a given item (using `===`).\n // Aliased as `includes` and `include`.\n _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n return _.indexOf(obj, item, fromIndex) >= 0;\n };\n\n // Invoke a method (with arguments) on every item in a collection.\n _.invoke = function(obj, method) {\n var args = slice.call(arguments, 2);\n var isFunc = _.isFunction(method);\n return _.map(obj, function(value) {\n var func = isFunc ? method : value[method];\n return func == null ? func : func.apply(value, args);\n });\n };\n\n // Convenience version of a common use case of `map`: fetching a property.\n _.pluck = function(obj, key) {\n return _.map(obj, _.property(key));\n };\n\n // Convenience version of a common use case of `filter`: selecting only objects\n // containing specific `key:value` pairs.\n _.where = function(obj, attrs) {\n return _.filter(obj, _.matcher(attrs));\n };\n\n // Convenience version of a common use case of `find`: getting the first object\n // containing specific `key:value` pairs.\n _.findWhere = function(obj, attrs) {\n return _.find(obj, _.matcher(attrs));\n };\n\n // Return the maximum element (or element-based computation).\n _.max = function(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index, list) {\n computed = iteratee(value, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = value;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Return the minimum element (or element-based computation).\n _.min = function(obj, iteratee, context) {\n var result = Infinity, lastComputed = Infinity,\n value, computed;\n if (iteratee == null && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value < result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index, list) {\n computed = iteratee(value, index, list);\n if (computed < lastComputed || computed === Infinity && result === Infinity) {\n result = value;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Shuffle a collection, using the modern version of the\n // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n _.shuffle = function(obj) {\n var set = isArrayLike(obj) ? obj : _.values(obj);\n var length = set.length;\n var shuffled = Array(length);\n for (var index = 0, rand; index < length; index++) {\n rand = _.random(0, index);\n if (rand !== index) shuffled[index] = shuffled[rand];\n shuffled[rand] = set[index];\n }\n return shuffled;\n };\n\n // Sample **n** random values from a collection.\n // If **n** is not specified, returns a single random element.\n // The internal `guard` argument allows it to work with `map`.\n _.sample = function(obj, n, guard) {\n if (n == null || guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n return obj[_.random(obj.length - 1)];\n }\n return _.shuffle(obj).slice(0, Math.max(0, n));\n };\n\n // Sort the object's values by a criterion produced by an iteratee.\n _.sortBy = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n return _.pluck(_.map(obj, function(value, index, list) {\n return {\n value: value,\n index: index,\n criteria: iteratee(value, index, list)\n };\n }).sort(function(left, right) {\n var a = left.criteria;\n var b = right.criteria;\n if (a !== b) {\n if (a > b || a === void 0) return 1;\n if (a < b || b === void 0) return -1;\n }\n return left.index - right.index;\n }), 'value');\n };\n\n // An internal function used for aggregate \"group by\" operations.\n var group = function(behavior) {\n return function(obj, iteratee, context) {\n var result = {};\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index) {\n var key = iteratee(value, index, obj);\n behavior(result, value, key);\n });\n return result;\n };\n };\n\n // Groups the object's values by a criterion. Pass either a string attribute\n // to group by, or a function that returns the criterion.\n _.groupBy = group(function(result, value, key) {\n if (_.has(result, key)) result[key].push(value); else result[key] = [value];\n });\n\n // Indexes the object's values by a criterion, similar to `groupBy`, but for\n // when you know that your index values will be unique.\n _.indexBy = group(function(result, value, key) {\n result[key] = value;\n });\n\n // Counts instances of an object that group by a certain criterion. Pass\n // either a string attribute to count by, or a function that returns the\n // criterion.\n _.countBy = group(function(result, value, key) {\n if (_.has(result, key)) result[key]++; else result[key] = 1;\n });\n\n // Safely create a real, live array from anything iterable.\n _.toArray = function(obj) {\n if (!obj) return [];\n if (_.isArray(obj)) return slice.call(obj);\n if (isArrayLike(obj)) return _.map(obj, _.identity);\n return _.values(obj);\n };\n\n // Return the number of elements in an object.\n _.size = function(obj) {\n if (obj == null) return 0;\n return isArrayLike(obj) ? obj.length : _.keys(obj).length;\n };\n\n // Split a collection into two arrays: one whose elements all satisfy the given\n // predicate, and one whose elements all do not satisfy the predicate.\n _.partition = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var pass = [], fail = [];\n _.each(obj, function(value, key, obj) {\n (predicate(value, key, obj) ? pass : fail).push(value);\n });\n return [pass, fail];\n };\n\n // Array Functions\n // ---------------\n\n // Get the first element of an array. Passing **n** will return the first N\n // values in the array. Aliased as `head` and `take`. The **guard** check\n // allows it to work with `_.map`.\n _.first = _.head = _.take = function(array, n, guard) {\n if (array == null) return void 0;\n if (n == null || guard) return array[0];\n return _.initial(array, array.length - n);\n };\n\n // Returns everything but the last entry of the array. Especially useful on\n // the arguments object. Passing **n** will return all the values in\n // the array, excluding the last N.\n _.initial = function(array, n, guard) {\n return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n };\n\n // Get the last element of an array. Passing **n** will return the last N\n // values in the array.\n _.last = function(array, n, guard) {\n if (array == null) return void 0;\n if (n == null || guard) return array[array.length - 1];\n return _.rest(array, Math.max(0, array.length - n));\n };\n\n // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.\n // Especially useful on the arguments object. Passing an **n** will return\n // the rest N values in the array.\n _.rest = _.tail = _.drop = function(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n };\n\n // Trim out all falsy values from an array.\n _.compact = function(array) {\n return _.filter(array, _.identity);\n };\n\n // Internal implementation of a recursive `flatten` function.\n var flatten = function(input, shallow, strict, startIndex) {\n var output = [], idx = 0;\n for (var i = startIndex || 0, length = getLength(input); i < length; i++) {\n var value = input[i];\n if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {\n //flatten current level of array or arguments object\n if (!shallow) value = flatten(value, shallow, strict);\n var j = 0, len = value.length;\n output.length += len;\n while (j < len) {\n output[idx++] = value[j++];\n }\n } else if (!strict) {\n output[idx++] = value;\n }\n }\n return output;\n };\n\n // Flatten out an array, either recursively (by default), or just one level.\n _.flatten = function(array, shallow) {\n return flatten(array, shallow, false);\n };\n\n // Return a version of the array that does not contain the specified value(s).\n _.without = function(array) {\n return _.difference(array, slice.call(arguments, 1));\n };\n\n // Produce a duplicate-free version of the array. If the array has already\n // been sorted, you have the option of using a faster algorithm.\n // Aliased as `unique`.\n _.uniq = _.unique = function(array, isSorted, iteratee, context) {\n if (!_.isBoolean(isSorted)) {\n context = iteratee;\n iteratee = isSorted;\n isSorted = false;\n }\n if (iteratee != null) iteratee = cb(iteratee, context);\n var result = [];\n var seen = [];\n for (var i = 0, length = getLength(array); i < length; i++) {\n var value = array[i],\n computed = iteratee ? iteratee(value, i, array) : value;\n if (isSorted) {\n if (!i || seen !== computed) result.push(value);\n seen = computed;\n } else if (iteratee) {\n if (!_.contains(seen, computed)) {\n seen.push(computed);\n result.push(value);\n }\n } else if (!_.contains(result, value)) {\n result.push(value);\n }\n }\n return result;\n };\n\n // Produce an array that contains the union: each distinct element from all of\n // the passed-in arrays.\n _.union = function() {\n return _.uniq(flatten(arguments, true, true));\n };\n\n // Produce an array that contains every item shared between all the\n // passed-in arrays.\n _.intersection = function(array) {\n var result = [];\n var argsLength = arguments.length;\n for (var i = 0, length = getLength(array); i < length; i++) {\n var item = array[i];\n if (_.contains(result, item)) continue;\n for (var j = 1; j < argsLength; j++) {\n if (!_.contains(arguments[j], item)) break;\n }\n if (j === argsLength) result.push(item);\n }\n return result;\n };\n\n // Take the difference between one array and a number of other arrays.\n // Only the elements present in just the first array will remain.\n _.difference = function(array) {\n var rest = flatten(arguments, true, true, 1);\n return _.filter(array, function(value){\n return !_.contains(rest, value);\n });\n };\n\n // Zip together multiple lists into a single array -- elements that share\n // an index go together.\n _.zip = function() {\n return _.unzip(arguments);\n };\n\n // Complement of _.zip. Unzip accepts an array of arrays and groups\n // each array's elements on shared indices\n _.unzip = function(array) {\n var length = array && _.max(array, getLength).length || 0;\n var result = Array(length);\n\n for (var index = 0; index < length; index++) {\n result[index] = _.pluck(array, index);\n }\n return result;\n };\n\n // Converts lists into objects. Pass either a single array of `[key, value]`\n // pairs, or two parallel arrays of the same length -- one of keys, and one of\n // the corresponding values.\n _.object = function(list, values) {\n var result = {};\n for (var i = 0, length = getLength(list); i < length; i++) {\n if (values) {\n result[list[i]] = values[i];\n } else {\n result[list[i][0]] = list[i][1];\n }\n }\n return result;\n };\n\n // Generator function to create the findIndex and findLastIndex functions\n function createPredicateIndexFinder(dir) {\n return function(array, predicate, context) {\n predicate = cb(predicate, context);\n var length = getLength(array);\n var index = dir > 0 ? 0 : length - 1;\n for (; index >= 0 && index < length; index += dir) {\n if (predicate(array[index], index, array)) return index;\n }\n return -1;\n };\n }\n\n // Returns the first index on an array-like that passes a predicate test\n _.findIndex = createPredicateIndexFinder(1);\n _.findLastIndex = createPredicateIndexFinder(-1);\n\n // Use a comparator function to figure out the smallest index at which\n // an object should be inserted so as to maintain order. Uses binary search.\n _.sortedIndex = function(array, obj, iteratee, context) {\n iteratee = cb(iteratee, context, 1);\n var value = iteratee(obj);\n var low = 0, high = getLength(array);\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n }\n return low;\n };\n\n // Generator function to create the indexOf and lastIndexOf functions\n function createIndexFinder(dir, predicateFind, sortedIndex) {\n return function(array, item, idx) {\n var i = 0, length = getLength(array);\n if (typeof idx == 'number') {\n if (dir > 0) {\n i = idx >= 0 ? idx : Math.max(idx + length, i);\n } else {\n length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n }\n } else if (sortedIndex && idx && length) {\n idx = sortedIndex(array, item);\n return array[idx] === item ? idx : -1;\n }\n if (item !== item) {\n idx = predicateFind(slice.call(array, i, length), _.isNaN);\n return idx >= 0 ? idx + i : -1;\n }\n for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n if (array[idx] === item) return idx;\n }\n return -1;\n };\n }\n\n // Return the position of the first occurrence of an item in an array,\n // or -1 if the item is not included in the array.\n // If the array is large and already in sort order, pass `true`\n // for **isSorted** to use binary search.\n _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex);\n _.lastIndexOf = createIndexFinder(-1, _.findLastIndex);\n\n // Generate an integer Array containing an arithmetic progression. A port of\n // the native Python `range()` function. See\n // [the Python documentation](http://docs.python.org/library/functions.html#range).\n _.range = function(start, stop, step) {\n if (stop == null) {\n stop = start || 0;\n start = 0;\n }\n step = step || 1;\n\n var length = Math.max(Math.ceil((stop - start) / step), 0);\n var range = Array(length);\n\n for (var idx = 0; idx < length; idx++, start += step) {\n range[idx] = start;\n }\n\n return range;\n };\n\n // Function (ahem) Functions\n // ------------------\n\n // Determines whether to execute a function as a constructor\n // or a normal function with the provided arguments\n var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {\n if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n var self = baseCreate(sourceFunc.prototype);\n var result = sourceFunc.apply(self, args);\n if (_.isObject(result)) return result;\n return self;\n };\n\n // Create a function bound to a given object (assigning `this`, and arguments,\n // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\n // available.\n _.bind = function(func, context) {\n if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));\n if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');\n var args = slice.call(arguments, 2);\n var bound = function() {\n return executeBound(func, bound, context, this, args.concat(slice.call(arguments)));\n };\n return bound;\n };\n\n // Partially apply a function by creating a version that has had some of its\n // arguments pre-filled, without changing its dynamic `this` context. _ acts\n // as a placeholder, allowing any combination of arguments to be pre-filled.\n _.partial = function(func) {\n var boundArgs = slice.call(arguments, 1);\n var bound = function() {\n var position = 0, length = boundArgs.length;\n var args = Array(length);\n for (var i = 0; i < length; i++) {\n args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i];\n }\n while (position < arguments.length) args.push(arguments[position++]);\n return executeBound(func, bound, this, this, args);\n };\n return bound;\n };\n\n // Bind a number of an object's methods to that object. Remaining arguments\n // are the method names to be bound. Useful for ensuring that all callbacks\n // defined on an object belong to it.\n _.bindAll = function(obj) {\n var i, length = arguments.length, key;\n if (length <= 1) throw new Error('bindAll must be passed function names');\n for (i = 1; i < length; i++) {\n key = arguments[i];\n obj[key] = _.bind(obj[key], obj);\n }\n return obj;\n };\n\n // Memoize an expensive function by storing its results.\n _.memoize = function(func, hasher) {\n var memoize = function(key) {\n var cache = memoize.cache;\n var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n if (!_.has(cache, address)) cache[address] = func.apply(this, arguments);\n return cache[address];\n };\n memoize.cache = {};\n return memoize;\n };\n\n // Delays a function for the given number of milliseconds, and then calls\n // it with the arguments supplied.\n _.delay = function(func, wait) {\n var args = slice.call(arguments, 2);\n return setTimeout(function(){\n return func.apply(null, args);\n }, wait);\n };\n\n // Defers a function, scheduling it to run after the current call stack has\n // cleared.\n _.defer = _.partial(_.delay, _, 1);\n\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time. Normally, the throttled function will run\n // as much as it can, without ever going more than once per `wait` duration;\n // but if you'd like to disable the execution on the leading edge, pass\n // `{leading: false}`. To disable execution on the trailing edge, ditto.\n _.throttle = function(func, wait, options) {\n var context, args, result;\n var timeout = null;\n var previous = 0;\n if (!options) options = {};\n var later = function() {\n previous = options.leading === false ? 0 : _.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n return function() {\n var now = _.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n };\n\n // Returns a function, that, as long as it continues to be invoked, will not\n // be triggered. The function will be called after it stops being called for\n // N milliseconds. If `immediate` is passed, trigger the function on the\n // leading edge, instead of the trailing.\n _.debounce = function(func, wait, immediate) {\n var timeout, args, context, timestamp, result;\n\n var later = function() {\n var last = _.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n }\n }\n };\n\n return function() {\n context = this;\n args = arguments;\n timestamp = _.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n };\n\n // Returns the first function passed as an argument to the second,\n // allowing you to adjust arguments, run code before and after, and\n // conditionally execute the original function.\n _.wrap = function(func, wrapper) {\n return _.partial(wrapper, func);\n };\n\n // Returns a negated version of the passed-in predicate.\n _.negate = function(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n };\n };\n\n // Returns a function that is the composition of a list of functions, each\n // consuming the return value of the function that follows.\n _.compose = function() {\n var args = arguments;\n var start = args.length - 1;\n return function() {\n var i = start;\n var result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n };\n\n // Returns a function that will only be executed on and after the Nth call.\n _.after = function(times, func) {\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n };\n\n // Returns a function that will only be executed up to (but not including) the Nth call.\n _.before = function(times, func) {\n var memo;\n return function() {\n if (--times > 0) {\n memo = func.apply(this, arguments);\n }\n if (times <= 1) func = null;\n return memo;\n };\n };\n\n // Returns a function that will be executed at most one time, no matter how\n // often you call it. Useful for lazy initialization.\n _.once = _.partial(_.before, 2);\n\n // Object Functions\n // ----------------\n\n // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\n var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\n var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\n function collectNonEnumProps(obj, keys) {\n var nonEnumIdx = nonEnumerableProps.length;\n var constructor = obj.constructor;\n var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto;\n\n // Constructor is a special case.\n var prop = 'constructor';\n if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);\n\n while (nonEnumIdx--) {\n prop = nonEnumerableProps[nonEnumIdx];\n if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {\n keys.push(prop);\n }\n }\n }\n\n // Retrieve the names of an object's own properties.\n // Delegates to **ECMAScript 5**'s native `Object.keys`\n _.keys = function(obj) {\n if (!_.isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var keys = [];\n for (var key in obj) if (_.has(obj, key)) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve all the property names of an object.\n _.allKeys = function(obj) {\n if (!_.isObject(obj)) return [];\n var keys = [];\n for (var key in obj) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve the values of an object's properties.\n _.values = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[keys[i]];\n }\n return values;\n };\n\n // Returns the results of applying the iteratee to each element of the object\n // In contrast to _.map it returns an object\n _.mapObject = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = _.keys(obj),\n length = keys.length,\n results = {},\n currentKey;\n for (var index = 0; index < length; index++) {\n currentKey = keys[index];\n results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Convert an object into a list of `[key, value]` pairs.\n _.pairs = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var pairs = Array(length);\n for (var i = 0; i < length; i++) {\n pairs[i] = [keys[i], obj[keys[i]]];\n }\n return pairs;\n };\n\n // Invert the keys and values of an object. The values must be serializable.\n _.invert = function(obj) {\n var result = {};\n var keys = _.keys(obj);\n for (var i = 0, length = keys.length; i < length; i++) {\n result[obj[keys[i]]] = keys[i];\n }\n return result;\n };\n\n // Return a sorted list of the function names available on the object.\n // Aliased as `methods`\n _.functions = _.methods = function(obj) {\n var names = [];\n for (var key in obj) {\n if (_.isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n };\n\n // Extend a given object with all the properties in passed-in object(s).\n _.extend = createAssigner(_.allKeys);\n\n // Assigns a given object with all the own properties in the passed-in object(s)\n // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\n _.extendOwn = _.assign = createAssigner(_.keys);\n\n // Returns the first key on an object that passes a predicate test\n _.findKey = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = _.keys(obj), key;\n for (var i = 0, length = keys.length; i < length; i++) {\n key = keys[i];\n if (predicate(obj[key], key, obj)) return key;\n }\n };\n\n // Return a copy of the object only containing the whitelisted properties.\n _.pick = function(object, oiteratee, context) {\n var result = {}, obj = object, iteratee, keys;\n if (obj == null) return result;\n if (_.isFunction(oiteratee)) {\n keys = _.allKeys(obj);\n iteratee = optimizeCb(oiteratee, context);\n } else {\n keys = flatten(arguments, false, false, 1);\n iteratee = function(value, key, obj) { return key in obj; };\n obj = Object(obj);\n }\n for (var i = 0, length = keys.length; i < length; i++) {\n var key = keys[i];\n var value = obj[key];\n if (iteratee(value, key, obj)) result[key] = value;\n }\n return result;\n };\n\n // Return a copy of the object without the blacklisted properties.\n _.omit = function(obj, iteratee, context) {\n if (_.isFunction(iteratee)) {\n iteratee = _.negate(iteratee);\n } else {\n var keys = _.map(flatten(arguments, false, false, 1), String);\n iteratee = function(value, key) {\n return !_.contains(keys, key);\n };\n }\n return _.pick(obj, iteratee, context);\n };\n\n // Fill in a given object with default properties.\n _.defaults = createAssigner(_.allKeys, true);\n\n // Creates an object that inherits from the given prototype object.\n // If additional properties are provided then they will be added to the\n // created object.\n _.create = function(prototype, props) {\n var result = baseCreate(prototype);\n if (props) _.extendOwn(result, props);\n return result;\n };\n\n // Create a (shallow-cloned) duplicate of an object.\n _.clone = function(obj) {\n if (!_.isObject(obj)) return obj;\n return _.isArray(obj) ? obj.slice() : _.extend({}, obj);\n };\n\n // Invokes interceptor with the obj, and then returns obj.\n // The primary purpose of this method is to \"tap into\" a method chain, in\n // order to perform operations on intermediate results within the chain.\n _.tap = function(obj, interceptor) {\n interceptor(obj);\n return obj;\n };\n\n // Returns whether an object has a given set of `key:value` pairs.\n _.isMatch = function(object, attrs) {\n var keys = _.keys(attrs), length = keys.length;\n if (object == null) return !length;\n var obj = Object(object);\n for (var i = 0; i < length; i++) {\n var key = keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) return false;\n }\n return true;\n };\n\n\n // Internal recursive comparison function for `isEqual`.\n var eq = function(a, b, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a instanceof _) a = a._wrapped;\n if (b instanceof _) b = b._wrapped;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n case '[object RegExp]':\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return '' + a === '' + b;\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN\n if (+a !== +a) return +b !== +b;\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n }\n\n var areArrays = className === '[object Array]';\n if (!areArrays) {\n if (typeof a != 'object' || typeof b != 'object') return false;\n\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&\n _.isFunction(bCtor) && bCtor instanceof bCtor)\n && ('constructor' in a && 'constructor' in b)) {\n return false;\n }\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n }\n\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false;\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var keys = _.keys(a), key;\n length = keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (_.keys(b).length !== length) return false;\n while (length--) {\n // Deep compare each member\n key = keys[length];\n if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n };\n\n // Perform a deep comparison to check if two objects are equal.\n _.isEqual = function(a, b) {\n return eq(a, b);\n };\n\n // Is a given array, string, or object empty?\n // An \"empty\" object has no enumerable own-properties.\n _.isEmpty = function(obj) {\n if (obj == null) return true;\n if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;\n return _.keys(obj).length === 0;\n };\n\n // Is a given value a DOM element?\n _.isElement = function(obj) {\n return !!(obj && obj.nodeType === 1);\n };\n\n // Is a given value an array?\n // Delegates to ECMA5's native Array.isArray\n _.isArray = nativeIsArray || function(obj) {\n return toString.call(obj) === '[object Array]';\n };\n\n // Is a given variable an object?\n _.isObject = function(obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object' && !!obj;\n };\n\n // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError.\n _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) {\n _['is' + name] = function(obj) {\n return toString.call(obj) === '[object ' + name + ']';\n };\n });\n\n // Define a fallback version of the method in browsers (ahem, IE < 9), where\n // there isn't any inspectable \"Arguments\" type.\n if (!_.isArguments(arguments)) {\n _.isArguments = function(obj) {\n return _.has(obj, 'callee');\n };\n }\n\n // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,\n // IE 11 (#1621), and in Safari 8 (#1929).\n if (typeof /./ != 'function' && typeof Int8Array != 'object') {\n _.isFunction = function(obj) {\n return typeof obj == 'function' || false;\n };\n }\n\n // Is a given object a finite number?\n _.isFinite = function(obj) {\n return isFinite(obj) && !isNaN(parseFloat(obj));\n };\n\n // Is the given value `NaN`? (NaN is the only number which does not equal itself).\n _.isNaN = function(obj) {\n return _.isNumber(obj) && obj !== +obj;\n };\n\n // Is a given value a boolean?\n _.isBoolean = function(obj) {\n return obj === true || obj === false || toString.call(obj) === '[object Boolean]';\n };\n\n // Is a given value equal to null?\n _.isNull = function(obj) {\n return obj === null;\n };\n\n // Is a given variable undefined?\n _.isUndefined = function(obj) {\n return obj === void 0;\n };\n\n // Shortcut function for checking if an object has a given property directly\n // on itself (in other words, not on a prototype).\n _.has = function(obj, key) {\n return obj != null && hasOwnProperty.call(obj, key);\n };\n\n // Utility Functions\n // -----------------\n\n // Run Underscore.js in *noConflict* mode, returning the `_` variable to its\n // previous owner. Returns a reference to the Underscore object.\n _.noConflict = function() {\n root._ = previousUnderscore;\n return this;\n };\n\n // Keep the identity function around for default iteratees.\n _.identity = function(value) {\n return value;\n };\n\n // Predicate-generating functions. Often useful outside of Underscore.\n _.constant = function(value) {\n return function() {\n return value;\n };\n };\n\n _.noop = function(){};\n\n _.property = property;\n\n // Generates a function for a given object that returns a given property.\n _.propertyOf = function(obj) {\n return obj == null ? function(){} : function(key) {\n return obj[key];\n };\n };\n\n // Returns a predicate for checking whether an object has a given set of\n // `key:value` pairs.\n _.matcher = _.matches = function(attrs) {\n attrs = _.extendOwn({}, attrs);\n return function(obj) {\n return _.isMatch(obj, attrs);\n };\n };\n\n // Run a function **n** times.\n _.times = function(n, iteratee, context) {\n var accum = Array(Math.max(0, n));\n iteratee = optimizeCb(iteratee, context, 1);\n for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n return accum;\n };\n\n // Return a random integer between min and max (inclusive).\n _.random = function(min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n return min + Math.floor(Math.random() * (max - min + 1));\n };\n\n // A (possibly faster) way to get the current timestamp as an integer.\n _.now = Date.now || function() {\n return new Date().getTime();\n };\n\n // List of HTML entities for escaping.\n var escapeMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n };\n var unescapeMap = _.invert(escapeMap);\n\n // Functions for escaping and unescaping strings to/from HTML interpolation.\n var createEscaper = function(map) {\n var escaper = function(match) {\n return map[match];\n };\n // Regexes for identifying a key that needs to be escaped\n var source = '(?:' + _.keys(map).join('|') + ')';\n var testRegexp = RegExp(source);\n var replaceRegexp = RegExp(source, 'g');\n return function(string) {\n string = string == null ? '' : '' + string;\n return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n };\n };\n _.escape = createEscaper(escapeMap);\n _.unescape = createEscaper(unescapeMap);\n\n // If the value of the named `property` is a function then invoke it with the\n // `object` as context; otherwise, return it.\n _.result = function(object, property, fallback) {\n var value = object == null ? void 0 : object[property];\n if (value === void 0) {\n value = fallback;\n }\n return _.isFunction(value) ? value.call(object) : value;\n };\n\n // Generate a unique integer id (unique within the entire client session).\n // Useful for temporary DOM ids.\n var idCounter = 0;\n _.uniqueId = function(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n };\n\n // By default, Underscore uses ERB-style template delimiters, change the\n // following template settings to use alternative delimiters.\n _.templateSettings = {\n evaluate : /<%([\\s\\S]+?)%>/g,\n interpolate : /<%=([\\s\\S]+?)%>/g,\n escape : /<%-([\\s\\S]+?)%>/g\n };\n\n // When customizing `templateSettings`, if you don't want to define an\n // interpolation, evaluation or escaping regex, we need one that is\n // guaranteed not to match.\n var noMatch = /(.)^/;\n\n // Certain characters need to be escaped so that they can be put into a\n // string literal.\n var escapes = {\n \"'\": \"'\",\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n var escaper = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\n var escapeChar = function(match) {\n return '\\\\' + escapes[match];\n };\n\n // JavaScript micro-templating, similar to John Resig's implementation.\n // Underscore templating handles arbitrary delimiters, preserves whitespace,\n // and correctly escapes quotes within interpolated code.\n // NB: `oldSettings` only exists for backwards compatibility.\n _.template = function(text, settings, oldSettings) {\n if (!settings && oldSettings) settings = oldSettings;\n settings = _.defaults({}, settings, _.templateSettings);\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g');\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0;\n var source = \"__p+='\";\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset).replace(escaper, escapeChar);\n index = offset + match.length;\n\n if (escape) {\n source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n } else if (interpolate) {\n source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n } else if (evaluate) {\n source += \"';\\n\" + evaluate + \"\\n__p+='\";\n }\n\n // Adobe VMs need the match returned to produce the correct offest.\n return match;\n });\n source += \"';\\n\";\n\n // If a variable is not specified, place data values in local scope.\n if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\n source = \"var __t,__p='',__j=Array.prototype.join,\" +\n \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n source + 'return __p;\\n';\n\n try {\n var render = new Function(settings.variable || 'obj', '_', source);\n } catch (e) {\n e.source = source;\n throw e;\n }\n\n var template = function(data) {\n return render.call(this, data, _);\n };\n\n // Provide the compiled source as a convenience for precompilation.\n var argument = settings.variable || 'obj';\n template.source = 'function(' + argument + '){\\n' + source + '}';\n\n return template;\n };\n\n // Add a \"chain\" function. Start chaining a wrapped Underscore object.\n _.chain = function(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n };\n\n // OOP\n // ---------------\n // If Underscore is called as a function, it returns a wrapped object that\n // can be used OO-style. This wrapper holds altered versions of all the\n // underscore functions. Wrapped objects may be chained.\n\n // Helper function to continue chaining intermediate results.\n var result = function(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n };\n\n // Add your own custom functions to the Underscore object.\n _.mixin = function(obj) {\n _.each(_.functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return result(this, func.apply(_, args));\n };\n });\n };\n\n // Add all of the Underscore functions to the wrapper object.\n _.mixin(_);\n\n // Add all mutator Array functions to the wrapper.\n _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n method.apply(obj, arguments);\n if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];\n return result(this, obj);\n };\n });\n\n // Add all accessor Array functions to the wrapper.\n _.each(['concat', 'join', 'slice'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n return result(this, method.apply(this._wrapped, arguments));\n };\n });\n\n // Extracts the result from a wrapped and chained object.\n _.prototype.value = function() {\n return this._wrapped;\n };\n\n // Provide unwrapping proxy for some methods used in engine operations\n // such as arithmetic and JSON stringification.\n _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;\n\n _.prototype.toString = function() {\n return '' + this._wrapped;\n };\n\n // AMD registration happens at the end for compatibility with AMD loaders\n // that may not enforce next-turn semantics on modules. Even though general\n // practice for AMD registration is to be anonymous, underscore registers\n // as a named module because, like jQuery, it is a base library that is\n // popular enough to be bundled in a third party lib, but not be part of\n // an AMD load request. Those cases could generate an error when an\n // anonymous define() is called outside of a loader request.\n if (typeof define === 'function' && define.amd) {\n define('underscore', [], function() {\n return _;\n });\n }\n}.call(this));\n","// keymaster.js\n// (c) 2011-2013 Thomas Fuchs\n// keymaster.js may be freely distributed under the MIT license.\n\n;(function(global){\n var k,\n _handlers = {},\n _mods = { 16: false, 18: false, 17: false, 91: false },\n _scope = 'all',\n // modifier keys\n _MODIFIERS = {\n '⇧': 16, shift: 16,\n '⌥': 18, alt: 18, option: 18,\n '⌃': 17, ctrl: 17, control: 17,\n '⌘': 91, command: 91\n },\n // special keys\n _MAP = {\n backspace: 8, tab: 9, clear: 12,\n enter: 13, 'return': 13,\n esc: 27, escape: 27, space: 32,\n left: 37, up: 38,\n right: 39, down: 40,\n del: 46, 'delete': 46,\n home: 36, end: 35,\n pageup: 33, pagedown: 34,\n ',': 188, '.': 190, '/': 191,\n '`': 192, '-': 189, '=': 187,\n ';': 186, '\\'': 222,\n '[': 219, ']': 221, '\\\\': 220\n },\n code = function(x){\n return _MAP[x] || x.toUpperCase().charCodeAt(0);\n },\n _downKeys = [];\n\n for(k=1;k<20;k++) _MAP['f'+k] = 111+k;\n\n // IE doesn't support Array#indexOf, so have a simple replacement\n function index(array, item){\n var i = array.length;\n while(i--) if(array[i]===item) return i;\n return -1;\n }\n\n // for comparing mods before unassignment\n function compareArray(a1, a2) {\n if (a1.length != a2.length) return false;\n for (var i = 0; i < a1.length; i++) {\n if (a1[i] !== a2[i]) return false;\n }\n return true;\n }\n\n var modifierMap = {\n 16:'shiftKey',\n 18:'altKey',\n 17:'ctrlKey',\n 91:'metaKey'\n };\n function updateModifierKey(event) {\n for(k in _mods) _mods[k] = event[modifierMap[k]];\n };\n\n // handle keydown event\n function dispatch(event) {\n var key, handler, k, i, modifiersMatch, scope;\n key = event.keyCode;\n\n if (index(_downKeys, key) == -1) {\n _downKeys.push(key);\n }\n\n // if a modifier key, set the key. property to true and return\n if(key == 93 || key == 224) key = 91; // right command on webkit, command on Gecko\n if(key in _mods) {\n _mods[key] = true;\n // 'assignKey' from inside this closure is exported to window.key\n for(k in _MODIFIERS) if(_MODIFIERS[k] == key) assignKey[k] = true;\n return;\n }\n updateModifierKey(event);\n\n // see if we need to ignore the keypress (filter() can can be overridden)\n // by default ignore key presses if a select, textarea, or input is focused\n if(!assignKey.filter.call(this, event)) return;\n\n // abort if no potentially matching shortcuts found\n if (!(key in _handlers)) return;\n\n scope = getScope();\n\n // for each potential shortcut\n for (i = 0; i < _handlers[key].length; i++) {\n handler = _handlers[key][i];\n\n // see if it's in the current scope\n if(handler.scope == scope || handler.scope == 'all'){\n // check if modifiers match if any\n modifiersMatch = handler.mods.length > 0;\n for(k in _mods)\n if((!_mods[k] && index(handler.mods, +k) > -1) ||\n (_mods[k] && index(handler.mods, +k) == -1)) modifiersMatch = false;\n // call the handler and stop the event if neccessary\n if((handler.mods.length == 0 && !_mods[16] && !_mods[18] && !_mods[17] && !_mods[91]) || modifiersMatch){\n if(handler.method(event, handler)===false){\n if(event.preventDefault) event.preventDefault();\n else event.returnValue = false;\n if(event.stopPropagation) event.stopPropagation();\n if(event.cancelBubble) event.cancelBubble = true;\n }\n }\n }\n }\n };\n\n // unset modifier keys on keyup\n function clearModifier(event){\n var key = event.keyCode, k,\n i = index(_downKeys, key);\n\n // remove key from _downKeys\n if (i >= 0) {\n _downKeys.splice(i, 1);\n }\n\n if(key == 93 || key == 224) key = 91;\n if(key in _mods) {\n _mods[key] = false;\n for(k in _MODIFIERS) if(_MODIFIERS[k] == key) assignKey[k] = false;\n }\n };\n\n function resetModifiers() {\n for(k in _mods) _mods[k] = false;\n for(k in _MODIFIERS) assignKey[k] = false;\n };\n\n // parse and assign shortcut\n function assignKey(key, scope, method){\n var keys, mods;\n keys = getKeys(key);\n if (method === undefined) {\n method = scope;\n scope = 'all';\n }\n\n // for each shortcut\n for (var i = 0; i < keys.length; i++) {\n // set modifier keys if any\n mods = [];\n key = keys[i].split('+');\n if (key.length > 1){\n mods = getMods(key);\n key = [key[key.length-1]];\n }\n // convert to keycode and...\n key = key[0]\n key = code(key);\n // ...store handler\n if (!(key in _handlers)) _handlers[key] = [];\n _handlers[key].push({ shortcut: keys[i], scope: scope, method: method, key: keys[i], mods: mods });\n }\n };\n\n // unbind all handlers for given key in current scope\n function unbindKey(key, scope) {\n var multipleKeys, keys,\n mods = [],\n i, j, obj;\n\n multipleKeys = getKeys(key);\n\n for (j = 0; j < multipleKeys.length; j++) {\n keys = multipleKeys[j].split('+');\n\n if (keys.length > 1) {\n mods = getMods(keys);\n key = keys[keys.length - 1];\n }\n\n key = code(key);\n\n if (scope === undefined) {\n scope = getScope();\n }\n if (!_handlers[key]) {\n return;\n }\n for (i = 0; i < _handlers[key].length; i++) {\n obj = _handlers[key][i];\n // only clear handlers if correct scope and mods match\n if (obj.scope === scope && compareArray(obj.mods, mods)) {\n _handlers[key][i] = {};\n }\n }\n }\n };\n\n // Returns true if the key with code 'keyCode' is currently down\n // Converts strings into key codes.\n function isPressed(keyCode) {\n if (typeof(keyCode)=='string') {\n keyCode = code(keyCode);\n }\n return index(_downKeys, keyCode) != -1;\n }\n\n function getPressedKeyCodes() {\n return _downKeys.slice(0);\n }\n\n function filter(event){\n var tagName = (event.target || event.srcElement).tagName;\n // ignore keypressed in any elements that support keyboard data input\n return !(tagName == 'INPUT' || tagName == 'SELECT' || tagName == 'TEXTAREA');\n }\n\n // initialize key. to false\n for(k in _MODIFIERS) assignKey[k] = false;\n\n // set current scope (default 'all')\n function setScope(scope){ _scope = scope || 'all' };\n function getScope(){ return _scope || 'all' };\n\n // delete all handlers for a given scope\n function deleteScope(scope){\n var key, handlers, i;\n\n for (key in _handlers) {\n handlers = _handlers[key];\n for (i = 0; i < handlers.length; ) {\n if (handlers[i].scope === scope) handlers.splice(i, 1);\n else i++;\n }\n }\n };\n\n // abstract key logic for assign and unassign\n function getKeys(key) {\n var keys;\n key = key.replace(/\\s/g, '');\n keys = key.split(',');\n if ((keys[keys.length - 1]) == '') {\n keys[keys.length - 2] += ',';\n }\n return keys;\n }\n\n // abstract mods logic for assign and unassign\n function getMods(key) {\n var mods = key.slice(0, key.length - 1);\n for (var mi = 0; mi < mods.length; mi++)\n mods[mi] = _MODIFIERS[mods[mi]];\n return mods;\n }\n\n // cross-browser events\n function addEvent(object, event, method) {\n if (object.addEventListener)\n object.addEventListener(event, method, false);\n else if(object.attachEvent)\n object.attachEvent('on'+event, function(){ method(window.event) });\n };\n\n // set the handlers globally on document\n addEvent(document, 'keydown', function(event) { dispatch(event) }); // Passing _scope to a callback to ensure it remains the same by execution. Fixes #48\n addEvent(document, 'keyup', clearModifier);\n\n // reset modifiers to false whenever the window is (re)focused.\n addEvent(window, 'focus', resetModifiers);\n\n // store previously defined key\n var previousKey = global.key;\n\n // restore previously defined key and return reference to our key object\n function noConflict() {\n var k = global.key;\n global.key = previousKey;\n return k;\n }\n\n // set window.key and window.key.set/get/deleteScope, and the default filter\n global.key = assignKey;\n global.key.setScope = setScope;\n global.key.getScope = getScope;\n global.key.deleteScope = deleteScope;\n global.key.filter = filter;\n global.key.isPressed = isPressed;\n global.key.getPressedKeyCodes = getPressedKeyCodes;\n global.key.noConflict = noConflict;\n global.key.unbind = unbindKey;\n\n if(typeof module !== 'undefined') module.exports = assignKey;\n\n})(this);\n","module.exports = {\n plugins: []\n};\n","module.exports = config => {\n var c = config || {},\n defaults = require('./config/config');\n\n // Set default options\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var plugins = {};\n\n return {\n /**\n * Add new plugin. Plugins could not be overwritten\n * @param {string} id Plugin ID\n * @param {Function} plugin Function which contains all plugin logic\n * @return {Function} The plugin function\n * @example\n * PluginManager.add('some-plugin', function(editor){\n * editor.Commands.add('new-command', {\n * run: function(editor, senderBtn){\n * console.log('Executed new-command');\n * }\n * })\n * });\n */\n add(id, plugin) {\n if (plugins[id]) {\n return plugins[id];\n }\n\n plugins[id] = plugin;\n return plugin;\n },\n\n /**\n * Returns plugin by ID\n * @param {string} id Plugin ID\n * @return {Function|undefined} Plugin\n * @example\n * var plugin = PluginManager.get('some-plugin');\n * plugin(editor);\n */\n get(id) {\n return plugins[id];\n },\n\n /**\n * Returns object with all plugins\n * @return {Object}\n */\n getAll() {\n return plugins;\n }\n };\n};\n","/**\n * File made for IE/Edge support\n * https://github.com/artf/grapesjs/issues/214\n */\n\nexport default () => {\n /**\n * Check if IE/Edge\n * @return {Boolean}\n */\n const isIE = () => {\n let match;\n const agent = window.navigator.userAgent;\n const rules = [\n ['edge', /Edge\\/([0-9\\._]+)/],\n ['ie', /MSIE\\s(7\\.0)/],\n ['ie', /MSIE\\s([0-9\\.]+);.*Trident\\/[4-7].0/],\n ['ie', /Trident\\/7\\.0.*rv\\:([0-9\\.]+).*\\).*Gecko$/]\n ];\n\n for (let i = 0; i < rules.length; i++) {\n const rule = rules[i];\n match = rule[1].exec(agent);\n if (match) break;\n }\n\n return !!match;\n };\n\n if (isIE()) {\n const originalCreateHTMLDocument =\n DOMImplementation.prototype.createHTMLDocument;\n DOMImplementation.prototype.createHTMLDocument = title => {\n if (!title) title = '';\n return originalCreateHTMLDocument.apply(document.implementation, [title]);\n };\n }\n};\n","const $ = Backbone.$;\n\nmodule.exports = Backbone.View.extend({\n initialize() {\n const model = this.model;\n model.view = this;\n this.conf = model.config;\n this.pn = model.get('Panels');\n model.on('loaded', () => {\n this.pn.active();\n this.pn.disableButtons();\n model.runDefault();\n setTimeout(() => model.trigger('load'), 0);\n });\n },\n\n render() {\n const model = this.model;\n const el = this.$el;\n const conf = this.conf;\n const contEl = $(conf.el || `body ${conf.container}`);\n const pfx = conf.stylePrefix;\n el.empty();\n\n if (conf.width) contEl.css('width', conf.width);\n\n if (conf.height) contEl.css('height', conf.height);\n\n el.append(model.get('Canvas').render());\n el.append(this.pn.render());\n el.attr('class', `${pfx}editor ${pfx}one-bg ${pfx}two-color`);\n contEl\n .addClass(`${pfx}editor-cont`)\n .empty()\n .append(el);\n\n return this;\n }\n});\n","import { isObject, isString, each, isUndefined } from 'underscore';\n\nmodule.exports = ({ $, Backbone }) => {\n if (Backbone) {\n const ViewProt = Backbone.View.prototype;\n const eventNsMap = {};\n ViewProt.eventNsMap = eventNsMap;\n\n ViewProt.delegate = function(eventName, selector, listener) {\n const vid = '.delegateEvents' + this.cid;\n this.$el.on(eventName, selector, listener);\n //return this;\n let eventMap = eventNsMap[vid];\n\n if (!eventMap) {\n eventMap = [];\n eventNsMap[vid] = eventMap;\n }\n\n eventMap.push({ eventName, selector, listener });\n return this;\n };\n\n ViewProt.undelegateEvents = function() {\n const vid = '.delegateEvents' + this.cid;\n if (this.$el) {\n //this.$el.off(); return this;\n let eventMap = eventNsMap[vid];\n\n if (eventMap) {\n eventMap.forEach(({ eventName, selector, listener }) => {\n this.$el.off(eventName);\n });\n }\n }\n return this;\n };\n\n ViewProt.undelegate = function(ev, sel, list) {\n const vid = '.delegateEvents' + this.cid;\n //this.$el.off(ev, sel, list); return this;\n let eventMap = eventNsMap[vid];\n\n if (eventMap) {\n eventMap.forEach(({ eventName, selector, listener }) => {\n if (eventName == ev && selector == sel) {\n this.$el.off(eventName);\n }\n });\n }\n\n return this;\n };\n }\n\n if ($ && $.prototype.constructor.name !== 'jQuery') {\n const fn = $.fn;\n\n const splitNamespace = function(name) {\n const namespaceArray = name.split('.');\n return name.indexOf('.') !== 0\n ? [namespaceArray[0], namespaceArray.slice(1)]\n : [null, namespaceArray];\n };\n\n const on = $.prototype.on;\n const off = $.prototype.off;\n const trigger = $.prototype.trigger;\n const offset = $.prototype.offset;\n const getEvents = eventName => eventName.split(/[,\\s]+/g);\n const getNamespaces = eventName => eventName.split('.');\n\n fn.on = function(eventName, delegate, callback, runOnce) {\n if (typeof eventName == 'string') {\n const events = getEvents(eventName);\n\n if (events.length == 1) {\n eventName = events[0];\n let namespaces = getNamespaces(eventName);\n\n if (eventName.indexOf('.') !== 0) {\n eventName = namespaces[0];\n }\n\n namespaces = namespaces.slice(1);\n\n if (namespaces.length) {\n //console.log('Found event with namespaces', namespaces, eventName, delegate, this);\n const cashNs = this.data('_cashNs') || [];\n // cashNs[namespace]\n this.data('_cashNs', namespaces); // for each ns need to store '.store' => eventName, delegate, callback\n }\n\n return on.call(this, eventName, delegate, callback, runOnce);\n } else {\n events.forEach(eventName =>\n this.on(eventName, delegate, callback, runOnce)\n );\n return this;\n }\n } else {\n return on.call(this, eventName, delegate, callback, runOnce);\n }\n };\n\n fn.off = function(eventName, callback) {\n if (typeof eventName == 'string') {\n const events = getEvents(eventName);\n\n if (events.length == 1) {\n eventName = events[0];\n let namespaces = getNamespaces(eventName);\n\n if (eventName.indexOf('.') !== 0) {\n eventName = namespaces[0];\n }\n\n namespaces = namespaces.slice(1);\n\n if (namespaces.length) {\n // Have to off only with the same namespace\n }\n\n return off.call(this, eventName, callback);\n } else {\n events.forEach(eventName => this.off(eventName, callback));\n return this;\n }\n } else {\n return off.call(this, eventName, callback);\n }\n };\n\n fn.trigger = function(eventName, data) {\n if (eventName instanceof $.Event) {\n return this.trigger(eventName.type, data);\n }\n\n if (typeof eventName == 'string') {\n const events = getEvents(eventName);\n\n if (events.length == 1) {\n eventName = events[0];\n let namespaces = getNamespaces(eventName);\n\n if (eventName.indexOf('.') !== 0) {\n eventName = namespaces[0];\n }\n\n namespaces = namespaces.slice(1);\n\n if (namespaces.length) {\n // have to trigger with same namespaces and eventName\n }\n\n return trigger.call(this, eventName, data);\n } else {\n events.forEach(eventName => this.trigger(eventName, data));\n return this;\n }\n } else {\n return trigger.call(this, eventName, data);\n }\n };\n\n fn.hide = function() {\n return this.css('display', 'none');\n };\n\n fn.show = function() {\n return this.css('display', 'block');\n };\n\n fn.focus = function() {\n const el = this.get(0);\n el && el.focus();\n return this;\n };\n\n // For SVGs in IE\n (fn.removeClass = function(c) {\n if (!arguments.length) {\n return this.attr('class', '');\n }\n const classes = isString(c) && c.match(/\\S+/g);\n return classes\n ? this.each(function(el) {\n each(classes, function(c) {\n if (el.classList) {\n el.classList.remove(c);\n } else {\n const val = el.className;\n const bval = el.className.baseVal;\n\n if (!isUndefined(bval)) {\n val.baseVal = bval.replace(c, '');\n } else {\n el.className = val.replace(c, '');\n }\n }\n });\n })\n : this;\n }),\n (fn.remove = function() {\n return this.each(node => {\n return node.parentNode && node.parentNode.removeChild(node);\n });\n }),\n // For spectrum compatibility\n (fn.bind = function(ev, h) {\n return this.on(ev, h);\n });\n\n fn.unbind = function(ev, h) {\n if (isObject(ev)) {\n for (let name in ev) {\n ev.hasOwnProperty(name) && this.off(name, ev[name]);\n }\n\n return this;\n } else {\n return this.off(ev, h);\n }\n };\n\n fn.click = function(h) {\n return h ? this.on('click', h) : this.trigger('click');\n };\n\n fn.change = function(h) {\n return h ? this.on('change', h) : this.trigger('change');\n };\n\n fn.keydown = function(h) {\n return h ? this.on('keydown', h) : this.trigger('keydown');\n };\n\n fn.delegate = function(selector, events, data, handler) {\n if (!handler) {\n handler = data;\n }\n\n return this.on(events, selector, function(e) {\n e.data = data;\n handler(e);\n });\n };\n\n fn.scrollLeft = function() {\n let el = this.get(0);\n el = el.nodeType == 9 ? el.defaultView : el;\n let win = el instanceof Window ? el : null;\n return win ? win.pageXOffset : el.scrollLeft || 0;\n };\n\n fn.scrollTop = function() {\n let el = this.get(0);\n el = el.nodeType == 9 ? el.defaultView : el;\n let win = el instanceof Window ? el : null;\n return win ? win.pageYOffset : el.scrollTop || 0;\n };\n\n fn.offset = function(coords) {\n let top, left;\n\n if (coords) {\n top = coords.top;\n left = coords.left;\n }\n\n if (typeof top != 'undefined') {\n this.css('top', `${top}px`);\n }\n if (typeof left != 'undefined') {\n this.css('left', `${left}px`);\n }\n\n return offset.call(this);\n };\n\n $.map = function(items, clb) {\n const ar = [];\n\n for (var i = 0; i < items.length; i++) {\n ar.push(clb(items[i], i));\n }\n\n return ar;\n };\n\n const indexOf = Array.prototype.indexOf;\n\n $.inArray = function(val, arr, i) {\n return arr == null ? -1 : indexOf.call(arr, val, i);\n };\n\n $.Event = function(src, props) {\n if (!(this instanceof $.Event)) {\n return new $.Event(src, props);\n }\n\n this.type = src;\n this.isDefaultPrevented = () => false;\n };\n }\n};\n","import _ from 'underscore';\nimport Backbone from 'backbone';\n\nmodule.exports = Backbone.View.extend({\n template: _.template(`\n
title\">\n caret-icon\">\n <%= label %>\n
\n
blocks-c\">
\n `),\n\n events: {},\n\n initialize(o = {}, config = {}) {\n this.config = config;\n const pfx = this.config.pStylePrefix || '';\n this.pfx = pfx;\n this.caretR = 'fa fa-caret-right';\n this.caretD = 'fa fa-caret-down';\n this.iconClass = `${pfx}caret-icon`;\n this.activeClass = `${pfx}open`;\n this.className = `${pfx}block-category`;\n this.events[`click .${pfx}title`] = 'toggle';\n this.listenTo(this.model, 'change:open', this.updateVisibility);\n this.delegateEvents();\n },\n\n updateVisibility() {\n if (this.model.get('open')) this.open();\n else this.close();\n },\n\n open() {\n this.el.className = `${this.className} ${this.activeClass}`;\n this.getIconEl().className = `${this.iconClass} ${this.caretD}`;\n this.getBlocksEl().style.display = '';\n },\n\n close() {\n this.el.className = this.className;\n this.getIconEl().className = `${this.iconClass} ${this.caretR}`;\n this.getBlocksEl().style.display = 'none';\n },\n\n toggle() {\n var model = this.model;\n model.set('open', !model.get('open'));\n },\n\n getIconEl() {\n if (!this.iconEl) {\n this.iconEl = this.el.querySelector('.' + this.iconClass);\n }\n\n return this.iconEl;\n },\n\n getBlocksEl() {\n if (!this.blocksEl) {\n this.blocksEl = this.el.querySelector('.' + this.pfx + 'blocks-c');\n }\n\n return this.blocksEl;\n },\n\n append(el) {\n this.getBlocksEl().appendChild(el);\n },\n\n render() {\n this.el.innerHTML = this.template({\n pfx: this.pfx,\n label: this.model.get('label')\n });\n this.el.className = this.className;\n this.$el.css({ order: this.model.get('order') });\n this.updateVisibility();\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport { isObject } from 'underscore';\nimport { on, off, hasDnd } from 'utils/mixins';\n\nmodule.exports = Backbone.View.extend({\n events: {\n mousedown: 'startDrag',\n dragstart: 'handleDragStart',\n drag: 'handleDrag',\n dragend: 'handleDragEnd'\n },\n\n initialize(o, config = {}) {\n this.em = config.em;\n this.config = config;\n this.endDrag = this.endDrag.bind(this);\n this.ppfx = config.pStylePrefix || '';\n this.listenTo(this.model, 'destroy remove', this.remove);\n },\n\n /**\n * Start block dragging\n * @private\n */\n startDrag(e) {\n const config = this.config;\n //Right or middel click\n if (e.button !== 0 || !config.getSorter || this.el.draggable) return;\n config.em.refreshCanvas();\n const sorter = config.getSorter();\n sorter.setDragHelper(this.el, e);\n sorter.setDropContent(this.model.get('content'));\n sorter.startSort(this.el);\n on(document, 'mouseup', this.endDrag);\n },\n\n handleDragStart(ev) {\n const { em, model } = this;\n const content = model.get('content');\n const isObj = isObject(content);\n const type = isObj ? 'text/json' : 'text';\n const data = isObj ? JSON.stringify(content) : content;\n\n // Note: data are not available on dragenter for security reason,\n // but will use dragContent as I need it for the Sorter context\n // IE11 supports only 'text' data type\n ev.dataTransfer.setData('text', data);\n em.set('dragContent', content);\n em.trigger('block:drag:start', model, ev);\n },\n\n handleDrag(ev) {\n this.em.trigger('block:drag', this.model, ev);\n },\n\n handleDragEnd() {\n const { em, model } = this;\n const result = em.get('dragResult');\n\n if (result) {\n const oldKey = 'activeOnRender';\n const oldActive = result.get && result.get(oldKey);\n\n if (model.get('activate') || oldActive) {\n result.trigger('active');\n result.set(oldKey, 0);\n }\n\n if (model.get('select')) {\n em.setSelected(result);\n }\n\n if (model.get('resetId')) {\n result.onAll(model => model.resetId());\n }\n }\n\n em.set({\n dragResult: null,\n dragContent: null\n });\n\n em.trigger('block:drag:stop', result, model);\n },\n\n /**\n * Drop block\n * @private\n */\n endDrag(e) {\n off(document, 'mouseup', this.endDrag);\n const sorter = this.config.getSorter();\n\n // After dropping the block in the canvas the mouseup event is not yet\n // triggerd on 'this.doc' and so clicking outside, the sorter, tries to move\n // things (throws false positives). As this method just need to drop away\n // the block helper I use the trick of 'moved = 0' to void those errors.\n sorter.moved = 0;\n sorter.endMove();\n },\n\n render() {\n const el = this.el;\n const pfx = this.ppfx;\n const className = `${pfx}block`;\n const label = this.model.get('label');\n el.className += ` ${className} ${pfx}one-bg ${pfx}four-color-h`;\n el.innerHTML = `
${label}
`;\n el.title = el.textContent.trim();\n hasDnd(this.em) && el.setAttribute('draggable', true);\n return this;\n }\n});\n","import { isString, isObject, bindAll } from 'underscore';\n\nconst BlockView = require('./BlockView');\nconst CategoryView = require('./CategoryView');\n\nmodule.exports = require('backbone').View.extend({\n initialize(opts, config) {\n bindAll(this, 'getSorter', 'onDrag', 'onDrop');\n this.config = config || {};\n this.categories = opts.categories || '';\n this.renderedCategories = [];\n var ppfx = this.config.pStylePrefix || '';\n this.ppfx = ppfx;\n this.noCatClass = `${ppfx}blocks-no-cat`;\n this.blockContClass = `${ppfx}blocks-c`;\n this.catsClass = `${ppfx}block-categories`;\n const coll = this.collection;\n this.listenTo(coll, 'add', this.addTo);\n this.listenTo(coll, 'reset', this.render);\n this.em = this.config.em;\n this.tac = 'test-tac';\n this.grabbingCls = this.ppfx + 'grabbing';\n\n if (this.em) {\n this.config.getSorter = this.getSorter;\n this.canvas = this.em.get('Canvas');\n }\n },\n\n /**\n * Get sorter\n * @private\n */\n getSorter() {\n if (!this.em) return;\n if (!this.sorter) {\n var utils = this.em.get('Utils');\n var canvas = this.canvas;\n this.sorter = new utils.Sorter({\n container: canvas.getBody(),\n placer: canvas.getPlacerEl(),\n containerSel: '*',\n itemSel: '*',\n pfx: this.ppfx,\n onStart: this.onDrag,\n onEndMove: this.onDrop,\n onMove: this.onMove,\n document: canvas.getFrameEl().contentDocument,\n direction: 'a',\n wmargin: 1,\n nested: 1,\n em: this.em,\n canvasRelative: 1\n });\n }\n return this.sorter;\n },\n\n /**\n * Callback when block is on drag\n * @private\n */\n onDrag(e) {\n this.em.stopDefault();\n this.em.trigger('block:drag:start', e);\n },\n\n onMove(e) {\n this.em.trigger('block:drag:move', e);\n },\n\n /**\n * Callback when block is dropped\n * @private\n */\n onDrop(model) {\n const em = this.em;\n em.runDefault();\n\n if (model && model.get) {\n if (model.get('activeOnRender')) {\n model.trigger('active');\n model.set('activeOnRender', 0);\n }\n\n em.trigger('block:drag:stop', model);\n }\n },\n\n /**\n * Add new model to the collection\n * @param {Model} model\n * @private\n * */\n addTo(model) {\n this.add(model);\n },\n\n /**\n * Render new model inside the view\n * @param {Model} model\n * @param {Object} fragment Fragment collection\n * @private\n * */\n add(model, fragment) {\n var frag = fragment || null;\n var view = new BlockView(\n {\n model,\n attributes: model.get('attributes')\n },\n this.config\n );\n var rendered = view.render().el;\n var category = model.get('category');\n\n // Check for categories\n if (category && this.categories) {\n if (isString(category)) {\n category = {\n id: category,\n label: category\n };\n } else if (isObject(category) && !category.id) {\n category.id = category.label;\n }\n\n var catModel = this.categories.add(category);\n var catId = catModel.get('id');\n var catView = this.renderedCategories[catId];\n var categories = this.getCategoriesEl();\n model.set('category', catModel);\n\n if (!catView && categories) {\n catView = new CategoryView(\n {\n model: catModel\n },\n this.config\n ).render();\n this.renderedCategories[catId] = catView;\n categories.appendChild(catView.el);\n }\n\n catView && catView.append(rendered);\n return;\n }\n\n if (frag) frag.appendChild(rendered);\n else this.append(rendered);\n },\n\n getCategoriesEl() {\n if (!this.catsEl) {\n this.catsEl = this.el.querySelector(`.${this.catsClass}`);\n }\n\n return this.catsEl;\n },\n\n getBlocksEl() {\n if (!this.blocksEl) {\n this.blocksEl = this.el.querySelector(\n `.${this.noCatClass} .${this.blockContClass}`\n );\n }\n\n return this.blocksEl;\n },\n\n append(el) {\n let blocks = this.getBlocksEl();\n blocks && blocks.appendChild(el);\n },\n\n render() {\n const ppfx = this.ppfx;\n const frag = document.createDocumentFragment();\n this.catsEl = null;\n this.blocksEl = null;\n this.renderedCategories = [];\n this.el.innerHTML = `\n
\n
\n
\n
\n `;\n\n this.collection.each(model => this.add(model, frag));\n this.append(frag);\n const cls = `${this.blockContClass}s ${ppfx}one-bg ${ppfx}two-color`;\n this.$el.addClass(cls);\n return this;\n }\n});\n","import Backbone from 'backbone';\n\nmodule.exports = Backbone.Collection.extend({\n model: require('./Category')\n});\n","import Backbone from 'backbone';\nvar Category = require('./Category');\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n // If true, triggers an 'active' event on dropped component\n activate: 0,\n // If true, the dropped component will be selected\n select: 0,\n // If true, all IDs of dropped component and its style will be changed\n resetId: 0,\n label: '',\n content: '',\n category: '',\n attributes: {}\n },\n\n initialize(opts = {}) {\n let category = this.get('category');\n\n if (category) {\n if (typeof category == 'string') {\n var catObj = new Category({\n id: category,\n label: category\n });\n }\n }\n }\n});\n","import Backbone from 'backbone';\nvar Block = require('./Block');\n\nmodule.exports = Backbone.Collection.extend({\n model: Block\n});\n","module.exports = {\n // Specify the element to use as a container, string (query) or HTMLElement\n // With the empty value, nothing will be rendered\n appendTo: '',\n\n blocks: []\n};\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/block_manager/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * blockManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const blockManager = editor.BlockManager;\n * ```\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getall)\n * * [getAllVisible](#getallvisible)\n * * [remove](#remove)\n * * [getConfig](#getconfig)\n * * [getCategories](#getcategories)\n * * [getContainer](#getcontainer)\n * * [render](#render)\n *\n * @module BlockManager\n */\nimport { isElement } from 'underscore';\n\nmodule.exports = () => {\n var c = {},\n defaults = require('./config/config'),\n Blocks = require('./model/Blocks'),\n BlockCategories = require('./model/Categories'),\n BlocksView = require('./view/BlocksView');\n var blocks, blocksVisible, blocksView;\n var categories = [];\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'BlockManager',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @return {this}\n * @private\n */\n init(config) {\n c = config || {};\n const em = c.em;\n\n for (let name in defaults) {\n if (!(name in c)) {\n c[name] = defaults[name];\n }\n }\n\n // Global blocks collection\n blocks = new Blocks([]);\n blocksVisible = new Blocks([]);\n (categories = new BlockCategories()),\n (blocksView = new BlocksView(\n {\n // Visible collection\n collection: blocksVisible,\n categories\n },\n c\n ));\n\n // Setup the sync between the global and public collections\n blocks.listenTo(blocks, 'add', model => {\n blocksVisible.add(model);\n em && em.trigger('block:add', model);\n });\n\n blocks.listenTo(blocks, 'remove', model => {\n blocksVisible.remove(model);\n em && em.trigger('block:remove', model);\n });\n\n blocks.listenTo(blocks, 'reset', coll => {\n blocksVisible.reset(coll.models);\n });\n\n return this;\n },\n\n /**\n * Get configuration object\n * @return {Object}\n */\n getConfig() {\n return c;\n },\n\n /**\n * Load default blocks if the collection is empty\n */\n onLoad() {\n const blocks = this.getAll();\n !blocks.length && blocks.reset(c.blocks);\n },\n\n postRender() {\n const elTo = this.getConfig().appendTo;\n\n if (elTo) {\n const el = isElement(elTo) ? elTo : document.querySelector(elTo);\n el.appendChild(this.render());\n }\n },\n\n /**\n * Add new block to the collection.\n * @param {string} id Block id\n * @param {Object} opts Options\n * @param {string} opts.label Name of the block\n * @param {string} opts.content HTML content\n * @param {string|Object} opts.category Group the block inside a catgegory.\n * You should pass objects with id property, eg:\n * {id: 'some-uid', label: 'My category'}\n * The string will be converted in:\n * 'someid' => {id: 'someid', label: 'someid'}\n * @param {Object} [opts.attributes={}] Block attributes\n * @return {Block} Added block\n * @example\n * blockManager.add('h1-block', {\n * label: 'Heading',\n * content: '

Put your title here

',\n * category: 'Basic',\n * attributes: {\n * title: 'Insert h1 block'\n * }\n * });\n */\n add(id, opts) {\n var obj = opts || {};\n obj.id = id;\n return blocks.add(obj);\n },\n\n /**\n * Return the block by id\n * @param {string} id Block id\n * @example\n * const block = blockManager.get('h1-block');\n * console.log(JSON.stringify(block));\n * // {label: 'Heading', content: '

Put your ...', ...}\n */\n get(id) {\n return blocks.get(id);\n },\n\n /**\n * Return all blocks\n * @return {Collection}\n * @example\n * const blocks = blockManager.getAll();\n * console.log(JSON.stringify(blocks));\n * // [{label: 'Heading', content: '

Put your ...'}, ...]\n */\n getAll() {\n return blocks;\n },\n\n /**\n * Return the visible collection, which containes blocks actually rendered\n * @return {Collection}\n */\n getAllVisible() {\n return blocksVisible;\n },\n\n /**\n * Remove a block by id\n * @param {string} id Block id\n * @return {Block} Removed block\n */\n remove(id) {\n return blocks.remove(id);\n },\n\n /**\n * Get all available categories.\n * It's possible to add categories only within blocks via 'add()' method\n * @return {Array|Collection}\n */\n getCategories() {\n return categories;\n },\n\n /**\n * Return the Blocks container element\n * @return {HTMLElement}\n */\n getContainer() {\n return blocksView.el;\n },\n\n /**\n * Render blocks\n * @param {Array} blocks Blocks to render, without the argument will render\n * all global blocks\n * @return {HTMLElement} Rendered element\n * @example\n * // Render all blocks (inside the global collection)\n * blockManager.render();\n *\n * // Render new set of blocks\n * const blocks = blockManager.getAll();\n * blockManager.render(blocks.filter(\n * block => block.get('category') == 'sections'\n * ));\n * // Or a new set from an array\n * blockManager.render([\n * {label: 'Label text', content: '
Content
'}\n * ]);\n *\n * // Back to blocks from the global collection\n * blockManager.render();\n */\n render(blocks) {\n const toRender = blocks || this.getAll().models;\n\n if (!blocksView.rendered) {\n blocksView.render();\n blocksView.rendered = 1;\n }\n\n blocksView.collection.reset(toRender);\n return this.getContainer();\n }\n };\n};\n","var map = {\n\t\"./CanvasClear\": 52,\n\t\"./CanvasClear.js\": 52,\n\t\"./CommandAbstract\": 38,\n\t\"./CommandAbstract.js\": 38,\n\t\"./ComponentDelete\": 51,\n\t\"./ComponentDelete.js\": 51,\n\t\"./ComponentEnter\": 50,\n\t\"./ComponentEnter.js\": 50,\n\t\"./ComponentExit\": 49,\n\t\"./ComponentExit.js\": 49,\n\t\"./ComponentNext\": 48,\n\t\"./ComponentNext.js\": 48,\n\t\"./ComponentPrev\": 47,\n\t\"./ComponentPrev.js\": 47,\n\t\"./CopyComponent\": 46,\n\t\"./CopyComponent.js\": 46,\n\t\"./CreateComponent\": 7,\n\t\"./CreateComponent.js\": 7,\n\t\"./DeleteComponent\": 36,\n\t\"./DeleteComponent.js\": 36,\n\t\"./Drag\": 21,\n\t\"./Drag.js\": 21,\n\t\"./ExportTemplate\": 37,\n\t\"./ExportTemplate.js\": 37,\n\t\"./Fullscreen\": 24,\n\t\"./Fullscreen.js\": 24,\n\t\"./ImageComponent\": 35,\n\t\"./ImageComponent.js\": 35,\n\t\"./InsertCustom\": 12,\n\t\"./InsertCustom.js\": 12,\n\t\"./MoveComponent\": 34,\n\t\"./MoveComponent.js\": 34,\n\t\"./OpenAssets\": 27,\n\t\"./OpenAssets.js\": 27,\n\t\"./OpenBlocks\": 28,\n\t\"./OpenBlocks.js\": 28,\n\t\"./OpenLayers\": 31,\n\t\"./OpenLayers.js\": 31,\n\t\"./OpenStyleManager\": 30,\n\t\"./OpenStyleManager.js\": 30,\n\t\"./OpenTraitManager\": 29,\n\t\"./OpenTraitManager.js\": 29,\n\t\"./PasteComponent\": 45,\n\t\"./PasteComponent.js\": 45,\n\t\"./Preview\": 23,\n\t\"./Preview.js\": 23,\n\t\"./Resize\": 22,\n\t\"./Resize.js\": 22,\n\t\"./SelectComponent\": 8,\n\t\"./SelectComponent.js\": 8,\n\t\"./SelectParent\": 25,\n\t\"./SelectParent.js\": 25,\n\t\"./SelectPosition\": 13,\n\t\"./SelectPosition.js\": 13,\n\t\"./ShowOffset\": 26,\n\t\"./ShowOffset.js\": 26,\n\t\"./SwitchVisibility\": 32,\n\t\"./SwitchVisibility.js\": 32,\n\t\"./TextComponent\": 33,\n\t\"./TextComponent.js\": 33\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) { // check for number or string\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn id;\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 99;","const Backbone = require('backbone');\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n command: '',\n attributes: {}\n }\n});\n","const Backbone = require('backbone');\nconst ToolbarButton = require('./ToolbarButton');\n\nmodule.exports = Backbone.Collection.extend({ model: ToolbarButton });\n","var Backbone = require('backbone');\n\nmodule.exports = Backbone.View.extend({\n events() {\n return (\n this.model.get('events') || {\n mousedown: 'handleClick'\n }\n );\n },\n\n attributes() {\n return this.model.get('attributes');\n },\n\n initialize(opts) {\n this.editor = opts.config.editor;\n },\n\n handleClick(event) {\n event.preventDefault();\n event.stopPropagation();\n this.execCommand(event);\n },\n\n execCommand(event) {\n const opts = { event };\n const command = this.model.get('command');\n const editor = this.editor;\n\n if (typeof command === 'function') {\n command(editor, null, opts);\n }\n\n if (typeof command === 'string') {\n editor.runCommand(command, opts);\n }\n },\n\n render() {\n var config = this.editor.getConfig();\n this.el.className += ' ' + config.stylePrefix + 'toolbar-item';\n return this;\n }\n});\n","var Backbone = require('backbone');\nvar DomainViews = require('domain_abstract/view/DomainViews');\nvar ToolbarButtonView = require('./ToolbarButtonView');\n\nmodule.exports = DomainViews.extend({\n itemView: ToolbarButtonView,\n\n initialize(opts) {\n this.config = { editor: opts.editor || '' };\n this.listenTo(this.collection, 'reset', this.render);\n }\n});\n","module.exports = {\n ESCAPE_KEY: 27,\n\n stylePrefix: 'com-',\n\n defaults: [],\n\n // Editor model\n // @deprecated\n em: null,\n\n // If true center new first-level components\n // @deprecated\n firstCentered: true,\n\n // If true the new component will created with 'height', else 'min-height'\n // @deprecated\n newFixedH: false,\n\n // Minimum height (in px) of new component\n // @deprecated\n minComponentH: 50,\n\n // Minimum width (in px) of component on creation\n // @deprecated\n minComponentW: 50\n};\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/commands/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * commands: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const commands = editor.Commands;\n * ```\n *\n * * [add](#add)\n * * [get](#get)\n * * [has](#has)\n *\n * @module Commands\n */\n\nimport { isFunction } from 'underscore';\n\nmodule.exports = () => {\n let em;\n var c = {},\n commands = {},\n defaultCommands = {},\n defaults = require('./config/config'),\n CommandAbstract = require('./view/CommandAbstract');\n\n // Need it here as it would be used below\n var add = function(id, obj) {\n if (isFunction(obj)) {\n obj = { run: obj };\n }\n\n delete obj.initialize;\n obj.id = id;\n commands[id] = CommandAbstract.extend(obj);\n return this;\n };\n\n return {\n CommandAbstract,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Commands',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n em = c.em;\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n // Load commands passed via configuration\n for (var k in c.defaults) {\n var obj = c.defaults[k];\n if (obj.id) this.add(obj.id, obj);\n }\n\n const ViewCode = require('./view/ExportTemplate');\n defaultCommands['select-comp'] = require('./view/SelectComponent');\n defaultCommands['create-comp'] = require('./view/CreateComponent');\n defaultCommands['delete-comp'] = require('./view/DeleteComponent');\n defaultCommands['image-comp'] = require('./view/ImageComponent');\n defaultCommands['move-comp'] = require('./view/MoveComponent');\n defaultCommands['text-comp'] = require('./view/TextComponent');\n defaultCommands['insert-custom'] = require('./view/InsertCustom');\n defaultCommands['export-template'] = ViewCode;\n defaultCommands['sw-visibility'] = require('./view/SwitchVisibility');\n defaultCommands['open-layers'] = require('./view/OpenLayers');\n defaultCommands['open-sm'] = require('./view/OpenStyleManager');\n defaultCommands['open-tm'] = require('./view/OpenTraitManager');\n defaultCommands['open-blocks'] = require('./view/OpenBlocks');\n defaultCommands['open-assets'] = require('./view/OpenAssets');\n defaultCommands['show-offset'] = require('./view/ShowOffset');\n defaultCommands['select-parent'] = require('./view/SelectParent');\n defaultCommands.fullscreen = require('./view/Fullscreen');\n defaultCommands.preview = require('./view/Preview');\n defaultCommands.resize = require('./view/Resize');\n defaultCommands.drag = require('./view/Drag');\n\n defaultCommands['tlb-delete'] = {\n run(ed) {\n return ed.runCommand('core:component-delete');\n }\n };\n\n defaultCommands['tlb-clone'] = {\n run(ed) {\n ed.runCommand('core:copy');\n ed.runCommand('core:paste');\n }\n };\n\n defaultCommands['tlb-move'] = {\n run(ed, sender, opts) {\n let dragger;\n const em = ed.getModel();\n const event = opts && opts.event;\n const sel = ed.getSelected();\n const selAll = [...ed.getSelectedAll()];\n const toolbarStyle = ed.Canvas.getToolbarEl().style;\n const nativeDrag = event && event.type == 'dragstart';\n const defComOptions = { preserveSelected: 1 };\n\n const hideTlb = () => {\n toolbarStyle.display = 'none';\n em.stopDefault(defComOptions);\n };\n\n if (!sel || !sel.get('draggable')) {\n console.warn('The element is not draggable');\n return;\n }\n\n // Without setTimeout the ghost image disappears\n nativeDrag ? setTimeout(() => hideTlb, 0) : hideTlb();\n\n const onStart = (e, opts) => {\n console.log('start mouse pos ', opts.start);\n console.log('el rect ', opts.elRect);\n var el = opts.el;\n el.style.position = 'absolute';\n el.style.margin = 0;\n };\n\n const onEnd = (e, opts) => {\n em.runDefault(defComOptions);\n selAll.forEach(sel => sel.set('status', 'selected'));\n ed.select(selAll);\n sel.emitUpdate();\n dragger && dragger.blur();\n };\n\n const onDrag = (e, opts) => {\n console.log('Delta ', opts.delta);\n console.log('Current ', opts.current);\n };\n\n if (em.get('designerMode')) {\n // TODO move grabbing func in editor/canvas from the Sorter\n dragger = editor.runCommand('drag', {\n el: sel.view.el,\n options: {\n event,\n onStart,\n onDrag,\n onEnd\n }\n });\n } else {\n if (nativeDrag) {\n event.dataTransfer.setDragImage(sel.view.el, 0, 0);\n //sel.set('status', 'freezed');\n }\n\n const cmdMove = ed.Commands.get('move-comp');\n cmdMove.onEndMoveFromModel = onEnd;\n cmdMove.initSorterFromModels(selAll);\n }\n\n selAll.forEach(sel => sel.set('status', 'freezed-selected'));\n }\n };\n\n // Core commands\n defaultCommands['core:undo'] = e => e.UndoManager.undo();\n defaultCommands['core:redo'] = e => e.UndoManager.redo();\n [\n ['copy', 'CopyComponent'],\n ['paste', 'PasteComponent'],\n ['component-next', 'ComponentNext'],\n ['component-prev', 'ComponentPrev'],\n ['component-enter', 'ComponentEnter'],\n ['component-exit', 'ComponentExit'],\n ['canvas-clear', 'CanvasClear'],\n ['component-delete', 'ComponentDelete']\n ].forEach(\n item =>\n (defaultCommands[`core:${item[0]}`] = require(`./view/${\n item[1]\n }`).run)\n );\n\n if (c.em) c.model = c.em.get('Canvas');\n\n this.loadDefaultCommands();\n\n return this;\n },\n\n /**\n * Add new command to the collection\n * @param\t{string} id Command's ID\n * @param\t{Object|Function} command Object representing your command,\n * By passing just a function it's intended as a stateless command\n * (just like passing an object with only `run` method).\n * @return {this}\n * @example\n * commands.add('myCommand', {\n * \trun(editor, sender) {\n * \t\talert('Hello world!');\n * \t},\n * \tstop(editor, sender) {\n * \t},\n * });\n * // As a function\n * commands.add('myCommand2', editor => { ... });\n * */\n add,\n\n /**\n * Get command by ID\n * @param\t{string}\tid Command's ID\n * @return {Object} Object representing the command\n * @example\n * var myCommand = commands.get('myCommand');\n * myCommand.run();\n * */\n get(id) {\n var el = commands[id];\n\n if (typeof el == 'function') {\n el = new el(c);\n commands[id] = el;\n }\n\n return el;\n },\n\n /**\n * Check if command exists\n * @param\t{string}\tid Command's ID\n * @return {Boolean}\n * */\n has(id) {\n return !!commands[id];\n },\n\n /**\n * Load default commands\n * @return {this}\n * @private\n * */\n loadDefaultCommands() {\n for (var id in defaultCommands) {\n this.add(id, defaultCommands[id]);\n }\n\n return this;\n },\n\n /**\n * Create anonymous Command instance\n * @param {Object} command Command object\n * @return {Command}\n * @private\n * */\n create(command) {\n const cmd = CommandAbstract.extend(command);\n return new cmd(c);\n }\n };\n};\n","import { bindAll } from 'underscore';\n\nconst motionsEv =\n 'transitionend oTransitionEnd transitionend webkitTransitionEnd';\n\nmodule.exports = require('backbone').View.extend({\n tagName: 'iframe',\n\n attributes: {\n allowfullscreen: 'allowfullscreen'\n },\n\n initialize(o) {\n bindAll(this, 'udpateOffset');\n this.config = o.config || {};\n this.ppfx = this.config.pStylePrefix || '';\n this.em = this.config.em;\n this.listenTo(this.em, 'change:device', this.updateDim);\n },\n\n /**\n * Update dimensions of the frame\n * @private\n */\n updateDim(model) {\n const em = this.em;\n const device = em.getDeviceModel();\n const style = this.el.style;\n const currW = style.width || '';\n const currH = style.height || '';\n const newW = device ? device.get('width') : '';\n const newH = device ? device.get('height') : '';\n const noChanges = currW == newW && currH == newH;\n style.width = newW;\n style.height = newH;\n this.udpateOffset();\n // Prevent fixed highlighting box which appears when on\n // component hover during the animation\n em.stopDefault({ preserveSelected: 1 });\n noChanges ? this.udpateOffset() : this.$el.on(motionsEv, this.udpateOffset);\n },\n\n udpateOffset() {\n const em = this.em;\n const offset = em.get('Canvas').getOffset();\n em.set('canvasOffset', offset);\n em.runDefault({ preserveSelected: 1 });\n this.$el.off(motionsEv, this.udpateOffset);\n },\n\n getBody() {\n this.$el.contents().find('body');\n },\n\n getWrapper() {\n return this.$el.contents().find('body > div');\n },\n\n render() {\n this.$el.attr({ class: this.ppfx + 'frame' });\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport { on, off, getElement } from 'utils/mixins';\nconst FrameView = require('./FrameView');\nconst $ = Backbone.$;\n\nmodule.exports = Backbone.View.extend({\n initialize(o) {\n _.bindAll(this, 'renderBody', 'onFrameScroll', 'clearOff');\n on(window, 'scroll resize', this.clearOff);\n this.config = o.config || {};\n this.em = this.config.em || {};\n this.ppfx = this.config.pStylePrefix || '';\n this.className = this.config.stylePrefix + 'canvas';\n this.listenTo(this.em, 'change:canvasOffset', this.clearOff);\n this.frame = new FrameView({\n model: this.model.get('frame'),\n config: this.config\n });\n },\n\n /**\n * Checks if the element is visible in the canvas's viewport\n * @param {HTMLElement} el\n * @return {Boolean}\n */\n isElInViewport(el) {\n const rect = getElement(el).getBoundingClientRect();\n const frameRect = this.getFrameOffset(1);\n const rTop = rect.top;\n const rLeft = rect.left;\n return (\n rTop >= 0 &&\n rLeft >= 0 &&\n rTop <= frameRect.height &&\n rLeft <= frameRect.width\n );\n },\n\n /**\n * Update tools position\n * @private\n */\n onFrameScroll() {\n var u = 'px';\n var body = this.frame.el.contentDocument.body;\n this.toolsEl.style.top = '-' + body.scrollTop + u;\n this.toolsEl.style.left = '-' + body.scrollLeft + u;\n this.em.trigger('canvasScroll');\n },\n\n /**\n * Insert scripts into head, it will call renderBody after all scripts loaded or failed\n * @private\n */\n renderScripts() {\n var frame = this.frame;\n var that = this;\n\n frame.el.onload = () => {\n var scripts = that.config.scripts.slice(0), // clone\n counter = 0;\n\n function appendScript(scripts) {\n if (scripts.length > 0) {\n var script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = scripts.shift();\n script.onerror = script.onload = appendScript.bind(null, scripts);\n frame.el.contentDocument.head.appendChild(script);\n } else {\n that.renderBody();\n }\n }\n appendScript(scripts);\n };\n },\n\n /**\n * Render inside frame's body\n * @private\n */\n renderBody() {\n var wrap = this.model.get('frame').get('wrapper');\n var em = this.config.em;\n if (wrap) {\n var ppfx = this.ppfx;\n //var body = this.frame.$el.contents().find('body');\n var body = $(this.frame.el.contentWindow.document.body);\n var cssc = em.get('CssComposer');\n var conf = em.get('Config');\n var confCanvas = this.config;\n var protCss = conf.protectedCss;\n var externalStyles = '';\n\n confCanvas.styles.forEach(style => {\n externalStyles += ``;\n });\n\n const colorWarn = '#ffca6f';\n\n // I need all this styles to make the editor work properly\n // Remove `html { height: 100%;}` from the baseCss as it gives jumpings\n // effects (on ENTER) with RTE like CKEditor (maybe some bug there?!?)\n // With `body {height: auto;}` jumps in CKEditor are removed but in\n // Firefox is impossible to drag stuff in empty canvas, so bring back\n // `body {height: 100%;}`.\n // For the moment I give the priority to Firefox as it might be\n // CKEditor's issue\n var frameCss = `\n ${em.config.baseCss || ''}\n\n .${ppfx}dashed *[data-highlightable] {\n outline: 1px dashed rgba(170,170,170,0.7);\n outline-offset: -2px;\n }\n\n .${ppfx}comp-selected {\n outline: 3px solid #3b97e3 !important;\n outline-offset: -3px;\n }\n\n .${ppfx}comp-selected-parent {\n outline: 2px solid ${colorWarn} !important\n }\n\n .${ppfx}no-select {\n user-select: none;\n -webkit-user-select:none;\n -moz-user-select: none;\n }\n\n .${ppfx}freezed {\n opacity: 0.5;\n pointer-events: none;\n }\n\n .${ppfx}no-pointer {\n pointer-events: none;\n }\n\n .${ppfx}plh-image {\n background: #f5f5f5;\n border: none;\n height: 50px;\n width: 50px;\n display: block;\n outline: 3px solid #ffca6f;\n cursor: pointer;\n outline-offset: -2px\n }\n\n .${ppfx}grabbing {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n\n ${conf.canvasCss || ''}\n ${protCss || ''}\n `;\n\n if (externalStyles) {\n body.append(externalStyles);\n }\n\n body.append('');\n body.append(wrap.render()).append(cssc.render());\n body.append(this.getJsContainer());\n em.trigger('loaded');\n this.frame.el.contentWindow.onscroll = this.onFrameScroll;\n this.frame.udpateOffset();\n\n // When the iframe is focused the event dispatcher is not the same so\n // I need to delegate all events to the parent document\n const doc = document;\n const fdoc = this.frame.el.contentDocument;\n\n // Unfortunately just creating `KeyboardEvent(e.type, e)` is not enough,\n // the keyCode/which will be always `0`. Even if it's an old/deprecated\n // property keymaster (and many others) still use it... using `defineProperty`\n // hack seems the only way\n const createCustomEvent = (e, cls) => {\n let oEvent;\n try {\n oEvent = new window[cls](e.type, e);\n } catch (e) {\n oEvent = document.createEvent(cls);\n oEvent.initEvent(e.type, true, true);\n }\n oEvent.keyCodeVal = e.keyCode;\n ['keyCode', 'which'].forEach(prop => {\n Object.defineProperty(oEvent, prop, {\n get() {\n return this.keyCodeVal;\n }\n });\n });\n return oEvent;\n };\n\n [\n { event: 'keydown keyup', class: 'KeyboardEvent' }\n //{ event: 'mousedown mousemove mouseup', class: 'MouseEvent' },\n ].forEach(obj =>\n obj.event.split(' ').forEach(event => {\n fdoc.addEventListener(event, e =>\n doc.dispatchEvent(createCustomEvent(e, obj.class))\n );\n })\n );\n }\n },\n\n /**\n * Get the offset of the element\n * @param {HTMLElement} el\n * @return {Object}\n */\n offset(el) {\n var rect = el.getBoundingClientRect();\n var docBody = el.ownerDocument.body;\n return {\n top: rect.top + docBody.scrollTop,\n left: rect.left + docBody.scrollLeft,\n width: rect.width,\n height: rect.height\n };\n },\n\n /**\n * Cleare cached offsets\n * @private\n */\n clearOff() {\n this.frmOff = null;\n this.cvsOff = null;\n },\n\n /**\n * Return frame offset\n * @return {Object}\n * @private\n */\n getFrameOffset(force = 0) {\n if (!this.frmOff || force) this.frmOff = this.offset(this.frame.el);\n return this.frmOff;\n },\n\n /**\n * Return canvas offset\n * @return {Object}\n * @private\n */\n getCanvasOffset() {\n if (!this.cvsOff) this.cvsOff = this.offset(this.el);\n return this.cvsOff;\n },\n\n /**\n * Returns element's data info\n * @param {HTMLElement} el\n * @return {Object}\n * @private\n */\n getElementPos(el, opts) {\n var opt = opts || {};\n var frmOff = this.getFrameOffset();\n var cvsOff = this.getCanvasOffset();\n var eo = this.offset(el);\n\n var frmTop = opt.avoidFrameOffset ? 0 : frmOff.top;\n var frmLeft = opt.avoidFrameOffset ? 0 : frmOff.left;\n\n const top = eo.top + frmTop - cvsOff.top;\n const left = eo.left + frmLeft - cvsOff.left;\n // clientHeight/clientWidth are for SVGs\n const height = el.offsetHeight || el.clientHeight;\n const width = el.offsetWidth || el.clientWidth;\n\n return { top, left, height, width };\n },\n\n /**\n * Returns position data of the canvas element\n * @return {Object} obj Position object\n * @private\n */\n getPosition() {\n const doc = this.frame.el.contentDocument;\n if (!doc) return;\n const bEl = doc.body;\n const fo = this.getFrameOffset();\n const co = this.getCanvasOffset();\n return {\n top: fo.top + bEl.scrollTop - co.top,\n left: fo.left + bEl.scrollLeft - co.left\n };\n },\n\n /**\n * Update javascript of a specific component passed by its View\n * @param {View} view Component's View\n * @private\n */\n updateScript(view) {\n if (!view.scriptContainer) {\n view.scriptContainer = $('
');\n this.getJsContainer().appendChild(view.scriptContainer.get(0));\n }\n\n const model = view.model;\n const id = model.getId();\n view.el.id = id;\n view.scriptContainer.html('');\n // In editor, I make use of setTimeout as during the append process of elements\n // those will not be available immediatly, therefore 'item' variable\n const script = document.createElement('script');\n script.innerHTML = `\n setTimeout(function() {\n var item = document.getElementById('${id}');\n if (!item) return;\n (function(){\n ${model.getScriptString()};\n }.bind(item))()\n }, 1);`;\n // #873\n // Adding setTimeout will make js components work on init of the editor\n setTimeout(() => view.scriptContainer.get(0).appendChild(script), 0);\n },\n\n /**\n * Get javascript container\n * @private\n */\n getJsContainer() {\n if (!this.jsContainer) {\n this.jsContainer = $(`
`).get(0);\n }\n return this.jsContainer;\n },\n\n render() {\n this.wrapper = this.model.get('wrapper');\n\n if (this.wrapper && typeof this.wrapper.render == 'function') {\n this.model.get('frame').set('wrapper', this.wrapper);\n this.$el.append(this.frame.render().el);\n var frame = this.frame;\n if (this.config.scripts.length === 0) {\n frame.el.onload = this.renderBody;\n } else {\n this.renderScripts(); // will call renderBody later\n }\n }\n var ppfx = this.ppfx;\n this.$el.append(`\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n `);\n const el = this.el;\n const toolsEl = el.querySelector(`#${ppfx}tools`);\n this.hlEl = el.querySelector(`.${ppfx}highlighter`);\n this.badgeEl = el.querySelector(`.${ppfx}badge`);\n this.placerEl = el.querySelector(`.${ppfx}placeholder`);\n this.ghostEl = el.querySelector(`.${ppfx}ghost`);\n this.toolbarEl = el.querySelector(`.${ppfx}toolbar`);\n this.resizerEl = el.querySelector(`.${ppfx}resizer`);\n this.offsetEl = el.querySelector(`.${ppfx}offset-v`);\n this.fixedOffsetEl = el.querySelector(`.${ppfx}offset-fixed-v`);\n this.toolsEl = toolsEl;\n this.el.className = this.className;\n return this;\n }\n});\n","import Backbone from 'backbone';\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n wrapper: '',\n width: '',\n height: '',\n attributes: {}\n }\n});\n","import Backbone from 'backbone';\nvar Frame = require('./Frame');\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n frame: '',\n wrapper: '',\n rulers: false\n },\n\n initialize(config) {\n var conf = this.conf || {};\n this.set('frame', new Frame(conf.frame));\n }\n});\n","module.exports = {\n stylePrefix: 'cv-',\n\n // Coming soon\n rulers: false,\n\n /*\n * Append external scripts in head of the iframe before renderBody content\n * In this case, you have to add them manually later in the final HTML page\n * @example\n * scripts: [\n * 'https://...',\n * ]\n */\n scripts: [],\n\n /*\n * Append external styles. This styles won't be added to the final HTML/CSS\n * @example\n * styles: [\n * 'https://...',\n * ]\n */\n styles: [],\n\n /**\n * Add custom badge naming strategy\n * @example\n * customBadgeLabel: function(ComponentModel) {\n * return ComponentModel.getName();\n * }\n */\n customBadgeLabel: ''\n};\n","/*\n This class makes the canvas droppable\n */\n\nimport { on } from 'utils/mixins';\nimport { bindAll, indexOf } from 'underscore';\n\nexport default class Droppable {\n constructor(em) {\n this.em = em;\n const el = em\n .get('DomComponents')\n .getWrapper()\n .getEl();\n this.el = el;\n this.counter = 0;\n bindAll(\n this,\n 'handleDragEnter',\n 'handleDragOver',\n 'handleDrop',\n 'handleDragLeave'\n );\n on(el, 'dragenter', this.handleDragEnter);\n on(el, 'dragover', this.handleDragOver);\n on(el, 'drop', this.handleDrop);\n on(el, 'dragleave', this.handleDragLeave);\n\n return this;\n }\n\n endDrop(cancel, ev) {\n const em = this.em;\n this.counter = 0;\n this.over = 0;\n // force out like in BlockView\n const sorter = this.sorter;\n cancel && (sorter.moved = 0);\n sorter.endMove();\n em.trigger('canvas:dragend', ev);\n }\n\n handleDragLeave(ev) {\n this.updateCounter(-1, ev);\n }\n\n updateCounter(value, ev) {\n this.counter += value;\n this.counter === 0 && this.endDrop(1, ev);\n }\n\n handleDragEnter(ev) {\n const em = this.em;\n const dt = ev.dataTransfer;\n this.updateCounter(1, ev);\n if (this.over) return;\n this.over = 1;\n const utils = em.get('Utils');\n const canvas = em.get('Canvas');\n this.sorter = new utils.Sorter({\n em,\n wmargin: 1,\n nested: 1,\n canvasRelative: 1,\n direction: 'a',\n container: canvas.getBody(),\n placer: canvas.getPlacerEl(),\n eventMoving: 'mousemove dragover',\n containerSel: '*',\n itemSel: '*',\n pfx: 'gjs-',\n onStart: () => em.stopDefault(),\n onEndMove: model => {\n em.runDefault();\n em.set('dragResult', model);\n model && em.trigger('canvas:drop', dt, model);\n },\n document: canvas.getFrameEl().contentDocument\n });\n // For security reason I can't read the drag data on dragenter, but\n // as I need it for the Sorter context I will use `dragContent` or just\n // any not empty element\n const content = em.get('dragContent') || '
';\n this.sorter.setDropContent(content);\n this.sorter.startSort();\n em.trigger('canvas:dragenter', dt, content);\n }\n\n /**\n * Always need to have this handler active for enabling the drop\n * @param {Event} ev\n */\n handleDragOver(ev) {\n ev.preventDefault();\n this.em.trigger('canvas:dragover', ev);\n }\n\n handleDrop(ev) {\n ev.preventDefault();\n const dt = ev.dataTransfer;\n const content = this.getContentByData(dt).content;\n ev.target.style.border = '';\n\n if (content) {\n this.sorter.setDropContent(content);\n } else {\n this.sorter.moved = 0;\n }\n\n this.endDrop(0, ev);\n }\n\n getContentByData(dataTransfer) {\n const em = this.em;\n const types = dataTransfer.types;\n const files = dataTransfer.files;\n const dragContent = em.get('dragContent');\n let content = dataTransfer.getData('text');\n\n if (files.length) {\n content = [];\n for (let i = 0; i < files.length; i++) {\n const file = files[i];\n const type = file.type.split('/')[0];\n\n if (type == 'image') {\n content.push({\n type,\n file,\n attributes: { alt: file.name }\n });\n }\n }\n } else if (dragContent) {\n content = dragContent;\n } else if (indexOf(types, 'text/html') >= 0) {\n content = dataTransfer\n .getData('text/html')\n .replace(/<\\/?meta[^>]*>/g, '');\n } else if (indexOf(types, 'text/uri-list') >= 0) {\n content = {\n type: 'link',\n attributes: { href: content },\n content: content\n };\n } else if (indexOf(types, 'text/json') >= 0) {\n const json = dataTransfer.getData('text/json');\n json && (content = JSON.parse(json));\n }\n\n const result = { content };\n em.trigger('canvas:dragdata', dataTransfer, result);\n\n return result;\n }\n}\n","import { on, off, hasDnd, getElement } from 'utils/mixins';\nimport Droppable from 'utils/Droppable';\n\nmodule.exports = () => {\n var c = {},\n defaults = require('./config/config'),\n Canvas = require('./model/Canvas'),\n CanvasView = require('./view/CanvasView');\n var canvas;\n var frameRect;\n\n return {\n /**\n * Used inside RTE\n * @private\n */\n getCanvasView() {\n return CanvasView;\n },\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Canvas',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n canvas = new Canvas(config);\n CanvasView = new CanvasView({\n model: canvas,\n config: c\n });\n\n var cm = c.em.get('DomComponents');\n if (cm) this.setWrapper(cm);\n\n this.startAutoscroll = this.startAutoscroll.bind(this);\n this.stopAutoscroll = this.stopAutoscroll.bind(this);\n this.autoscroll = this.autoscroll.bind(this);\n return this;\n },\n\n /**\n * Return config object\n * @return {Object}\n */\n getConfig() {\n return c;\n },\n\n /**\n * Add wrapper\n * @param\t{Object}\twrp Wrapper\n *\n * */\n setWrapper(wrp) {\n canvas.set('wrapper', wrp);\n },\n\n /**\n * Returns canvas element\n * @return {HTMLElement}\n */\n getElement() {\n return CanvasView.el;\n },\n\n /**\n * Returns frame element of the canvas\n * @return {HTMLElement}\n */\n getFrameEl() {\n return CanvasView.frame.el;\n },\n\n /**\n * Returns the frame document\n * @return {HTMLElement}\n */\n getDocument() {\n return this.getFrameEl().contentDocument;\n },\n\n /**\n * Returns the frame's window\n * @return {HTMLElement}\n */\n getWindow() {\n return this.getFrameEl().contentWindow;\n },\n\n /**\n * Returns body element of the frame\n * @return {HTMLElement}\n */\n getBody() {\n return CanvasView.frame.el.contentDocument.body;\n },\n\n /**\n * Returns body wrapper element of the frame\n * @return {HTMLElement}\n */\n getWrapperEl() {\n return this.getBody().querySelector('#wrapper');\n },\n\n /**\n * Returns element containing all canvas tools\n * @return {HTMLElement}\n */\n getToolsEl() {\n return CanvasView.toolsEl;\n },\n\n /**\n * Returns highlighter element\n * @return {HTMLElement}\n */\n getHighlighter() {\n return CanvasView.hlEl;\n },\n\n /**\n * Returns badge element\n * @return {HTMLElement}\n */\n getBadgeEl() {\n return CanvasView.badgeEl;\n },\n\n /**\n * Returns placer element\n * @return {HTMLElement}\n */\n getPlacerEl() {\n return CanvasView.placerEl;\n },\n\n /**\n * Returns ghost element\n * @return {HTMLElement}\n * @private\n */\n getGhostEl() {\n return CanvasView.ghostEl;\n },\n\n /**\n * Returns toolbar element\n * @return {HTMLElement}\n */\n getToolbarEl() {\n return CanvasView.toolbarEl;\n },\n\n /**\n * Returns resizer element\n * @return {HTMLElement}\n */\n getResizerEl() {\n return CanvasView.resizerEl;\n },\n\n /**\n * Returns offset viewer element\n * @return {HTMLElement}\n */\n getOffsetViewerEl() {\n return CanvasView.offsetEl;\n },\n\n /**\n * Returns fixed offset viewer element\n * @return {HTMLElement}\n */\n getFixedOffsetViewerEl() {\n return CanvasView.fixedOffsetEl;\n },\n\n /**\n * Render canvas\n * */\n render() {\n return CanvasView.render().el;\n },\n\n /**\n * Get frame position\n * @return {Object}\n * @private\n */\n getOffset() {\n var frameOff = this.offset(this.getFrameEl());\n var canvasOff = this.offset(this.getElement());\n return {\n top: frameOff.top - canvasOff.top,\n left: frameOff.left - canvasOff.left\n };\n },\n\n /**\n * Get the offset of the element\n * @param {HTMLElement} el\n * @return {Object}\n * @private\n */\n offset(el) {\n return CanvasView.offset(el);\n },\n\n /**\n * Set custom badge naming strategy\n * @param {Function} f\n * @example\n * canvas.setCustomBadgeLabel(function(model){\n * return ComponentModel.getName();\n * });\n */\n setCustomBadgeLabel(f) {\n c.customBadgeLabel = f;\n },\n\n /**\n * Get element position relative to the canvas\n * @param {HTMLElement} el\n * @return {Object}\n */\n getElementPos(el, opts) {\n return CanvasView.getElementPos(el, opts);\n },\n\n /**\n * This method comes handy when you need to attach something like toolbars\n * to elements inside the canvas, dealing with all relative position,\n * offsets, etc. and returning as result the object with positions which are\n * viewable by the user (when the canvas is scrolled the top edge of the element\n * is not viewable by the user anymore so the new top edge is the one of the canvas)\n *\n * The target should be visible before being passed here as invisible elements\n * return empty string as width\n * @param {HTMLElement} target The target in this case could be the toolbar\n * @param {HTMLElement} element The element on which I'd attach the toolbar\n * @param {Object} options Custom options\n * @param {Boolean} options.toRight Set to true if you want the toolbar attached to the right\n * @return {Object}\n */\n getTargetToElementDim(target, element, options) {\n var opts = options || {};\n var canvasPos = CanvasView.getPosition();\n if (!canvasPos) return;\n var pos = opts.elPos || CanvasView.getElementPos(element);\n var toRight = options.toRight || 0;\n var targetHeight = opts.targetHeight || target.offsetHeight;\n var targetWidth = opts.targetWidth || target.offsetWidth;\n var eventToTrigger = opts.event || null;\n\n var elTop = pos.top - targetHeight;\n var elLeft = pos.left;\n elLeft += toRight ? pos.width : 0;\n elLeft = toRight ? elLeft - targetWidth : elLeft;\n\n var leftPos = elLeft < canvasPos.left ? canvasPos.left : elLeft;\n var topPos = elTop < canvasPos.top ? canvasPos.top : elTop;\n topPos = topPos > pos.top + pos.height ? pos.top + pos.height : topPos;\n\n var result = {\n top: topPos,\n left: leftPos,\n elementTop: pos.top,\n elementLeft: pos.left,\n elementWidth: pos.width,\n elementHeight: pos.height,\n targetWidth: target.offsetWidth,\n targetHeight: target.offsetHeight,\n canvasTop: canvasPos.top,\n canvasLeft: canvasPos.left\n };\n\n // In this way I can catch data and also change the position strategy\n if (eventToTrigger && c.em) {\n c.em.trigger(eventToTrigger, result);\n }\n\n return result;\n },\n\n /**\n * Instead of simply returning e.clientX and e.clientY this function\n * calculates also the offset based on the canvas. This is helpful when you\n * need to get X and Y position while moving between the editor area and\n * canvas area, which is in the iframe\n * @param {Event} e\n * @return {Object}\n */\n getMouseRelativePos(e, options) {\n var opts = options || {};\n var addTop = 0;\n var addLeft = 0;\n var subWinOffset = opts.subWinOffset;\n var doc = e.target.ownerDocument;\n var win = doc.defaultView || doc.parentWindow;\n var frame = win.frameElement;\n var yOffset = subWinOffset ? win.pageYOffset : 0;\n var xOffset = subWinOffset ? win.pageXOffset : 0;\n\n if (frame) {\n var frameRect = frame.getBoundingClientRect();\n addTop = frameRect.top || 0;\n addLeft = frameRect.left || 0;\n }\n\n return {\n y: e.clientY + addTop - yOffset,\n x: e.clientX + addLeft - xOffset\n };\n },\n\n /**\n * X and Y mouse position relative to the canvas\n * @param {Event} e\n * @return {Object}\n */\n getMouseRelativeCanvas(e, options) {\n var opts = options || {};\n var frame = this.getFrameEl();\n var body = this.getBody();\n var addTop = frame.offsetTop || 0;\n var addLeft = frame.offsetLeft || 0;\n var yOffset = body.scrollTop || 0;\n var xOffset = body.scrollLeft || 0;\n\n return {\n y: e.clientY + addTop + yOffset,\n x: e.clientX + addLeft + xOffset\n };\n },\n\n /**\n * Check if the canvas is focused\n * @return {Boolean}\n */\n hasFocus() {\n return this.getDocument().hasFocus();\n },\n\n /**\n * Detects if some input is focused (input elements, text components, etc.)\n * Used internally, for example, to avoid undo/redo in text editing mode\n * @return {Boolean}\n */\n isInputFocused() {\n return this.getFrameEl().contentDocument.activeElement.tagName !== 'BODY';\n },\n\n /**\n * Scroll canvas to the element if it's not visible. The scrolling is\n * executed via `scrollIntoView` API and options of this method are\n * passed to it. For instance, you can scroll smoothly with\n * `{ behavior: 'smooth' }`. You can also force the scroll\n * @param {HTMLElement|Component} el\n * @param {Object} [opts={}] Options, same as options for `scrollIntoView`\n * @example\n * const selected = editor.getSelected();\n * // Scroll smoothly (this behavior can be polyfilled)\n * cv.scrollTo(selected, { behavior: 'smooth' });\n * // Force the scroll, even if the element is alredy visible\n * cv.scrollTo(selected, { force: true });\n */\n scrollTo(el, opts = {}) {\n const elem = getElement(el);\n const cv = this.getCanvasView();\n\n if (!cv.isElInViewport(elem) || opts.force) {\n elem.scrollIntoView(opts);\n }\n },\n\n /**\n * Start autoscroll\n */\n startAutoscroll() {\n this.dragging = 1;\n let toListen = this.getScrollListeners();\n frameRect = CanvasView.getFrameOffset(1);\n\n // By detaching those from the stack avoid browsers lags\n // Noticeable with \"fast\" drag of blocks\n setTimeout(() => {\n on(toListen, 'mousemove', this.autoscroll);\n on(toListen, 'mouseup', this.stopAutoscroll);\n }, 0);\n },\n\n autoscroll(e) {\n e.preventDefault();\n if (this.dragging) {\n let frameWindow = this.getFrameEl().contentWindow;\n let actualTop = frameWindow.document.body.scrollTop;\n let nextTop = actualTop;\n let clientY = e.clientY;\n let limitTop = 50;\n let limitBottom = frameRect.height - limitTop;\n\n if (clientY < limitTop) {\n nextTop -= limitTop - clientY;\n }\n\n if (clientY > limitBottom) {\n nextTop += clientY - limitBottom;\n }\n\n //console.log(`actualTop: ${actualTop} clientY: ${clientY} nextTop: ${nextTop} frameHeigh: ${frameRect.height}`);\n frameWindow.scrollTo(0, nextTop);\n }\n },\n\n /**\n * Stop autoscroll\n */\n stopAutoscroll() {\n this.dragging = 0;\n let toListen = this.getScrollListeners();\n off(toListen, 'mousemove', this.autoscroll);\n off(toListen, 'mouseup', this.stopAutoscroll);\n },\n\n getScrollListeners() {\n return [this.getFrameEl().contentWindow, this.getElement()];\n },\n\n postRender() {\n if (hasDnd(c.em)) this.droppable = new Droppable(c.em);\n },\n\n /**\n * Returns wrapper element\n * @return {HTMLElement}\n * ????\n */\n getFrameWrapperEl() {\n return CanvasView.frame.getWrapper();\n }\n };\n};\n","const ItemView = require('./ItemView');\n\nmodule.exports = require('backbone').View.extend({\n initialize(o = {}) {\n this.opt = o;\n const config = o.config || {};\n this.level = o.level;\n this.config = config;\n this.preview = o.preview;\n this.ppfx = config.pStylePrefix || '';\n this.pfx = config.stylePrefix || '';\n this.parent = o.parent;\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const parent = this.parent;\n const coll = this.collection;\n this.listenTo(coll, 'add', this.addTo);\n this.listenTo(coll, 'reset resetNavigator', this.render);\n this.listenTo(coll, 'remove', this.removeChildren);\n this.className = `${pfx}layers`;\n const em = config.em;\n\n if (config.sortable && !this.opt.sorter) {\n const utils = em.get('Utils');\n this.opt.sorter = new utils.Sorter({\n container: config.sortContainer || this.el,\n containerSel: `.${this.className}`,\n itemSel: `.${pfx}layer`,\n ignoreViewChildren: 1,\n onEndMove(created, sorter) {\n const srcModel = sorter.getSourceModel();\n em.setSelected(srcModel, { forceChange: 1 });\n },\n avoidSelectOnEnd: 1,\n nested: 1,\n ppfx,\n pfx\n });\n }\n\n this.sorter = this.opt.sorter || '';\n\n // For the sorter\n this.$el.data('collection', coll);\n parent && this.$el.data('model', parent);\n },\n\n removeChildren(removed) {\n const view = removed.viewLayer;\n if (!view) return;\n view.remove.apply(view);\n },\n\n /**\n * Add to collection\n * @param Object Model\n *\n * @return Object\n * */\n addTo(model) {\n var i = this.collection.indexOf(model);\n this.addToCollection(model, null, i);\n },\n\n /**\n * Add new object to collection\n * @param Object Model\n * @param Object Fragment collection\n * @param integer Index of append\n *\n * @return Object Object created\n * */\n addToCollection(model, fragmentEl, index) {\n const level = this.level;\n var fragment = fragmentEl || null;\n var viewObject = ItemView;\n\n if (!this.isCountable(model, this.config.hideTextnode)) {\n return;\n }\n\n var view = new viewObject({\n level,\n model,\n config: this.config,\n sorter: this.sorter,\n isCountable: this.isCountable,\n opened: this.opt.opened\n });\n var rendered = view.render().el;\n\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n if (typeof index != 'undefined') {\n var method = 'before';\n // If the added model is the last of collection\n // need to change the logic of append\n if (this.$el.children().length == index) {\n index--;\n method = 'after';\n }\n // In case the added is new in the collection index will be -1\n if (index < 0) {\n this.$el.append(rendered);\n } else\n this.$el\n .children()\n .eq(index)\n [method](rendered);\n } else this.$el.append(rendered);\n }\n\n return rendered;\n },\n\n /**\n * Check if the model could be count by the navigator\n * @param {Object} model\n * @return {Boolean}\n * @private\n */\n isCountable(model, hide) {\n var type = model.get('type');\n var tag = model.get('tagName');\n if (\n ((type == 'textnode' || tag == 'br') && hide) ||\n !model.get('layerable')\n ) {\n return false;\n }\n return true;\n },\n\n render() {\n const frag = document.createDocumentFragment();\n const el = this.el;\n el.innerHTML = '';\n this.collection.each(model => this.addToCollection(model, frag));\n el.appendChild(frag);\n el.className = this.className;\n return this;\n }\n});\n","module.exports = {\n stylePrefix: '',\n\n // Specify the element to use as a container, string (query) or HTMLElement\n // With the empty value, nothing will be rendered\n appendTo: '',\n\n // Enable/Disable globally the possibility to sort layers\n sortable: 1,\n\n // Enable/Disable globally the possibility to hide layers\n hidable: 1,\n\n // Hide textnodes\n hideTextnode: 1,\n\n // Indicate a query string of the element to be selected as the root of layers.\n // By default the root is the wrapper\n root: '',\n\n // Indicates if the wrapper is visible in layers\n showWrapper: 1,\n\n // Show hovered components in canvas\n showHover: 1,\n\n // Scroll to selected component in Canvas when it's selected in Layers\n // true, false or `scrollIntoView`-like options\n scrollCanvas: { behavior: 'smooth' },\n\n // Scroll to selected component in Layers when it's selected in Canvas\n // true, false or `scrollIntoView`-like options\n scrollLayers: 1,\n\n // Highlight when a layer component is hovered\n highlightHover: 1\n};\n","module.exports = require('backbone').View.extend({});\n","const Component = require('./Component');\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n droppable: false,\n editable: true\n },\n\n toHTML() {\n return this.get('content');\n }\n },\n {\n isComponent(el) {\n var result = '';\n if (el.nodeType === 3) {\n result = {\n type: 'textnode',\n content: el.textContent\n };\n }\n return result;\n }\n }\n);\n","const ComponentView = require('./ComponentView');\n\nmodule.exports = ComponentView.extend({\n _createElement: function(tagName) {\n return document.createElementNS('http://www.w3.org/2000/svg', tagName);\n }\n});\n","const Component = require('./Component');\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n highlightable: 0\n },\n\n getName() {\n let name = this.get('tagName');\n let customName = this.get('custom-name');\n name = name.charAt(0).toUpperCase() + name.slice(1);\n return customName || name;\n }\n },\n {\n isComponent(el) {\n if (SVGElement && el instanceof SVGElement) {\n // Some SVG elements require uppercase letters (eg. )\n const tagName = el.tagName;\n // Make the root resizable\n const resizable = tagName == 'svg' ? true : false;\n\n return {\n tagName,\n type: 'svg',\n resizable\n };\n }\n }\n }\n);\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentImageView');\n\nmodule.exports = ComponentView.extend({\n tagName: 'script',\n\n events: {},\n\n render() {\n var model = this.model;\n var src = model.get('src');\n var em = this.em;\n var scriptCount = em && em.get('scriptCount') ? em.get('scriptCount') : 0;\n var content = '';\n\n // If it's an external script\n if (src) {\n var onload = model.get('onload');\n var svar = 'script' + scriptCount;\n var svarNext = 'script' + (scriptCount + 1);\n content =\n 'var ' +\n svar +\n \" = document.createElement('script');\\n\" +\n svar +\n '.onload = function(){\\n' +\n (onload ? onload + '();\\n' : '') +\n 'typeof ' +\n svarNext +\n \"Start == 'function' && \" +\n svarNext +\n 'Start();\\n' +\n '};\\n' +\n svar +\n \".src = '\" +\n src +\n \"';\\n\" +\n 'function ' +\n svar +\n 'Start() { document.body.appendChild(' +\n svar +\n '); };\\n' +\n (!scriptCount ? svar + 'Start();' : '');\n if (em) {\n em.set('scriptCount', scriptCount + 1);\n }\n } else {\n content = model.get('content');\n }\n\n this.el.innerHTML = content;\n return this;\n }\n});\n","const Component = require('./Component');\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n type: 'script',\n droppable: false,\n draggable: false,\n layerable: false\n }\n },\n {\n isComponent(el) {\n if (el.tagName == 'SCRIPT') {\n var result = { type: 'script' };\n\n if (el.src) {\n result.src = el.src;\n result.onload = el.onload;\n }\n\n return result;\n }\n }\n }\n);\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentImageView');\nvar OComponentView = require('./ComponentView');\n\nmodule.exports = ComponentView.extend({\n tagName: 'div',\n\n events: {},\n\n initialize(o) {\n OComponentView.prototype.initialize.apply(this, arguments);\n this.listenTo(this.model, 'change:src', this.updateSrc);\n this.listenTo(\n this.model,\n 'change:loop change:autoplay change:controls change:color change:rel change:modestbranding',\n this.updateVideo\n );\n this.listenTo(this.model, 'change:provider', this.updateProvider);\n },\n\n /**\n * Rerender on update of the provider\n * @private\n */\n updateProvider() {\n var prov = this.model.get('provider');\n this.el.innerHTML = '';\n this.el.appendChild(this.renderByProvider(prov));\n },\n\n /**\n * Update the source of the video\n * @private\n */\n updateSrc() {\n var prov = this.model.get('provider');\n var src = this.model.get('src');\n switch (prov) {\n case 'yt':\n src = this.model.getYoutubeSrc();\n break;\n case 'ytnc':\n src = this.model.getYoutubeNoCookieSrc();\n break;\n case 'vi':\n src = this.model.getVimeoSrc();\n break;\n }\n this.videoEl.src = src;\n },\n\n /**\n * Update video parameters\n * @private\n */\n updateVideo() {\n var prov = this.model.get('provider');\n var videoEl = this.videoEl;\n var md = this.model;\n switch (prov) {\n case 'yt':\n case 'ytnc':\n case 'vi':\n this.model.trigger('change:videoId');\n break;\n default:\n videoEl.loop = md.get('loop');\n videoEl.autoplay = md.get('autoplay');\n videoEl.controls = md.get('controls');\n }\n },\n\n renderByProvider(prov) {\n var videoEl;\n switch (prov) {\n case 'yt':\n videoEl = this.renderYoutube();\n break;\n case 'ytnc':\n videoEl = this.renderYoutubeNoCookie();\n break;\n case 'vi':\n videoEl = this.renderVimeo();\n break;\n default:\n videoEl = this.renderSource();\n }\n this.videoEl = videoEl;\n return videoEl;\n },\n\n renderSource() {\n var el = document.createElement('video');\n el.src = this.model.get('src');\n this.initVideoEl(el);\n return el;\n },\n\n renderYoutube() {\n var el = document.createElement('iframe');\n el.src = this.model.getYoutubeSrc();\n el.frameBorder = 0;\n el.setAttribute('allowfullscreen', true);\n this.initVideoEl(el);\n return el;\n },\n\n renderYoutubeNoCookie() {\n var el = document.createElement('iframe');\n el.src = this.model.getYoutubeNoCookieSrc();\n el.frameBorder = 0;\n el.setAttribute('allowfullscreen', true);\n this.initVideoEl(el);\n return el;\n },\n\n renderVimeo() {\n var el = document.createElement('iframe');\n el.src = this.model.getVimeoSrc();\n el.frameBorder = 0;\n el.setAttribute('allowfullscreen', true);\n this.initVideoEl(el);\n return el;\n },\n\n initVideoEl(el) {\n el.className = this.ppfx + 'no-pointer';\n el.style.height = '100%';\n el.style.width = '100%';\n },\n\n render(...args) {\n ComponentView.prototype.render.apply(this, args);\n this.updateClasses();\n var prov = this.model.get('provider');\n this.el.appendChild(this.renderByProvider(prov));\n return this;\n }\n});\n","const Component = require('./ComponentImage');\nconst OComponent = require('./Component');\nconst yt = 'yt';\nconst vi = 'vi';\nconst ytnc = 'ytnc';\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n type: 'video',\n tagName: 'video',\n videoId: '',\n void: 0,\n provider: '', // on change of provider, traits are switched\n ytUrl: 'https://www.youtube.com/embed/',\n ytncUrl: 'https://www.youtube-nocookie.com/embed/',\n viUrl: 'https://player.vimeo.com/video/',\n loop: 0,\n muted: 0,\n autoplay: 0,\n controls: 1,\n color: '',\n rel: 1, // YT related videos\n modestbranding: 0, // YT modest branding\n sources: [],\n attributes: { allowfullscreen: 'allowfullscreen' },\n toolbar: OComponent.prototype.defaults.toolbar\n },\n\n initialize(o, opt) {\n var traits = [];\n var prov = this.get('provider');\n switch (prov) {\n case yt:\n case ytnc:\n traits = this.getYoutubeTraits();\n break;\n case vi:\n traits = this.getVimeoTraits();\n break;\n default:\n traits = this.getSourceTraits();\n }\n if (this.get('src')) this.parseFromSrc();\n this.set('traits', traits);\n Component.prototype.initialize.apply(this, arguments);\n this.listenTo(this, 'change:provider', this.updateTraits);\n this.listenTo(this, 'change:videoId change:provider', this.updateSrc);\n },\n\n initToolbar(...args) {\n OComponent.prototype.initToolbar.apply(this, args);\n },\n\n /**\n * Set attributes by src string\n */\n parseFromSrc() {\n var prov = this.get('provider');\n var uri = this.parseUri(this.get('src'));\n var qr = uri.query;\n switch (prov) {\n case yt:\n case ytnc:\n case vi:\n var videoId = uri.pathname.split('/').pop();\n this.set('videoId', videoId);\n if (qr.autoplay) this.set('autoplay', 1);\n if (qr.loop) this.set('loop', 1);\n if (parseInt(qr.controls) === 0) this.set('controls', 0);\n if (qr.color) this.set('color', qr.color);\n if (qr.rel === '0') this.set('rel', 0);\n if (qr.modestbranding === '1') this.set('modestbranding', 1);\n break;\n default:\n }\n },\n\n /**\n * Update src on change of video ID\n * @private\n */\n updateSrc() {\n var prov = this.get('provider');\n switch (prov) {\n case yt:\n this.set('src', this.getYoutubeSrc());\n break;\n case ytnc:\n this.set('src', this.getYoutubeNoCookieSrc());\n break;\n case vi:\n this.set('src', this.getVimeoSrc());\n break;\n }\n },\n\n /**\n * Returns object of attributes for HTML\n * @return {Object}\n * @private\n */\n getAttrToHTML(...args) {\n var attr = Component.prototype.getAttrToHTML.apply(this, args);\n var prov = this.get('provider');\n switch (prov) {\n case yt:\n case ytnc:\n case vi:\n break;\n default:\n if (this.get('loop')) attr.loop = 'loop';\n if (this.get('autoplay')) attr.autoplay = 'autoplay';\n if (this.get('controls')) attr.controls = 'controls';\n }\n return attr;\n },\n\n /**\n * Update traits by provider\n * @private\n */\n updateTraits() {\n var prov = this.get('provider');\n var traits = this.getSourceTraits();\n switch (prov) {\n case yt:\n case ytnc:\n this.set('tagName', 'iframe');\n traits = this.getYoutubeTraits();\n break;\n case vi:\n this.set('tagName', 'iframe');\n traits = this.getVimeoTraits();\n break;\n default:\n this.set('tagName', 'video');\n }\n this.loadTraits(traits);\n this.em.trigger('component:toggled');\n },\n\n // Listen provider change and switch traits, in TraitView listen traits change\n\n /**\n * Return the provider trait\n * @return {Object}\n * @private\n */\n getProviderTrait() {\n return {\n type: 'select',\n label: 'Provider',\n name: 'provider',\n changeProp: 1,\n value: this.get('provider'),\n options: [\n { value: 'so', name: 'HTML5 Source' },\n { value: yt, name: 'Youtube' },\n { value: ytnc, name: 'Youtube (no cookie)' },\n { value: vi, name: 'Vimeo' }\n ]\n };\n },\n\n /**\n * Return traits for the source provider\n * @return {Array}\n * @private\n */\n getSourceTraits() {\n return [\n this.getProviderTrait(),\n {\n label: 'Source',\n name: 'src',\n placeholder: 'eg. ./media/video.mp4',\n changeProp: 1\n },\n this.getAutoplayTrait(),\n this.getLoopTrait(),\n this.getControlsTrait()\n ];\n },\n /**\n * Return traits for the source provider\n * @return {Array}\n * @private\n */\n getYoutubeTraits() {\n return [\n this.getProviderTrait(),\n {\n label: 'Video ID',\n name: 'videoId',\n placeholder: 'eg. jNQXAC9IVRw',\n changeProp: 1\n },\n this.getAutoplayTrait(),\n this.getLoopTrait(),\n this.getControlsTrait(),\n {\n type: 'checkbox',\n label: 'Related',\n name: 'rel',\n changeProp: 1\n },\n {\n type: 'checkbox',\n label: 'Modest',\n name: 'modestbranding',\n changeProp: 1\n }\n ];\n },\n\n /**\n * Return traits for the source provider\n * @return {Array}\n * @private\n */\n getVimeoTraits() {\n return [\n this.getProviderTrait(),\n {\n label: 'Video ID',\n name: 'videoId',\n placeholder: 'eg. 123456789',\n changeProp: 1\n },\n {\n label: 'Color',\n name: 'color',\n placeholder: 'eg. FF0000',\n changeProp: 1\n },\n this.getAutoplayTrait(),\n this.getLoopTrait()\n ];\n },\n\n /**\n * Return object trait\n * @return {Object}\n * @private\n */\n getAutoplayTrait() {\n return {\n type: 'checkbox',\n label: 'Autoplay',\n name: 'autoplay',\n changeProp: 1\n };\n },\n\n /**\n * Return object trait\n * @return {Object}\n * @private\n */\n getLoopTrait() {\n return {\n type: 'checkbox',\n label: 'Loop',\n name: 'loop',\n changeProp: 1\n };\n },\n\n /**\n * Return object trait\n * @return {Object}\n * @private\n */\n getControlsTrait() {\n return {\n type: 'checkbox',\n label: 'Controls',\n name: 'controls',\n changeProp: 1\n };\n },\n\n /**\n * Returns url to youtube video\n * @return {string}\n * @private\n */\n getYoutubeSrc() {\n const id = this.get('videoId');\n let url = this.get('ytUrl');\n url += id + '?';\n url += this.get('autoplay') ? '&autoplay=1' : '';\n url += !this.get('controls') ? '&controls=0&showinfo=0' : '';\n // Loop works only with playlist enabled\n // https://stackoverflow.com/questions/25779966/youtube-iframe-loop-doesnt-work\n url += this.get('loop') ? `&loop=1&playlist=${id}` : '';\n url += this.get('rel') ? '' : '&rel=0';\n url += this.get('modestbranding') ? '&modestbranding=1' : '';\n return url;\n },\n\n /**\n * Returns url to youtube no cookie video\n * @return {string}\n * @private\n */\n getYoutubeNoCookieSrc() {\n let url = this.getYoutubeSrc();\n url = url.replace(this.get('ytUrl'), this.get('ytncUrl'));\n return url;\n },\n\n /**\n * Returns url to vimeo video\n * @return {string}\n * @private\n */\n getVimeoSrc() {\n var url = this.get('viUrl');\n url += this.get('videoId') + '?';\n url += this.get('autoplay') ? '&autoplay=1' : '';\n url += this.get('loop') ? '&loop=1' : '';\n url += !this.get('controls') ? '&title=0&portrait=0&badge=0' : '';\n url += this.get('color') ? '&color=' + this.get('color') : '';\n return url;\n }\n },\n {\n /**\n * Detect if the passed element is a valid component.\n * In case the element is valid an object abstracted\n * from the element will be returned\n * @param {HTMLElement}\n * @return {Object}\n * @private\n */\n isComponent(el) {\n var result = '';\n var isYtProv = /youtube\\.com\\/embed/.test(el.src);\n var isYtncProv = /youtube-nocookie\\.com\\/embed/.test(el.src);\n var isViProv = /player\\.vimeo\\.com\\/video/.test(el.src);\n var isExtProv = isYtProv || isYtncProv || isViProv;\n if (el.tagName == 'VIDEO' || (el.tagName == 'IFRAME' && isExtProv)) {\n result = { type: 'video' };\n if (el.src) result.src = el.src;\n if (isExtProv) {\n if (isYtProv) result.provider = yt;\n else if (isYtncProv) result.provider = ytnc;\n else if (isViProv) result.provider = vi;\n }\n }\n return result;\n }\n }\n);\n","module.exports = require('./ComponentLinkView').extend({});\n","import Component from './ComponentText';\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n tagName: 'label',\n traits: ['id', 'title', 'for']\n }\n },\n {\n isComponent(el) {\n if (el.tagName == 'LABEL') {\n return { type: 'label' };\n }\n }\n }\n);\n","const Component = require('./ComponentText');\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n type: 'link',\n tagName: 'a',\n traits: ['title', 'href', 'target']\n },\n\n /**\n * Returns object of attributes for HTML\n * @return {Object}\n * @private\n */\n getAttrToHTML(...args) {\n const attr = Component.prototype.getAttrToHTML.apply(this, args);\n delete attr.onmousedown;\n return attr;\n }\n },\n {\n isComponent(el) {\n let result;\n let avoidEdit;\n\n if (el.tagName == 'A') {\n result = {\n type: 'link',\n editable: 0\n };\n\n // The link is editable only if, at least, one of its\n // children is a text node (not empty one)\n const children = el.childNodes;\n const len = children.length;\n if (!len) delete result.editable;\n\n for (let i = 0; i < len; i++) {\n const child = children[i];\n\n if (child.nodeType == 3 && child.textContent.trim() != '') {\n delete result.editable;\n break;\n }\n }\n }\n\n return result;\n }\n }\n);\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentImageView');\n\nmodule.exports = ComponentView.extend({\n tagName: 'div',\n\n events: {},\n\n initialize(o) {\n ComponentView.prototype.initialize.apply(this, arguments);\n this.classEmpty = this.ppfx + 'plh-map';\n },\n\n /**\n * Update the map on the canvas\n * @private\n */\n updateSrc() {\n this.getIframe().src = this.model.get('src');\n },\n\n getIframe() {\n if (!this.iframe) {\n var ifrm = document.createElement('iframe');\n ifrm.src = this.model.get('src');\n ifrm.frameBorder = 0;\n ifrm.style.height = '100%';\n ifrm.style.width = '100%';\n ifrm.className = this.ppfx + 'no-pointer';\n this.iframe = ifrm;\n }\n return this.iframe;\n },\n\n render(...args) {\n ComponentView.prototype.render.apply(this, args);\n this.updateClasses();\n this.el.appendChild(this.getIframe());\n return this;\n }\n});\n","const Component = require('./ComponentImage');\nconst OComponent = require('./Component');\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n type: 'map',\n void: 0,\n mapUrl: 'https://maps.google.com/maps',\n tagName: 'iframe',\n mapType: 'q',\n address: '',\n zoom: '1',\n attributes: { frameborder: 0 },\n toolbar: OComponent.prototype.defaults.toolbar,\n traits: [\n {\n label: 'Address',\n name: 'address',\n placeholder: 'eg. London, UK',\n changeProp: 1\n },\n {\n type: 'select',\n label: 'Map type',\n name: 'mapType',\n changeProp: 1,\n options: [\n { value: 'q', name: 'Roadmap' },\n { value: 'w', name: 'Satellite' }\n ]\n },\n {\n label: 'Zoom',\n name: 'zoom',\n type: 'range',\n min: '1',\n max: '20',\n changeProp: 1\n }\n ]\n },\n\n initialize(o, opt) {\n if (this.get('src')) this.parseFromSrc();\n else this.updateSrc();\n Component.prototype.initialize.apply(this, arguments);\n this.listenTo(\n this,\n 'change:address change:zoom change:mapType',\n this.updateSrc\n );\n },\n\n updateSrc() {\n this.set('src', this.getMapUrl());\n },\n\n /**\n * Returns url of the map\n * @return {string}\n * @private\n */\n getMapUrl() {\n var md = this;\n var addr = md.get('address');\n var zoom = md.get('zoom');\n var type = md.get('mapType');\n var size = '';\n addr = addr ? '&q=' + addr : '';\n zoom = zoom ? '&z=' + zoom : '';\n type = type ? '&t=' + type : '';\n var result = md.get('mapUrl') + '?' + addr + zoom + type;\n result += '&output=embed';\n return result;\n },\n\n /**\n * Set attributes by src string\n * @private\n */\n parseFromSrc() {\n var uri = this.parseUri(this.get('src'));\n var qr = uri.query;\n if (qr.q) this.set('address', qr.q);\n if (qr.z) this.set('zoom', qr.z);\n if (qr.t) this.set('mapType', qr.t);\n }\n },\n {\n /**\n * Detect if the passed element is a valid component.\n * In case the element is valid an object abstracted\n * from the element will be returned\n * @param {HTMLElement}\n * @return {Object}\n * @private\n */\n isComponent(el) {\n var result = '';\n if (el.tagName == 'IFRAME' && /maps\\.google\\.com/.test(el.src)) {\n result = { type: 'map', src: el.src };\n }\n return result;\n }\n }\n);\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentView');\n\nmodule.exports = ComponentView.extend({});\n","const ComponentTableBody = require('./ComponentTableBody');\n\nmodule.exports = ComponentTableBody.extend(\n {\n defaults: {\n ...ComponentTableBody.prototype.defaults,\n type: 'tfoot',\n tagName: 'tfoot'\n }\n },\n {\n isComponent(el) {\n let result = '';\n\n if (el.tagName == 'TFOOT') {\n result = { type: 'tfoot' };\n }\n\n return result;\n }\n }\n);\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentView');\n\nmodule.exports = ComponentView.extend({});\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentView');\n\nmodule.exports = ComponentView.extend({});\n","const ComponentTableBody = require('./ComponentTableBody');\n\nmodule.exports = ComponentTableBody.extend(\n {\n defaults: {\n ...ComponentTableBody.prototype.defaults,\n type: 'thead',\n tagName: 'thead'\n }\n },\n {\n isComponent(el) {\n let result = '';\n\n if (el.tagName == 'THEAD') {\n result = { type: 'thead' };\n }\n\n return result;\n }\n }\n);\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentView');\n\nmodule.exports = ComponentView.extend({\n events: {}\n});\n","const Component = require('./Component');\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n type: 'table',\n tagName: 'table',\n droppable: ['tbody', 'thead', 'tfoot']\n },\n\n initialize(o, opt) {\n Component.prototype.initialize.apply(this, arguments);\n const components = this.get('components');\n !components.length && components.add({ type: 'tbody' });\n }\n },\n {\n isComponent(el) {\n let result = '';\n\n if (el.tagName == 'TABLE') {\n result = { type: 'table' };\n }\n\n return result;\n }\n }\n);\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentView');\n\nmodule.exports = ComponentView.extend({});\n","const Component = require('./Component');\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n type: 'row',\n tagName: 'tr',\n draggable: ['thead', 'tbody', 'tfoot'],\n droppable: ['th', 'td']\n },\n\n initialize(o, opt) {\n Component.prototype.initialize.apply(this, arguments);\n\n // Clean the row from non cell components\n const cells = [];\n const components = this.get('components');\n components.each(model => model.is('cell') && cells.push(model));\n components.reset(cells);\n }\n },\n {\n isComponent(el) {\n let result = '';\n\n if (el.tagName == 'TR') {\n result = { type: 'row' };\n }\n\n return result;\n }\n }\n);\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentView');\n\nmodule.exports = ComponentView.extend({});\n","const Component = require('./Component');\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n type: 'cell',\n tagName: 'td',\n draggable: ['tr']\n }\n },\n {\n isComponent(el) {\n let result = '';\n const tag = el.tagName;\n\n if (tag == 'TD' || tag == 'TH') {\n result = {\n type: 'cell',\n tagName: tag.toLowerCase()\n };\n }\n\n return result;\n }\n }\n);\n","module.exports = (config = {}) => ({\n /**\n * Build props object by their name\n * @param {Array|string} props Array of properties name\n * @return {Array}\n */\n build(props) {\n var objs = [];\n\n if (typeof props === 'string') props = [props];\n\n for (var i = 0; i < props.length; i++) {\n var obj = {};\n var prop = props[i];\n obj.name = prop;\n\n // Define type\n switch (prop) {\n case 'target':\n obj.type = 'select';\n break;\n }\n\n // Define placeholder\n switch (prop) {\n case 'title':\n case 'alt':\n case 'id':\n obj.placeholder = config.labelPlhText;\n break;\n case 'href':\n obj.placeholder = config.labelPlhHref;\n break;\n }\n\n // Define options\n switch (prop) {\n case 'target':\n obj.options = config.optionsTarget;\n break;\n }\n\n objs.push(obj);\n }\n\n return objs;\n }\n});\n","import { isUndefined } from 'underscore';\n\nmodule.exports = require('backbone').Model.extend({\n defaults: {\n type: 'text', // text, number, range, select\n label: '',\n name: '',\n min: '',\n max: '',\n unit: '',\n step: 1,\n value: '',\n target: '',\n default: '',\n placeholder: '',\n changeProp: 0,\n options: []\n },\n\n initialize() {\n const target = this.get('target');\n const name = this.get('name');\n const changeProp = this.get('changeProp');\n\n if (target) {\n this.target = target;\n this.unset('target');\n const targetEvent = changeProp\n ? `change:${name}`\n : `change:attributes:${name}`;\n this.listenTo(target, targetEvent, this.targetUpdated);\n }\n },\n\n targetUpdated() {\n const value = this.getTargetValue();\n this.set({ value }, { fromTarget: 1 });\n },\n\n getTargetValue() {\n const name = this.get('name');\n const target = this.target;\n let value;\n\n if (this.get('changeProp')) {\n value = target.get(name);\n } else {\n value = target.getAttributes()[name];\n }\n\n return !isUndefined(value) ? value : '';\n },\n\n setTargetValue(value, opts = {}) {\n const target = this.target;\n const name = this.get('name');\n if (isUndefined(value)) return;\n\n if (this.get('changeProp')) {\n target.set(name, value, opts);\n } else {\n const attrs = { ...target.get('attributes') };\n attrs[name] = value;\n target.set('attributes', attrs, opts);\n }\n },\n\n setValueFromInput(value, final = 1, opts = {}) {\n const toSet = { value };\n this.set(toSet, { ...opts, avoidStore: 1 });\n\n // Have to trigger the change\n if (final) {\n this.set('value', '', opts);\n this.set(toSet, opts);\n }\n },\n\n /**\n * Get the initial value of the trait\n * @return {string}\n */\n getInitValue() {\n const target = this.target;\n const name = this.get('name');\n let value;\n\n if (target) {\n const attrs = target.get('attributes');\n value = this.get('changeProp') ? target.get(name) : attrs[name];\n }\n\n return value || this.get('value') || this.get('default');\n }\n});\n","import { isString, isArray } from 'underscore';\nconst Backbone = require('backbone');\nconst Trait = require('./Trait');\nconst TraitFactory = require('./TraitFactory');\n\nmodule.exports = Backbone.Collection.extend({\n model: Trait,\n\n initialize(coll, options = {}) {\n this.em = options.em || '';\n this.listenTo(this, 'add', this.handleAdd);\n },\n\n handleAdd(model) {\n const target = this.target;\n\n if (target) {\n model.target = target;\n }\n },\n\n setTarget(target) {\n this.target = target;\n },\n\n add(models, opt) {\n const em = this.em;\n\n // Use TraitFactory if necessary\n if (isString(models) || isArray(models)) {\n const tm = em && em.get && em.get('TraitManager');\n const tmOpts = tm && tm.getConfig();\n const tf = TraitFactory(tmOpts);\n\n if (isString(models)) {\n models = [models];\n }\n\n for (var i = 0, len = models.length; i < len; i++) {\n const str = models[i];\n const model = isString(str) ? tf.build(str)[0] : str;\n model.target = this.target;\n models[i] = model;\n }\n }\n\n return Backbone.Collection.prototype.add.apply(this, [models, opt]);\n }\n});\n","module.exports = {\n stylePrefix: 'comp-',\n\n wrapperId: 'wrapper',\n\n wrapperName: 'Body',\n\n // Default wrapper configuration\n wrapper: {\n removable: false,\n copyable: false,\n draggable: false,\n components: [],\n traits: [],\n stylable: [\n 'background',\n 'background-color',\n 'background-image',\n 'background-repeat',\n 'background-attachment',\n 'background-position',\n 'background-size'\n ]\n },\n\n // Could be used for default components\n components: [],\n\n // Class for new image component\n imageCompClass: 'fa fa-picture-o',\n\n // Open assets manager on create of image component\n oAssetsOnCreate: true,\n\n // TODO to remove\n // Editor should also store the wrapper informations, but as this change might\n // break stuff I set ii as an opt-in option, for now.\n storeWrapper: 0,\n\n // List of void elements\n voidElements: [\n 'area',\n 'base',\n 'br',\n 'col',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'keygen',\n 'link',\n 'menuitem',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr'\n ]\n};\n","/**\n * With this module is possible to manage components inside the canvas. You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/dom_components/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * domComponents: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const domComponents = editor.DomComponents;\n * ```\n *\n * * [getWrapper](#getwrapper)\n * * [getComponents](#getcomponents)\n * * [addComponent](#addcomponent)\n * * [clear](#clear)\n * * [load](#load)\n * * [store](#store)\n * * [render](#render)\n *\n * @module DomComponents\n */\n\nimport { isEmpty } from 'underscore';\n\nmodule.exports = () => {\n var c = {};\n let em;\n const defaults = require('./config/config');\n const Component = require('./model/Component');\n const ComponentView = require('./view/ComponentView');\n const Components = require('./model/Components');\n const ComponentsView = require('./view/ComponentsView');\n\n var component, componentView;\n var componentTypes = [\n {\n id: 'cell',\n model: require('./model/ComponentTableCell'),\n view: require('./view/ComponentTableCellView')\n },\n {\n id: 'row',\n model: require('./model/ComponentTableRow'),\n view: require('./view/ComponentTableRowView')\n },\n {\n id: 'table',\n model: require('./model/ComponentTable'),\n view: require('./view/ComponentTableView')\n },\n {\n id: 'thead',\n model: require('./model/ComponentTableHead'),\n view: require('./view/ComponentTableHeadView')\n },\n {\n id: 'tbody',\n model: require('./model/ComponentTableBody'),\n view: require('./view/ComponentTableBodyView')\n },\n {\n id: 'tfoot',\n model: require('./model/ComponentTableFoot'),\n view: require('./view/ComponentTableFootView')\n },\n {\n id: 'map',\n model: require('./model/ComponentMap'),\n view: require('./view/ComponentMapView')\n },\n {\n id: 'link',\n model: require('./model/ComponentLink'),\n view: require('./view/ComponentLinkView')\n },\n {\n id: 'label',\n model: require('./model/ComponentLabel'),\n view: require('./view/ComponentLabelView')\n },\n {\n id: 'video',\n model: require('./model/ComponentVideo'),\n view: require('./view/ComponentVideoView')\n },\n {\n id: 'image',\n model: require('./model/ComponentImage'),\n view: require('./view/ComponentImageView')\n },\n {\n id: 'script',\n model: require('./model/ComponentScript'),\n view: require('./view/ComponentScriptView')\n },\n {\n id: 'svg',\n model: require('./model/ComponentSvg'),\n view: require('./view/ComponentSvgView')\n },\n {\n id: 'textnode',\n model: require('./model/ComponentTextNode'),\n view: require('./view/ComponentTextNodeView')\n },\n {\n id: 'text',\n model: require('./model/ComponentText'),\n view: require('./view/ComponentTextView')\n },\n {\n id: 'default',\n model: Component,\n view: ComponentView\n }\n ];\n\n return {\n Component,\n\n Components,\n\n ComponentsView,\n\n componentTypes,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'DomComponents',\n\n /**\n * Returns config\n * @return {Object} Config object\n * @private\n */\n getConfig() {\n return c;\n },\n\n /**\n * Mandatory for the storage manager\n * @type {String}\n * @private\n */\n storageKey() {\n var keys = [];\n var smc = (c.stm && c.stm.getConfig()) || {};\n if (smc.storeHtml) keys.push('html');\n if (smc.storeComponents) keys.push('components');\n return keys;\n },\n\n /**\n * Initialize module. Called on a new instance of the editor with configurations passed\n * inside 'domComponents' field\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = config || {};\n em = c.em;\n this.em = em;\n\n if (em) {\n c.components = em.config.components || c.components;\n }\n\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n // Load dependencies\n if (em) {\n c.modal = em.get('Modal') || '';\n c.am = em.get('AssetManager') || '';\n em.get('Parser').compTypes = componentTypes;\n em.on('change:componentHovered', this.componentHovered, this);\n\n const selected = em.get('selected');\n em.listenTo(selected, 'add', (sel, c, opts) =>\n this.selectAdd(sel, opts)\n );\n em.listenTo(selected, 'remove', (sel, c, opts) =>\n this.selectRemove(sel, opts)\n );\n }\n\n // Build wrapper\n let components = c.components;\n let wrapper = { ...c.wrapper };\n wrapper['custom-name'] = c.wrapperName;\n wrapper.wrapper = 1;\n\n // Components might be a wrapper\n if (\n components &&\n components.constructor === Object &&\n components.wrapper\n ) {\n wrapper = { ...components };\n components = components.components || [];\n wrapper.components = [];\n\n // Have to put back the real object of components\n if (em) {\n em.config.components = components;\n c.components = components;\n }\n }\n\n component = new Component(wrapper, {\n em,\n config: c,\n componentTypes\n });\n component.set({ attributes: { id: 'wrapper' } });\n\n componentView = new ComponentView({\n model: component,\n config: c,\n componentTypes\n });\n return this;\n },\n\n /**\n * On load callback\n * @private\n */\n onLoad() {\n this.setComponents(c.components);\n },\n\n /**\n * Do stuff after load\n * @param {Editor} em\n * @private\n */\n postLoad(em) {\n this.handleChanges(this.getWrapper(), null, { avoidStore: 1 });\n },\n\n /**\n * Handle component changes\n * @private\n */\n handleChanges(model, value, opts = {}) {\n const comps = model.components();\n const um = em.get('UndoManager');\n const handleUpdates = em.handleUpdates.bind(em);\n const handleChanges = this.handleChanges.bind(this);\n const handleRemoves = this.handleRemoves.bind(this);\n um && um.add(model);\n um && comps && um.add(comps);\n const evn = 'change:style change:content change:attributes change:src';\n\n [\n [model, evn, handleUpdates],\n [comps, 'add', handleChanges],\n [comps, 'remove', handleRemoves],\n [model.get('classes'), 'add remove', handleUpdates]\n ].forEach(els => {\n em.stopListening(els[0], els[1], els[2]);\n em.listenTo(els[0], els[1], els[2]);\n });\n\n !opts.avoidStore && handleUpdates('', '', opts);\n comps.each(model => this.handleChanges(model, value, opts));\n },\n\n /**\n * Triggered when some component is removed\n * @private\n * */\n handleRemoves(model, value, opts = {}) {\n !opts.avoidStore && em.handleUpdates(model, value, opts);\n },\n\n /**\n * Load components from the passed object, if the object is empty will try to fetch them\n * autonomously from the selected storage\n * The fetched data will be added to the collection\n * @param {Object} data Object of data to load\n * @return {Object} Loaded data\n */\n load(data = '') {\n let result = '';\n\n if (!data && c.stm) {\n data = c.em.getCacheLoad();\n }\n\n if (data.components) {\n try {\n result = JSON.parse(data.components);\n } catch (err) {}\n } else if (data.html) {\n result = data.html;\n }\n\n const isObj = result && result.constructor === Object;\n\n if ((result && result.length) || isObj) {\n this.clear();\n this.getComponents().reset();\n\n // If the result is an object I consider it the wrapper\n if (isObj) {\n this.getWrapper()\n .set(result)\n .initComponents()\n .initClasses()\n .loadTraits();\n } else {\n this.getComponents().add(result);\n }\n }\n\n return result;\n },\n\n /**\n * Store components on the selected storage\n * @param {Boolean} noStore If true, won't store\n * @return {Object} Data to store\n */\n store(noStore) {\n if (!c.stm) {\n return;\n }\n\n var obj = {};\n var keys = this.storageKey();\n\n if (keys.indexOf('html') >= 0) {\n obj.html = c.em.getHtml();\n }\n\n if (keys.indexOf('components') >= 0) {\n const toStore = c.storeWrapper\n ? this.getWrapper()\n : this.getComponents();\n obj.components = JSON.stringify(toStore);\n }\n\n if (!noStore) {\n c.stm.store(obj);\n }\n\n return obj;\n },\n\n /**\n * Returns privately the main wrapper\n * @return {Object}\n * @private\n */\n getComponent() {\n return component;\n },\n\n /**\n * Returns root component inside the canvas. Something like `` inside HTML page\n * The wrapper doesn't differ from the original Component Model\n * @return {Component} Root Component\n * @example\n * // Change background of the wrapper and set some attribute\n * var wrapper = domComponents.getWrapper();\n * wrapper.set('style', {'background-color': 'red'});\n * wrapper.set('attributes', {'title': 'Hello!'});\n */\n getWrapper() {\n return this.getComponent();\n },\n\n /**\n * Returns wrapper's children collection. Once you have the collection you can\n * add other Components(Models) inside. Each component can have several nested\n * components inside and you can nest them as more as you wish.\n * @return {Components} Collection of components\n * @example\n * // Let's add some component\n * var wrapperChildren = domComponents.getComponents();\n * var comp1 = wrapperChildren.add({\n * style: { 'background-color': 'red'}\n * });\n * var comp2 = wrapperChildren.add({\n * tagName: 'span',\n * attributes: { title: 'Hello!'}\n * });\n * // Now let's add an other one inside first component\n * // First we have to get the collection inside. Each\n * // component has 'components' property\n * var comp1Children = comp1.get('components');\n * // Procede as before. You could also add multiple objects\n * comp1Children.add([\n * { style: { 'background-color': 'blue'}},\n * { style: { height: '100px', width: '100px'}}\n * ]);\n * // Remove comp2\n * wrapperChildren.remove(comp2);\n */\n getComponents() {\n return this.getWrapper().get('components');\n },\n\n /**\n * Add new components to the wrapper's children. It's the same\n * as 'domComponents.getComponents().add(...)'\n * @param {Object|Component|Array} component Component/s to add\n * @param {string} [component.tagName='div'] Tag name\n * @param {string} [component.type=''] Type of the component. Available: ''(default), 'text', 'image'\n * @param {boolean} [component.removable=true] If component is removable\n * @param {boolean} [component.draggable=true] If is possible to move the component around the structure\n * @param {boolean} [component.droppable=true] If is possible to drop inside other components\n * @param {boolean} [component.badgable=true] If the badge is visible when the component is selected\n * @param {boolean} [component.stylable=true] If is possible to style component\n * @param {boolean} [component.copyable=true] If is possible to copy&paste the component\n * @param {string} [component.content=''] String inside component\n * @param {Object} [component.style={}] Style object\n * @param {Object} [component.attributes={}] Attribute object\n * @return {Component|Array} Component/s added\n * @example\n * // Example of a new component with some extra property\n * var comp1 = domComponents.addComponent({\n * tagName: 'div',\n * removable: true, // Can't remove it\n * draggable: true, // Can't move it\n * copyable: true, // Disable copy/past\n * content: 'Content text', // Text inside component\n * style: { color: 'red'},\n * attributes: { title: 'here' }\n * });\n */\n addComponent(component) {\n return this.getComponents().add(component);\n },\n\n /**\n * Render and returns wrapper element with all components inside.\n * Once the wrapper is rendered, and it's what happens when you init the editor,\n * the all new components will be added automatically and property changes are all\n * updated immediately\n * @return {HTMLElement}\n */\n render() {\n return componentView.render().el;\n },\n\n /**\n * Remove all components\n * @return {this}\n */\n clear() {\n this.getComponents().reset();\n return this;\n },\n\n /**\n * Set components\n * @param {Object|string} components HTML string or components model\n * @return {this}\n * @private\n */\n setComponents(components) {\n this.clear().addComponent(components);\n },\n\n /**\n * Add new component type\n * @param {string} type\n * @param {Object} methods\n * @private\n */\n addType(type, methods) {\n var compType = this.getType(type);\n if (compType) {\n compType.model = methods.model;\n compType.view = methods.view;\n } else {\n methods.id = type;\n componentTypes.unshift(methods);\n }\n },\n\n /**\n * Get component type\n * @param {string} type\n * @private\n */\n getType(type) {\n var df = componentTypes;\n\n for (var it = 0; it < df.length; it++) {\n var dfId = df[it].id;\n if (dfId == type) {\n return df[it];\n }\n }\n return;\n },\n\n selectAdd(component, opts = {}) {\n if (component) {\n component.set({\n status: 'selected'\n });\n ['component:selected', 'component:toggled'].forEach(event =>\n this.em.trigger(event, component, opts)\n );\n }\n },\n\n selectRemove(component, opts = {}) {\n if (component) {\n const { em } = this;\n component.set({\n status: '',\n state: ''\n });\n ['component:deselected', 'component:toggled'].forEach(event =>\n this.em.trigger(event, component, opts)\n );\n }\n },\n\n /**\n * Triggered when the component is hovered\n * @private\n */\n componentHovered() {\n const em = c.em;\n const model = em.get('componentHovered');\n const previous = em.previous('componentHovered');\n const state = 'hovered';\n\n // Deselect the previous component\n previous &&\n previous.get('status') == state &&\n previous.set({\n status: '',\n state: ''\n });\n\n model && isEmpty(model.get('status')) && model.set('status', state);\n }\n };\n};\n","var TraitView = require('./TraitView');\nvar InputColor = require('domain_abstract/ui/InputColor');\n\nmodule.exports = TraitView.extend({\n /**\n * Returns input element\n * @return {HTMLElement}\n * @private\n */\n getInputEl() {\n if (!this.$input) {\n const model = this.model;\n const value = this.getModelValue();\n const inputColor = new InputColor({\n model,\n target: this.config.em,\n contClass: this.ppfx + 'field-color',\n ppfx: this.ppfx\n });\n const input = inputColor.render();\n this.$input = input.colorEl;\n input.setValue(value, { fromTarget: 1 });\n this.input = input;\n }\n\n return this.$input.get(0);\n },\n\n /**\n * Renders input\n * @private\n * */\n renderField() {\n if (!this.$input) {\n this.getInputEl();\n this.$el.append(this.input.el);\n }\n }\n});\n","var TraitView = require('./TraitView');\nvar InputNumber = require('domain_abstract/ui/InputNumber');\n\nmodule.exports = TraitView.extend({\n getValueForTarget() {\n var model = this.model;\n var value = model.get('value');\n var unit = model.get('unit');\n return value ? value + unit : '';\n },\n\n /**\n * Returns input element\n * @return {HTMLElement}\n * @private\n */\n getInputEl() {\n if (!this.$input) {\n var value = this.getModelValue();\n var inputNumber = new InputNumber({\n contClass: this.ppfx + 'field-int',\n model: this.model,\n ppfx: this.ppfx\n });\n this.input = inputNumber.render();\n this.$input = this.input.inputEl;\n this.$unit = this.input.unitEl;\n this.model.set('value', value);\n this.$input.val(value);\n }\n return this.$input.get(0);\n },\n\n /**\n * Renders input\n * @private\n * */\n renderField() {\n if (!this.$input) {\n this.$el.append(this.tmpl);\n this.getInputEl();\n this.$el.find('.' + this.inputhClass).prepend(this.input.el);\n }\n }\n});\n","var TraitView = require('./TraitView');\n\nmodule.exports = TraitView.extend({\n initialize(o) {\n TraitView.prototype.initialize.apply(this, arguments);\n var iconCls = this.ppfx + 'chk-icon';\n this.tmpl =\n '
';\n },\n\n /**\n * Fires when the input is changed\n * @private\n */\n onChange() {\n this.model.set('value', this.getInputEl().checked);\n },\n\n /**\n * Returns input element\n * @return {HTMLElement}\n * @private\n */\n getInputEl(...args) {\n var first;\n if (!this.$input) first = 1;\n var el = TraitView.prototype.getInputEl.apply(this, args);\n if (first) {\n var md = this.model;\n var name = md.get('name');\n var target = this.target;\n if (md.get('changeProp')) {\n el.checked = target.get(name);\n } else {\n var attrs = target.get('attributes');\n el.checked = !!attrs[name];\n }\n }\n return el;\n }\n});\n","const TraitView = require('./TraitView');\nconst $ = require('backbone').$;\n\nmodule.exports = TraitView.extend({\n initialize(o) {\n TraitView.prototype.initialize.apply(this, arguments);\n var ppfx = this.ppfx;\n this.tmpl =\n '
' +\n '
';\n },\n\n /**\n * Returns input element\n * @return {HTMLElement}\n * @private\n */\n getInputEl() {\n if (!this.$input) {\n var md = this.model;\n var opts = md.get('options') || [];\n var input = '';\n this.input = input;\n this.$input = $(this.input);\n\n var target = this.target;\n var name = md.get('name');\n var val = md.get('value');\n\n if (md.get('changeProp')) {\n val = val || target.get(name);\n } else {\n var attrs = target.get('attributes');\n val = attrs[name];\n }\n\n if (val) this.$input.val(val);\n }\n\n return this.$input.get(0);\n }\n});\n","var DomainViews = require('domain_abstract/view/DomainViews');\nvar TraitView = require('./TraitView');\nvar TraitSelectView = require('./TraitSelectView');\nvar TraitCheckboxView = require('./TraitCheckboxView');\nvar TraitNumberView = require('./TraitNumberView');\nvar TraitColorView = require('./TraitColorView');\n\nmodule.exports = DomainViews.extend({\n itemView: TraitView,\n\n itemsView: {\n text: TraitView,\n number: TraitNumberView,\n select: TraitSelectView,\n checkbox: TraitCheckboxView,\n color: TraitColorView\n },\n\n initialize(o = {}) {\n const config = o.config || {};\n this.config = config;\n this.em = o.editor;\n this.pfx = config.stylePrefix || '';\n this.ppfx = config.pStylePrefix || '';\n this.className = this.pfx + 'traits';\n const toListen = 'component:toggled';\n this.listenTo(this.em, toListen, this.updatedCollection);\n this.updatedCollection();\n },\n\n /**\n * Update view collection\n * @private\n */\n updatedCollection() {\n const ppfx = this.ppfx;\n const comp = this.em.getSelected();\n this.el.className = `${this.className} ${ppfx}one-bg ${ppfx}two-color`;\n\n if (comp) {\n this.collection = comp.get('traits');\n this.render();\n }\n }\n});\n","module.exports = {\n stylePrefix: 'trt-',\n\n // Specify the element to use as a container, string (query) or HTMLElement\n // With the empty value, nothing will be rendered\n appendTo: '',\n\n labelContainer: 'Component settings',\n\n // Placeholder label for text input types\n labelPlhText: 'eg. Text here',\n\n // Placeholder label for href input\n labelPlhHref: 'eg. https://google.com',\n\n // Default options for the target input\n optionsTarget: [\n { value: '', name: 'This window' },\n { value: '_blank', name: 'New window' }\n ],\n\n // Text to show in case no element selected\n textNoElement: 'Select an element before using Trait Manager'\n};\n","import { defaults, isElement } from 'underscore';\n\nconst defaultOpts = require('./config/config');\nconst TraitsView = require('./view/TraitsView');\n\nmodule.exports = () => {\n let c = {};\n let TraitsViewer;\n\n return {\n TraitsView,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'TraitManager',\n\n /**\n * Get configuration object\n * @return {Object}\n * @private\n */\n getConfig() {\n return c;\n },\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n */\n init(config = {}) {\n c = config;\n defaults(c, defaultOpts);\n const ppfx = c.pStylePrefix;\n ppfx && (c.stylePrefix = `${ppfx}${c.stylePrefix}`);\n TraitsViewer = new TraitsView({\n collection: [],\n editor: c.em,\n config: c\n });\n return this;\n },\n\n postRender() {\n const elTo = this.getConfig().appendTo;\n\n if (elTo) {\n const el = isElement(elTo) ? elTo : document.querySelector(elTo);\n el.appendChild(this.render());\n }\n },\n\n /**\n *\n * Get Traits viewer\n * @private\n */\n getTraitsViewer() {\n return TraitsViewer;\n },\n\n /**\n * Add new trait type\n * @param {string} name Type name\n * @param {Object} methods Object representing the trait\n */\n addType(name, trait) {\n var itemView = TraitsViewer.itemView;\n TraitsViewer.itemsView[name] = itemView.extend(trait);\n },\n\n /**\n * Get trait type\n * @param {string} name Type name\n * @return {Object}\n */\n getType(name) {\n return TraitsViewer.itemsView[name];\n },\n\n render() {\n return TraitsViewer.render().el;\n }\n };\n};\n","module.exports = require('./CssRuleView').extend({\n _createElement: function(tagName) {\n return document.createTextNode('');\n },\n\n render() {\n const model = this.model;\n const important = model.get('important');\n this.el.textContent = model.getDeclaration({ important });\n return this;\n }\n});\n","import Backbone from 'backbone';\nconst CssRuleView = require('./CssRuleView');\nconst CssGroupRuleView = require('./CssGroupRuleView');\nconst $ = Backbone.$;\n\n// % is not a valid character for classes\nconst getBlockId = (pfx, widthMedia) =>\n `${pfx}${widthMedia ? `-${widthMedia.replace('%', 'pc')}` : ''}`;\n\nmodule.exports = Backbone.View.extend({\n initialize(o) {\n const config = o.config || {};\n this.atRules = {};\n this.config = config;\n this.em = config.em;\n this.pfx = config.stylePrefix || '';\n this.className = this.pfx + 'rules';\n const coll = this.collection;\n this.listenTo(coll, 'add', this.addTo);\n this.listenTo(coll, 'reset', this.render);\n },\n\n /**\n * Add to collection\n * @param {Object} model\n * @private\n * */\n addTo(model) {\n this.addToCollection(model);\n },\n\n /**\n * Add new object to collection\n * @param {Object} model\n * @param {Object} fragmentEl\n * @return {Object}\n * @private\n * */\n addToCollection(model, fragmentEl) {\n // If the render is not yet started\n if (!this.renderStarted) {\n return;\n }\n\n var fragment = fragmentEl || null;\n var viewObject = CssRuleView;\n var config = this.config;\n let rendered, view;\n const opts = { model, config };\n\n // I have to render keyframes of the same name together\n // Unfortunately at the moment I didn't find the way of appending them\n // if not staticly, via appendData\n if (model.get('atRuleType') === 'keyframes') {\n const atRule = model.getAtRule();\n let atRuleEl = this.atRules[atRule];\n\n if (!atRuleEl) {\n const styleEl = document.createElement('style');\n atRuleEl = document.createTextNode('');\n styleEl.appendChild(document.createTextNode(`${atRule}{`));\n styleEl.appendChild(atRuleEl);\n styleEl.appendChild(document.createTextNode(`}`));\n this.atRules[atRule] = atRuleEl;\n rendered = styleEl;\n }\n\n view = new CssGroupRuleView(opts);\n atRuleEl.appendData(view.render().el.textContent);\n } else {\n view = new CssRuleView(opts);\n rendered = view.render().el;\n }\n\n const clsName = this.className;\n const mediaText = model.get('mediaText');\n const defaultBlockId = getBlockId(clsName);\n let blockId = defaultBlockId;\n\n // If the rule contains a media query it might have a different container\n // for it (eg. rules created with Device Manager)\n if (mediaText) {\n blockId = getBlockId(clsName, this.getMediaWidth(mediaText));\n }\n\n if (rendered) {\n const container = fragment || this.el;\n let contRules;\n\n // Try to find a specific container for the rule (if it\n // containes a media query), otherwise get the default one\n try {\n contRules = container.querySelector(`#${blockId}`);\n } catch (e) {}\n\n if (!contRules) {\n contRules = container.querySelector(`#${defaultBlockId}`);\n }\n\n contRules.appendChild(rendered);\n }\n\n return rendered;\n },\n\n getMediaWidth(mediaText) {\n return (\n mediaText &&\n mediaText\n .replace(`(${this.em.getConfig('mediaCondition')}: `, '')\n .replace(')', '')\n );\n },\n\n render() {\n this.renderStarted = 1;\n this.atRules = {};\n const $el = this.$el;\n const frag = document.createDocumentFragment();\n const className = this.className;\n $el.empty();\n\n // Create devices related DOM structure\n this.em\n .get('DeviceManager')\n .getAll()\n .map(model => model.get('widthMedia'))\n .sort(\n (left, right) =>\n ((right && right.replace('px', '')) || Number.MAX_VALUE) -\n ((left && left.replace('px', '')) || Number.MAX_VALUE)\n )\n .forEach(widthMedia => {\n $(`
`).appendTo(\n frag\n );\n });\n\n this.collection.each(model => this.addToCollection(model, frag));\n $el.append(frag);\n $el.attr('class', className);\n return this;\n }\n});\n","import Backbone from 'backbone';\nvar CssRule = require('./CssRule');\n\nmodule.exports = Backbone.Collection.extend({\n initialize(models, opt) {\n // Inject editor\n if (opt && opt.em) this.editor = opt.em;\n\n // Not used\n this.model = (attrs, options) => {\n var model;\n\n if (!options.em && opt && opt.em) options.em = opt.em;\n\n switch (1) {\n default:\n model = new CssRule(attrs, options);\n }\n\n return model;\n };\n },\n\n add(models, opt = {}) {\n if (typeof models === 'string') {\n models = this.editor.get('Parser').parseCss(models);\n }\n opt.em = this.editor;\n return Backbone.Collection.prototype.add.apply(this, [models, opt]);\n }\n});\n","module.exports = {\n // Style prefix\n stylePrefix: 'css-',\n\n // Custom CSS string to render on top\n staticRules: '',\n\n // Default CSS style\n rules: []\n};\n","/**\n * This module contains and manage CSS rules for the template inside the canvas.\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/css_composer/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * cssComposer: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const cssComposer = editor.CssComposer;\n * ```\n *\n * * [load](#load)\n * * [store](#store)\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getall)\n * * [clear](#clear)\n * * [setIdRule](#setidrule)\n * * [getIdRule](#getidrule)\n * * [setClassRule](#setclassrule)\n * * [getClassRule](#getclassrule)\n *\n * @module CssComposer\n */\n\nimport { isArray } from 'underscore';\n\nmodule.exports = () => {\n let em;\n var c = {},\n defaults = require('./config/config'),\n CssRule = require('./model/CssRule'),\n CssRules = require('./model/CssRules'),\n CssRulesView = require('./view/CssRulesView');\n const Selectors = require('selector_manager/model/Selectors');\n const Selector = require('selector_manager/model/Selector');\n\n var rules, rulesView;\n\n return {\n Selectors,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'CssComposer',\n\n /**\n * Mandatory for the storage manager\n * @type {String}\n * @private\n */\n storageKey() {\n var keys = [];\n var smc = (c.stm && c.stm.getConfig()) || {};\n if (smc.storeCss) keys.push('css');\n if (smc.storeStyles) keys.push('styles');\n return keys;\n },\n\n /**\n * Initializes module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n var elStyle = (c.em && c.em.config.style) || '';\n c.rules = elStyle || c.rules;\n\n em = c.em;\n rules = new CssRules([], c);\n rulesView = new CssRulesView({\n collection: rules,\n config: c\n });\n return this;\n },\n\n /**\n * On load callback\n * @private\n */\n onLoad() {\n rules.add(c.rules);\n },\n\n /**\n * Do stuff after load\n * @param {Editor} em\n * @private\n */\n postLoad(em) {\n const ev = 'add remove';\n const rules = this.getAll();\n const um = em.get('UndoManager');\n um && um.add(rules);\n em.stopListening(rules, ev, this.handleChange);\n em.listenTo(rules, ev, this.handleChange);\n rules.each(rule => this.handleChange(rule, { avoidStore: 1 }));\n },\n\n /**\n * Handle rule changes\n * @private\n */\n handleChange(model, opts = {}) {\n const ev = 'change:style';\n const um = em.get('UndoManager');\n um && um.add(model);\n const handleUpdates = em.handleUpdates.bind(em);\n em.stopListening(model, ev, handleUpdates);\n em.listenTo(model, ev, handleUpdates);\n !opts.avoidStore && handleUpdates('', '', opts);\n },\n\n /**\n * Load data from the passed object, if the object is empty will try to fetch them\n * autonomously from the storage manager.\n * The fetched data will be added to the collection\n * @param {Object} data Object of data to load\n * @return {Object} Loaded rules\n */\n load(data) {\n var d = data || '';\n\n if (!d && c.stm) {\n d = c.em.getCacheLoad();\n }\n\n var obj = d.styles || '';\n\n if (d.styles) {\n try {\n obj = JSON.parse(d.styles);\n } catch (err) {}\n } else if (d.css) {\n obj = c.em.get('Parser').parseCss(d.css);\n }\n\n if (isArray(obj)) {\n obj.length && rules.reset(obj);\n } else if (obj) {\n rules.reset(obj);\n }\n\n return obj;\n },\n\n /**\n * Store data to the selected storage\n * @param {Boolean} noStore If true, won't store\n * @return {Object} Data to store\n */\n store(noStore) {\n if (!c.stm) return;\n var obj = {};\n var keys = this.storageKey();\n if (keys.indexOf('css') >= 0) obj.css = c.em.getCss();\n if (keys.indexOf('styles') >= 0) obj.styles = JSON.stringify(rules);\n if (!noStore) c.stm.store(obj);\n return obj;\n },\n\n /**\n * Add new rule to the collection, if not yet exists with the same selectors\n * @param {Array} selectors Array of selectors\n * @param {String} state Css rule state\n * @param {String} width For which device this style is oriented\n * @param {Object} opts Other options for the rule\n * @return {Model}\n * @example\n * var sm = editor.SelectorManager;\n * var sel1 = sm.add('myClass1');\n * var sel2 = sm.add('myClass2');\n * var rule = cssComposer.add([sel1, sel2], 'hover');\n * rule.set('style', {\n * width: '100px',\n * color: '#fff',\n * });\n * */\n add(selectors, state, width, opts = {}) {\n var s = state || '';\n var w = width || '';\n var opt = { ...opts };\n var rule = this.get(selectors, s, w, opt);\n\n // do not create rules that were found before\n // unless this is an at-rule, for which multiple declarations\n // make sense (e.g. multiple `@font-type`s)\n if (rule && rule.config && !rule.config.atRuleType) {\n return rule;\n } else {\n opt.state = s;\n opt.mediaText = w;\n opt.selectors = '';\n rule = new CssRule(opt, c);\n rule.get('selectors').add(selectors);\n rules.add(rule);\n return rule;\n }\n },\n\n /**\n * Get the rule\n * @param {Array} selectors Array of selectors\n * @param {String} state Css rule state\n * @param {String} width For which device this style is oriented\n * @param {Object} ruleProps Other rule props\n * @return {Model|null}\n * @example\n * var sm = editor.SelectorManager;\n * var sel1 = sm.add('myClass1');\n * var sel2 = sm.add('myClass2');\n * var rule = cssComposer.get([sel1, sel2], 'hover');\n * // Update the style\n * rule.set('style', {\n * width: '300px',\n * color: '#000',\n * });\n * */\n get(selectors, state, width, ruleProps) {\n var rule = null;\n rules.each(m => {\n if (rule) return;\n if (m.compare(selectors, state, width, ruleProps)) rule = m;\n });\n return rule;\n },\n\n /**\n * Get the collection of rules\n * @return {Collection}\n * */\n getAll() {\n return rules;\n },\n\n /**\n * Remove all rules\n * @return {this}\n */\n clear() {\n this.getAll().reset();\n return this;\n },\n\n /**\n * Add a raw collection of rule objects\n * This method overrides styles, in case, of already defined rule\n * @param {Array} data Array of rule objects, eg . [{selectors: ['class1'], style: {....}}, ..]\n * @param {Object} opts Options\n * @return {Array}\n * @private\n */\n addCollection(data, opts = {}) {\n var result = [];\n var d = data instanceof Array ? data : [data];\n\n for (var i = 0, l = d.length; i < l; i++) {\n var rule = d[i] || {};\n if (!rule.selectors) continue;\n var sm = c.em && c.em.get('SelectorManager');\n if (!sm) console.warn('Selector Manager not found');\n var sl = rule.selectors;\n var sels = sl instanceof Array ? sl : [sl];\n var newSels = [];\n\n for (var j = 0, le = sels.length; j < le; j++) {\n var selec = sm.add(sels[j]);\n newSels.push(selec);\n }\n\n var modelExists = this.get(newSels, rule.state, rule.mediaText, rule);\n var model = this.add(newSels, rule.state, rule.mediaText, rule);\n var updateStyle = !modelExists || !opts.avoidUpdateStyle;\n const style = rule.style || {};\n\n if (updateStyle) {\n let styleUpdate = opts.extend\n ? { ...model.get('style'), ...style }\n : style;\n model.set('style', styleUpdate);\n }\n\n result.push(model);\n }\n\n return result;\n },\n\n /**\n * Add/update the CSS rule with id selector\n * @param {string} name Id selector name, eg. 'my-id'\n * @param {Object} style Style properties and values\n * @param {Object} [opts={}] Custom options, like `state` and `mediaText`\n * @return {CssRule} The new/updated rule\n * @example\n * const rule = cc.setIdRule('myid', { color: 'red' });\n * const ruleHover = cc.setIdRule('myid', { color: 'blue' }, { state: 'hover' });\n * // This will add current CSS:\n * // #myid { color: red }\n * // #myid:hover { color: blue }\n */\n setIdRule(name, style = {}, opts = {}) {\n const state = opts.state || '';\n const media = opts.mediaText || em.getCurrentMedia();\n const sm = em.get('SelectorManager');\n const selector = sm.add({ name, type: Selector.TYPE_ID });\n const rule = this.add(selector, state, media);\n rule.setStyle(style, opts);\n return rule;\n },\n\n /**\n * Get the CSS rule by id selector\n * @param {string} name Id selector name, eg. 'my-id'\n * @param {Object} [opts={}] Custom options, like `state` and `mediaText`\n * @return {CssRule}\n * @example\n * const rule = cc.getIdRule('myid');\n * const ruleHover = cc.setIdRule('myid', { state: 'hover' });\n */\n getIdRule(name, opts = {}) {\n const state = opts.state || '';\n const media = opts.mediaText || em.getCurrentMedia();\n const selector = em.get('SelectorManager').get(name, Selector.TYPE_ID);\n return selector && this.get(selector, state, media);\n },\n\n /**\n * Add/update the CSS rule with class selector\n * @param {string} name Class selector name, eg. 'my-class'\n * @param {Object} style Style properties and values\n * @param {Object} [opts={}] Custom options, like `state` and `mediaText`\n * @return {CssRule} The new/updated rule\n * @example\n * const rule = cc.setClassRule('myclass', { color: 'red' });\n * const ruleHover = cc.setClassRule('myclass', { color: 'blue' }, { state: 'hover' });\n * // This will add current CSS:\n * // .myclass { color: red }\n * // .myclass:hover { color: blue }\n */\n setClassRule(name, style = {}, opts = {}) {\n const state = opts.state || '';\n const media = opts.mediaText || em.getCurrentMedia();\n const sm = em.get('SelectorManager');\n const selector = sm.add({ name, type: Selector.TYPE_CLASS });\n const rule = this.add(selector, state, media);\n rule.setStyle(style, opts);\n return rule;\n },\n\n /**\n * Get the CSS rule by class selector\n * @param {string} name Class selector name, eg. 'my-class'\n * @param {Object} [opts={}] Custom options, like `state` and `mediaText`\n * @return {CssRule}\n * @example\n * const rule = cc.getClassRule('myclass');\n * const ruleHover = cc.getClassRule('myclass', { state: 'hover' });\n */\n getClassRule(name, opts = {}) {\n const state = opts.state || '';\n const media = opts.mediaText || em.getCurrentMedia();\n const selector = em.get('SelectorManager').get(name, Selector.TYPE_CLASS);\n return selector && this.get(selector, state, media);\n },\n\n /**\n * Render the block of CSS rules\n * @return {HTMLElement}\n * @private\n */\n render() {\n return rulesView.render().el;\n }\n };\n};\n","import Backbone from 'backbone';\nvar AssetView = require('./AssetView');\nvar AssetImageView = require('./AssetImageView');\nvar FileUploader = require('./FileUploader');\n\nmodule.exports = Backbone.View.extend({\n events: {\n submit: 'handleSubmit'\n },\n\n template(view) {\n const pfx = view.pfx;\n const ppfx = view.ppfx;\n return `\n
\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n
\n
\n `;\n },\n\n initialize(o) {\n this.options = o;\n this.config = o.config;\n this.pfx = this.config.stylePrefix || '';\n this.ppfx = this.config.pStylePrefix || '';\n const coll = this.collection;\n this.listenTo(coll, 'reset', this.renderAssets);\n this.listenTo(coll, 'add', this.addToAsset);\n this.listenTo(coll, 'remove', this.removedAsset);\n this.listenTo(coll, 'deselectAll', this.deselectAll);\n },\n\n /**\n * Add new asset to the collection via string\n * @param {Event} e Event object\n * @return {this}\n * @private\n */\n handleSubmit(e) {\n e.preventDefault();\n const input = this.getAddInput();\n const url = input.value.trim();\n const handleAdd = this.config.handleAdd;\n\n if (!url) {\n return;\n }\n\n input.value = '';\n this.getAssetsEl().scrollTop = 0;\n\n if (handleAdd) {\n handleAdd.bind(this)(url);\n } else {\n this.options.globalCollection.add(url, { at: 0 });\n }\n },\n\n /**\n * Returns assets element\n * @return {HTMLElement}\n * @private\n */\n getAssetsEl() {\n //if(!this.assets) // Not able to cache as after the rerender it losses the ref\n return this.el.querySelector(`.${this.pfx}assets`);\n },\n\n /**\n * Returns input url element\n * @return {HTMLElement}\n * @private\n */\n getAddInput() {\n if (!this.inputUrl || !this.inputUrl.value)\n this.inputUrl = this.el.querySelector(`.${this.pfx}add-asset input`);\n return this.inputUrl;\n },\n\n /**\n * Triggered when an asset is removed\n * @param {Asset} model Removed asset\n * @private\n */\n removedAsset(model) {\n if (!this.collection.length) {\n this.toggleNoAssets();\n }\n },\n\n /**\n * Add asset to collection\n * @private\n * */\n addToAsset(model) {\n if (this.collection.length == 1) {\n this.toggleNoAssets(1);\n }\n this.addAsset(model);\n },\n\n /**\n * Add new asset to collection\n * @param Object Model\n * @param Object Fragment collection\n * @return Object Object created\n * @private\n * */\n addAsset(model, fragmentEl = null) {\n const fragment = fragmentEl;\n const collection = this.collection;\n const config = this.config;\n const rendered = new model.typeView({\n model,\n collection,\n config\n }).render().el;\n\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n const assetsEl = this.getAssetsEl();\n if (assetsEl) {\n assetsEl.insertBefore(rendered, assetsEl.firstChild);\n }\n }\n\n return rendered;\n },\n\n /**\n * Checks if to show noAssets\n * @param {Boolean} hide\n * @private\n */\n toggleNoAssets(hide) {\n const assetsEl = this.$el.find(`.${this.pfx}assets`);\n\n if (hide) {\n assetsEl.empty();\n } else {\n const noAssets = this.config.noAssets;\n noAssets && assetsEl.append(noAssets);\n }\n },\n\n /**\n * Deselect all assets\n * @private\n * */\n deselectAll() {\n const pfx = this.pfx;\n this.$el.find(`.${pfx}highlight`).removeClass(`${pfx}highlight`);\n },\n\n renderAssets() {\n const fragment = document.createDocumentFragment();\n const assets = this.$el.find(`.${this.pfx}assets`);\n assets.empty();\n this.toggleNoAssets(this.collection.length);\n this.collection.each(model => this.addAsset(model, fragment));\n assets.append(fragment);\n },\n\n render() {\n const fuRendered = this.options.fu.render().el;\n this.$el.empty();\n this.$el.append(fuRendered).append(this.template(this));\n this.el.className = `${this.ppfx}asset-manager`;\n this.renderAssets();\n this.rendered = 1;\n return this;\n }\n});\n","module.exports = require('backbone').Model.extend({\n idAttribute: 'src',\n\n defaults: {\n type: '',\n src: ''\n },\n\n /**\n * Get filename of the asset\n * @return {string}\n * @private\n * */\n getFilename() {\n return this.get('src')\n .split('/')\n .pop();\n },\n\n /**\n * Get extension of the asset\n * @return {string}\n * @private\n * */\n getExtension() {\n return this.getFilename()\n .split('.')\n .pop();\n }\n});\n","const Asset = require('./Asset');\n\nmodule.exports = Asset.extend({\n defaults: {\n ...Asset.prototype.defaults,\n type: 'image',\n unitDim: 'px',\n height: 0,\n width: 0\n },\n});\n","import TypeableCollection from 'domain_abstract/model/TypeableCollection';\n\nmodule.exports = require('backbone')\n .Collection.extend(TypeableCollection)\n .extend({\n types: [\n {\n id: 'image',\n model: require('./AssetImage'),\n view: require('./../view/AssetImageView'),\n isType(value) {\n if (typeof value == 'string') {\n return {\n type: 'image',\n src: value\n };\n }\n return value;\n }\n }\n ]\n });\n","module.exports = {\n // Default assets\n // eg. [\n // 'https://...image1.png',\n // 'https://...image2.png',\n // {type: 'image', src: 'https://...image3.png', someOtherCustomProp: 1},\n // ..\n // ]\n assets: [],\n\n // Content to add where there is no assets to show\n // eg. 'No assets here, drag to upload'\n noAssets: '',\n\n // Style prefix\n stylePrefix: 'am-',\n\n // Upload endpoint, set `false` to disable upload\n // upload: 'https://endpoint/upload/assets',\n // upload: false,\n upload: 0,\n\n // The name used in POST to pass uploaded files\n uploadName: 'files',\n\n // Custom headers to pass with the upload request\n headers: {},\n\n // Custom parameters to pass with the upload request, eg. csrf token\n params: {},\n\n // If true, tries to add automatically uploaded assets.\n // To make it work the server should respond with a JSON containing assets\n // in a data key, eg:\n // {\n // data: [\n // 'https://.../image.png',\n // ...\n // {src: 'https://.../image2.png'},\n // ...\n // ]\n // }\n autoAdd: 1,\n\n // Text on upload input\n uploadText: 'Drop files here or click to upload',\n\n // Label for the add button\n addBtnText: 'Add image',\n\n // Custom uploadFile function\n // @example\n // uploadFile: (e) => {\n // var files = e.dataTransfer ? e.dataTransfer.files : e.target.files;\n // // ...send somewhere\n // }\n uploadFile: '',\n\n // Handle the image url submit from the built-in 'Add image' form\n // @example\n // handleAdd: (textFromInput) => {\n // // some check...\n // editor.AssetManager.add(textFromInput);\n // }\n handleAdd: '',\n\n // Enable an upload dropzone on the entire editor (not document) when dragging\n // files over it\n // If active the dropzone disable/hide the upload dropzone in asset modal,\n // otherwise you will get double drops (#507)\n dropzone: 0,\n\n // Open the asset manager once files are been dropped via the dropzone\n openAssetsOnDrop: 1,\n\n // Any dropzone content to append inside dropzone element\n dropzoneContent: '',\n\n // Default title for the asset manager modal\n modalTitle: 'Select Image',\n\n //Default placeholder for input\n inputPlaceholder: 'http://path/to/the/image.jpg'\n};\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/asset_manager/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * assetManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const assetManager = editor.AssetManager;\n * ```\n *\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getall)\n * * [getAllVisible](#getallvisible)\n * * [remove](#remove)\n * * [store](#store)\n * * [load](#load)\n * * [getContainer](#getcontainer)\n * * [getAssetsEl](#getassetsel)\n * * [addType](#addtype)\n * * [getType](#gettype)\n * * [getTypes](#gettypes)\n *\n * @module AssetManager\n */\n\nmodule.exports = () => {\n let c = {};\n const defaults = require('./config/config');\n const Assets = require('./model/Assets');\n const AssetsView = require('./view/AssetsView');\n const FileUpload = require('./view/FileUploader');\n let assets, am, fu;\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'AssetManager',\n\n /**\n * Mandatory for the storage manager\n * @type {String}\n * @private\n */\n storageKey: 'assets',\n\n getConfig() {\n return c;\n },\n\n /**\n * Initialize module\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = config || {};\n\n for (let name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n const ppfx = c.pStylePrefix;\n const em = c.em;\n\n if (ppfx) {\n c.stylePrefix = ppfx + c.stylePrefix;\n }\n\n // Global assets collection\n assets = new Assets([]);\n const obj = {\n // Collection visible in asset manager\n collection: new Assets([]),\n globalCollection: assets,\n config: c\n };\n fu = new FileUpload(obj);\n obj.fu = fu;\n am = new AssetsView(obj);\n\n // Setup the sync between the global and public collections\n assets.listenTo(assets, 'add', model => {\n this.getAllVisible().add(model);\n em && em.trigger('asset:add', model);\n });\n\n assets.listenTo(assets, 'remove', model => {\n this.getAllVisible().remove(model);\n em && em.trigger('asset:remove', model);\n });\n\n return this;\n },\n\n /**\n * Add new asset/s to the collection. URLs are supposed to be unique\n * @param {string|Object|Array|Array} asset URL strings or an objects representing the resource.\n * @param {Object} [opts] Options\n * @return {Model}\n * @example\n * // In case of strings, would be interpreted as images\n * assetManager.add('http://img.jpg');\n * assetManager.add(['http://img.jpg', './path/to/img.png']);\n *\n * // Using objects you could indicate the type and other meta informations\n * assetManager.add({\n * \tsrc: 'http://img.jpg',\n * \t//type: 'image',\t//image is default\n * \theight: 300,\n *\twidth: 200,\n * });\n * assetManager.add([{\n * \tsrc: 'http://img.jpg',\n * },{\n * \tsrc: './path/to/img.png',\n * }]);\n */\n add(asset, opts = {}) {\n // Put the model at the beginning\n if (typeof opts.at == 'undefined') {\n opts.at = 0;\n }\n\n return assets.add(asset, opts);\n },\n\n /**\n * Returns the asset by URL\n * @param {string} src URL of the asset\n * @return {Object} Object representing the asset\n * @example\n * var asset = assetManager.get('http://img.jpg');\n */\n get(src) {\n return assets.where({ src })[0];\n },\n\n /**\n * Return the global collection, containing all the assets\n * @return {Collection}\n */\n getAll() {\n return assets;\n },\n\n /**\n * Return the visible collection, which containes assets actually rendered\n * @return {Collection}\n */\n getAllVisible() {\n return am.collection;\n },\n\n /**\n * Remove the asset by its URL\n * @param {string} src URL of the asset\n * @return {this}\n * @example\n * assetManager.remove('http://img.jpg');\n */\n remove(src) {\n var asset = this.get(src);\n this.getAll().remove(asset);\n return this;\n },\n\n /**\n * Store assets data to the selected storage\n * @param {Boolean} noStore If true, won't store\n * @return {Object} Data to store\n * @example\n * var assets = assetManager.store();\n */\n store(noStore) {\n var obj = {};\n var assets = JSON.stringify(this.getAll().toJSON());\n obj[this.storageKey] = assets;\n if (!noStore && c.stm) c.stm.store(obj);\n return obj;\n },\n\n /**\n * Load data from the passed object.\n * The fetched data will be added to the collection.\n * @param {Object} data Object of data to load\n * @return {Object} Loaded assets\n * @example\n * var assets = assetManager.load({\n * \tassets: [...]\n * })\n *\n */\n load(data = {}) {\n const name = this.storageKey;\n let assets = data[name] || [];\n\n if (typeof assets == 'string') {\n try {\n assets = JSON.parse(data[name]);\n } catch (err) {}\n }\n\n if (assets && assets.length) {\n this.getAll().reset(assets);\n }\n\n return assets;\n },\n\n /**\n * Return the Asset Manager Container\n * @return {HTMLElement}\n */\n getContainer() {\n return am.el;\n },\n\n /**\n * Get assets element container\n * @return {HTMLElement}\n */\n getAssetsEl() {\n return am.el.querySelector('[data-el=assets]');\n },\n\n /**\n * Render assets\n * @param {array} assets Assets to render, without the argument will render\n * all global assets\n * @return {HTMLElement}\n * @example\n * // Render all assets\n * assetManager.render();\n *\n * // Render some of the assets\n * const assets = assetManager.getAll();\n * assetManager.render(assets.filter(\n * asset => asset.get('category') == 'cats'\n * ));\n */\n render(assets) {\n const toRender = assets || this.getAll().models;\n\n if (!am.rendered) {\n am.render();\n }\n\n am.collection.reset(toRender);\n return this.getContainer();\n },\n\n /**\n * Add new type. If you want to get more about type definition we suggest to read the [module's page](/modules/Assets.html)\n * @param {string} id Type ID\n * @param {Object} definition Definition of the type. Each definition contains\n * `model` (business logic), `view` (presentation logic)\n * and `isType` function which recognize the type of the\n * passed entity\n * @example\n * assetManager.addType('my-type', {\n * model: {},\n * view: {},\n * isType: (value) => {},\n * })\n */\n addType(id, definition) {\n this.getAll().addType(id, definition);\n },\n\n /**\n * Get type\n * @param {string} id Type ID\n * @return {Object} Type definition\n */\n getType(id) {\n return this.getAll().getType(id);\n },\n\n /**\n * Get types\n * @return {Array}\n */\n getTypes() {\n return this.getAll().getTypes();\n },\n\n //-------\n\n AssetsView() {\n return am;\n },\n\n FileUploader() {\n return fu;\n },\n\n onLoad() {\n this.getAll().reset(c.assets);\n },\n\n postRender(editorView) {\n c.dropzone && fu.initDropzone(editorView);\n },\n\n /**\n * Set new target\n * @param\t{Object}\tm Model\n * @private\n * */\n setTarget(m) {\n am.collection.target = m;\n },\n\n /**\n * Set callback after asset was selected\n * @param\t{Object}\tf Callback function\n * @private\n * */\n onSelect(f) {\n am.collection.onSelect = f;\n },\n\n /**\n * Set callback to fire when the asset is clicked\n * @param {function} func\n * @private\n */\n onClick(func) {\n c.onClick = func;\n },\n\n /**\n * Set callback to fire when the asset is double clicked\n * @param {function} func\n * @private\n */\n onDblClick(func) {\n c.onDblClick = func;\n }\n };\n};\n","import _ from 'underscore';\nimport Backbone from 'backbone';\nvar PropertiesView = require('./PropertiesView');\n\nmodule.exports = Backbone.View.extend({\n template: _.template(`\n
title\" data-sector-title>\n caret\" class=\"fa\">\n <%= label %>\n
`),\n\n events: {\n 'click [data-sector-title]': 'toggle'\n },\n\n initialize(o) {\n this.config = o.config || {};\n this.pfx = this.config.stylePrefix || '';\n this.target = o.target || {};\n this.propTarget = o.propTarget || {};\n this.caretR = 'fa-caret-right';\n this.caretD = 'fa-caret-down';\n const model = this.model;\n this.listenTo(model, 'change:open', this.updateOpen);\n this.listenTo(model, 'updateVisibility', this.updateVisibility);\n this.listenTo(model, 'destroy remove', this.remove);\n },\n\n /**\n * If all properties are hidden this will hide the sector\n */\n updateVisibility() {\n var show;\n this.model.get('properties').each(prop => {\n if (prop.get('visible')) {\n show = 1;\n }\n });\n this.el.style.display = show ? 'block' : 'none';\n },\n\n /**\n * Update visibility\n */\n updateOpen() {\n if (this.model.get('open')) this.show();\n else this.hide();\n },\n\n /**\n * Show the content of the sector\n * */\n show() {\n this.$el.addClass(this.pfx + 'open');\n this.getPropertiesEl().style.display = '';\n this.$caret.removeClass(this.caretR).addClass(this.caretD);\n },\n\n /**\n * Hide the content of the sector\n * */\n hide() {\n this.$el.removeClass(this.pfx + 'open');\n this.getPropertiesEl().style.display = 'none';\n this.$caret.removeClass(this.caretD).addClass(this.caretR);\n },\n\n getPropertiesEl() {\n return this.$el.find(`.${this.pfx}properties`).get(0);\n },\n\n /**\n * Toggle visibility\n * */\n toggle(e) {\n var v = this.model.get('open') ? 0 : 1;\n this.model.set('open', v);\n },\n\n render() {\n this.$el.html(\n this.template({\n pfx: this.pfx,\n label: this.model.get('name')\n })\n );\n this.$caret = this.$el.find('#' + this.pfx + 'caret');\n this.renderProperties();\n this.$el.attr('class', this.pfx + 'sector no-select');\n this.updateOpen();\n return this;\n },\n\n renderProperties() {\n var objs = this.model.get('properties');\n\n if (objs) {\n var view = new PropertiesView({\n collection: objs,\n target: this.target,\n propTarget: this.propTarget,\n config: this.config\n });\n this.$el.append(view.render().el);\n }\n }\n});\n","import Backbone from 'backbone';\nimport { extend } from 'underscore';\n\nconst SectorView = require('./SectorView');\n\nmodule.exports = Backbone.View.extend({\n initialize(o = {}) {\n const config = o.config || {};\n this.pfx = config.stylePrefix || '';\n this.ppfx = config.pStylePrefix || '';\n this.target = o.target || {};\n this.config = config;\n\n // The target that will emit events for properties\n const target = {};\n extend(target, Backbone.Events);\n const body = document.body;\n const dummy = document.createElement(`el-${new Date().getTime()}`);\n body.appendChild(dummy);\n target.computedDefault = { ...window.getComputedStyle(dummy) };\n body.removeChild(dummy);\n this.propTarget = target;\n const coll = this.collection;\n const events =\n 'component:toggled component:update:classes component:update:state change:device';\n this.listenTo(coll, 'add', this.addTo);\n this.listenTo(coll, 'reset', this.render);\n this.listenTo(this.target, events, this.targetUpdated);\n },\n\n /**\n * Add to collection\n * @param {Object} model Model\n * @return {Object}\n * @private\n * */\n addTo(model) {\n this.addToCollection(model);\n },\n\n /**\n * Fired when target is updated\n * @private\n */\n targetUpdated() {\n const em = this.target;\n const pt = this.propTarget;\n let model = em.getSelected();\n if (!model) return;\n\n const config = em.get('Config');\n const state = !config.devicePreviewMode ? model.get('state') : '';\n const el = model.getEl();\n pt.helper = null;\n\n // Create computed style container\n if (el) {\n const stateStr = state ? `:${state}` : null;\n pt.computed = window.getComputedStyle(el, stateStr);\n }\n\n // Create a new rule for the state as a helper\n const appendStateRule = (style = {}) => {\n const cc = em.get('CssComposer');\n const helperCls = 'hc-state';\n const rules = cc.getAll();\n let helperRule = cc.getClassRule(helperCls);\n\n if (!helperRule) {\n helperRule = cc.setClassRule(helperCls);\n } else {\n // I will make it last again, otherwise it could be overridden\n rules.remove(helperRule);\n rules.add(helperRule);\n }\n\n helperRule.set('important', 1);\n helperRule.setStyle(style);\n pt.helper = helperRule;\n };\n\n model = em.get('StyleManager').getModelToStyle(model);\n state && appendStateRule(model.getStyle());\n pt.model = model;\n pt.trigger('update');\n },\n\n /**\n * Add new object to collection\n * @param {Object} model Model\n * @param {Object} fragmentEl collection\n * @return {Object} Object created\n * @private\n * */\n addToCollection(model, fragmentEl) {\n var fragment = fragmentEl || null;\n var view = new SectorView({\n model,\n id:\n this.pfx +\n model\n .get('name')\n .replace(' ', '_')\n .toLowerCase(),\n name: model.get('name'),\n properties: model.get('properties'),\n target: this.target,\n propTarget: this.propTarget,\n config: this.config\n });\n var rendered = view.render().el;\n\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n this.$el.append(rendered);\n }\n\n return rendered;\n },\n\n render() {\n const frag = document.createDocumentFragment();\n const $el = this.$el;\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n $el.empty();\n this.collection.each(model => this.addToCollection(model, frag));\n $el.append(frag);\n $el.addClass(`${pfx}sectors ${ppfx}one-bg ${ppfx}two-color`);\n return this;\n }\n});\n","var Backbone = require('backbone');\n\nmodule.exports = () => ({\n /**\n * Build props object by their name\n * @param {Array|string} props Array of properties name\n * @return {Array}\n */\n build(props) {\n var objs = [];\n var dftFixedValues = ['initial', 'inherit'];\n\n if (typeof props === 'string') props = [props];\n\n for (var i = 0, len = props.length; i < len; i++) {\n var obj = {};\n var prop = props[i];\n obj.property = prop;\n\n // Property\n switch (prop) {\n case 'border-radius-c':\n obj.property = 'border-radius';\n break;\n }\n\n // Fixed values\n switch (prop) {\n case 'margin-top':\n case 'margin-right':\n case 'margin-bottom':\n case 'margin-left':\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n case 'width':\n case 'max-width':\n case 'min-width':\n case 'height':\n case 'max-height':\n case 'min-height':\n obj.fixedValues = ['initial', 'inherit', 'auto'];\n break;\n case 'font-size':\n obj.fixedValues = [\n 'medium',\n 'xx-small',\n 'x-small',\n 'small',\n 'large',\n 'x-large',\n 'xx-large',\n 'smaller',\n 'larger',\n 'length',\n 'initial',\n 'inherit'\n ];\n break;\n case 'letter-spacing':\n case 'line-height':\n obj.fixedValues = ['normal', 'initial', 'inherit'];\n break;\n }\n\n // Type\n switch (prop) {\n case 'float':\n case 'position':\n case 'text-align':\n obj.type = 'radio';\n break;\n case 'display':\n case 'font-family':\n case 'font-weight':\n case 'border-style':\n case 'box-shadow-type':\n case 'background-repeat':\n case 'background-position':\n case 'background-attachment':\n case 'background-size':\n case 'transition-property':\n case 'transition-timing-function':\n case 'cursor':\n case 'overflow':\n obj.type = 'select';\n break;\n case 'top':\n case 'right':\n case 'bottom':\n case 'left':\n case 'margin-top':\n case 'margin-right':\n case 'margin-bottom':\n case 'margin-left':\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n case 'min-height':\n case 'min-width':\n case 'max-height':\n case 'max-width':\n case 'width':\n case 'height':\n case 'font-size':\n case 'letter-spacing':\n case 'line-height':\n case 'text-shadow-h':\n case 'text-shadow-v':\n case 'text-shadow-blur':\n case 'border-radius-c':\n case 'border-top-left-radius':\n case 'border-top-right-radius':\n case 'border-bottom-left-radius':\n case 'border-bottom-right-radius':\n case 'border-width':\n case 'box-shadow-h':\n case 'box-shadow-v':\n case 'box-shadow-blur':\n case 'box-shadow-spread':\n case 'transition-duration':\n case 'perspective':\n case 'transform-rotate-x':\n case 'transform-rotate-y':\n case 'transform-rotate-z':\n case 'transform-scale-x':\n case 'transform-scale-y':\n case 'transform-scale-z':\n obj.type = 'integer';\n break;\n case 'margin':\n case 'padding':\n case 'border-radius':\n case 'border':\n case 'transform':\n obj.type = 'composite';\n break;\n case 'color':\n case 'text-shadow-color':\n case 'background-color':\n case 'border-color':\n case 'box-shadow-color':\n obj.type = 'color';\n break;\n case 'text-shadow':\n case 'box-shadow':\n case 'background':\n case 'transition':\n obj.type = 'stack';\n break;\n case 'background-image':\n obj.type = 'file';\n break;\n }\n\n // Defaults\n switch (prop) {\n case 'float':\n case 'background-color':\n case 'background-image':\n case 'text-shadow':\n obj.defaults = 'none';\n break;\n case 'display':\n obj.defaults = 'block';\n break;\n case 'position':\n obj.defaults = 'static';\n break;\n case 'top':\n case 'right':\n case 'bottom':\n case 'left':\n case 'margin-top':\n case 'margin-right':\n case 'margin-bottom':\n case 'margin-left':\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n case 'text-shadow-h':\n case 'text-shadow-v':\n case 'text-shadow-blur':\n case 'border-radius-c':\n case 'border-top-left-radius':\n case 'border-top-right-radius':\n case 'border-bottom-left-radius':\n case 'border-bottom-right-radius':\n case 'box-shadow-h':\n case 'box-shadow-v':\n case 'box-shadow-spread':\n case 'perspective':\n case 'transform-rotate-x':\n case 'transform-rotate-y':\n case 'transform-rotate-z':\n obj.defaults = 0;\n break;\n case 'transform-scale-x':\n case 'transform-scale-y':\n case 'transform-scale-z':\n obj.defaults = 1;\n break;\n case 'box-shadow-blur':\n obj.defaults = '5px';\n break;\n case 'min-height':\n case 'min-width':\n case 'max-height':\n case 'max-width':\n case 'width':\n case 'height':\n case 'background-size':\n case 'cursor':\n obj.defaults = 'auto';\n break;\n case 'font-family':\n obj.defaults = 'Arial, Helvetica, sans-serif';\n break;\n case 'font-size':\n case 'border-width':\n obj.defaults = 'medium';\n break;\n case 'font-weight':\n obj.defaults = '400';\n break;\n case 'letter-spacing':\n case 'line-height':\n obj.defaults = 'normal';\n break;\n case 'color':\n case 'text-shadow-color':\n case 'border-color':\n case 'box-shadow-color':\n obj.defaults = 'black';\n break;\n case 'text-align':\n obj.defaults = 'left';\n break;\n case 'border-style':\n obj.defaults = 'solid';\n break;\n case 'box-shadow-type':\n obj.defaults = '';\n break;\n case 'background-repeat':\n obj.defaults = 'repeat';\n break;\n case 'background-position':\n obj.defaults = 'left top';\n break;\n case 'background-attachment':\n obj.defaults = 'scroll';\n break;\n case 'transition-property':\n obj.defaults = 'width';\n break;\n case 'transition-duration':\n obj.defaults = '2';\n break;\n case 'transition-timing-function':\n obj.defaults = 'ease';\n break;\n case 'overflow':\n obj.defaults = 'visible';\n break;\n }\n\n // Units\n switch (prop) {\n case 'top':\n case 'right':\n case 'bottom':\n case 'left':\n case 'margin-top':\n case 'margin-right':\n case 'margin-bottom':\n case 'margin-left':\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n case 'min-height':\n case 'min-width':\n case 'max-height':\n case 'max-width':\n case 'width':\n case 'height':\n case 'text-shadow-h':\n case 'text-shadow-v':\n case 'text-shadow-blur':\n case 'border-radius-c':\n case 'border-top-left-radius':\n case 'border-top-right-radius':\n case 'border-bottom-left-radius':\n case 'border-bottom-right-radius':\n case 'box-shadow-h':\n case 'box-shadow-v':\n obj.units = ['px', '%'];\n break;\n case 'font-size':\n case 'letter-spacing':\n case 'line-height':\n obj.units = ['px', 'em', 'rem', '%'];\n break;\n case 'border-width':\n obj.units = ['px', 'em'];\n break;\n case 'box-shadow-blur':\n case 'box-shadow-spread':\n case 'perspective':\n obj.units = ['px'];\n break;\n case 'transition-duration':\n obj.units = ['s'];\n break;\n case 'transform-rotate-x':\n case 'transform-rotate-y':\n case 'transform-rotate-z':\n obj.units = ['deg'];\n break;\n }\n\n // Min/Max\n switch (prop) {\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n case 'min-height':\n case 'min-width':\n case 'max-height':\n case 'max-width':\n case 'width':\n case 'height':\n case 'font-size':\n case 'text-shadow-blur':\n case 'border-radius-c':\n case 'border-top-left-radius':\n case 'border-top-right-radius':\n case 'border-bottom-left-radius':\n case 'border-bottom-right-radius':\n case 'border-width':\n case 'box-shadow-blur':\n case 'transition-duration':\n case 'perspective':\n obj.min = 0;\n break;\n }\n\n // Preview\n switch (prop) {\n case 'text-shadow':\n case 'box-shadow':\n case 'background':\n obj.preview = true;\n break;\n }\n\n // Detached\n switch (prop) {\n case 'background':\n obj.detached = true;\n break;\n }\n\n // Functions\n switch (prop) {\n case 'transform-rotate-x':\n obj.functionName = 'rotateX';\n break;\n case 'transform-rotate-y':\n obj.functionName = 'rotateY';\n break;\n case 'transform-rotate-z':\n obj.functionName = 'rotateZ';\n break;\n case 'transform-scale-x':\n obj.functionName = 'scaleX';\n break;\n case 'transform-scale-y':\n obj.functionName = 'scaleY';\n break;\n case 'transform-scale-z':\n obj.functionName = 'scaleZ';\n break;\n case 'background-image':\n obj.functionName = 'url';\n break;\n }\n\n // Options\n switch (prop) {\n case 'float':\n obj.list = [{ value: 'none' }, { value: 'left' }, { value: 'right' }];\n break;\n case 'display':\n obj.list = [\n { value: 'block' },\n { value: 'inline' },\n { value: 'inline-block' },\n { value: 'none' }\n ];\n break;\n case 'position':\n obj.list = [\n { value: 'static' },\n { value: 'relative' },\n { value: 'absolute' },\n { value: 'fixed' }\n ];\n break;\n case 'font-family':\n var ss = ', sans-serif';\n var fonts = [\n 'Arial, Helvetica' + ss,\n 'Arial Black, Gadget' + ss,\n 'Brush Script MT' + ss,\n 'Comic Sans MS, cursive' + ss,\n 'Courier New, Courier, monospace',\n 'Georgia, serif',\n 'Helvetica, serif',\n 'Impact, Charcoal' + ss,\n 'Lucida Sans Unicode, Lucida Grande' + ss,\n 'Tahoma, Geneva' + ss,\n 'Times New Roman, Times, serif',\n 'Trebuchet MS, Helvetica' + ss,\n 'Verdana, Geneva' + ss\n ];\n obj.list = [];\n for (var j = 0, l = fonts.length; j < l; j++) {\n var font = {};\n font.value = fonts[j];\n font.name = fonts[j].split(',')[0];\n obj.list.push(font);\n }\n break;\n case 'font-weight':\n obj.list = [\n { value: '100', name: 'Thin' },\n { value: '200', name: 'Extra-Light' },\n { value: '300', name: 'Light' },\n { value: '400', name: 'Normal' },\n { value: '500', name: 'Medium' },\n { value: '600', name: 'Semi-Bold' },\n { value: '700', name: 'Bold' },\n { value: '800', name: 'Extra-Bold' },\n { value: '900', name: 'Ultra-Bold' }\n ];\n break;\n case 'text-align':\n obj.list = [\n { value: 'left' },\n { value: 'center' },\n { value: 'right' },\n { value: 'justify' }\n ];\n break;\n case 'border-style':\n obj.list = [\n { value: 'none' },\n { value: 'solid' },\n { value: 'dotted' },\n { value: 'dashed' },\n { value: 'double' },\n { value: 'groove' },\n { value: 'ridge' },\n { value: 'inset' },\n { value: 'outset' }\n ];\n break;\n case 'box-shadow-type':\n obj.list = [\n { value: '', name: 'Outside' },\n { value: 'inset', name: 'Inside' }\n ];\n break;\n case 'background-repeat':\n obj.list = [\n { value: 'repeat' },\n { value: 'repeat-x' },\n { value: 'repeat-y' },\n { value: 'no-repeat' }\n ];\n break;\n case 'background-position':\n obj.list = [\n { value: 'left top' },\n { value: 'left center' },\n { value: 'left bottom' },\n { value: 'right top' },\n { value: 'right center' },\n { value: 'right bottom' },\n { value: 'center top' },\n { value: 'center center' },\n { value: 'center bottom' }\n ];\n break;\n case 'background-attachment':\n obj.list = [\n { value: 'scroll' },\n { value: 'fixed' },\n { value: 'local' }\n ];\n break;\n case 'background-size':\n obj.list = [\n { value: 'auto' },\n { value: 'cover' },\n { value: 'contain' }\n ];\n break;\n case 'transition-property':\n obj.list = [\n { value: 'all' },\n { value: 'width' },\n { value: 'height' },\n { value: 'background-color' },\n { value: 'transform' },\n { value: 'box-shadow' },\n { value: 'opacity' }\n ];\n break;\n case 'transition-timing-function':\n obj.list = [\n { value: 'linear' },\n { value: 'ease' },\n { value: 'ease-in' },\n { value: 'ease-out' },\n { value: 'ease-in-out' }\n ];\n break;\n case 'cursor':\n obj.list = [\n { value: 'auto' },\n { value: 'pointer' },\n { value: 'copy' },\n { value: 'crosshair' },\n { value: 'grab' },\n { value: 'grabbing' },\n { value: 'help' },\n { value: 'move' },\n { value: 'text' }\n ];\n break;\n case 'overflow':\n obj.list = [\n { value: 'visible' },\n { value: 'hidden' },\n { value: 'scroll' },\n { value: 'auto' }\n ];\n break;\n }\n\n // Properties\n switch (prop) {\n case 'margin':\n obj.properties = this.build([\n 'margin-top',\n 'margin-right',\n 'margin-bottom',\n 'margin-left'\n ]);\n break;\n case 'padding':\n obj.properties = this.build([\n 'padding-top',\n 'padding-right',\n 'padding-bottom',\n 'padding-left'\n ]);\n break;\n case 'text-shadow':\n obj.properties = this.build([\n 'text-shadow-h',\n 'text-shadow-v',\n 'text-shadow-blur',\n 'text-shadow-color'\n ]);\n break;\n case 'border':\n obj.properties = this.build([\n 'border-width',\n 'border-style',\n 'border-color'\n ]);\n break;\n case 'border-radius':\n obj.properties = this.build([\n 'border-top-left-radius',\n 'border-top-right-radius',\n 'border-bottom-left-radius',\n 'border-bottom-right-radius'\n ]);\n break;\n case 'box-shadow':\n obj.properties = this.build([\n 'box-shadow-h',\n 'box-shadow-v',\n 'box-shadow-blur',\n 'box-shadow-spread',\n 'box-shadow-color',\n 'box-shadow-type'\n ]);\n break;\n case 'background':\n obj.properties = this.build([\n 'background-image',\n 'background-repeat',\n 'background-position',\n 'background-attachment',\n 'background-size'\n ]);\n break;\n case 'transition':\n obj.properties = this.build([\n 'transition-property',\n 'transition-duration',\n 'transition-timing-function'\n ]);\n break;\n case 'transform':\n obj.properties = this.build([\n 'transform-rotate-x',\n 'transform-rotate-y',\n 'transform-rotate-z',\n 'transform-scale-x',\n 'transform-scale-y',\n 'transform-scale-z'\n ]);\n break;\n }\n\n objs.push(obj);\n }\n\n return objs;\n }\n});\n","const Property = require('./PropertyIntegerView');\n\nmodule.exports = Property.extend({\n events() {\n return {\n ...Property.prototype.events,\n 'change [type=range]': 'inputValueChanged',\n 'input [type=range]': 'inputValueChangedSoft',\n change: ''\n };\n },\n\n templateInput(model) {\n const ppfx = this.ppfx;\n return `\n
\n \n
\n `;\n },\n\n getSliderEl() {\n if (!this.slider) {\n this.slider = this.el.querySelector('input[type=range]');\n }\n\n return this.slider;\n },\n\n inputValueChanged() {\n const model = this.model;\n const step = model.get('step');\n this.getInputEl().value = this.getSliderEl().value;\n const value = this.getInputValue() - step;\n model.set('value', value, { avoidStore: 1 }).set('value', value + step);\n this.elementUpdated();\n },\n\n inputValueChangedSoft() {\n this.getInputEl().value = this.getSliderEl().value;\n this.model.set('value', this.getInputValue(), { avoidStore: 1 });\n this.elementUpdated();\n },\n\n setValue(value) {\n this.getSliderEl().value = value;\n this.inputInst.setValue(value, { silent: 1 });\n },\n\n onRender() {\n Property.prototype.onRender.apply(this, arguments);\n\n if (!this.model.get('showInput')) {\n this.inputInst.el.style.display = 'none';\n }\n }\n});\n","const Property = require('./PropertyInteger');\n\nmodule.exports = Property.extend({\n defaults: {\n ...Property.prototype.defaults,\n showInput: 1\n }\n});\n","import Backbone from 'backbone';\n\nmodule.exports = Backbone.View.extend({\n events: {\n click: 'active',\n 'click [data-close-layer]': 'remove',\n 'mousedown [data-move-layer]': 'initSorter'\n },\n\n template(model) {\n const pfx = this.pfx;\n const label = `Layer ${model.get('index')}`;\n\n return `\n
\n \n
\n
${label}
\n
\n \t
\n
\n
\n ⨯\n
\n
\n
\n `;\n },\n\n initialize(o = {}) {\n let model = this.model;\n this.stackModel = o.stackModel || {};\n this.config = o.config || {};\n this.pfx = this.config.stylePrefix || '';\n this.sorter = o.sorter || null;\n this.propsConfig = o.propsConfig || {};\n this.customPreview = o.onPreview;\n this.listenTo(model, 'destroy remove', this.remove);\n this.listenTo(model, 'change:active', this.updateVisibility);\n this.listenTo(model.get('properties'), 'change', this.updatePreview);\n\n if (!model.get('preview')) {\n this.$el.addClass(this.pfx + 'no-preview');\n }\n\n // For the sorter\n model.view = this;\n model.set({ droppable: 0, draggable: 1 });\n this.$el.data('model', model);\n },\n\n /**\n * Delegate sorting\n * @param {Event} e\n * */\n initSorter(e) {\n if (this.sorter) this.sorter.startSort(this.el);\n },\n\n remove(e) {\n if (e && e.stopPropagation) e.stopPropagation();\n\n const model = this.model;\n const collection = model.collection;\n const stackModel = this.stackModel;\n\n Backbone.View.prototype.remove.apply(this, arguments);\n\n if (collection.contains(model)) {\n collection.remove(model);\n }\n\n if (stackModel && stackModel.set) {\n stackModel.set({ stackIndex: null }, { silent: true });\n stackModel.trigger('updateValue');\n }\n },\n\n /**\n * Default method for changing preview box\n * @param {Collection} props\n * @param {Element} $el\n */\n onPreview(value) {\n const values = value.split(' ');\n const lim = 3;\n const result = [];\n this.model.get('properties').each((prop, index) => {\n var value = values[index] || '';\n\n if (value) {\n if (prop.get('type') == 'integer') {\n let valueInt = parseInt(value, 10);\n let unit = value.replace(valueInt, '');\n valueInt = !isNaN(valueInt) ? valueInt : 0;\n valueInt = valueInt > lim ? lim : valueInt;\n valueInt = valueInt < -lim ? -lim : valueInt;\n value = valueInt + unit;\n }\n }\n\n result.push(value);\n });\n\n return result.join(' ');\n },\n\n updatePreview() {\n const stackModel = this.stackModel;\n const customPreview = this.customPreview;\n const previewEl = this.getPreviewEl();\n const value = this.model.getFullValue();\n const preview = customPreview\n ? customPreview(value)\n : this.onPreview(value);\n\n if (preview && stackModel && previewEl) {\n previewEl.style[stackModel.get('property')] = preview;\n }\n },\n\n getPropertiesWrapper() {\n if (!this.propsWrapEl) {\n this.propsWrapEl = this.el.querySelector('[data-properties]');\n }\n return this.propsWrapEl;\n },\n\n getPreviewEl() {\n if (!this.previewEl) {\n this.previewEl = this.el.querySelector('[data-preview]');\n }\n return this.previewEl;\n },\n\n active() {\n const model = this.model;\n const collection = model.collection;\n collection.active(collection.indexOf(model));\n },\n\n updateVisibility() {\n const pfx = this.pfx;\n const wrapEl = this.getPropertiesWrapper();\n const active = this.model.get('active');\n wrapEl.style.display = active ? '' : 'none';\n this.$el[active ? 'addClass' : 'removeClass'](`${pfx}active`);\n },\n\n render() {\n const PropertiesView = require('./PropertiesView');\n const propsConfig = this.propsConfig;\n const className = `${this.pfx}layer`;\n const model = this.model;\n const el = this.el;\n const properties = new PropertiesView({\n collection: model.get('properties'),\n config: this.config,\n target: propsConfig.target,\n customValue: propsConfig.customValue,\n propTarget: propsConfig.propTarget,\n onChange: propsConfig.onChange\n }).render().el;\n el.innerHTML = this.template(model);\n el.className = className;\n this.getPropertiesWrapper().appendChild(properties);\n this.updateVisibility();\n this.updatePreview();\n return this;\n }\n});\n","var Backbone = require('backbone');\nvar LayerView = require('./LayerView');\n\nmodule.exports = Backbone.View.extend({\n initialize(o) {\n this.config = o.config || {};\n this.stackModel = o.stackModel;\n this.preview = o.preview;\n this.pfx = this.config.stylePrefix || '';\n this.ppfx = this.config.pStylePrefix || '';\n this.propsConfig = o.propsConfig;\n let pfx = this.pfx;\n let ppfx = this.ppfx;\n let collection = this.collection;\n this.className = `${pfx}layers ${ppfx}field`;\n this.listenTo(collection, 'add', this.addTo);\n this.listenTo(collection, 'deselectAll', this.deselectAll);\n this.listenTo(collection, 'reset', this.render);\n\n var em = this.config.em || '';\n var utils = em ? em.get('Utils') : '';\n\n this.sorter = utils\n ? new utils.Sorter({\n container: this.el,\n ignoreViewChildren: 1,\n containerSel: `.${pfx}layers`,\n itemSel: `.${pfx}layer`,\n pfx: this.config.pStylePrefix\n })\n : '';\n\n // For the Sorter\n collection.view = this;\n this.$el.data('model', collection);\n this.$el.data('collection', collection);\n },\n\n /**\n * Add to collection\n * @param Object Model\n *\n * @return Object\n * */\n addTo(model) {\n var i = this.collection.indexOf(model);\n this.addToCollection(model, null, i);\n },\n\n /**\n * Add new object to collection\n * @param Object Model\n * @param Object Fragment collection\n * @param {number} index Index of append\n *\n * @return Object Object created\n * */\n addToCollection(model, fragmentEl, index) {\n var fragment = fragmentEl || null;\n const stackModel = this.stackModel;\n const config = this.config;\n const sorter = this.sorter;\n const propsConfig = this.propsConfig;\n\n if (typeof this.preview !== 'undefined') {\n model.set('preview', this.preview);\n }\n\n var view = new LayerView({\n model,\n config,\n sorter,\n stackModel,\n propsConfig\n });\n var rendered = view.render().el;\n\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n if (typeof index != 'undefined') {\n var method = 'before';\n // If the added model is the last of collection\n // need to change the logic of append\n if (this.$el.children().length == index) {\n index--;\n method = 'after';\n }\n // In case the added is new in the collection index will be -1\n if (index < 0) {\n this.$el.append(rendered);\n } else\n this.$el\n .children()\n .eq(index)\n [method](rendered);\n } else this.$el.append(rendered);\n }\n\n return rendered;\n },\n\n /**\n * Deselect all\n *\n * @return void\n * */\n deselectAll() {\n this.$el.find('.' + this.pfx + 'layer').removeClass(this.pfx + 'active');\n },\n\n render() {\n var fragment = document.createDocumentFragment();\n this.$el.empty();\n\n this.collection.each(function(model) {\n this.addToCollection(model, fragment);\n }, this);\n\n this.$el.append(fragment);\n this.$el.attr('class', this.className);\n\n if (this.sorter) this.sorter.plh = null;\n\n return this;\n }\n});\n","// Without jquery I have to update few stuff\n//\n// Spectrum Colorpicker v1.8.0\n// https://github.com/bgrins/spectrum\n// Author: Brian Grinstead\n// License: MIT\n\nexport default function($, undefined) {\n 'use strict';\n\n var defaultOpts = {\n // Callbacks\n beforeShow: noop,\n move: noop,\n change: noop,\n show: noop,\n hide: noop,\n\n // Options\n color: false,\n flat: false,\n showInput: false,\n allowEmpty: false,\n showButtons: true,\n clickoutFiresChange: true,\n showInitial: false,\n showPalette: false,\n showPaletteOnly: false,\n hideAfterPaletteSelect: false,\n togglePaletteOnly: false,\n showSelectionPalette: true,\n localStorageKey: false,\n appendTo: 'body',\n maxSelectionSize: 7,\n cancelText: 'cancel',\n chooseText: 'choose',\n togglePaletteMoreText: 'more',\n togglePaletteLessText: 'less',\n clearText: 'Clear Color Selection',\n noColorSelectedText: 'No Color Selected',\n preferredFormat: false,\n className: '', // Deprecated - use containerClassName and replacerClassName instead.\n containerClassName: '',\n replacerClassName: '',\n showAlpha: false,\n theme: 'sp-light',\n palette: [\n [\n '#ffffff',\n '#000000',\n '#ff0000',\n '#ff8000',\n '#ffff00',\n '#008000',\n '#0000ff',\n '#4b0082',\n '#9400d3'\n ]\n ],\n selectionPalette: [],\n disabled: false,\n offset: null\n },\n spectrums = [],\n IE = !!/msie/i.exec(window.navigator.userAgent),\n rgbaSupport = (function() {\n function contains(str, substr) {\n return !!~('' + str).indexOf(substr);\n }\n\n var elem = document.createElement('div');\n var style = elem.style;\n style.cssText = 'background-color:rgba(0,0,0,.5)';\n return (\n contains(style.backgroundColor, 'rgba') ||\n contains(style.backgroundColor, 'hsla')\n );\n })(),\n replaceInput = [\n \"
\",\n \"
\",\n \"
\",\n '
'\n ].join(''),\n markup = (function() {\n // IE does not support gradients with multiple stops, so we need to simulate\n // that for the rainbow slider with 8 divs that each have a single gradient\n var gradientFix = '';\n if (IE) {\n for (var i = 1; i <= 6; i++) {\n gradientFix += \"
\";\n }\n }\n\n return [\n \"
\",\n \"
\",\n \"
\",\n \"
\",\n \"\",\n '
',\n '
',\n \"
\",\n \"
\",\n \"
\",\n \"
\",\n \"
\",\n \"
\",\n \"
\",\n \"
\",\n '
',\n '
',\n '
',\n \"
\",\n '
',\n \"
\",\n \"
\",\n gradientFix,\n '
',\n '
',\n \"
\",\n '
',\n \"
\",\n \"\",\n '
',\n \"
\",\n \"
\",\n \"\",\n \"\",\n '
',\n '
',\n '
'\n ].join('');\n })();\n\n function paletteTemplate(p, color, className, opts) {\n var html = [];\n for (var i = 0; i < p.length; i++) {\n var current = p[i];\n if (current) {\n var tiny = tinycolor(current);\n var c =\n tiny.toHsl().l < 0.5\n ? 'sp-thumb-el sp-thumb-dark'\n : 'sp-thumb-el sp-thumb-light';\n c += tinycolor.equals(color, current) ? ' sp-thumb-active' : '';\n var formattedString = tiny.toString(opts.preferredFormat || 'rgb');\n var swatchStyle = rgbaSupport\n ? 'background-color:' + tiny.toRgbString()\n : 'filter:' + tiny.toFilter();\n html.push(\n ''\n );\n } else {\n var cls = 'sp-clear-display';\n html.push(\n $('
')\n .append(\n $(\n ''\n ).attr('title', opts.noColorSelectedText)\n )\n .html()\n );\n }\n }\n return \"
\" + html.join('') + '
';\n }\n\n function hideAll() {\n for (var i = 0; i < spectrums.length; i++) {\n if (spectrums[i]) {\n spectrums[i].hide();\n }\n }\n }\n\n function instanceOptions(o, callbackContext) {\n var opts = $.extend({}, defaultOpts, o);\n opts.callbacks = {\n move: bind(opts.move, callbackContext),\n change: bind(opts.change, callbackContext),\n show: bind(opts.show, callbackContext),\n hide: bind(opts.hide, callbackContext),\n beforeShow: bind(opts.beforeShow, callbackContext)\n };\n return opts;\n }\n\n function spectrum(element, o) {\n var opts = instanceOptions(o, element),\n flat = opts.flat,\n showSelectionPalette = opts.showSelectionPalette,\n localStorageKey = opts.localStorageKey,\n theme = opts.theme,\n callbacks = opts.callbacks,\n resize = throttle(reflow, 10),\n visible = false,\n isDragging = false,\n dragWidth = 0,\n dragHeight = 0,\n dragHelperHeight = 0,\n slideHeight = 0,\n slideWidth = 0,\n alphaWidth = 0,\n alphaSlideHelperWidth = 0,\n slideHelperHeight = 0,\n currentHue = 0,\n currentSaturation = 0,\n currentValue = 0,\n currentAlpha = 1,\n palette = [],\n paletteArray = [],\n paletteLookup = {},\n selectionPalette = opts.selectionPalette.slice(0),\n maxSelectionSize = opts.maxSelectionSize,\n draggingClass = 'sp-dragging',\n shiftMovementDirection = null;\n\n var doc = element.ownerDocument,\n body = doc.body,\n boundElement = $(element),\n disabled = false,\n container = $(markup, doc).addClass(theme),\n pickerContainer = container.find('.sp-picker-container'),\n dragger = container.find('.sp-color'),\n dragHelper = container.find('.sp-dragger'),\n slider = container.find('.sp-hue'),\n slideHelper = container.find('.sp-slider'),\n alphaSliderInner = container.find('.sp-alpha-inner'),\n alphaSlider = container.find('.sp-alpha'),\n alphaSlideHelper = container.find('.sp-alpha-handle'),\n textInput = container.find('.sp-input'),\n paletteContainer = container.find('.sp-palette'),\n initialColorContainer = container.find('.sp-initial'),\n cancelButton = container.find('.sp-cancel'),\n clearButton = container.find('.sp-clear'),\n chooseButton = container.find('.sp-choose'),\n toggleButton = container.find('.sp-palette-toggle'),\n isInput = boundElement.is('input'),\n isInputTypeColor =\n isInput &&\n boundElement.attr('type') === 'color' &&\n inputTypeColorSupport(),\n shouldReplace = isInput && !flat,\n replacer = shouldReplace\n ? $(replaceInput)\n .addClass(theme)\n .addClass(opts.className)\n .addClass(opts.replacerClassName)\n : $([]),\n offsetElement = shouldReplace ? replacer : boundElement,\n previewElement = replacer.find('.sp-preview-inner'),\n initialColor = opts.color || (isInput && boundElement.val()),\n colorOnShow = false,\n currentPreferredFormat = opts.preferredFormat,\n clickoutFiresChange = !opts.showButtons || opts.clickoutFiresChange,\n isEmpty = !initialColor,\n allowEmpty = opts.allowEmpty && !isInputTypeColor;\n\n function applyOptions() {\n if (opts.showPaletteOnly) {\n opts.showPalette = true;\n }\n\n toggleButton.text(\n opts.showPaletteOnly\n ? opts.togglePaletteMoreText\n : opts.togglePaletteLessText\n );\n\n if (opts.palette) {\n palette = opts.palette.slice(0);\n paletteArray = $.isArray(palette[0]) ? palette : [palette];\n paletteLookup = {};\n for (var i = 0; i < paletteArray.length; i++) {\n for (var j = 0; j < paletteArray[i].length; j++) {\n var rgb = tinycolor(paletteArray[i][j]).toRgbString();\n paletteLookup[rgb] = true;\n }\n }\n }\n\n container.toggleClass('sp-flat', flat);\n container.toggleClass('sp-input-disabled', !opts.showInput);\n container.toggleClass('sp-alpha-enabled', opts.showAlpha);\n container.toggleClass('sp-clear-enabled', allowEmpty);\n container.toggleClass('sp-buttons-disabled', !opts.showButtons);\n container.toggleClass(\n 'sp-palette-buttons-disabled',\n !opts.togglePaletteOnly\n );\n container.toggleClass('sp-palette-disabled', !opts.showPalette);\n container.toggleClass('sp-palette-only', opts.showPaletteOnly);\n container.toggleClass('sp-initial-disabled', !opts.showInitial);\n container.addClass(opts.className).addClass(opts.containerClassName);\n\n reflow();\n }\n\n function initialize() {\n if (IE) {\n container.find('*:not(input)').attr('unselectable', 'on');\n }\n\n applyOptions();\n\n if (shouldReplace) {\n boundElement.after(replacer).hide();\n }\n\n if (!allowEmpty) {\n clearButton.hide();\n }\n\n if (flat) {\n boundElement.after(container).hide();\n } else {\n var appendTo =\n opts.appendTo === 'parent' ? boundElement.parent() : $(opts.appendTo);\n if (appendTo.length !== 1) {\n appendTo = $('body');\n }\n\n appendTo.append(container);\n }\n\n updateSelectionPaletteFromStorage();\n\n offsetElement.bind('click.spectrum touchstart.spectrum', function(e) {\n if (!disabled) {\n toggle();\n }\n\n e.stopPropagation();\n\n if (!$(e.target).is('input')) {\n e.preventDefault();\n }\n });\n\n if (boundElement.is(':disabled') || opts.disabled === true) {\n disable();\n }\n\n // Prevent clicks from bubbling up to document. This would cause it to be hidden.\n container.click(stopPropagation);\n\n // Handle user typed input\n textInput.change(setFromTextInput);\n textInput.bind('paste', function() {\n setTimeout(setFromTextInput, 1);\n });\n textInput.keydown(function(e) {\n if (e.keyCode == 13) {\n setFromTextInput();\n }\n });\n\n cancelButton.text(opts.cancelText);\n cancelButton.bind('click.spectrum', function(e) {\n e.stopPropagation();\n e.preventDefault();\n revert();\n hide();\n });\n\n clearButton.attr('title', opts.clearText);\n clearButton.bind('click.spectrum', function(e) {\n e.stopPropagation();\n e.preventDefault();\n isEmpty = true;\n move();\n\n if (flat) {\n //for the flat style, this is a change event\n updateOriginalInput(true);\n }\n });\n\n chooseButton.text(opts.chooseText);\n chooseButton.bind('click.spectrum', function(e) {\n e.stopPropagation();\n e.preventDefault();\n\n if (IE && textInput.is(':focus')) {\n textInput.trigger('change');\n }\n\n if (isValid()) {\n updateOriginalInput(true);\n hide();\n }\n });\n\n toggleButton.text(\n opts.showPaletteOnly\n ? opts.togglePaletteMoreText\n : opts.togglePaletteLessText\n );\n toggleButton.bind('click.spectrum', function(e) {\n e.stopPropagation();\n e.preventDefault();\n\n opts.showPaletteOnly = !opts.showPaletteOnly;\n\n // To make sure the Picker area is drawn on the right, next to the\n // Palette area (and not below the palette), first move the Palette\n // to the left to make space for the picker, plus 5px extra.\n // The 'applyOptions' function puts the whole container back into place\n // and takes care of the button-text and the sp-palette-only CSS class.\n if (!opts.showPaletteOnly && !flat) {\n container.css('left', '-=' + (pickerContainer.outerWidth(true) + 5));\n }\n applyOptions();\n });\n\n draggable(\n alphaSlider,\n function(dragX, dragY, e) {\n currentAlpha = dragX / alphaWidth;\n isEmpty = false;\n if (e.shiftKey) {\n currentAlpha = Math.round(currentAlpha * 10) / 10;\n }\n\n move();\n },\n dragStart,\n dragStop\n );\n\n draggable(\n slider,\n function(dragX, dragY) {\n currentHue = parseFloat(dragY / slideHeight);\n isEmpty = false;\n if (!opts.showAlpha) {\n currentAlpha = 1;\n }\n move();\n },\n dragStart,\n dragStop\n );\n\n draggable(\n dragger,\n function(dragX, dragY, e) {\n // shift+drag should snap the movement to either the x or y axis.\n if (!e.shiftKey) {\n shiftMovementDirection = null;\n } else if (!shiftMovementDirection) {\n var oldDragX = currentSaturation * dragWidth;\n var oldDragY = dragHeight - currentValue * dragHeight;\n var furtherFromX =\n Math.abs(dragX - oldDragX) > Math.abs(dragY - oldDragY);\n\n shiftMovementDirection = furtherFromX ? 'x' : 'y';\n }\n\n var setSaturation =\n !shiftMovementDirection || shiftMovementDirection === 'x';\n var setValue =\n !shiftMovementDirection || shiftMovementDirection === 'y';\n\n if (setSaturation) {\n currentSaturation = parseFloat(dragX / dragWidth);\n }\n if (setValue) {\n currentValue = parseFloat((dragHeight - dragY) / dragHeight);\n }\n\n isEmpty = false;\n if (!opts.showAlpha) {\n currentAlpha = 1;\n }\n\n move();\n },\n dragStart,\n dragStop\n );\n\n if (!!initialColor) {\n set(initialColor);\n\n // In case color was black - update the preview UI and set the format\n // since the set function will not run (default color is black).\n updateUI();\n currentPreferredFormat =\n opts.preferredFormat || tinycolor(initialColor).format;\n\n addColorToSelectionPalette(initialColor);\n } else {\n updateUI();\n }\n\n if (flat) {\n show();\n }\n\n function paletteElementClick(e) {\n if (e.data && e.data.ignore) {\n set(\n $(e.target)\n .closest('.sp-thumb-el')\n .data('color')\n );\n move();\n } else {\n set(\n $(e.target)\n .closest('.sp-thumb-el')\n .data('color')\n );\n move();\n updateOriginalInput(true);\n if (opts.hideAfterPaletteSelect) {\n hide();\n }\n }\n\n return false;\n }\n\n var paletteEvent = IE\n ? 'mousedown.spectrum'\n : 'click.spectrum touchstart.spectrum';\n paletteContainer.delegate(\n '.sp-thumb-el',\n paletteEvent,\n paletteElementClick\n );\n initialColorContainer.delegate(\n '.sp-thumb-el:nth-child(1)',\n paletteEvent,\n { ignore: true },\n paletteElementClick\n );\n }\n\n function updateSelectionPaletteFromStorage() {\n if (localStorageKey && window.localStorage) {\n // Migrate old palettes over to new format. May want to remove this eventually.\n try {\n var oldPalette = window.localStorage[localStorageKey].split(',#');\n if (oldPalette.length > 1) {\n delete window.localStorage[localStorageKey];\n $.each(oldPalette, function(i, c) {\n addColorToSelectionPalette(c);\n });\n }\n } catch (e) {}\n\n try {\n selectionPalette = window.localStorage[localStorageKey].split(';');\n } catch (e) {}\n }\n }\n\n function addColorToSelectionPalette(color) {\n if (showSelectionPalette) {\n var rgb = tinycolor(color).toRgbString();\n if (!paletteLookup[rgb] && $.inArray(rgb, selectionPalette) === -1) {\n selectionPalette.push(rgb);\n while (selectionPalette.length > maxSelectionSize) {\n selectionPalette.shift();\n }\n }\n\n if (localStorageKey && window.localStorage) {\n try {\n window.localStorage[localStorageKey] = selectionPalette.join(';');\n } catch (e) {}\n }\n }\n }\n\n function getUniqueSelectionPalette() {\n var unique = [];\n if (opts.showPalette) {\n for (var i = 0; i < selectionPalette.length; i++) {\n var rgb = tinycolor(selectionPalette[i]).toRgbString();\n\n if (!paletteLookup[rgb]) {\n unique.push(selectionPalette[i]);\n }\n }\n }\n\n return unique.reverse().slice(0, opts.maxSelectionSize);\n }\n\n function drawPalette() {\n var currentColor = get();\n\n var html = $.map(paletteArray, function(palette, i) {\n return paletteTemplate(\n palette,\n currentColor,\n 'sp-palette-row sp-palette-row-' + i,\n opts\n );\n });\n\n updateSelectionPaletteFromStorage();\n\n if (selectionPalette) {\n html.push(\n paletteTemplate(\n getUniqueSelectionPalette(),\n currentColor,\n 'sp-palette-row sp-palette-row-selection',\n opts\n )\n );\n }\n\n paletteContainer.html(html.join(''));\n }\n\n function drawInitial() {\n if (opts.showInitial) {\n var initial = colorOnShow;\n var current = get();\n initialColorContainer.html(\n paletteTemplate(\n [initial, current],\n current,\n 'sp-palette-row-initial',\n opts\n )\n );\n }\n }\n\n function dragStart() {\n if (dragHeight <= 0 || dragWidth <= 0 || slideHeight <= 0) {\n reflow();\n }\n isDragging = true;\n container.addClass(draggingClass);\n shiftMovementDirection = null;\n boundElement.trigger('dragstart.spectrum', [get()]);\n }\n\n function dragStop() {\n isDragging = false;\n container.removeClass(draggingClass);\n boundElement.trigger('dragstop.spectrum', [get()]);\n }\n\n function setFromTextInput() {\n var value = textInput.val();\n\n if ((value === null || value === '') && allowEmpty) {\n set(null);\n updateOriginalInput(true);\n } else {\n var tiny = tinycolor(value);\n if (tiny.isValid()) {\n set(tiny);\n updateOriginalInput(true);\n } else {\n textInput.addClass('sp-validation-error');\n }\n }\n }\n\n function toggle() {\n if (visible) {\n hide();\n } else {\n show();\n }\n }\n\n function show() {\n var event = $.Event('beforeShow.spectrum');\n\n if (visible) {\n reflow();\n return;\n }\n\n boundElement.trigger(event, [get()]);\n\n if (callbacks.beforeShow(get()) === false || event.isDefaultPrevented()) {\n return;\n }\n\n hideAll();\n visible = true;\n\n var $doc = $(doc);\n $doc.bind('keydown.spectrum', onkeydown);\n $doc.bind('click.spectrum', clickout);\n $(window).bind('resize.spectrum', resize);\n replacer.addClass('sp-active');\n container.removeClass('sp-hidden');\n\n reflow();\n updateUI();\n\n colorOnShow = get();\n\n drawInitial();\n callbacks.show(colorOnShow);\n boundElement.trigger('show.spectrum', [colorOnShow]);\n }\n\n function onkeydown(e) {\n // Close on ESC\n if (e.keyCode === 27) {\n hide();\n }\n }\n\n function clickout(e) {\n // Return on right click.\n if (e.button == 2) {\n return;\n }\n\n // If a drag event was happening during the mouseup, don't hide\n // on click.\n if (isDragging) {\n return;\n }\n\n if (clickoutFiresChange) {\n updateOriginalInput(true);\n } else {\n revert();\n }\n hide();\n }\n\n function hide() {\n // Return if hiding is unnecessary\n if (!visible || flat) {\n return;\n }\n visible = false;\n\n $(doc).unbind('keydown.spectrum', onkeydown);\n $(doc).unbind('click.spectrum', clickout);\n $(window).unbind('resize.spectrum', resize);\n\n replacer.removeClass('sp-active');\n container.addClass('sp-hidden');\n\n callbacks.hide(get());\n boundElement.trigger('hide.spectrum', [get()]);\n }\n\n function revert() {\n set(colorOnShow, true);\n }\n\n function set(color, ignoreFormatChange) {\n if (tinycolor.equals(color, get())) {\n // Update UI just in case a validation error needs\n // to be cleared.\n updateUI();\n return;\n }\n\n var newColor, newHsv;\n if (!color && allowEmpty) {\n isEmpty = true;\n } else {\n isEmpty = false;\n newColor = tinycolor(color);\n newHsv = newColor.toHsv();\n\n currentHue = (newHsv.h % 360) / 360;\n currentSaturation = newHsv.s;\n currentValue = newHsv.v;\n currentAlpha = newHsv.a;\n }\n updateUI();\n\n if (newColor && newColor.isValid() && !ignoreFormatChange) {\n currentPreferredFormat = opts.preferredFormat || newColor.getFormat();\n }\n }\n\n function get(opts) {\n opts = opts || {};\n\n if (allowEmpty && isEmpty) {\n return null;\n }\n\n return tinycolor.fromRatio(\n {\n h: currentHue,\n s: currentSaturation,\n v: currentValue,\n a: Math.round(currentAlpha * 100) / 100\n },\n { format: opts.format || currentPreferredFormat }\n );\n }\n\n function isValid() {\n return !textInput.hasClass('sp-validation-error');\n }\n\n function move() {\n updateUI();\n\n callbacks.move(get());\n boundElement.trigger('move.spectrum', [get()]);\n }\n\n function updateUI() {\n textInput.removeClass('sp-validation-error');\n\n updateHelperLocations();\n\n // Update dragger background color (gradients take care of saturation and value).\n var flatColor = tinycolor.fromRatio({ h: currentHue, s: 1, v: 1 });\n dragger.css('background-color', flatColor.toHexString());\n\n // Get a format that alpha will be included in (hex and names ignore alpha)\n var format = currentPreferredFormat;\n if (currentAlpha < 1 && !(currentAlpha === 0 && format === 'name')) {\n if (\n format === 'hex' ||\n format === 'hex3' ||\n format === 'hex6' ||\n format === 'name'\n ) {\n format = 'rgb';\n }\n }\n\n var realColor = get({ format: format }),\n displayColor = '';\n\n //reset background info for preview element\n previewElement.removeClass('sp-clear-display');\n previewElement.css('background-color', 'transparent');\n\n if (!realColor && allowEmpty) {\n // Update the replaced elements background with icon indicating no color selection\n previewElement.addClass('sp-clear-display');\n } else {\n var realHex = realColor.toHexString(),\n realRgb = realColor.toRgbString();\n\n // Update the replaced elements background color (with actual selected color)\n if (rgbaSupport || realColor.alpha === 1) {\n previewElement.css('background-color', realRgb);\n } else {\n previewElement.css('background-color', 'transparent');\n previewElement.css('filter', realColor.toFilter());\n }\n\n if (opts.showAlpha) {\n var rgb = realColor.toRgb();\n rgb.a = 0;\n var realAlpha = tinycolor(rgb).toRgbString();\n var gradient =\n 'linear-gradient(left, ' + realAlpha + ', ' + realHex + ')';\n\n if (IE) {\n alphaSliderInner.css(\n 'filter',\n tinycolor(realAlpha).toFilter({ gradientType: 1 }, realHex)\n );\n } else {\n alphaSliderInner.css('background', '-webkit-' + gradient);\n alphaSliderInner.css('background', '-moz-' + gradient);\n alphaSliderInner.css('background', '-ms-' + gradient);\n // Use current syntax gradient on unprefixed property.\n alphaSliderInner.css(\n 'background',\n 'linear-gradient(to right, ' + realAlpha + ', ' + realHex + ')'\n );\n }\n }\n\n displayColor = realColor.toString(format);\n }\n\n // Update the text entry input as it changes happen\n if (opts.showInput) {\n textInput.val(displayColor);\n }\n\n if (opts.showPalette) {\n drawPalette();\n }\n\n drawInitial();\n }\n\n function updateHelperLocations() {\n var s = currentSaturation;\n var v = currentValue;\n\n if (allowEmpty && isEmpty) {\n //if selected color is empty, hide the helpers\n alphaSlideHelper.hide();\n slideHelper.hide();\n dragHelper.hide();\n } else {\n //make sure helpers are visible\n alphaSlideHelper.show();\n slideHelper.show();\n dragHelper.show();\n\n // Where to show the little circle in that displays your current selected color\n var dragX = s * dragWidth;\n var dragY = dragHeight - v * dragHeight;\n dragX = Math.max(\n -dragHelperHeight,\n Math.min(dragWidth - dragHelperHeight, dragX - dragHelperHeight)\n );\n dragY = Math.max(\n -dragHelperHeight,\n Math.min(dragHeight - dragHelperHeight, dragY - dragHelperHeight)\n );\n dragHelper.css({\n top: dragY + 'px',\n left: dragX + 'px'\n });\n\n var alphaX = currentAlpha * alphaWidth;\n alphaSlideHelper.css({\n left: alphaX - alphaSlideHelperWidth / 2 + 'px'\n });\n\n // Where to show the bar that displays your current selected hue\n var slideY = currentHue * slideHeight;\n slideHelper.css({\n top: slideY - slideHelperHeight + 'px'\n });\n }\n }\n\n function updateOriginalInput(fireCallback) {\n var color = get(),\n displayColor = '',\n hasChanged = !tinycolor.equals(color, colorOnShow);\n\n if (color) {\n displayColor = color.toString(currentPreferredFormat);\n // Update the selection palette with the current color\n addColorToSelectionPalette(color);\n }\n\n if (isInput) {\n boundElement.val(displayColor);\n }\n\n if (fireCallback && hasChanged) {\n callbacks.change(color);\n boundElement.trigger('change', [color]);\n }\n }\n\n function reflow() {\n if (!visible) {\n return; // Calculations would be useless and wouldn't be reliable anyways\n }\n dragWidth = dragger.width();\n dragHeight = dragger.height();\n dragHelperHeight = dragHelper.height();\n slideWidth = slider.width();\n slideHeight = slider.height();\n slideHelperHeight = slideHelper.height();\n alphaWidth = alphaSlider.width();\n alphaSlideHelperWidth = alphaSlideHelper.width();\n\n if (!flat) {\n container.css('position', 'absolute');\n if (opts.offset) {\n container.offset(opts.offset);\n } else {\n container.offset(getOffset(container, offsetElement));\n }\n }\n\n updateHelperLocations();\n\n if (opts.showPalette) {\n drawPalette();\n }\n\n boundElement.trigger('reflow.spectrum');\n }\n\n function destroy() {\n boundElement.show();\n offsetElement.unbind('click.spectrum touchstart.spectrum');\n container.remove();\n replacer.remove();\n spectrums[spect.id] = null;\n }\n\n function option(optionName, optionValue) {\n if (optionName === undefined) {\n return $.extend({}, opts);\n }\n if (optionValue === undefined) {\n return opts[optionName];\n }\n\n opts[optionName] = optionValue;\n\n if (optionName === 'preferredFormat') {\n currentPreferredFormat = opts.preferredFormat;\n }\n applyOptions();\n }\n\n function enable() {\n disabled = false;\n boundElement.attr('disabled', false);\n offsetElement.removeClass('sp-disabled');\n }\n\n function disable() {\n hide();\n disabled = true;\n boundElement.attr('disabled', true);\n offsetElement.addClass('sp-disabled');\n }\n\n function setOffset(coord) {\n opts.offset = coord;\n reflow();\n }\n\n initialize();\n\n var spect = {\n show: show,\n hide: hide,\n toggle: toggle,\n reflow: reflow,\n option: option,\n enable: enable,\n disable: disable,\n offset: setOffset,\n set: function(c) {\n set(c);\n updateOriginalInput();\n },\n get: get,\n destroy: destroy,\n container: container\n };\n\n spect.id = spectrums.push(spect) - 1;\n\n return spect;\n }\n\n /**\n * checkOffset - get the offset below/above and left/right element depending on screen position\n * Thanks https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js\n */\n function getOffset(picker, input) {\n var extraY = 0;\n var dpWidth = picker.outerWidth();\n var dpHeight = picker.outerHeight();\n var inputHeight = input.outerHeight();\n var doc = picker[0].ownerDocument;\n var docElem = doc.documentElement;\n var cW = docElem.clientWidth;\n var cH = docElem.clientHeight;\n var scL = $(doc).scrollLeft();\n var scT = $(doc).scrollTop();\n var viewWidth = cW + scL;\n var viewHeight = cH + scT;\n var offset = input.offset();\n\n offset.top += inputHeight;\n\n offset.left -= Math.min(\n offset.left,\n offset.left + dpWidth > viewWidth && viewWidth > dpWidth\n ? Math.abs(offset.left + dpWidth - viewWidth)\n : 0\n );\n\n offset.top -= Math.min(\n offset.top,\n offset.top + dpHeight > viewHeight && viewHeight > dpHeight\n ? Math.abs(dpHeight + inputHeight - extraY)\n : extraY\n );\n\n return offset;\n }\n\n /**\n * noop - do nothing\n */\n function noop() {}\n\n /**\n * stopPropagation - makes the code only doing this a little easier to read in line\n */\n function stopPropagation(e) {\n e.stopPropagation();\n }\n\n /**\n * Create a function bound to a given object\n * Thanks to underscore.js\n */\n function bind(func, obj) {\n var slice = Array.prototype.slice;\n var args = slice.call(arguments, 2);\n return function() {\n return func.apply(obj, args.concat(slice.call(arguments)));\n };\n }\n\n /**\n * Lightweight drag helper. Handles containment within the element, so that\n * when dragging, the x is within [0,element.width] and y is within [0,element.height]\n */\n function draggable(element, onmove, onstart, onstop) {\n onmove = onmove || function() {};\n onstart = onstart || function() {};\n onstop = onstop || function() {};\n var doc = document;\n var dragging = false;\n var offset = {};\n var maxHeight = 0;\n var maxWidth = 0;\n var hasTouch = 'ontouchstart' in window;\n\n var duringDragEvents = {};\n duringDragEvents['selectstart'] = prevent;\n duringDragEvents['dragstart'] = prevent;\n duringDragEvents['touchmove mousemove'] = move;\n duringDragEvents['touchend mouseup'] = stop;\n\n function prevent(e) {\n if (e.stopPropagation) {\n e.stopPropagation();\n }\n if (e.preventDefault) {\n e.preventDefault();\n }\n e.returnValue = false;\n }\n\n function move(e) {\n if (dragging) {\n // Mouseup happened outside of window\n if (IE && doc.documentMode < 9 && !e.button) {\n return stop();\n }\n\n var t0 =\n e.originalEvent &&\n e.originalEvent.touches &&\n e.originalEvent.touches[0];\n var pageX = (t0 && t0.pageX) || e.pageX;\n var pageY = (t0 && t0.pageY) || e.pageY;\n\n var dragX = Math.max(0, Math.min(pageX - offset.left, maxWidth));\n var dragY = Math.max(0, Math.min(pageY - offset.top, maxHeight));\n\n if (hasTouch) {\n // Stop scrolling in iOS\n prevent(e);\n }\n\n onmove.apply(element, [dragX, dragY, e]);\n }\n }\n\n function start(e) {\n var rightclick = e.which ? e.which == 3 : e.button == 2;\n\n if (!rightclick && !dragging) {\n if (onstart.apply(element, arguments) !== false) {\n dragging = true;\n maxHeight = $(element).height();\n maxWidth = $(element).width();\n offset = $(element).offset();\n\n $(doc).bind(duringDragEvents);\n $(doc.body).addClass('sp-dragging');\n\n move(e);\n\n prevent(e);\n }\n }\n }\n\n function stop() {\n if (dragging) {\n $(doc).unbind(duringDragEvents);\n $(doc.body).removeClass('sp-dragging');\n\n // Wait a tick before notifying observers to allow the click event\n // to fire in Chrome.\n setTimeout(function() {\n onstop.apply(element, arguments);\n }, 0);\n }\n dragging = false;\n }\n\n $(element).bind('touchstart mousedown', start);\n }\n\n function throttle(func, wait, debounce) {\n var timeout;\n return function() {\n var context = this,\n args = arguments;\n var throttler = function() {\n timeout = null;\n func.apply(context, args);\n };\n if (debounce) clearTimeout(timeout);\n if (debounce || !timeout) timeout = setTimeout(throttler, wait);\n };\n }\n\n function inputTypeColorSupport() {\n return $.fn.spectrum.inputTypeColorSupport();\n }\n\n /**\n * Define a jQuery plugin\n */\n var dataID = 'spectrum.id';\n $.fn.spectrum = function(opts, extra) {\n if (typeof opts == 'string') {\n var returnValue = this;\n var args = Array.prototype.slice.call(arguments, 1);\n\n this.each(function() {\n var spect = spectrums[$(this).data(dataID)];\n if (spect) {\n var method = spect[opts];\n if (!method) {\n throw new Error(\"Spectrum: no such method: '\" + opts + \"'\");\n }\n\n if (opts == 'get') {\n returnValue = spect.get();\n } else if (opts == 'container') {\n returnValue = spect.container;\n } else if (opts == 'option') {\n returnValue = spect.option.apply(spect, args);\n } else if (opts == 'destroy') {\n spect.destroy();\n $(this).removeData(dataID);\n } else {\n method.apply(spect, args);\n }\n }\n });\n\n return returnValue;\n }\n\n // Initializing a new instance of spectrum\n return this.spectrum('destroy').each(function() {\n var options = $.extend({}, opts, $(this).data());\n var spect = spectrum(this, options);\n $(this).data(dataID, spect.id);\n });\n };\n\n $.fn.spectrum.load = true;\n $.fn.spectrum.loadOpts = {};\n $.fn.spectrum.draggable = draggable;\n $.fn.spectrum.defaults = defaultOpts;\n $.fn.spectrum.inputTypeColorSupport = function inputTypeColorSupport() {\n if (typeof inputTypeColorSupport._cachedResult === 'undefined') {\n var colorInput = $(\"\")[0]; // if color element is supported, value will default to not null\n inputTypeColorSupport._cachedResult =\n colorInput.type === 'color' && colorInput.value !== '';\n }\n return inputTypeColorSupport._cachedResult;\n };\n\n $.spectrum = {};\n $.spectrum.localization = {};\n $.spectrum.palettes = {};\n\n $.fn.spectrum.processNativeColorInputs = function() {\n var colorInputs = $('input[type=color]');\n if (colorInputs.length && !inputTypeColorSupport()) {\n colorInputs.spectrum({\n preferredFormat: 'hex6'\n });\n }\n };\n\n // TinyColor v1.1.2\n // https://github.com/bgrins/TinyColor\n // Brian Grinstead, MIT License\n\n //(function() {\n\n var trimLeft = /^[\\s,#]+/,\n trimRight = /\\s+$/,\n tinyCounter = 0,\n math = Math,\n mathRound = math.round,\n mathMin = math.min,\n mathMax = math.max,\n mathRandom = math.random;\n\n var tinycolor = function(color, opts) {\n color = color ? color : '';\n opts = opts || {};\n\n // If input is already a tinycolor, return itself\n if (color instanceof tinycolor) {\n return color;\n }\n // If we are called as a function, call using new instead\n if (!(this instanceof tinycolor)) {\n return new tinycolor(color, opts);\n }\n\n var rgb = inputToRGB(color);\n (this._originalInput = color),\n (this._r = rgb.r),\n (this._g = rgb.g),\n (this._b = rgb.b),\n (this._a = rgb.a),\n (this._roundA = mathRound(100 * this._a) / 100),\n (this._format = opts.format || rgb.format);\n this._gradientType = opts.gradientType;\n\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1\n // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n if (this._r < 1) {\n this._r = mathRound(this._r);\n }\n if (this._g < 1) {\n this._g = mathRound(this._g);\n }\n if (this._b < 1) {\n this._b = mathRound(this._b);\n }\n\n this._ok = rgb.ok;\n this._tc_id = tinyCounter++;\n };\n\n tinycolor.prototype = {\n isDark: function() {\n return this.getBrightness() < 128;\n },\n isLight: function() {\n return !this.isDark();\n },\n isValid: function() {\n return this._ok;\n },\n getOriginalInput: function() {\n return this._originalInput;\n },\n getFormat: function() {\n return this._format;\n },\n getAlpha: function() {\n return this._a;\n },\n getBrightness: function() {\n var rgb = this.toRgb();\n return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n },\n setAlpha: function(value) {\n this._a = boundAlpha(value);\n this._roundA = mathRound(100 * this._a) / 100;\n return this;\n },\n toHsv: function() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };\n },\n toHsvString: function() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n var h = mathRound(hsv.h * 360),\n s = mathRound(hsv.s * 100),\n v = mathRound(hsv.v * 100);\n return this._a == 1\n ? 'hsv(' + h + ', ' + s + '%, ' + v + '%)'\n : 'hsva(' + h + ', ' + s + '%, ' + v + '%, ' + this._roundA + ')';\n },\n toHsl: function() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };\n },\n toHslString: function() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n var h = mathRound(hsl.h * 360),\n s = mathRound(hsl.s * 100),\n l = mathRound(hsl.l * 100);\n return this._a == 1\n ? 'hsl(' + h + ', ' + s + '%, ' + l + '%)'\n : 'hsla(' + h + ', ' + s + '%, ' + l + '%, ' + this._roundA + ')';\n },\n toHex: function(allow3Char) {\n return rgbToHex(this._r, this._g, this._b, allow3Char);\n },\n toHexString: function(allow3Char) {\n return '#' + this.toHex(allow3Char);\n },\n toHex8: function() {\n return rgbaToHex(this._r, this._g, this._b, this._a);\n },\n toHex8String: function() {\n return '#' + this.toHex8();\n },\n toRgb: function() {\n return {\n r: mathRound(this._r),\n g: mathRound(this._g),\n b: mathRound(this._b),\n a: this._a\n };\n },\n toRgbString: function() {\n return this._a == 1\n ? 'rgb(' +\n mathRound(this._r) +\n ', ' +\n mathRound(this._g) +\n ', ' +\n mathRound(this._b) +\n ')'\n : 'rgba(' +\n mathRound(this._r) +\n ', ' +\n mathRound(this._g) +\n ', ' +\n mathRound(this._b) +\n ', ' +\n this._roundA +\n ')';\n },\n toPercentageRgb: function() {\n return {\n r: mathRound(bound01(this._r, 255) * 100) + '%',\n g: mathRound(bound01(this._g, 255) * 100) + '%',\n b: mathRound(bound01(this._b, 255) * 100) + '%',\n a: this._a\n };\n },\n toPercentageRgbString: function() {\n return this._a == 1\n ? 'rgb(' +\n mathRound(bound01(this._r, 255) * 100) +\n '%, ' +\n mathRound(bound01(this._g, 255) * 100) +\n '%, ' +\n mathRound(bound01(this._b, 255) * 100) +\n '%)'\n : 'rgba(' +\n mathRound(bound01(this._r, 255) * 100) +\n '%, ' +\n mathRound(bound01(this._g, 255) * 100) +\n '%, ' +\n mathRound(bound01(this._b, 255) * 100) +\n '%, ' +\n this._roundA +\n ')';\n },\n toName: function() {\n if (this._a === 0) {\n return 'transparent';\n }\n\n if (this._a < 1) {\n return false;\n }\n\n return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;\n },\n toFilter: function(secondColor) {\n var hex8String = '#' + rgbaToHex(this._r, this._g, this._b, this._a);\n var secondHex8String = hex8String;\n var gradientType = this._gradientType ? 'GradientType = 1, ' : '';\n\n if (secondColor) {\n var s = tinycolor(secondColor);\n secondHex8String = s.toHex8String();\n }\n\n return (\n 'progid:DXImageTransform.Microsoft.gradient(' +\n gradientType +\n 'startColorstr=' +\n hex8String +\n ',endColorstr=' +\n secondHex8String +\n ')'\n );\n },\n toString: function(format) {\n var formatSet = !!format;\n format = format || this._format;\n\n var formattedString = false;\n var hasAlpha = this._a < 1 && this._a >= 0;\n var needsAlphaFormat =\n !formatSet &&\n hasAlpha &&\n (format === 'hex' ||\n format === 'hex6' ||\n format === 'hex3' ||\n format === 'name');\n\n if (needsAlphaFormat) {\n // Special case for \"transparent\", all other non-alpha formats\n // will return rgba when there is transparency.\n if (format === 'name' && this._a === 0) {\n return this.toName();\n }\n return this.toRgbString();\n }\n if (format === 'rgb') {\n formattedString = this.toRgbString();\n }\n if (format === 'prgb') {\n formattedString = this.toPercentageRgbString();\n }\n if (format === 'hex' || format === 'hex6') {\n formattedString = this.toHexString();\n }\n if (format === 'hex3') {\n formattedString = this.toHexString(true);\n }\n if (format === 'hex8') {\n formattedString = this.toHex8String();\n }\n if (format === 'name') {\n formattedString = this.toName();\n }\n if (format === 'hsl') {\n formattedString = this.toHslString();\n }\n if (format === 'hsv') {\n formattedString = this.toHsvString();\n }\n\n return formattedString || this.toHexString();\n },\n\n _applyModification: function(fn, args) {\n var color = fn.apply(null, [this].concat([].slice.call(args)));\n this._r = color._r;\n this._g = color._g;\n this._b = color._b;\n this.setAlpha(color._a);\n return this;\n },\n lighten: function() {\n return this._applyModification(lighten, arguments);\n },\n brighten: function() {\n return this._applyModification(brighten, arguments);\n },\n darken: function() {\n return this._applyModification(darken, arguments);\n },\n desaturate: function() {\n return this._applyModification(desaturate, arguments);\n },\n saturate: function() {\n return this._applyModification(saturate, arguments);\n },\n greyscale: function() {\n return this._applyModification(greyscale, arguments);\n },\n spin: function() {\n return this._applyModification(spin, arguments);\n },\n\n _applyCombination: function(fn, args) {\n return fn.apply(null, [this].concat([].slice.call(args)));\n },\n analogous: function() {\n return this._applyCombination(analogous, arguments);\n },\n complement: function() {\n return this._applyCombination(complement, arguments);\n },\n monochromatic: function() {\n return this._applyCombination(monochromatic, arguments);\n },\n splitcomplement: function() {\n return this._applyCombination(splitcomplement, arguments);\n },\n triad: function() {\n return this._applyCombination(triad, arguments);\n },\n tetrad: function() {\n return this._applyCombination(tetrad, arguments);\n }\n };\n\n // If input is an object, force 1 into \"1.0\" to handle ratios properly\n // String input requires \"1.0\" as input, so 1 will be treated as 1\n tinycolor.fromRatio = function(color, opts) {\n if (typeof color == 'object') {\n var newColor = {};\n for (var i in color) {\n if (color.hasOwnProperty(i)) {\n if (i === 'a') {\n newColor[i] = color[i];\n } else {\n newColor[i] = convertToPercentage(color[i]);\n }\n }\n }\n color = newColor;\n }\n\n return tinycolor(color, opts);\n };\n\n // Given a string or object, convert that input to RGB\n // Possible string inputs:\n //\n // \"red\"\n // \"#f00\" or \"f00\"\n // \"#ff0000\" or \"ff0000\"\n // \"#ff000000\" or \"ff000000\"\n // \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n // \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n // \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n // \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n // \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n // \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n // \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n //\n function inputToRGB(color) {\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var ok = false;\n var format = false;\n\n if (typeof color == 'string') {\n color = stringInputToObject(color);\n }\n\n if (typeof color == 'object') {\n if (\n color.hasOwnProperty('r') &&\n color.hasOwnProperty('g') &&\n color.hasOwnProperty('b')\n ) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n } else if (\n color.hasOwnProperty('h') &&\n color.hasOwnProperty('s') &&\n color.hasOwnProperty('v')\n ) {\n color.s = convertToPercentage(color.s);\n color.v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, color.s, color.v);\n ok = true;\n format = 'hsv';\n } else if (\n color.hasOwnProperty('h') &&\n color.hasOwnProperty('s') &&\n color.hasOwnProperty('l')\n ) {\n color.s = convertToPercentage(color.s);\n color.l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, color.s, color.l);\n ok = true;\n format = 'hsl';\n }\n\n if (color.hasOwnProperty('a')) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n }\n\n // Conversion Functions\n // --------------------\n\n // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n // \n\n // `rgbToRgb`\n // Handle bounds / percentage checking to conform to CSS color spec\n // \n // *Assumes:* r, g, b in [0, 255] or [0, 1]\n // *Returns:* { r, g, b } in [0, 255]\n function rgbToRgb(r, g, b) {\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255\n };\n }\n\n // `rgbToHsl`\n // Converts an RGB color value to HSL.\n // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n // *Returns:* { h, s, l } in [0,1]\n function rgbToHsl(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = mathMax(r, g, b),\n min = mathMin(r, g, b);\n var h,\n s,\n l = (max + min) / 2;\n\n if (max == min) {\n h = s = 0; // achromatic\n } else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n\n h /= 6;\n }\n\n return { h: h, s: s, l: l };\n }\n\n // `hslToRgb`\n // Converts an HSL color value to RGB.\n // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n // *Returns:* { r, g, b } in the set [0, 255]\n function hslToRgb(h, s, l) {\n var r, g, b;\n\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n\n function hue2rgb(p, q, t) {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1 / 6) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n }\n\n if (s === 0) {\n r = g = b = l; // achromatic\n } else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n\n return { r: r * 255, g: g * 255, b: b * 255 };\n }\n\n // `rgbToHsv`\n // Converts an RGB color value to HSV\n // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n // *Returns:* { h, s, v } in [0,1]\n function rgbToHsv(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = mathMax(r, g, b),\n min = mathMin(r, g, b);\n var h,\n s,\n v = max;\n\n var d = max - min;\n s = max === 0 ? 0 : d / max;\n\n if (max == min) {\n h = 0; // achromatic\n } else {\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n return { h: h, s: s, v: v };\n }\n\n // `hsvToRgb`\n // Converts an HSV color value to RGB.\n // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n // *Returns:* { r, g, b } in the set [0, 255]\n function hsvToRgb(h, s, v) {\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n\n var i = math.floor(h),\n f = h - i,\n p = v * (1 - s),\n q = v * (1 - f * s),\n t = v * (1 - (1 - f) * s),\n mod = i % 6,\n r = [v, q, p, p, t, v][mod],\n g = [t, v, v, q, p, p][mod],\n b = [p, p, t, v, v, q][mod];\n\n return { r: r * 255, g: g * 255, b: b * 255 };\n }\n\n // `rgbToHex`\n // Converts an RGB color to hex\n // Assumes r, g, and b are contained in the set [0, 255]\n // Returns a 3 or 6 character hex\n function rgbToHex(r, g, b, allow3Char) {\n var hex = [\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n // Return a 3 character hex if possible\n if (\n allow3Char &&\n hex[0].charAt(0) == hex[0].charAt(1) &&\n hex[1].charAt(0) == hex[1].charAt(1) &&\n hex[2].charAt(0) == hex[2].charAt(1)\n ) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n\n return hex.join('');\n }\n // `rgbaToHex`\n // Converts an RGBA color plus alpha transparency to hex\n // Assumes r, g, b and a are contained in the set [0, 255]\n // Returns an 8 character hex\n function rgbaToHex(r, g, b, a) {\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join('');\n }\n\n // `equals`\n // Can be called with any tinycolor input\n tinycolor.equals = function(color1, color2) {\n if (!color1 || !color2) {\n return false;\n }\n return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();\n };\n tinycolor.random = function() {\n return tinycolor.fromRatio({\n r: mathRandom(),\n g: mathRandom(),\n b: mathRandom()\n });\n };\n\n // Modification Functions\n // ----------------------\n // Thanks to less.js for some of the basics here\n // \n\n function desaturate(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.s -= amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n }\n\n function saturate(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.s += amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n }\n\n function greyscale(color) {\n return tinycolor(color).desaturate(100);\n }\n\n function lighten(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.l += amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n }\n\n function brighten(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var rgb = tinycolor(color).toRgb();\n rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * -(amount / 100))));\n rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * -(amount / 100))));\n rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * -(amount / 100))));\n return tinycolor(rgb);\n }\n\n function darken(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.l -= amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n }\n\n // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n // Values outside of this range will be wrapped into this range.\n function spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (mathRound(hsl.h) + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n }\n\n // Combination Functions\n // ---------------------\n // Thanks to jQuery xColor for some of the ideas behind these\n // \n\n function complement(color) {\n var hsl = tinycolor(color).toHsl();\n hsl.h = (hsl.h + 180) % 360;\n return tinycolor(hsl);\n }\n\n function triad(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })\n ];\n }\n\n function tetrad(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })\n ];\n }\n\n function splitcomplement(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l })\n ];\n }\n\n function analogous(color, results, slices) {\n results = results || 6;\n slices = slices || 30;\n\n var hsl = tinycolor(color).toHsl();\n var part = 360 / slices;\n var ret = [tinycolor(color)];\n\n for (hsl.h = (hsl.h - ((part * results) >> 1) + 720) % 360; --results; ) {\n hsl.h = (hsl.h + part) % 360;\n ret.push(tinycolor(hsl));\n }\n return ret;\n }\n\n function monochromatic(color, results) {\n results = results || 6;\n var hsv = tinycolor(color).toHsv();\n var h = hsv.h,\n s = hsv.s,\n v = hsv.v;\n var ret = [];\n var modification = 1 / results;\n\n while (results--) {\n ret.push(tinycolor({ h: h, s: s, v: v }));\n v = (v + modification) % 1;\n }\n\n return ret;\n }\n\n // Utility Functions\n // ---------------------\n\n tinycolor.mix = function(color1, color2, amount) {\n amount = amount === 0 ? 0 : amount || 50;\n\n var rgb1 = tinycolor(color1).toRgb();\n var rgb2 = tinycolor(color2).toRgb();\n\n var p = amount / 100;\n var w = p * 2 - 1;\n var a = rgb2.a - rgb1.a;\n\n var w1;\n\n if (w * a == -1) {\n w1 = w;\n } else {\n w1 = (w + a) / (1 + w * a);\n }\n\n w1 = (w1 + 1) / 2;\n\n var w2 = 1 - w1;\n\n var rgba = {\n r: rgb2.r * w1 + rgb1.r * w2,\n g: rgb2.g * w1 + rgb1.g * w2,\n b: rgb2.b * w1 + rgb1.b * w2,\n a: rgb2.a * p + rgb1.a * (1 - p)\n };\n\n return tinycolor(rgba);\n };\n\n // Readability Functions\n // ---------------------\n // \n\n // `readability`\n // Analyze the 2 colors and returns an object with the following properties:\n // `brightness`: difference in brightness between the two colors\n // `color`: difference in color/hue between the two colors\n tinycolor.readability = function(color1, color2) {\n var c1 = tinycolor(color1);\n var c2 = tinycolor(color2);\n var rgb1 = c1.toRgb();\n var rgb2 = c2.toRgb();\n var brightnessA = c1.getBrightness();\n var brightnessB = c2.getBrightness();\n var colorDiff =\n Math.max(rgb1.r, rgb2.r) -\n Math.min(rgb1.r, rgb2.r) +\n Math.max(rgb1.g, rgb2.g) -\n Math.min(rgb1.g, rgb2.g) +\n Math.max(rgb1.b, rgb2.b) -\n Math.min(rgb1.b, rgb2.b);\n\n return {\n brightness: Math.abs(brightnessA - brightnessB),\n color: colorDiff\n };\n };\n\n // `readable`\n // http://www.w3.org/TR/AERT#color-contrast\n // Ensure that foreground and background color combinations provide sufficient contrast.\n // *Example*\n // tinycolor.isReadable(\"#000\", \"#111\") => false\n tinycolor.isReadable = function(color1, color2) {\n var readability = tinycolor.readability(color1, color2);\n return readability.brightness > 125 && readability.color > 500;\n };\n\n // `mostReadable`\n // Given a base color and a list of possible foreground or background\n // colors for that base, returns the most readable color.\n // *Example*\n // tinycolor.mostReadable(\"#123\", [\"#fff\", \"#000\"]) => \"#000\"\n tinycolor.mostReadable = function(baseColor, colorList) {\n var bestColor = null;\n var bestScore = 0;\n var bestIsReadable = false;\n for (var i = 0; i < colorList.length; i++) {\n // We normalize both around the \"acceptable\" breaking point,\n // but rank brightness constrast higher than hue.\n\n var readability = tinycolor.readability(baseColor, colorList[i]);\n var readable = readability.brightness > 125 && readability.color > 500;\n var score = 3 * (readability.brightness / 125) + readability.color / 500;\n\n if (\n (readable && !bestIsReadable) ||\n (readable && bestIsReadable && score > bestScore) ||\n (!readable && !bestIsReadable && score > bestScore)\n ) {\n bestIsReadable = readable;\n bestScore = score;\n bestColor = tinycolor(colorList[i]);\n }\n }\n return bestColor;\n };\n\n // Big List of Colors\n // ------------------\n // \n var names = (tinycolor.names = {\n aliceblue: 'f0f8ff',\n antiquewhite: 'faebd7',\n aqua: '0ff',\n aquamarine: '7fffd4',\n azure: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '000',\n blanchedalmond: 'ffebcd',\n blue: '00f',\n blueviolet: '8a2be2',\n brown: 'a52a2a',\n burlywood: 'deb887',\n burntsienna: 'ea7e5d',\n cadetblue: '5f9ea0',\n chartreuse: '7fff00',\n chocolate: 'd2691e',\n coral: 'ff7f50',\n cornflowerblue: '6495ed',\n cornsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: '0ff',\n darkblue: '00008b',\n darkcyan: '008b8b',\n darkgoldenrod: 'b8860b',\n darkgray: 'a9a9a9',\n darkgreen: '006400',\n darkgrey: 'a9a9a9',\n darkkhaki: 'bdb76b',\n darkmagenta: '8b008b',\n darkolivegreen: '556b2f',\n darkorange: 'ff8c00',\n darkorchid: '9932cc',\n darkred: '8b0000',\n darksalmon: 'e9967a',\n darkseagreen: '8fbc8f',\n darkslateblue: '483d8b',\n darkslategray: '2f4f4f',\n darkslategrey: '2f4f4f',\n darkturquoise: '00ced1',\n darkviolet: '9400d3',\n deeppink: 'ff1493',\n deepskyblue: '00bfff',\n dimgray: '696969',\n dimgrey: '696969',\n dodgerblue: '1e90ff',\n firebrick: 'b22222',\n floralwhite: 'fffaf0',\n forestgreen: '228b22',\n fuchsia: 'f0f',\n gainsboro: 'dcdcdc',\n ghostwhite: 'f8f8ff',\n gold: 'ffd700',\n goldenrod: 'daa520',\n gray: '808080',\n green: '008000',\n greenyellow: 'adff2f',\n grey: '808080',\n honeydew: 'f0fff0',\n hotpink: 'ff69b4',\n indianred: 'cd5c5c',\n indigo: '4b0082',\n ivory: 'fffff0',\n khaki: 'f0e68c',\n lavender: 'e6e6fa',\n lavenderblush: 'fff0f5',\n lawngreen: '7cfc00',\n lemonchiffon: 'fffacd',\n lightblue: 'add8e6',\n lightcoral: 'f08080',\n lightcyan: 'e0ffff',\n lightgoldenrodyellow: 'fafad2',\n lightgray: 'd3d3d3',\n lightgreen: '90ee90',\n lightgrey: 'd3d3d3',\n lightpink: 'ffb6c1',\n lightsalmon: 'ffa07a',\n lightseagreen: '20b2aa',\n lightskyblue: '87cefa',\n lightslategray: '789',\n lightslategrey: '789',\n lightsteelblue: 'b0c4de',\n lightyellow: 'ffffe0',\n lime: '0f0',\n limegreen: '32cd32',\n linen: 'faf0e6',\n magenta: 'f0f',\n maroon: '800000',\n mediumaquamarine: '66cdaa',\n mediumblue: '0000cd',\n mediumorchid: 'ba55d3',\n mediumpurple: '9370db',\n mediumseagreen: '3cb371',\n mediumslateblue: '7b68ee',\n mediumspringgreen: '00fa9a',\n mediumturquoise: '48d1cc',\n mediumvioletred: 'c71585',\n midnightblue: '191970',\n mintcream: 'f5fffa',\n mistyrose: 'ffe4e1',\n moccasin: 'ffe4b5',\n navajowhite: 'ffdead',\n navy: '000080',\n oldlace: 'fdf5e6',\n olive: '808000',\n olivedrab: '6b8e23',\n orange: 'ffa500',\n orangered: 'ff4500',\n orchid: 'da70d6',\n palegoldenrod: 'eee8aa',\n palegreen: '98fb98',\n paleturquoise: 'afeeee',\n palevioletred: 'db7093',\n papayawhip: 'ffefd5',\n peachpuff: 'ffdab9',\n peru: 'cd853f',\n pink: 'ffc0cb',\n plum: 'dda0dd',\n powderblue: 'b0e0e6',\n purple: '800080',\n rebeccapurple: '663399',\n red: 'f00',\n rosybrown: 'bc8f8f',\n royalblue: '4169e1',\n saddlebrown: '8b4513',\n salmon: 'fa8072',\n sandybrown: 'f4a460',\n seagreen: '2e8b57',\n seashell: 'fff5ee',\n sienna: 'a0522d',\n silver: 'c0c0c0',\n skyblue: '87ceeb',\n slateblue: '6a5acd',\n slategray: '708090',\n slategrey: '708090',\n snow: 'fffafa',\n springgreen: '00ff7f',\n steelblue: '4682b4',\n tan: 'd2b48c',\n teal: '008080',\n thistle: 'd8bfd8',\n tomato: 'ff6347',\n turquoise: '40e0d0',\n violet: 'ee82ee',\n wheat: 'f5deb3',\n white: 'fff',\n whitesmoke: 'f5f5f5',\n yellow: 'ff0',\n yellowgreen: '9acd32'\n });\n\n // Make it easy to access colors via `hexNames[hex]`\n var hexNames = (tinycolor.hexNames = flip(names));\n\n // Utilities\n // ---------\n\n // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`\n function flip(o) {\n var flipped = {};\n for (var i in o) {\n if (o.hasOwnProperty(i)) {\n flipped[o[i]] = i;\n }\n }\n return flipped;\n }\n\n // Return a valid alpha value [0,1] with all invalid values being set to 1\n function boundAlpha(a) {\n a = parseFloat(a);\n\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return a;\n }\n\n // Take input from [0, n] and return it as [0, 1]\n function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n\n var processPercent = isPercentage(n);\n n = mathMin(max, mathMax(0, parseFloat(n)));\n\n // Automatically convert percentage into number\n if (processPercent) {\n n = parseInt(n * max, 10) / 100;\n }\n\n // Handle floating point rounding errors\n if (math.abs(n - max) < 0.000001) {\n return 1;\n }\n\n // Convert into [0, 1] range if it isn't already\n return (n % max) / parseFloat(max);\n }\n\n // Force a number between 0 and 1\n function clamp01(val) {\n return mathMin(1, mathMax(0, val));\n }\n\n // Parse a base-16 hex value into a base-10 integer\n function parseIntFromHex(val) {\n return parseInt(val, 16);\n }\n\n // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n // \n function isOnePointZero(n) {\n return typeof n == 'string' && n.indexOf('.') != -1 && parseFloat(n) === 1;\n }\n\n // Check to see if string passed in is a percentage\n function isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') != -1;\n }\n\n // Force a hex value to have 2 characters\n function pad2(c) {\n return c.length == 1 ? '0' + c : '' + c;\n }\n\n // Replace a decimal with it's percentage value\n function convertToPercentage(n) {\n if (n <= 1) {\n n = n * 100 + '%';\n }\n\n return n;\n }\n\n // Converts a decimal to a hex value\n function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }\n // Converts a hex value to a decimal\n function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n }\n\n var matchers = (function() {\n // \n var CSS_INTEGER = '[-\\\\+]?\\\\d+%?';\n\n // \n var CSS_NUMBER = '[-\\\\+]?\\\\d*\\\\.\\\\d+%?';\n\n // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\n var CSS_UNIT = '(?:' + CSS_NUMBER + ')|(?:' + CSS_INTEGER + ')';\n\n // Actual matching.\n // Parentheses and commas are optional, but not required.\n // Whitespace can take the place of commas or opening paren\n var PERMISSIVE_MATCH3 =\n '[\\\\s|\\\\(]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')\\\\s*\\\\)?';\n var PERMISSIVE_MATCH4 =\n '[\\\\s|\\\\(]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')\\\\s*\\\\)?';\n\n return {\n rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),\n rgba: new RegExp('rgba' + PERMISSIVE_MATCH4),\n hsl: new RegExp('hsl' + PERMISSIVE_MATCH3),\n hsla: new RegExp('hsla' + PERMISSIVE_MATCH4),\n hsv: new RegExp('hsv' + PERMISSIVE_MATCH3),\n hsva: new RegExp('hsva' + PERMISSIVE_MATCH4),\n hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex8: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/\n };\n })();\n\n // `stringInputToObject`\n // Permissive string parsing. Take in a number of formats, and output an object\n // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\n function stringInputToObject(color) {\n color = color\n .replace(trimLeft, '')\n .replace(trimRight, '')\n .toLowerCase();\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n } else if (color == 'transparent') {\n return { r: 0, g: 0, b: 0, a: 0, format: 'name' };\n }\n\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match;\n if ((match = matchers.rgb.exec(color))) {\n return { r: match[1], g: match[2], b: match[3] };\n }\n if ((match = matchers.rgba.exec(color))) {\n return { r: match[1], g: match[2], b: match[3], a: match[4] };\n }\n if ((match = matchers.hsl.exec(color))) {\n return { h: match[1], s: match[2], l: match[3] };\n }\n if ((match = matchers.hsla.exec(color))) {\n return { h: match[1], s: match[2], l: match[3], a: match[4] };\n }\n if ((match = matchers.hsv.exec(color))) {\n return { h: match[1], s: match[2], v: match[3] };\n }\n if ((match = matchers.hsva.exec(color))) {\n return { h: match[1], s: match[2], v: match[3], a: match[4] };\n }\n if ((match = matchers.hex8.exec(color))) {\n return {\n a: convertHexToDecimal(match[1]),\n r: parseIntFromHex(match[2]),\n g: parseIntFromHex(match[3]),\n b: parseIntFromHex(match[4]),\n format: named ? 'name' : 'hex8'\n };\n }\n if ((match = matchers.hex6.exec(color))) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? 'name' : 'hex'\n };\n }\n if ((match = matchers.hex3.exec(color))) {\n return {\n r: parseIntFromHex(match[1] + '' + match[1]),\n g: parseIntFromHex(match[2] + '' + match[2]),\n b: parseIntFromHex(match[3] + '' + match[3]),\n format: named ? 'name' : 'hex'\n };\n }\n\n return false;\n }\n\n window.tinycolor = tinycolor;\n //})();\n\n $(function() {\n if ($.fn.spectrum.load) {\n $.fn.spectrum.processNativeColorInputs();\n }\n });\n}\n","import Backbone from 'backbone';\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n index: '',\n value: '',\n values: {},\n active: false,\n preview: false,\n properties: []\n },\n\n initialize() {\n const Properties = require('./Properties');\n const properties = this.get('properties');\n var value = this.get('value');\n this.set(\n 'properties',\n properties instanceof Properties ? properties : new Properties(properties)\n );\n\n // If there is no value I'll try to get it from values\n // I need value setted to make preview working\n if (!value) {\n var val = '';\n var values = this.get('values');\n\n for (var prop in values) {\n val += ' ' + values[prop];\n }\n\n this.set('value', val.trim());\n }\n },\n\n getPropertyValue(property) {\n let result = '';\n this.get('properties').each(prop => {\n if (prop.get('property') == property) {\n result = prop.getFullValue();\n }\n });\n return result;\n },\n\n getFullValue() {\n let result = [];\n this.get('properties').each(prop => result.push(prop.getFullValue()));\n return result.join(' ');\n }\n});\n","import Backbone from 'backbone';\nconst Layer = require('./Layer');\n\nmodule.exports = Backbone.Collection.extend({\n model: Layer,\n\n initialize() {\n this.idx = 1;\n this.on('add', this.onAdd);\n this.on('reset', this.onReset);\n },\n\n onAdd(model, c, opts) {\n if (!opts.noIncrement) model.set('index', this.idx++);\n },\n\n onReset() {\n this.idx = 1;\n },\n\n /**\n * Get layers from a value string (for not detached properties),\n * example of input:\n * `layer1Value, layer2Value, layer3Value, ...`\n * @param {string} value\n * @return {Array}\n * @private\n */\n getLayersFromValue(value) {\n const layers = [];\n // Remove spaces inside functions, eg:\n // From: 1px 1px rgba(2px, 2px, 2px), 2px 2px rgba(3px, 3px, 3px)\n // To: 1px 1px rgba(2px,2px,2px), 2px 2px rgba(3px,3px,3px)\n value.replace(/\\(([\\w\\s,.]*)\\)/g, match => {\n var cleaned = match.replace(/,\\s*/g, ',');\n value = value.replace(match, cleaned);\n });\n const layerValues = value ? value.split(', ') : [];\n layerValues.forEach(layerValue => {\n layers.push({ properties: this.properties.parseValue(layerValue) });\n });\n return layers;\n },\n\n /**\n * Get layers from a style object (for detached properties),\n * example of input:\n * {\n * subPropname1: sub-propvalue11, sub-propvalue12, sub-propvalue13, ...\n * subPropname2: sub-propvalue21, sub-propvalue22, sub-propvalue23, ...\n * subPropname3: sub-propvalue31, sub-propvalue32, sub-propvalue33, ...\n * }\n * @param {Object} styleObj\n * @return {Array}\n * @private\n */\n getLayersFromStyle(styleObj) {\n const layers = [];\n const properties = this.properties;\n const propNames = properties.pluck('property');\n\n properties.each(propModel => {\n const style = styleObj[propModel.get('property')];\n const values = style ? style.split(', ') : [];\n values.forEach((value, i) => {\n value = propModel.parseValue(value.trim()).value;\n const layer = layers[i];\n const propertyObj = { ...propModel.attributes, ...{ value } };\n\n if (layer) {\n layer.properties.push(propertyObj);\n } else {\n layers[i] = {\n properties: [propertyObj]\n };\n }\n });\n });\n\n // Now whit all layers in, will check missing properties\n layers.forEach(layer => {\n const layerProprs = layer.properties.map(prop => prop.property);\n properties.each(propModel => {\n const propertyName = propModel.get('property');\n\n if (layerProprs.indexOf(propertyName) < 0) {\n layer.properties.push({ ...propModel.attributes });\n }\n });\n });\n\n return layers;\n },\n\n active(index) {\n this.each(layer => layer.set('active', 0));\n const layer = this.at(index);\n layer && layer.set('active', 1);\n },\n\n getFullValue() {\n let result = [];\n this.each(layer => result.push(layer.getFullValue()));\n return result.join(', ');\n },\n\n getPropertyValues(property) {\n const result = [];\n this.each(layer => {\n const value = layer.getPropertyValue(property);\n value && result.push(value);\n });\n return result.join(', ');\n }\n});\n","const Property = require('./PropertyComposite');\nconst Layers = require('./Layers');\n\nmodule.exports = Property.extend({\n defaults: {\n ...Property.prototype.defaults,\n // Array of layers (which contain properties)\n layers: [],\n\n // Layer preview\n preview: 0\n },\n\n init() {\n Property.prototype.init.apply(this, arguments);\n const layers = this.get('layers');\n const layersColl = new Layers(layers);\n layersColl.properties = this.get('properties');\n this.set('layers', layersColl);\n },\n\n getFullValue() {\n return this.get('detached') ? '' : this.get('layers').getFullValue();\n }\n});\n","import { extend } from 'underscore';\n\nconst Backbone = require('backbone');\nconst Properties = require('./Properties');\nconst PropertyFactory = require('./PropertyFactory');\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n id: '',\n name: '',\n open: true,\n buildProps: '',\n extendBuilded: 1,\n properties: []\n },\n\n initialize(opts) {\n var o = opts || {};\n var props = [];\n var builded = this.buildProperties(o.buildProps);\n !this.get('id') && this.set('id', this.get('name'));\n\n if (!builded) props = this.get('properties');\n else props = this.extendProperties(builded);\n\n var propsModel = new Properties(props);\n propsModel.sector = this;\n this.set('properties', propsModel);\n },\n\n /**\n * Extend properties\n * @param {Array} props Start properties\n * @param {Array} moProps Model props\n * @param {Boolean} ex Returns the same amount of passed model props\n * @return {Array} Final props\n * @private\n */\n extendProperties(props, moProps, ex) {\n var pLen = props.length;\n var mProps = moProps || this.get('properties');\n var ext = this.get('extendBuilded');\n var isolated = [];\n\n for (var i = 0, len = mProps.length; i < len; i++) {\n var mProp = mProps[i];\n var found = 0;\n\n for (var j = 0; j < pLen; j++) {\n var prop = props[j];\n if (mProp.property == prop.property || mProp.id == prop.property) {\n // Check for nested properties\n var mPProps = mProp.properties;\n if (mPProps && mPProps.length) {\n mProp.properties = this.extendProperties(\n prop.properties,\n mPProps,\n 1\n );\n }\n props[j] = ext ? extend(prop, mProp) : mProp;\n isolated[j] = props[j];\n found = 1;\n continue;\n }\n }\n\n if (!found) {\n props.push(mProp);\n isolated.push(mProp);\n }\n }\n\n return ex ? isolated : props;\n },\n\n /**\n * Build properties\n * @param {Array} propr Array of props as sting\n * @return {Array}\n * @private\n */\n buildProperties(props) {\n var r;\n var buildP = props || [];\n\n if (!buildP.length) return;\n\n if (!this.propFactory) this.propFactory = new PropertyFactory();\n\n r = this.propFactory.build(buildP);\n\n return r;\n }\n});\n","const Sector = require('./Sector');\n\nmodule.exports = require('backbone').Collection.extend({\n model: Sector\n});\n","module.exports = {\n stylePrefix: 'sm-',\n\n sectors: [],\n\n // Specify the element to use as a container, string (query) or HTMLElement\n // With the empty value, nothing will be rendered\n appendTo: '',\n\n // Text to show in case no element selected\n textNoElement: 'Select an element before using Style Manager',\n\n // Hide the property in case it's not stylable for the\n // selected component (each component has 'stylable' property)\n hideNotStylable: true,\n\n // Highlight changed properties of the selected component\n highlightChanged: true,\n\n // Highlight computed properties of the selected component\n highlightComputed: true,\n\n // Show computed properties of the selected component, if this value\n // is set to false, highlightComputed will not take effect\n showComputed: true,\n\n // Adds the possibility to clear property value from the target style\n clearProperties: 0,\n\n // Properties not to take in account for computed styles\n avoidComputed: ['width', 'height']\n};\n","module.exports = {\n stylePrefix: 'rte-',\n\n // If true, moves the toolbar below the element when the top canvas\n // edge is reached\n adjustToolbar: 1,\n\n // Default RTE actions\n actions: ['bold', 'italic', 'underline', 'strikethrough', 'link']\n};\n","// The initial version of this RTE was borrowed from https://github.com/jaredreich/pell\n// and adapted to the GrapesJS's need\n\nimport { on, off } from 'utils/mixins';\n\nconst RTE_KEY = '_rte';\n\nconst defActions = {\n bold: {\n name: 'bold',\n icon: 'B',\n attributes: { title: 'Bold' },\n result: rte => rte.exec('bold')\n },\n italic: {\n name: 'italic',\n icon: 'I',\n attributes: { title: 'Italic' },\n result: rte => rte.exec('italic')\n },\n underline: {\n name: 'underline',\n icon: 'U',\n attributes: { title: 'Underline' },\n result: rte => rte.exec('underline')\n },\n strikethrough: {\n name: 'strikethrough',\n icon: 'S',\n attributes: { title: 'Strike-through' },\n result: rte => rte.exec('strikeThrough')\n },\n link: {\n icon: ``,\n name: 'link',\n attributes: {\n style: 'font-size:1.4rem;padding:0 4px 2px;',\n title: 'Link'\n },\n result: rte =>\n rte.insertHTML(`${rte.selection()}`)\n }\n};\n\nexport default class RichTextEditor {\n constructor(settings = {}) {\n const el = settings.el;\n\n if (el[RTE_KEY]) {\n return el[RTE_KEY];\n }\n\n el[RTE_KEY] = this;\n this.setEl(el);\n this.updateActiveActions = this.updateActiveActions.bind(this);\n\n const settAct = settings.actions || [];\n settAct.forEach((action, i) => {\n if (typeof action === 'string') {\n action = defActions[action];\n } else if (defActions[action.name]) {\n action = { ...defActions[action.name], ...action };\n }\n settAct[i] = action;\n });\n const actions = settAct.length\n ? settAct\n : Object.keys(defActions).map(action => defActions[action]);\n\n settings.classes = {\n ...{\n actionbar: 'actionbar',\n button: 'action',\n active: 'active'\n },\n ...settings.classes\n };\n\n const classes = settings.classes;\n let actionbar = settings.actionbar;\n this.actionbar = actionbar;\n this.settings = settings;\n this.classes = classes;\n this.actions = actions;\n\n if (!actionbar) {\n const actionbarCont = settings.actionbarContainer;\n actionbar = document.createElement('div');\n actionbar.className = classes.actionbar;\n actionbarCont.appendChild(actionbar);\n this.actionbar = actionbar;\n actions.forEach(action => this.addAction(action));\n }\n\n settings.styleWithCSS && this.exec('styleWithCSS');\n this.syncActions();\n\n return this;\n }\n\n setEl(el) {\n this.el = el;\n this.doc = el.ownerDocument;\n }\n\n updateActiveActions() {\n this.getActions().forEach(action => {\n const btn = action.btn;\n const update = action.update;\n const active = this.classes.active;\n const name = action.name;\n const doc = this.doc;\n btn.className = btn.className.replace(active, '').trim();\n\n // doc.queryCommandValue(name) != 'false'\n if (doc.queryCommandSupported(name) && doc.queryCommandState(name)) {\n btn.className += ` ${active}`;\n }\n\n update && update(this, action);\n });\n }\n\n enable() {\n if (this.enabled) {\n return this;\n }\n\n this.actionbarEl().style.display = '';\n this.el.contentEditable = true;\n on(this.el, 'mouseup keyup', this.updateActiveActions);\n this.syncActions();\n this.updateActiveActions();\n this.el.focus();\n this.enabled = 1;\n return this;\n }\n\n disable() {\n this.actionbarEl().style.display = 'none';\n this.el.contentEditable = false;\n off(this.el, 'mouseup keyup', this.updateActiveActions);\n this.enabled = 0;\n return this;\n }\n\n /**\n * Sync actions with the current RTE\n */\n syncActions() {\n this.getActions().forEach(action => {\n const event = action.event || 'click';\n action.btn[`on${event}`] = e => {\n action.result(this, action);\n this.updateActiveActions();\n };\n });\n }\n\n /**\n * Add new action to the actionbar\n * @param {Object} action\n * @param {Object} [opts={}]\n */\n addAction(action, opts = {}) {\n const sync = opts.sync;\n const btn = document.createElement('span');\n const icon = action.icon;\n const attr = action.attributes || {};\n btn.className = this.classes.button;\n action.btn = btn;\n\n for (let key in attr) {\n btn.setAttribute(key, attr[key]);\n }\n\n if (typeof icon == 'string') {\n btn.innerHTML = icon;\n } else {\n btn.appendChild(icon);\n }\n\n this.actionbarEl().appendChild(btn);\n\n if (sync) {\n this.actions.push(action);\n this.syncActions();\n }\n }\n\n /**\n * Get the array of current actions\n * @return {Array}\n */\n getActions() {\n return this.actions;\n }\n\n /**\n * Returns the Selection instance\n * @return {Selection}\n */\n selection() {\n return this.doc.getSelection();\n }\n\n /**\n * Execute the command\n * @param {string} command Command name\n * @param {any} [value=null Command's arguments\n */\n exec(command, value = null) {\n this.doc.execCommand(command, false, value);\n }\n\n /**\n * Get the actionbar element\n * @return {HTMLElement}\n */\n actionbarEl() {\n return this.actionbar;\n }\n\n /**\n * Set custom HTML to the selection, useful as the default 'insertHTML' command\n * doesn't work in the same way on all browsers\n * @param {string} value HTML string\n */\n insertHTML(value) {\n let lastNode;\n const doc = this.doc;\n const sel = doc.getSelection();\n\n if (sel && sel.rangeCount) {\n const node = doc.createElement('div');\n const range = sel.getRangeAt(0);\n range.deleteContents();\n node.innerHTML = value;\n Array.prototype.slice.call(node.childNodes).forEach(nd => {\n range.insertNode(nd);\n lastNode = nd;\n });\n\n sel.removeAllRanges();\n sel.addRange(range);\n this.el.focus();\n }\n }\n}\n","/**\n * This module allows to customize the built-in toolbar of the Rich Text Editor and use commands from the [HTML Editing APIs](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand).\n * It's highly recommended to keep this toolbar as small as possible, especially from styling commands (eg. 'fontSize') and leave this task to the Style Manager\n *\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/rich_text_editor/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * rte: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const rte = editor.RichTextEditor;\n * ```\n *\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getall)\n * * [remove](#remove)\n * * [getToolbarEl](#gettoolbarel)\n *\n * @module RichTextEditor\n */\n\nimport RichTextEditor from './model/RichTextEditor';\nimport { on, off } from 'utils/mixins';\n\nmodule.exports = () => {\n let config = {};\n const defaults = require('./config/config');\n let toolbar, actions, lastEl, globalRte;\n\n const hideToolbar = () => {\n const style = toolbar.style;\n const size = '-100px';\n style.top = size;\n style.left = size;\n style.display = 'none';\n };\n\n return {\n customRte: null,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'RichTextEditor',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} opts Options\n * @private\n */\n init(opts = {}) {\n config = opts;\n\n for (let name in defaults) {\n if (!(name in config)) {\n config[name] = defaults[name];\n }\n }\n\n const ppfx = config.pStylePrefix;\n\n if (ppfx) {\n config.stylePrefix = ppfx + config.stylePrefix;\n }\n\n this.pfx = config.stylePrefix;\n actions = config.actions || [];\n toolbar = document.createElement('div');\n toolbar.className = `${ppfx}rte-toolbar ${ppfx}one-bg`;\n globalRte = this.initRte(document.createElement('div'));\n\n //Avoid closing on toolbar clicking\n on(toolbar, 'mousedown', e => e.stopPropagation());\n return this;\n },\n\n /**\n * Post render callback\n * @param {View} ev\n * @private\n */\n postRender(ev) {\n const canvas = ev.model.get('Canvas');\n toolbar.style.pointerEvents = 'all';\n hideToolbar();\n canvas.getToolsEl().appendChild(toolbar);\n },\n\n /**\n * Init the built-in RTE\n * @param {HTMLElement} el\n * @return {RichTextEditor}\n * @private\n */\n initRte(el) {\n const pfx = this.pfx;\n const actionbarContainer = toolbar;\n const actionbar = this.actionbar;\n const actions = this.actions || config.actions;\n const classes = {\n actionbar: `${pfx}actionbar`,\n button: `${pfx}action`,\n active: `${pfx}active`\n };\n const rte = new RichTextEditor({\n el,\n classes,\n actions,\n actionbar,\n actionbarContainer\n });\n globalRte && globalRte.setEl(el);\n\n if (rte.actionbar) {\n this.actionbar = rte.actionbar;\n }\n\n if (rte.actions) {\n this.actions = rte.actions;\n }\n\n return rte;\n },\n\n /**\n * Add a new action to the built-in RTE toolbar\n * @param {string} name Action name\n * @param {Object} action Action options\n * @example\n * rte.add('bold', {\n * icon: 'B',\n * attributes: {title: 'Bold',}\n * result: rte => rte.exec('bold')\n * });\n * rte.add('link', {\n * icon: document.getElementById('t'),\n * attributes: {title: 'Link',}\n * // Example on it's easy to wrap a selected content\n * result: rte => rte.insertHTML(`${rte.selection()}`)\n * });\n * // An example with fontSize\n * rte.add('fontSize', {\n * icon: ``,\n * // Bind the 'result' on 'change' listener\n * event: 'change',\n * result: (rte, action) => rte.exec('fontSize', action.btn.firstChild.value),\n * // Callback on any input change (mousedown, keydown, etc..)\n * update: (rte, action) => {\n * const value = rte.doc.queryCommandValue(action.name);\n * if (value != 'false') { // value is a string\n * action.btn.firstChild.value = value;\n * }\n * }\n * })\n */\n add(name, action = {}) {\n action.name = name;\n globalRte.addAction(action, { sync: 1 });\n },\n\n /**\n * Get the action by its name\n * @param {string} name Action name\n * @return {Object}\n * @example\n * const action = rte.get('bold');\n * // {name: 'bold', ...}\n */\n get(name) {\n let result;\n globalRte.getActions().forEach(action => {\n if (action.name == name) {\n result = action;\n }\n });\n return result;\n },\n\n /**\n * Get all actions\n * @return {Array}\n */\n getAll() {\n return globalRte.getActions();\n },\n\n /**\n * Remove the action from the toolbar\n * @param {string} name\n * @return {Object} Removed action\n * @example\n * const action = rte.remove('bold');\n * // {name: 'bold', ...}\n */\n remove(name) {\n const actions = this.getAll();\n const action = this.get(name);\n\n if (action) {\n const btn = action.btn;\n const index = actions.indexOf(action);\n btn.parentNode.removeChild(btn);\n actions.splice(index, 1);\n }\n\n return action;\n },\n\n /**\n * Get the toolbar element\n * @return {HTMLElement}\n */\n getToolbarEl() {\n return toolbar;\n },\n\n /**\n * Triggered when the offset of the editor is changed\n * @private\n */\n udpatePosition() {\n const un = 'px';\n const canvas = config.em.get('Canvas');\n const pos = canvas.getTargetToElementDim(toolbar, lastEl, {\n event: 'rteToolbarPosUpdate'\n });\n\n if (pos) {\n if (config.adjustToolbar) {\n // Move the toolbar down when the top canvas edge is reached\n if (pos.top <= pos.canvasTop) {\n pos.top = pos.elementTop + pos.elementHeight;\n }\n }\n\n const toolbarStyle = toolbar.style;\n toolbarStyle.top = pos.top + un;\n toolbarStyle.left = pos.left + un;\n }\n },\n\n /**\n * Enable rich text editor on the element\n * @param {View} view Component view\n * @param {Object} rte The instance of already defined RTE\n * @private\n * */\n enable(view, rte) {\n lastEl = view.el;\n const em = config.em;\n const el = view.getChildrenContainer();\n const customRte = this.customRte;\n\n toolbar.style.display = '';\n rte = customRte ? customRte.enable(el, rte) : this.initRte(el).enable();\n\n if (em) {\n setTimeout(this.udpatePosition.bind(this), 0);\n const event = 'change:canvasOffset canvasScroll';\n em.off(event, this.udpatePosition, this);\n em.on(event, this.udpatePosition, this);\n em.trigger('rte:enable', view, rte);\n }\n\n return rte;\n },\n\n /**\n * Unbind rich text editor from the element\n * @param {View} view\n * @param {Object} rte The instance of already defined RTE\n * @private\n * */\n disable(view, rte) {\n const em = config.em;\n const customRte = this.customRte;\n var el = view.getChildrenContainer();\n\n if (customRte) {\n customRte.disable(el, rte);\n } else {\n rte && rte.disable();\n }\n\n hideToolbar();\n em && em.trigger('rte:disable', view, rte);\n }\n };\n};\n","var Backbone = require('backbone');\nvar PanelView = require('./PanelView');\n\nmodule.exports = Backbone.View.extend({\n initialize(o) {\n this.opt = o || {};\n this.config = this.opt.config || {};\n this.pfx = this.config.stylePrefix || '';\n const items = this.collection;\n this.listenTo(items, 'add', this.addTo);\n this.listenTo(items, 'reset', this.render);\n this.listenTo(items, 'remove', this.onRemove);\n this.className = this.pfx + 'panels';\n },\n\n onRemove(model) {\n const view = model.view;\n view && view.remove();\n },\n\n /**\n * Add to collection\n * @param Object Model\n *\n * @return Object\n * @private\n * */\n addTo(model) {\n this.addToCollection(model);\n },\n\n /**\n * Add new object to collection\n * @param Object Model\n * @param Object Fragment collection\n * @param integer Index of append\n *\n * @return Object Object created\n * @private\n * */\n addToCollection(model, fragmentEl) {\n const fragment = fragmentEl || null;\n const config = this.config;\n const el = model.get('el');\n const view = new PanelView({\n el,\n model,\n config\n });\n const rendered = view.render().el;\n const appendTo = model.get('appendTo');\n\n // Do nothing if the panel was requested to be another element\n if (el) {\n } else if (appendTo) {\n var appendEl = document.querySelector(appendTo);\n appendEl.appendChild(rendered);\n } else {\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n this.$el.append(rendered);\n }\n }\n\n view.initResize();\n return rendered;\n },\n\n render() {\n const $el = this.$el;\n const frag = document.createDocumentFragment();\n $el.empty();\n this.collection.each(model => this.addToCollection(model, frag));\n $el.append(frag);\n $el.attr('class', this.className);\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport { isString, isObject, isFunction } from 'underscore';\nconst $ = Backbone.$;\n\nmodule.exports = Backbone.View.extend({\n tagName: 'span',\n\n events: {\n click: 'clicked'\n },\n\n initialize(o) {\n var cls = this.model.get('className');\n this.config = o.config || {};\n this.em = this.config.em || {};\n const pfx = this.config.stylePrefix || '';\n const ppfx = this.config.pStylePrefix || '';\n this.pfx = pfx;\n this.ppfx = this.config.pStylePrefix || '';\n this.id = pfx + this.model.get('id');\n this.activeCls = `${pfx}active ${ppfx}four-color`;\n this.disableCls = pfx + 'active';\n this.btnsVisCls = pfx + 'visible';\n this.className = pfx + 'btn' + (cls ? ' ' + cls : '');\n this.listenTo(this.model, 'change:active updateActive', this.updateActive);\n this.listenTo(this.model, 'checkActive', this.checkActive);\n this.listenTo(this.model, 'change:bntsVis', this.updateBtnsVis);\n this.listenTo(this.model, 'change:attributes', this.updateAttributes);\n this.listenTo(this.model, 'change:className', this.updateClassName);\n this.listenTo(this.model, 'change:disable', this.updateDisable);\n\n if (this.em && this.em.get) this.commands = this.em.get('Commands');\n },\n\n /**\n * Updates class name of the button\n *\n * @return void\n * */\n updateClassName() {\n var cls = this.model.get('className');\n this.$el.attr('class', this.pfx + 'btn' + (cls ? ' ' + cls : ''));\n },\n\n /**\n * Updates attributes of the button\n *\n * @return void\n * */\n updateAttributes() {\n this.$el.attr(this.model.get('attributes'));\n },\n\n /**\n * Updates visibility of children buttons\n *\n * @return void\n * */\n updateBtnsVis() {\n if (!this.$buttons) return;\n\n if (this.model.get('bntsVis')) this.$buttons.addClass(this.btnsVisCls);\n else this.$buttons.removeClass(this.btnsVisCls);\n },\n\n /**\n * Update active status of the button\n *\n * @return void\n * */\n updateActive() {\n const { model, commands, em } = this;\n const context = model.get('context');\n const options = model.get('options');\n let command = {};\n var editor = em && em.get ? em.get('Editor') : null;\n var commandName = model.get('command');\n var cmdIsFunc = isFunction(commandName);\n\n if (commands && isString(commandName)) {\n command = commands.get(commandName) || {};\n } else if (cmdIsFunc) {\n command = commands.create({ run: commandName });\n } else if (commandName !== null && isObject(commandName)) {\n command = commands.create(commandName);\n }\n\n if (model.get('active')) {\n model.collection.deactivateAll(context);\n model.set('active', true, { silent: true }).trigger('checkActive');\n\n if (command.run) {\n command.callRun(editor, { ...options, sender: model });\n }\n\n // Disable button if the command was just a function\n cmdIsFunc && model.set('active', false);\n } else {\n this.$el.removeClass(this.activeCls);\n model.collection.deactivateAll(context);\n\n if (command.stop) {\n command.callStop(editor, { ...options, sender: model });\n }\n }\n },\n\n updateDisable() {\n if (this.model.get('disable')) {\n this.$el.addClass(this.disableCls);\n } else {\n this.$el.removeClass(this.disableCls);\n }\n },\n\n /**\n * Update active style status\n *\n * @return void\n * */\n checkActive() {\n if (this.model.get('active')) this.$el.addClass(this.activeCls);\n else this.$el.removeClass(this.activeCls);\n },\n\n /**\n * Triggered when button is clicked\n * @param {Object} e Event\n *\n * @return void\n * */\n clicked(e) {\n if (this.model.get('bntsVis')) return;\n\n if (this.model.get('disable')) return;\n\n this.toogleActive();\n },\n\n toogleActive() {\n const { model } = this;\n const { active, togglable } = model.attributes;\n\n if (active && !togglable) return;\n\n model.set('active', !active);\n\n // If the stop is requested\n var command = this.em.get('Commands').get('select-comp');\n\n if (active) {\n if (model.get('runDefaultCommand')) this.em.runDefault();\n } else {\n if (model.get('stopDefaultCommand')) this.em.stopDefault();\n }\n },\n\n render() {\n const label = this.model.get('label');\n const $el = this.$el;\n this.updateAttributes();\n $el.attr('class', this.className);\n label && $el.append(label);\n\n return this;\n }\n});\n","var Backbone = require('backbone');\nvar ButtonView = require('./ButtonView');\n\nmodule.exports = Backbone.View.extend({\n initialize(o) {\n this.opt = o || {};\n this.config = this.opt.config || {};\n this.pfx = this.config.stylePrefix || '';\n this.parentM = this.opt.parentM || null;\n this.listenTo(this.collection, 'add', this.addTo);\n this.listenTo(this.collection, 'reset remove', this.render);\n this.className = this.pfx + 'buttons';\n },\n\n /**\n * Add to collection\n * @param Object Model\n *\n * @return Object\n * */\n addTo(model) {\n this.addToCollection(model);\n },\n\n /**\n * Add new object to collection\n * @param Object Model\n * @param Object Fragment collection\n *\n * @return Object Object created\n * */\n addToCollection(model, fragmentEl) {\n var fragment = fragmentEl || null;\n var viewObject = ButtonView;\n\n var view = new viewObject({\n model,\n config: this.config,\n parentM: this.parentM\n });\n var rendered = view.render().el;\n\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n this.$el.append(rendered);\n }\n\n return rendered;\n },\n\n render() {\n var fragment = document.createDocumentFragment();\n this.$el.empty();\n\n this.collection.each(function(model) {\n this.addToCollection(model, fragment);\n }, this);\n\n this.$el.append(fragment);\n this.$el.attr('class', _.result(this, 'className'));\n return this;\n }\n});\n","var Backbone = require('backbone');\nvar Panel = require('./Panel');\n\nmodule.exports = Backbone.Collection.extend({\n model: Panel\n});\n","var Backbone = require('backbone');\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n id: '',\n label: '',\n className: '',\n command: '',\n context: '',\n buttons: [],\n attributes: {},\n options: {},\n active: false,\n dragDrop: false,\n togglable: true,\n runDefaultCommand: true,\n stopDefaultCommand: false,\n disable: false\n },\n\n initialize(options) {\n if (this.get('buttons').length) {\n var Buttons = require('./Buttons');\n this.set('buttons', new Buttons(this.get('buttons')));\n }\n }\n});\n","var crc = 'create-comp';\nvar mvc = 'move-comp';\nvar swv = 'sw-visibility';\nvar expt = 'export-template';\nvar osm = 'open-sm';\nvar otm = 'open-tm';\nvar ola = 'open-layers';\nvar obl = 'open-blocks';\nvar ful = 'fullscreen';\nvar prv = 'preview';\n\nmodule.exports = {\n stylePrefix: 'pn-',\n\n // Default panels fa-sliders for features\n defaults: [\n {\n id: 'commands',\n buttons: [{}]\n },\n {\n id: 'options',\n buttons: [\n {\n active: true,\n id: swv,\n className: 'fa fa-square-o',\n command: swv,\n context: swv,\n attributes: { title: 'View components' }\n },\n {\n id: prv,\n className: 'fa fa-eye',\n command: prv,\n context: prv,\n attributes: { title: 'Preview' }\n },\n {\n id: ful,\n className: 'fa fa-arrows-alt',\n command: ful,\n context: ful,\n attributes: { title: 'Fullscreen' }\n },\n {\n id: expt,\n className: 'fa fa-code',\n command: expt,\n attributes: { title: 'View code' }\n }\n ]\n },\n {\n id: 'views',\n buttons: [\n {\n id: osm,\n className: 'fa fa-paint-brush',\n command: osm,\n active: true,\n attributes: { title: 'Open Style Manager' }\n },\n {\n id: otm,\n className: 'fa fa-cog',\n command: otm,\n attributes: { title: 'Settings' }\n },\n {\n id: ola,\n className: 'fa fa-bars',\n command: ola,\n attributes: { title: 'Open Layer Manager' }\n },\n {\n id: obl,\n className: 'fa fa-th-large',\n command: obl,\n attributes: { title: 'Open Blocks' }\n }\n ]\n }\n ],\n\n // Editor model\n em: null,\n\n // Delay before show children buttons (in milliseconds)\n delayBtnsShow: 300\n};\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/panels/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * panels: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const panelManager = editor.Panels;\n * ```\n *\n * * [addPanel](#addpanel)\n * * [addButton](#addbutton)\n * * [removeButton](#removebutton)\n * * [getButton](#getbutton)\n * * [getPanel](#getpanel)\n * * [getPanels](#getpanels)\n * * [getPanelsEl](#getpanelsel)\n * * [removePanel](#removepanel)\n * * [removeButton](#removeButton)\n *\n * @module Panels\n */\n\nmodule.exports = () => {\n var c = {},\n defaults = require('./config/config'),\n Panel = require('./model/Panel'),\n Panels = require('./model/Panels'),\n PanelView = require('./view/PanelView'),\n PanelsView = require('./view/PanelsView');\n var panels, PanelsViewObj;\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Panels',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n panels = new Panels(c.defaults);\n PanelsViewObj = new PanelsView({\n collection: panels,\n config: c\n });\n return this;\n },\n\n /**\n * Returns the collection of panels\n * @return {Collection} Collection of panel\n */\n getPanels() {\n return panels;\n },\n\n /**\n * Returns panels element\n * @return {HTMLElement}\n */\n getPanelsEl() {\n return PanelsViewObj.el;\n },\n\n /**\n * Add new panel to the collection\n * @param {Object|Panel} panel Object with right properties or an instance of Panel\n * @return {Panel} Added panel. Useful in case passed argument was an Object\n * @example\n * var newPanel = panelManager.addPanel({\n * id: 'myNewPanel',\n * visible : true,\n * buttons : [...],\n * });\n */\n addPanel(panel) {\n return panels.add(panel);\n },\n\n /**\n * Remove a panel from the collection\n * @param {Object|Panel|String} panel Object with right properties or an instance of Panel or Painel id\n * @return {Panel} Removed panel. Useful in case passed argument was an Object\n * @example\n * const newPanel = panelManager.removePanel({\n * id: 'myNewPanel',\n * visible : true,\n * buttons : [...],\n * });\n *\n * const newPanel = panelManager.removePanel('myNewPanel');\n *\n */\n removePanel(panel) {\n return panels.remove(panel);\n },\n\n /**\n * Get panel by ID\n * @param {string} id Id string\n * @return {Panel|null}\n * @example\n * var myPanel = panelManager.getPanel('myNewPanel');\n */\n getPanel(id) {\n var res = panels.where({ id });\n return res.length ? res[0] : null;\n },\n\n /**\n * Add button to the panel\n * @param {string} panelId Panel's ID\n * @param {Object|Button} button Button object or instance of Button\n * @return {Button|null} Added button. Useful in case passed button was an Object\n * @example\n * var newButton = panelManager.addButton('myNewPanel',{\n * id: 'myNewButton',\n * className: 'someClass',\n * command: 'someCommand',\n * attributes: { title: 'Some title'},\n * active: false,\n * });\n * // It's also possible to pass the command as an object\n * // with .run and .stop methods\n * ...\n * command: {\n * run: function(editor) {\n * ...\n * },\n * stop: function(editor) {\n * ...\n * }\n * },\n * // Or simply like a function which will be evaluated as a single .run command\n * ...\n * command: function(editor) {\n * ...\n * }\n */\n addButton(panelId, button) {\n var pn = this.getPanel(panelId);\n return pn ? pn.get('buttons').add(button) : null;\n },\n\n /**\n * Remove button from the panel\n * @param {string} panelId Panel's ID\n * @param {Object|Button|String} button Button object or instance of Button or button id\n * @return {Button|null} Removed button.\n * @example\n * const removedButton = panelManager.removeButton('myNewPanel',{\n * id: 'myNewButton',\n * className: 'someClass',\n * command: 'someCommand',\n * attributes: { title: 'Some title'},\n * active: false,\n * });\n *\n * // It's also possible to use the button id\n * const removedButton = panelManager.removeButton('myNewPanel','myNewButton');\n *\n */\n removeButton(panelId, button) {\n var pn = this.getPanel(panelId);\n return pn && pn.get('buttons').remove(button);\n },\n\n /**\n * Get button from the panel\n * @param {string} panelId Panel's ID\n * @param {string} id Button's ID\n * @return {Button|null}\n * @example\n * var button = panelManager.getButton('myPanel','myButton');\n */\n getButton(panelId, id) {\n var pn = this.getPanel(panelId);\n if (pn) {\n var res = pn.get('buttons').where({ id });\n return res.length ? res[0] : null;\n }\n return null;\n },\n\n /**\n * Render panels and buttons\n * @return {HTMLElement}\n * @private\n */\n render() {\n return PanelsViewObj.render().el;\n },\n\n /**\n * Active activable buttons\n * @private\n */\n active() {\n this.getPanels().each(p => {\n p.get('buttons').each(btn => {\n if (btn.get('active')) btn.trigger('updateActive');\n });\n });\n },\n\n /**\n * Disable buttons flagged as disabled\n * @private\n */\n disableButtons() {\n this.getPanels().each(p => {\n p.get('buttons').each(btn => {\n if (btn.get('disable')) btn.trigger('change:disable');\n });\n });\n },\n\n Panel\n };\n};\n","import { template } from 'underscore';\nimport Backbone from 'backbone';\n\nmodule.exports = Backbone.View.extend({\n template: template(`\n
editor\" id=\"<%= pfx %><%= codeName %>\">\n \t
title\"><%= label %>
\n \t
code\">
\n
`),\n\n initialize(o) {\n this.config = o.config || {};\n this.pfx = this.config.stylePrefix;\n },\n\n render() {\n var obj = this.model.toJSON();\n obj.pfx = this.pfx;\n this.$el.html(this.template(obj));\n this.$el.attr('class', this.pfx + 'editor-c');\n this.$el.find('#' + this.pfx + 'code').append(this.model.get('input'));\n return this;\n }\n});\n","(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"codemirror/lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"codemirror/lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\n CodeMirror.extendMode(\"css\", {\n commentStart: \"/*\",\n commentEnd: \"*/\",\n newlineAfterToken: function(_type, content) {\n return /^[;{}]$/.test(content);\n }\n });\n\n CodeMirror.extendMode(\"javascript\", {\n commentStart: \"/*\",\n commentEnd: \"*/\",\n // FIXME semicolons inside of for\n newlineAfterToken: function(_type, content, textAfter, state) {\n if (this.jsonMode) {\n return /^[\\[,{]$/.test(content) || /^}/.test(textAfter);\n } else {\n if (content == \";\" && state.lexical && state.lexical.type == \")\") return false;\n return /^[;{}]$/.test(content) && !/^;/.test(textAfter);\n }\n }\n });\n\n var inlineElements = /^(a|abbr|acronym|area|base|bdo|big|br|button|caption|cite|code|col|colgroup|dd|del|dfn|em|frame|hr|iframe|img|input|ins|kbd|label|legend|link|map|object|optgroup|option|param|q|samp|script|select|small|span|strong|sub|sup|textarea|tt|var)$/;\n\n CodeMirror.extendMode(\"xml\", {\n commentStart: \"\",\n newlineAfterToken: function(type, content, textAfter, state) {\n var inline = false;\n if (this.configuration == \"html\")\n inline = state.context ? inlineElements.test(state.context.tagName) : false;\n return !inline && ((type == \"tag\" && />$/.test(content) && state.context) ||\n /^ -1 && endIndex > -1 && endIndex > startIndex) {\n // Take string till comment start\n selText = selText.substr(0, startIndex) +\n // From comment start till comment end\n selText.substring(startIndex + curMode.commentStart.length, endIndex) +\n // From comment end till string end\n selText.substr(endIndex + curMode.commentEnd.length);\n }\n cm.replaceRange(selText, from, to);\n }\n });\n });\n\n // Applies automatic mode-aware indentation to the specified range\n CodeMirror.defineExtension(\"autoIndentRange\", function (from, to) {\n var cmInstance = this;\n this.operation(function () {\n for (var i = from.line; i <= to.line; i++) {\n cmInstance.indentLine(i, \"smart\");\n }\n });\n });\n\n // Applies automatic formatting to the specified range\n CodeMirror.defineExtension(\"autoFormatRange\", function (from, to) {\n var cm = this;\n var outer = cm.getMode(), text = cm.getRange(from, to).split(\"\\n\");\n var state = CodeMirror.copyState(outer, cm.getTokenAt(from).state);\n var tabSize = cm.getOption(\"tabSize\");\n\n var out = \"\", lines = 0, atSol = from.ch === 0;\n function newline() {\n out += \"\\n\";\n atSol = true;\n ++lines;\n }\n\n for (var i = 0; i < text.length; ++i) {\n var stream = new CodeMirror.StringStream(text[i], tabSize);\n while (!stream.eol()) {\n var inner = CodeMirror.innerMode(outer, state);\n var style = outer.token(stream, state), cur = stream.current();\n stream.start = stream.pos;\n if (!atSol || /\\S/.test(cur)) {\n out += cur;\n atSol = false;\n }\n if (!atSol && inner.mode.newlineAfterToken &&\n inner.mode.newlineAfterToken(style, cur, stream.string.slice(stream.pos) || text[i+1] || \"\", inner.state))\n newline();\n }\n if (!stream.pos && outer.blankLine) outer.blankLine(state);\n if (!atSol && i < text.length - 1) newline();\n }\n\n cm.operation(function () {\n cm.replaceRange(out, from, to);\n for (var cur = from.line + 1, end = from.line + lines; cur <= end; ++cur)\n cm.indentLine(cur, \"smart\");\n cm.setSelection(from, cm.getCursor(false));\n });\n });\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"javascript\", function(config, parserConfig) {\n var indentUnit = config.indentUnit;\n var statementIndent = parserConfig.statementIndent;\n var jsonldMode = parserConfig.jsonld;\n var jsonMode = parserConfig.json || jsonldMode;\n var isTS = parserConfig.typescript;\n var wordRE = parserConfig.wordCharacters || /[\\w$\\xa1-\\uffff]/;\n\n // Tokenizer\n\n var keywords = function(){\n function kw(type) {return {type: type, style: \"keyword\"};}\n var A = kw(\"keyword a\"), B = kw(\"keyword b\"), C = kw(\"keyword c\"), D = kw(\"keyword d\");\n var operator = kw(\"operator\"), atom = {type: \"atom\", style: \"atom\"};\n\n return {\n \"if\": kw(\"if\"), \"while\": A, \"with\": A, \"else\": B, \"do\": B, \"try\": B, \"finally\": B,\n \"return\": D, \"break\": D, \"continue\": D, \"new\": kw(\"new\"), \"delete\": C, \"void\": C, \"throw\": C,\n \"debugger\": kw(\"debugger\"), \"var\": kw(\"var\"), \"const\": kw(\"var\"), \"let\": kw(\"var\"),\n \"function\": kw(\"function\"), \"catch\": kw(\"catch\"),\n \"for\": kw(\"for\"), \"switch\": kw(\"switch\"), \"case\": kw(\"case\"), \"default\": kw(\"default\"),\n \"in\": operator, \"typeof\": operator, \"instanceof\": operator,\n \"true\": atom, \"false\": atom, \"null\": atom, \"undefined\": atom, \"NaN\": atom, \"Infinity\": atom,\n \"this\": kw(\"this\"), \"class\": kw(\"class\"), \"super\": kw(\"atom\"),\n \"yield\": C, \"export\": kw(\"export\"), \"import\": kw(\"import\"), \"extends\": C,\n \"await\": C\n };\n }();\n\n var isOperatorChar = /[+\\-*&%=<>!?|~^@]/;\n var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)\"/;\n\n function readRegexp(stream) {\n var escaped = false, next, inSet = false;\n while ((next = stream.next()) != null) {\n if (!escaped) {\n if (next == \"/\" && !inSet) return;\n if (next == \"[\") inSet = true;\n else if (inSet && next == \"]\") inSet = false;\n }\n escaped = !escaped && next == \"\\\\\";\n }\n }\n\n // Used as scratch variables to communicate multiple values without\n // consing up tons of objects.\n var type, content;\n function ret(tp, style, cont) {\n type = tp; content = cont;\n return style;\n }\n function tokenBase(stream, state) {\n var ch = stream.next();\n if (ch == '\"' || ch == \"'\") {\n state.tokenize = tokenString(ch);\n return state.tokenize(stream, state);\n } else if (ch == \".\" && stream.match(/^\\d+(?:[eE][+\\-]?\\d+)?/)) {\n return ret(\"number\", \"number\");\n } else if (ch == \".\" && stream.match(\"..\")) {\n return ret(\"spread\", \"meta\");\n } else if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\n return ret(ch);\n } else if (ch == \"=\" && stream.eat(\">\")) {\n return ret(\"=>\", \"operator\");\n } else if (ch == \"0\" && stream.match(/^(?:x[\\da-f]+|o[0-7]+|b[01]+)n?/i)) {\n return ret(\"number\", \"number\");\n } else if (/\\d/.test(ch)) {\n stream.match(/^\\d*(?:n|(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)?/);\n return ret(\"number\", \"number\");\n } else if (ch == \"/\") {\n if (stream.eat(\"*\")) {\n state.tokenize = tokenComment;\n return tokenComment(stream, state);\n } else if (stream.eat(\"/\")) {\n stream.skipToEnd();\n return ret(\"comment\", \"comment\");\n } else if (expressionAllowed(stream, state, 1)) {\n readRegexp(stream);\n stream.match(/^\\b(([gimyus])(?![gimyus]*\\2))+\\b/);\n return ret(\"regexp\", \"string-2\");\n } else {\n stream.eat(\"=\");\n return ret(\"operator\", \"operator\", stream.current());\n }\n } else if (ch == \"`\") {\n state.tokenize = tokenQuasi;\n return tokenQuasi(stream, state);\n } else if (ch == \"#\") {\n stream.skipToEnd();\n return ret(\"error\", \"error\");\n } else if (isOperatorChar.test(ch)) {\n if (ch != \">\" || !state.lexical || state.lexical.type != \">\") {\n if (stream.eat(\"=\")) {\n if (ch == \"!\" || ch == \"=\") stream.eat(\"=\")\n } else if (/[<>*+\\-]/.test(ch)) {\n stream.eat(ch)\n if (ch == \">\") stream.eat(ch)\n }\n }\n return ret(\"operator\", \"operator\", stream.current());\n } else if (wordRE.test(ch)) {\n stream.eatWhile(wordRE);\n var word = stream.current()\n if (state.lastType != \".\") {\n if (keywords.propertyIsEnumerable(word)) {\n var kw = keywords[word]\n return ret(kw.type, kw.style, word)\n }\n if (word == \"async\" && stream.match(/^(\\s|\\/\\*.*?\\*\\/)*[\\[\\(\\w]/, false))\n return ret(\"async\", \"keyword\", word)\n }\n return ret(\"variable\", \"variable\", word)\n }\n }\n\n function tokenString(quote) {\n return function(stream, state) {\n var escaped = false, next;\n if (jsonldMode && stream.peek() == \"@\" && stream.match(isJsonldKeyword)){\n state.tokenize = tokenBase;\n return ret(\"jsonld-keyword\", \"meta\");\n }\n while ((next = stream.next()) != null) {\n if (next == quote && !escaped) break;\n escaped = !escaped && next == \"\\\\\";\n }\n if (!escaped) state.tokenize = tokenBase;\n return ret(\"string\", \"string\");\n };\n }\n\n function tokenComment(stream, state) {\n var maybeEnd = false, ch;\n while (ch = stream.next()) {\n if (ch == \"/\" && maybeEnd) {\n state.tokenize = tokenBase;\n break;\n }\n maybeEnd = (ch == \"*\");\n }\n return ret(\"comment\", \"comment\");\n }\n\n function tokenQuasi(stream, state) {\n var escaped = false, next;\n while ((next = stream.next()) != null) {\n if (!escaped && (next == \"`\" || next == \"$\" && stream.eat(\"{\"))) {\n state.tokenize = tokenBase;\n break;\n }\n escaped = !escaped && next == \"\\\\\";\n }\n return ret(\"quasi\", \"string-2\", stream.current());\n }\n\n var brackets = \"([{}])\";\n // This is a crude lookahead trick to try and notice that we're\n // parsing the argument patterns for a fat-arrow function before we\n // actually hit the arrow token. It only works if the arrow is on\n // the same line as the arguments and there's no strange noise\n // (comments) in between. Fallback is to only notice when we hit the\n // arrow, and not declare the arguments as locals for the arrow\n // body.\n function findFatArrow(stream, state) {\n if (state.fatArrowAt) state.fatArrowAt = null;\n var arrow = stream.string.indexOf(\"=>\", stream.start);\n if (arrow < 0) return;\n\n if (isTS) { // Try to skip TypeScript return type declarations after the arguments\n var m = /:\\s*(?:\\w+(?:<[^>]*>|\\[\\])?|\\{[^}]*\\})\\s*$/.exec(stream.string.slice(stream.start, arrow))\n if (m) arrow = m.index\n }\n\n var depth = 0, sawSomething = false;\n for (var pos = arrow - 1; pos >= 0; --pos) {\n var ch = stream.string.charAt(pos);\n var bracket = brackets.indexOf(ch);\n if (bracket >= 0 && bracket < 3) {\n if (!depth) { ++pos; break; }\n if (--depth == 0) { if (ch == \"(\") sawSomething = true; break; }\n } else if (bracket >= 3 && bracket < 6) {\n ++depth;\n } else if (wordRE.test(ch)) {\n sawSomething = true;\n } else if (/[\"'\\/]/.test(ch)) {\n return;\n } else if (sawSomething && !depth) {\n ++pos;\n break;\n }\n }\n if (sawSomething && !depth) state.fatArrowAt = pos;\n }\n\n // Parser\n\n var atomicTypes = {\"atom\": true, \"number\": true, \"variable\": true, \"string\": true, \"regexp\": true, \"this\": true, \"jsonld-keyword\": true};\n\n function JSLexical(indented, column, type, align, prev, info) {\n this.indented = indented;\n this.column = column;\n this.type = type;\n this.prev = prev;\n this.info = info;\n if (align != null) this.align = align;\n }\n\n function inScope(state, varname) {\n for (var v = state.localVars; v; v = v.next)\n if (v.name == varname) return true;\n for (var cx = state.context; cx; cx = cx.prev) {\n for (var v = cx.vars; v; v = v.next)\n if (v.name == varname) return true;\n }\n }\n\n function parseJS(state, style, type, content, stream) {\n var cc = state.cc;\n // Communicate our context to the combinators.\n // (Less wasteful than consing up a hundred closures on every call.)\n cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style;\n\n if (!state.lexical.hasOwnProperty(\"align\"))\n state.lexical.align = true;\n\n while(true) {\n var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;\n if (combinator(type, content)) {\n while(cc.length && cc[cc.length - 1].lex)\n cc.pop()();\n if (cx.marked) return cx.marked;\n if (type == \"variable\" && inScope(state, content)) return \"variable-2\";\n return style;\n }\n }\n }\n\n // Combinator utils\n\n var cx = {state: null, column: null, marked: null, cc: null};\n function pass() {\n for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);\n }\n function cont() {\n pass.apply(null, arguments);\n return true;\n }\n function inList(name, list) {\n for (var v = list; v; v = v.next) if (v.name == name) return true\n return false;\n }\n function register(varname) {\n var state = cx.state;\n cx.marked = \"def\";\n if (state.context) {\n if (state.lexical.info == \"var\" && state.context && state.context.block) {\n // FIXME function decls are also not block scoped\n var newContext = registerVarScoped(varname, state.context)\n if (newContext != null) {\n state.context = newContext\n return\n }\n } else if (!inList(varname, state.localVars)) {\n state.localVars = new Var(varname, state.localVars)\n return\n }\n }\n // Fall through means this is global\n if (parserConfig.globalVars && !inList(varname, state.globalVars))\n state.globalVars = new Var(varname, state.globalVars)\n }\n function registerVarScoped(varname, context) {\n if (!context) {\n return null\n } else if (context.block) {\n var inner = registerVarScoped(varname, context.prev)\n if (!inner) return null\n if (inner == context.prev) return context\n return new Context(inner, context.vars, true)\n } else if (inList(varname, context.vars)) {\n return context\n } else {\n return new Context(context.prev, new Var(varname, context.vars), false)\n }\n }\n\n function isModifier(name) {\n return name == \"public\" || name == \"private\" || name == \"protected\" || name == \"abstract\" || name == \"readonly\"\n }\n\n // Combinators\n\n function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block }\n function Var(name, next) { this.name = name; this.next = next }\n\n var defaultVars = new Var(\"this\", new Var(\"arguments\", null))\n function pushcontext() {\n cx.state.context = new Context(cx.state.context, cx.state.localVars, false)\n cx.state.localVars = defaultVars\n }\n function pushblockcontext() {\n cx.state.context = new Context(cx.state.context, cx.state.localVars, true)\n cx.state.localVars = null\n }\n function popcontext() {\n cx.state.localVars = cx.state.context.vars\n cx.state.context = cx.state.context.prev\n }\n popcontext.lex = true\n function pushlex(type, info) {\n var result = function() {\n var state = cx.state, indent = state.indented;\n if (state.lexical.type == \"stat\") indent = state.lexical.indented;\n else for (var outer = state.lexical; outer && outer.type == \")\" && outer.align; outer = outer.prev)\n indent = outer.indented;\n state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);\n };\n result.lex = true;\n return result;\n }\n function poplex() {\n var state = cx.state;\n if (state.lexical.prev) {\n if (state.lexical.type == \")\")\n state.indented = state.lexical.indented;\n state.lexical = state.lexical.prev;\n }\n }\n poplex.lex = true;\n\n function expect(wanted) {\n function exp(type) {\n if (type == wanted) return cont();\n else if (wanted == \";\" || type == \"}\" || type == \")\" || type == \"]\") return pass();\n else return cont(exp);\n };\n return exp;\n }\n\n function statement(type, value) {\n if (type == \"var\") return cont(pushlex(\"vardef\", value), vardef, expect(\";\"), poplex);\n if (type == \"keyword a\") return cont(pushlex(\"form\"), parenExpr, statement, poplex);\n if (type == \"keyword b\") return cont(pushlex(\"form\"), statement, poplex);\n if (type == \"keyword d\") return cx.stream.match(/^\\s*$/, false) ? cont() : cont(pushlex(\"stat\"), maybeexpression, expect(\";\"), poplex);\n if (type == \"debugger\") return cont(expect(\";\"));\n if (type == \"{\") return cont(pushlex(\"}\"), pushblockcontext, block, poplex, popcontext);\n if (type == \";\") return cont();\n if (type == \"if\") {\n if (cx.state.lexical.info == \"else\" && cx.state.cc[cx.state.cc.length - 1] == poplex)\n cx.state.cc.pop()();\n return cont(pushlex(\"form\"), parenExpr, statement, poplex, maybeelse);\n }\n if (type == \"function\") return cont(functiondef);\n if (type == \"for\") return cont(pushlex(\"form\"), forspec, statement, poplex);\n if (type == \"class\" || (isTS && value == \"interface\")) { cx.marked = \"keyword\"; return cont(pushlex(\"form\"), className, poplex); }\n if (type == \"variable\") {\n if (isTS && value == \"declare\") {\n cx.marked = \"keyword\"\n return cont(statement)\n } else if (isTS && (value == \"module\" || value == \"enum\" || value == \"type\") && cx.stream.match(/^\\s*\\w/, false)) {\n cx.marked = \"keyword\"\n if (value == \"enum\") return cont(enumdef);\n else if (value == \"type\") return cont(typeexpr, expect(\"operator\"), typeexpr, expect(\";\"));\n else return cont(pushlex(\"form\"), pattern, expect(\"{\"), pushlex(\"}\"), block, poplex, poplex)\n } else if (isTS && value == \"namespace\") {\n cx.marked = \"keyword\"\n return cont(pushlex(\"form\"), expression, block, poplex)\n } else if (isTS && value == \"abstract\") {\n cx.marked = \"keyword\"\n return cont(statement)\n } else {\n return cont(pushlex(\"stat\"), maybelabel);\n }\n }\n if (type == \"switch\") return cont(pushlex(\"form\"), parenExpr, expect(\"{\"), pushlex(\"}\", \"switch\"), pushblockcontext,\n block, poplex, poplex, popcontext);\n if (type == \"case\") return cont(expression, expect(\":\"));\n if (type == \"default\") return cont(expect(\":\"));\n if (type == \"catch\") return cont(pushlex(\"form\"), pushcontext, maybeCatchBinding, statement, poplex, popcontext);\n if (type == \"export\") return cont(pushlex(\"stat\"), afterExport, poplex);\n if (type == \"import\") return cont(pushlex(\"stat\"), afterImport, poplex);\n if (type == \"async\") return cont(statement)\n if (value == \"@\") return cont(expression, statement)\n return pass(pushlex(\"stat\"), expression, expect(\";\"), poplex);\n }\n function maybeCatchBinding(type) {\n if (type == \"(\") return cont(funarg, expect(\")\"))\n }\n function expression(type, value) {\n return expressionInner(type, value, false);\n }\n function expressionNoComma(type, value) {\n return expressionInner(type, value, true);\n }\n function parenExpr(type) {\n if (type != \"(\") return pass()\n return cont(pushlex(\")\"), expression, expect(\")\"), poplex)\n }\n function expressionInner(type, value, noComma) {\n if (cx.state.fatArrowAt == cx.stream.start) {\n var body = noComma ? arrowBodyNoComma : arrowBody;\n if (type == \"(\") return cont(pushcontext, pushlex(\")\"), commasep(funarg, \")\"), poplex, expect(\"=>\"), body, popcontext);\n else if (type == \"variable\") return pass(pushcontext, pattern, expect(\"=>\"), body, popcontext);\n }\n\n var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;\n if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);\n if (type == \"function\") return cont(functiondef, maybeop);\n if (type == \"class\" || (isTS && value == \"interface\")) { cx.marked = \"keyword\"; return cont(pushlex(\"form\"), classExpression, poplex); }\n if (type == \"keyword c\" || type == \"async\") return cont(noComma ? expressionNoComma : expression);\n if (type == \"(\") return cont(pushlex(\")\"), maybeexpression, expect(\")\"), poplex, maybeop);\n if (type == \"operator\" || type == \"spread\") return cont(noComma ? expressionNoComma : expression);\n if (type == \"[\") return cont(pushlex(\"]\"), arrayLiteral, poplex, maybeop);\n if (type == \"{\") return contCommasep(objprop, \"}\", null, maybeop);\n if (type == \"quasi\") return pass(quasi, maybeop);\n if (type == \"new\") return cont(maybeTarget(noComma));\n if (type == \"import\") return cont(expression);\n return cont();\n }\n function maybeexpression(type) {\n if (type.match(/[;\\}\\)\\],]/)) return pass();\n return pass(expression);\n }\n\n function maybeoperatorComma(type, value) {\n if (type == \",\") return cont(expression);\n return maybeoperatorNoComma(type, value, false);\n }\n function maybeoperatorNoComma(type, value, noComma) {\n var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;\n var expr = noComma == false ? expression : expressionNoComma;\n if (type == \"=>\") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);\n if (type == \"operator\") {\n if (/\\+\\+|--/.test(value) || isTS && value == \"!\") return cont(me);\n if (isTS && value == \"<\" && cx.stream.match(/^([^>]|<.*?>)*>\\s*\\(/, false))\n return cont(pushlex(\">\"), commasep(typeexpr, \">\"), poplex, me);\n if (value == \"?\") return cont(expression, expect(\":\"), expr);\n return cont(expr);\n }\n if (type == \"quasi\") { return pass(quasi, me); }\n if (type == \";\") return;\n if (type == \"(\") return contCommasep(expressionNoComma, \")\", \"call\", me);\n if (type == \".\") return cont(property, me);\n if (type == \"[\") return cont(pushlex(\"]\"), maybeexpression, expect(\"]\"), poplex, me);\n if (isTS && value == \"as\") { cx.marked = \"keyword\"; return cont(typeexpr, me) }\n if (type == \"regexp\") {\n cx.state.lastType = cx.marked = \"operator\"\n cx.stream.backUp(cx.stream.pos - cx.stream.start - 1)\n return cont(expr)\n }\n }\n function quasi(type, value) {\n if (type != \"quasi\") return pass();\n if (value.slice(value.length - 2) != \"${\") return cont(quasi);\n return cont(expression, continueQuasi);\n }\n function continueQuasi(type) {\n if (type == \"}\") {\n cx.marked = \"string-2\";\n cx.state.tokenize = tokenQuasi;\n return cont(quasi);\n }\n }\n function arrowBody(type) {\n findFatArrow(cx.stream, cx.state);\n return pass(type == \"{\" ? statement : expression);\n }\n function arrowBodyNoComma(type) {\n findFatArrow(cx.stream, cx.state);\n return pass(type == \"{\" ? statement : expressionNoComma);\n }\n function maybeTarget(noComma) {\n return function(type) {\n if (type == \".\") return cont(noComma ? targetNoComma : target);\n else if (type == \"variable\" && isTS) return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma)\n else return pass(noComma ? expressionNoComma : expression);\n };\n }\n function target(_, value) {\n if (value == \"target\") { cx.marked = \"keyword\"; return cont(maybeoperatorComma); }\n }\n function targetNoComma(_, value) {\n if (value == \"target\") { cx.marked = \"keyword\"; return cont(maybeoperatorNoComma); }\n }\n function maybelabel(type) {\n if (type == \":\") return cont(poplex, statement);\n return pass(maybeoperatorComma, expect(\";\"), poplex);\n }\n function property(type) {\n if (type == \"variable\") {cx.marked = \"property\"; return cont();}\n }\n function objprop(type, value) {\n if (type == \"async\") {\n cx.marked = \"property\";\n return cont(objprop);\n } else if (type == \"variable\" || cx.style == \"keyword\") {\n cx.marked = \"property\";\n if (value == \"get\" || value == \"set\") return cont(getterSetter);\n var m // Work around fat-arrow-detection complication for detecting typescript typed arrow params\n if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\\s*:\\s*/, false)))\n cx.state.fatArrowAt = cx.stream.pos + m[0].length\n return cont(afterprop);\n } else if (type == \"number\" || type == \"string\") {\n cx.marked = jsonldMode ? \"property\" : (cx.style + \" property\");\n return cont(afterprop);\n } else if (type == \"jsonld-keyword\") {\n return cont(afterprop);\n } else if (isTS && isModifier(value)) {\n cx.marked = \"keyword\"\n return cont(objprop)\n } else if (type == \"[\") {\n return cont(expression, maybetype, expect(\"]\"), afterprop);\n } else if (type == \"spread\") {\n return cont(expressionNoComma, afterprop);\n } else if (value == \"*\") {\n cx.marked = \"keyword\";\n return cont(objprop);\n } else if (type == \":\") {\n return pass(afterprop)\n }\n }\n function getterSetter(type) {\n if (type != \"variable\") return pass(afterprop);\n cx.marked = \"property\";\n return cont(functiondef);\n }\n function afterprop(type) {\n if (type == \":\") return cont(expressionNoComma);\n if (type == \"(\") return pass(functiondef);\n }\n function commasep(what, end, sep) {\n function proceed(type, value) {\n if (sep ? sep.indexOf(type) > -1 : type == \",\") {\n var lex = cx.state.lexical;\n if (lex.info == \"call\") lex.pos = (lex.pos || 0) + 1;\n return cont(function(type, value) {\n if (type == end || value == end) return pass()\n return pass(what)\n }, proceed);\n }\n if (type == end || value == end) return cont();\n return cont(expect(end));\n }\n return function(type, value) {\n if (type == end || value == end) return cont();\n return pass(what, proceed);\n };\n }\n function contCommasep(what, end, info) {\n for (var i = 3; i < arguments.length; i++)\n cx.cc.push(arguments[i]);\n return cont(pushlex(end, info), commasep(what, end), poplex);\n }\n function block(type) {\n if (type == \"}\") return cont();\n return pass(statement, block);\n }\n function maybetype(type, value) {\n if (isTS) {\n if (type == \":\") return cont(typeexpr);\n if (value == \"?\") return cont(maybetype);\n }\n }\n function mayberettype(type) {\n if (isTS && type == \":\") {\n if (cx.stream.match(/^\\s*\\w+\\s+is\\b/, false)) return cont(expression, isKW, typeexpr)\n else return cont(typeexpr)\n }\n }\n function isKW(_, value) {\n if (value == \"is\") {\n cx.marked = \"keyword\"\n return cont()\n }\n }\n function typeexpr(type, value) {\n if (value == \"keyof\" || value == \"typeof\") {\n cx.marked = \"keyword\"\n return cont(value == \"keyof\" ? typeexpr : expressionNoComma)\n }\n if (type == \"variable\" || value == \"void\") {\n cx.marked = \"type\"\n return cont(afterType)\n }\n if (type == \"string\" || type == \"number\" || type == \"atom\") return cont(afterType);\n if (type == \"[\") return cont(pushlex(\"]\"), commasep(typeexpr, \"]\", \",\"), poplex, afterType)\n if (type == \"{\") return cont(pushlex(\"}\"), commasep(typeprop, \"}\", \",;\"), poplex, afterType)\n if (type == \"(\") return cont(commasep(typearg, \")\"), maybeReturnType)\n if (type == \"<\") return cont(commasep(typeexpr, \">\"), typeexpr)\n }\n function maybeReturnType(type) {\n if (type == \"=>\") return cont(typeexpr)\n }\n function typeprop(type, value) {\n if (type == \"variable\" || cx.style == \"keyword\") {\n cx.marked = \"property\"\n return cont(typeprop)\n } else if (value == \"?\") {\n return cont(typeprop)\n } else if (type == \":\") {\n return cont(typeexpr)\n } else if (type == \"[\") {\n return cont(expression, maybetype, expect(\"]\"), typeprop)\n }\n }\n function typearg(type, value) {\n if (type == \"variable\" && cx.stream.match(/^\\s*[?:]/, false) || value == \"?\") return cont(typearg)\n if (type == \":\") return cont(typeexpr)\n return pass(typeexpr)\n }\n function afterType(type, value) {\n if (value == \"<\") return cont(pushlex(\">\"), commasep(typeexpr, \">\"), poplex, afterType)\n if (value == \"|\" || type == \".\" || value == \"&\") return cont(typeexpr)\n if (type == \"[\") return cont(expect(\"]\"), afterType)\n if (value == \"extends\" || value == \"implements\") { cx.marked = \"keyword\"; return cont(typeexpr) }\n }\n function maybeTypeArgs(_, value) {\n if (value == \"<\") return cont(pushlex(\">\"), commasep(typeexpr, \">\"), poplex, afterType)\n }\n function typeparam() {\n return pass(typeexpr, maybeTypeDefault)\n }\n function maybeTypeDefault(_, value) {\n if (value == \"=\") return cont(typeexpr)\n }\n function vardef(_, value) {\n if (value == \"enum\") {cx.marked = \"keyword\"; return cont(enumdef)}\n return pass(pattern, maybetype, maybeAssign, vardefCont);\n }\n function pattern(type, value) {\n if (isTS && isModifier(value)) { cx.marked = \"keyword\"; return cont(pattern) }\n if (type == \"variable\") { register(value); return cont(); }\n if (type == \"spread\") return cont(pattern);\n if (type == \"[\") return contCommasep(pattern, \"]\");\n if (type == \"{\") return contCommasep(proppattern, \"}\");\n }\n function proppattern(type, value) {\n if (type == \"variable\" && !cx.stream.match(/^\\s*:/, false)) {\n register(value);\n return cont(maybeAssign);\n }\n if (type == \"variable\") cx.marked = \"property\";\n if (type == \"spread\") return cont(pattern);\n if (type == \"}\") return pass();\n return cont(expect(\":\"), pattern, maybeAssign);\n }\n function maybeAssign(_type, value) {\n if (value == \"=\") return cont(expressionNoComma);\n }\n function vardefCont(type) {\n if (type == \",\") return cont(vardef);\n }\n function maybeelse(type, value) {\n if (type == \"keyword b\" && value == \"else\") return cont(pushlex(\"form\", \"else\"), statement, poplex);\n }\n function forspec(type, value) {\n if (value == \"await\") return cont(forspec);\n if (type == \"(\") return cont(pushlex(\")\"), forspec1, expect(\")\"), poplex);\n }\n function forspec1(type) {\n if (type == \"var\") return cont(vardef, expect(\";\"), forspec2);\n if (type == \";\") return cont(forspec2);\n if (type == \"variable\") return cont(formaybeinof);\n return pass(expression, expect(\";\"), forspec2);\n }\n function formaybeinof(_type, value) {\n if (value == \"in\" || value == \"of\") { cx.marked = \"keyword\"; return cont(expression); }\n return cont(maybeoperatorComma, forspec2);\n }\n function forspec2(type, value) {\n if (type == \";\") return cont(forspec3);\n if (value == \"in\" || value == \"of\") { cx.marked = \"keyword\"; return cont(expression); }\n return pass(expression, expect(\";\"), forspec3);\n }\n function forspec3(type) {\n if (type != \")\") cont(expression);\n }\n function functiondef(type, value) {\n if (value == \"*\") {cx.marked = \"keyword\"; return cont(functiondef);}\n if (type == \"variable\") {register(value); return cont(functiondef);}\n if (type == \"(\") return cont(pushcontext, pushlex(\")\"), commasep(funarg, \")\"), poplex, mayberettype, statement, popcontext);\n if (isTS && value == \"<\") return cont(pushlex(\">\"), commasep(typeparam, \">\"), poplex, functiondef)\n }\n function funarg(type, value) {\n if (value == \"@\") cont(expression, funarg)\n if (type == \"spread\") return cont(funarg);\n if (isTS && isModifier(value)) { cx.marked = \"keyword\"; return cont(funarg); }\n return pass(pattern, maybetype, maybeAssign);\n }\n function classExpression(type, value) {\n // Class expressions may have an optional name.\n if (type == \"variable\") return className(type, value);\n return classNameAfter(type, value);\n }\n function className(type, value) {\n if (type == \"variable\") {register(value); return cont(classNameAfter);}\n }\n function classNameAfter(type, value) {\n if (value == \"<\") return cont(pushlex(\">\"), commasep(typeparam, \">\"), poplex, classNameAfter)\n if (value == \"extends\" || value == \"implements\" || (isTS && type == \",\")) {\n if (value == \"implements\") cx.marked = \"keyword\";\n return cont(isTS ? typeexpr : expression, classNameAfter);\n }\n if (type == \"{\") return cont(pushlex(\"}\"), classBody, poplex);\n }\n function classBody(type, value) {\n if (type == \"async\" ||\n (type == \"variable\" &&\n (value == \"static\" || value == \"get\" || value == \"set\" || (isTS && isModifier(value))) &&\n cx.stream.match(/^\\s+[\\w$\\xa1-\\uffff]/, false))) {\n cx.marked = \"keyword\";\n return cont(classBody);\n }\n if (type == \"variable\" || cx.style == \"keyword\") {\n cx.marked = \"property\";\n return cont(isTS ? classfield : functiondef, classBody);\n }\n if (type == \"[\")\n return cont(expression, maybetype, expect(\"]\"), isTS ? classfield : functiondef, classBody)\n if (value == \"*\") {\n cx.marked = \"keyword\";\n return cont(classBody);\n }\n if (type == \";\") return cont(classBody);\n if (type == \"}\") return cont();\n if (value == \"@\") return cont(expression, classBody)\n }\n function classfield(type, value) {\n if (value == \"?\") return cont(classfield)\n if (type == \":\") return cont(typeexpr, maybeAssign)\n if (value == \"=\") return cont(expressionNoComma)\n return pass(functiondef)\n }\n function afterExport(type, value) {\n if (value == \"*\") { cx.marked = \"keyword\"; return cont(maybeFrom, expect(\";\")); }\n if (value == \"default\") { cx.marked = \"keyword\"; return cont(expression, expect(\";\")); }\n if (type == \"{\") return cont(commasep(exportField, \"}\"), maybeFrom, expect(\";\"));\n return pass(statement);\n }\n function exportField(type, value) {\n if (value == \"as\") { cx.marked = \"keyword\"; return cont(expect(\"variable\")); }\n if (type == \"variable\") return pass(expressionNoComma, exportField);\n }\n function afterImport(type) {\n if (type == \"string\") return cont();\n if (type == \"(\") return pass(expression);\n return pass(importSpec, maybeMoreImports, maybeFrom);\n }\n function importSpec(type, value) {\n if (type == \"{\") return contCommasep(importSpec, \"}\");\n if (type == \"variable\") register(value);\n if (value == \"*\") cx.marked = \"keyword\";\n return cont(maybeAs);\n }\n function maybeMoreImports(type) {\n if (type == \",\") return cont(importSpec, maybeMoreImports)\n }\n function maybeAs(_type, value) {\n if (value == \"as\") { cx.marked = \"keyword\"; return cont(importSpec); }\n }\n function maybeFrom(_type, value) {\n if (value == \"from\") { cx.marked = \"keyword\"; return cont(expression); }\n }\n function arrayLiteral(type) {\n if (type == \"]\") return cont();\n return pass(commasep(expressionNoComma, \"]\"));\n }\n function enumdef() {\n return pass(pushlex(\"form\"), pattern, expect(\"{\"), pushlex(\"}\"), commasep(enummember, \"}\"), poplex, poplex)\n }\n function enummember() {\n return pass(pattern, maybeAssign);\n }\n\n function isContinuedStatement(state, textAfter) {\n return state.lastType == \"operator\" || state.lastType == \",\" ||\n isOperatorChar.test(textAfter.charAt(0)) ||\n /[,.]/.test(textAfter.charAt(0));\n }\n\n function expressionAllowed(stream, state, backUp) {\n return state.tokenize == tokenBase &&\n /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\\[{}\\(,;:]|=>)$/.test(state.lastType) ||\n (state.lastType == \"quasi\" && /\\{\\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0))))\n }\n\n // Interface\n\n return {\n startState: function(basecolumn) {\n var state = {\n tokenize: tokenBase,\n lastType: \"sof\",\n cc: [],\n lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, \"block\", false),\n localVars: parserConfig.localVars,\n context: parserConfig.localVars && new Context(null, null, false),\n indented: basecolumn || 0\n };\n if (parserConfig.globalVars && typeof parserConfig.globalVars == \"object\")\n state.globalVars = parserConfig.globalVars;\n return state;\n },\n\n token: function(stream, state) {\n if (stream.sol()) {\n if (!state.lexical.hasOwnProperty(\"align\"))\n state.lexical.align = false;\n state.indented = stream.indentation();\n findFatArrow(stream, state);\n }\n if (state.tokenize != tokenComment && stream.eatSpace()) return null;\n var style = state.tokenize(stream, state);\n if (type == \"comment\") return style;\n state.lastType = type == \"operator\" && (content == \"++\" || content == \"--\") ? \"incdec\" : type;\n return parseJS(state, style, type, content, stream);\n },\n\n indent: function(state, textAfter) {\n if (state.tokenize == tokenComment) return CodeMirror.Pass;\n if (state.tokenize != tokenBase) return 0;\n var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top\n // Kludge to prevent 'maybelse' from blocking lexical scope pops\n if (!/^\\s*else\\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {\n var c = state.cc[i];\n if (c == poplex) lexical = lexical.prev;\n else if (c != maybeelse) break;\n }\n while ((lexical.type == \"stat\" || lexical.type == \"form\") &&\n (firstChar == \"}\" || ((top = state.cc[state.cc.length - 1]) &&\n (top == maybeoperatorComma || top == maybeoperatorNoComma) &&\n !/^[,\\.=+\\-*:?[\\(]/.test(textAfter))))\n lexical = lexical.prev;\n if (statementIndent && lexical.type == \")\" && lexical.prev.type == \"stat\")\n lexical = lexical.prev;\n var type = lexical.type, closing = firstChar == type;\n\n if (type == \"vardef\") return lexical.indented + (state.lastType == \"operator\" || state.lastType == \",\" ? lexical.info.length + 1 : 0);\n else if (type == \"form\" && firstChar == \"{\") return lexical.indented;\n else if (type == \"form\") return lexical.indented + indentUnit;\n else if (type == \"stat\")\n return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);\n else if (lexical.info == \"switch\" && !closing && parserConfig.doubleIndentSwitch != false)\n return lexical.indented + (/^(?:case|default)\\b/.test(textAfter) ? indentUnit : 2 * indentUnit);\n else if (lexical.align) return lexical.column + (closing ? 0 : 1);\n else return lexical.indented + (closing ? 0 : indentUnit);\n },\n\n electricInput: /^\\s*(?:case .*?:|default:|\\{|\\})$/,\n blockCommentStart: jsonMode ? null : \"/*\",\n blockCommentEnd: jsonMode ? null : \"*/\",\n blockCommentContinue: jsonMode ? null : \" * \",\n lineComment: jsonMode ? null : \"//\",\n fold: \"brace\",\n closeBrackets: \"()[]{}''\\\"\\\"``\",\n\n helperType: jsonMode ? \"json\" : \"javascript\",\n jsonldMode: jsonldMode,\n jsonMode: jsonMode,\n\n expressionAllowed: expressionAllowed,\n\n skipExpression: function(state) {\n var top = state.cc[state.cc.length - 1]\n if (top == expression || top == expressionNoComma) state.cc.pop()\n }\n };\n});\n\nCodeMirror.registerHelper(\"wordChars\", \"javascript\", /[\\w$]/);\n\nCodeMirror.defineMIME(\"text/javascript\", \"javascript\");\nCodeMirror.defineMIME(\"text/ecmascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/javascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/x-javascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/ecmascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/json\", {name: \"javascript\", json: true});\nCodeMirror.defineMIME(\"application/x-json\", {name: \"javascript\", json: true});\nCodeMirror.defineMIME(\"application/ld+json\", {name: \"javascript\", jsonld: true});\nCodeMirror.defineMIME(\"text/typescript\", { name: \"javascript\", typescript: true });\nCodeMirror.defineMIME(\"application/typescript\", { name: \"javascript\", typescript: true });\n\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nvar htmlConfig = {\n autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,\n 'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,\n 'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,\n 'track': true, 'wbr': true, 'menuitem': true},\n implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,\n 'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,\n 'th': true, 'tr': true},\n contextGrabbers: {\n 'dd': {'dd': true, 'dt': true},\n 'dt': {'dd': true, 'dt': true},\n 'li': {'li': true},\n 'option': {'option': true, 'optgroup': true},\n 'optgroup': {'optgroup': true},\n 'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,\n 'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,\n 'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,\n 'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,\n 'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},\n 'rp': {'rp': true, 'rt': true},\n 'rt': {'rp': true, 'rt': true},\n 'tbody': {'tbody': true, 'tfoot': true},\n 'td': {'td': true, 'th': true},\n 'tfoot': {'tbody': true},\n 'th': {'td': true, 'th': true},\n 'thead': {'tbody': true, 'tfoot': true},\n 'tr': {'tr': true}\n },\n doNotIndent: {\"pre\": true},\n allowUnquoted: true,\n allowMissing: true,\n caseFold: true\n}\n\nvar xmlConfig = {\n autoSelfClosers: {},\n implicitlyClosed: {},\n contextGrabbers: {},\n doNotIndent: {},\n allowUnquoted: false,\n allowMissing: false,\n allowMissingTagName: false,\n caseFold: false\n}\n\nCodeMirror.defineMode(\"xml\", function(editorConf, config_) {\n var indentUnit = editorConf.indentUnit\n var config = {}\n var defaults = config_.htmlMode ? htmlConfig : xmlConfig\n for (var prop in defaults) config[prop] = defaults[prop]\n for (var prop in config_) config[prop] = config_[prop]\n\n // Return variables for tokenizers\n var type, setStyle;\n\n function inText(stream, state) {\n function chain(parser) {\n state.tokenize = parser;\n return parser(stream, state);\n }\n\n var ch = stream.next();\n if (ch == \"<\") {\n if (stream.eat(\"!\")) {\n if (stream.eat(\"[\")) {\n if (stream.match(\"CDATA[\")) return chain(inBlock(\"atom\", \"]]>\"));\n else return null;\n } else if (stream.match(\"--\")) {\n return chain(inBlock(\"comment\", \"-->\"));\n } else if (stream.match(\"DOCTYPE\", true, true)) {\n stream.eatWhile(/[\\w\\._\\-]/);\n return chain(doctype(1));\n } else {\n return null;\n }\n } else if (stream.eat(\"?\")) {\n stream.eatWhile(/[\\w\\._\\-]/);\n state.tokenize = inBlock(\"meta\", \"?>\");\n return \"meta\";\n } else {\n type = stream.eat(\"/\") ? \"closeTag\" : \"openTag\";\n state.tokenize = inTag;\n return \"tag bracket\";\n }\n } else if (ch == \"&\") {\n var ok;\n if (stream.eat(\"#\")) {\n if (stream.eat(\"x\")) {\n ok = stream.eatWhile(/[a-fA-F\\d]/) && stream.eat(\";\");\n } else {\n ok = stream.eatWhile(/[\\d]/) && stream.eat(\";\");\n }\n } else {\n ok = stream.eatWhile(/[\\w\\.\\-:]/) && stream.eat(\";\");\n }\n return ok ? \"atom\" : \"error\";\n } else {\n stream.eatWhile(/[^&<]/);\n return null;\n }\n }\n inText.isInText = true;\n\n function inTag(stream, state) {\n var ch = stream.next();\n if (ch == \">\" || (ch == \"/\" && stream.eat(\">\"))) {\n state.tokenize = inText;\n type = ch == \">\" ? \"endTag\" : \"selfcloseTag\";\n return \"tag bracket\";\n } else if (ch == \"=\") {\n type = \"equals\";\n return null;\n } else if (ch == \"<\") {\n state.tokenize = inText;\n state.state = baseState;\n state.tagName = state.tagStart = null;\n var next = state.tokenize(stream, state);\n return next ? next + \" tag error\" : \"tag error\";\n } else if (/[\\'\\\"]/.test(ch)) {\n state.tokenize = inAttribute(ch);\n state.stringStartCol = stream.column();\n return state.tokenize(stream, state);\n } else {\n stream.match(/^[^\\s\\u00a0=<>\\\"\\']*[^\\s\\u00a0=<>\\\"\\'\\/]/);\n return \"word\";\n }\n }\n\n function inAttribute(quote) {\n var closure = function(stream, state) {\n while (!stream.eol()) {\n if (stream.next() == quote) {\n state.tokenize = inTag;\n break;\n }\n }\n return \"string\";\n };\n closure.isInAttribute = true;\n return closure;\n }\n\n function inBlock(style, terminator) {\n return function(stream, state) {\n while (!stream.eol()) {\n if (stream.match(terminator)) {\n state.tokenize = inText;\n break;\n }\n stream.next();\n }\n return style;\n }\n }\n\n function doctype(depth) {\n return function(stream, state) {\n var ch;\n while ((ch = stream.next()) != null) {\n if (ch == \"<\") {\n state.tokenize = doctype(depth + 1);\n return state.tokenize(stream, state);\n } else if (ch == \">\") {\n if (depth == 1) {\n state.tokenize = inText;\n break;\n } else {\n state.tokenize = doctype(depth - 1);\n return state.tokenize(stream, state);\n }\n }\n }\n return \"meta\";\n };\n }\n\n function Context(state, tagName, startOfLine) {\n this.prev = state.context;\n this.tagName = tagName;\n this.indent = state.indented;\n this.startOfLine = startOfLine;\n if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))\n this.noIndent = true;\n }\n function popContext(state) {\n if (state.context) state.context = state.context.prev;\n }\n function maybePopContext(state, nextTagName) {\n var parentTagName;\n while (true) {\n if (!state.context) {\n return;\n }\n parentTagName = state.context.tagName;\n if (!config.contextGrabbers.hasOwnProperty(parentTagName) ||\n !config.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {\n return;\n }\n popContext(state);\n }\n }\n\n function baseState(type, stream, state) {\n if (type == \"openTag\") {\n state.tagStart = stream.column();\n return tagNameState;\n } else if (type == \"closeTag\") {\n return closeTagNameState;\n } else {\n return baseState;\n }\n }\n function tagNameState(type, stream, state) {\n if (type == \"word\") {\n state.tagName = stream.current();\n setStyle = \"tag\";\n return attrState;\n } else if (config.allowMissingTagName && type == \"endTag\") {\n setStyle = \"tag bracket\";\n return attrState(type, stream, state);\n } else {\n setStyle = \"error\";\n return tagNameState;\n }\n }\n function closeTagNameState(type, stream, state) {\n if (type == \"word\") {\n var tagName = stream.current();\n if (state.context && state.context.tagName != tagName &&\n config.implicitlyClosed.hasOwnProperty(state.context.tagName))\n popContext(state);\n if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {\n setStyle = \"tag\";\n return closeState;\n } else {\n setStyle = \"tag error\";\n return closeStateErr;\n }\n } else if (config.allowMissingTagName && type == \"endTag\") {\n setStyle = \"tag bracket\";\n return closeState(type, stream, state);\n } else {\n setStyle = \"error\";\n return closeStateErr;\n }\n }\n\n function closeState(type, _stream, state) {\n if (type != \"endTag\") {\n setStyle = \"error\";\n return closeState;\n }\n popContext(state);\n return baseState;\n }\n function closeStateErr(type, stream, state) {\n setStyle = \"error\";\n return closeState(type, stream, state);\n }\n\n function attrState(type, _stream, state) {\n if (type == \"word\") {\n setStyle = \"attribute\";\n return attrEqState;\n } else if (type == \"endTag\" || type == \"selfcloseTag\") {\n var tagName = state.tagName, tagStart = state.tagStart;\n state.tagName = state.tagStart = null;\n if (type == \"selfcloseTag\" ||\n config.autoSelfClosers.hasOwnProperty(tagName)) {\n maybePopContext(state, tagName);\n } else {\n maybePopContext(state, tagName);\n state.context = new Context(state, tagName, tagStart == state.indented);\n }\n return baseState;\n }\n setStyle = \"error\";\n return attrState;\n }\n function attrEqState(type, stream, state) {\n if (type == \"equals\") return attrValueState;\n if (!config.allowMissing) setStyle = \"error\";\n return attrState(type, stream, state);\n }\n function attrValueState(type, stream, state) {\n if (type == \"string\") return attrContinuedState;\n if (type == \"word\" && config.allowUnquoted) {setStyle = \"string\"; return attrState;}\n setStyle = \"error\";\n return attrState(type, stream, state);\n }\n function attrContinuedState(type, stream, state) {\n if (type == \"string\") return attrContinuedState;\n return attrState(type, stream, state);\n }\n\n return {\n startState: function(baseIndent) {\n var state = {tokenize: inText,\n state: baseState,\n indented: baseIndent || 0,\n tagName: null, tagStart: null,\n context: null}\n if (baseIndent != null) state.baseIndent = baseIndent\n return state\n },\n\n token: function(stream, state) {\n if (!state.tagName && stream.sol())\n state.indented = stream.indentation();\n\n if (stream.eatSpace()) return null;\n type = null;\n var style = state.tokenize(stream, state);\n if ((style || type) && style != \"comment\") {\n setStyle = null;\n state.state = state.state(type || style, stream, state);\n if (setStyle)\n style = setStyle == \"error\" ? style + \" error\" : setStyle;\n }\n return style;\n },\n\n indent: function(state, textAfter, fullLine) {\n var context = state.context;\n // Indent multi-line strings (e.g. css).\n if (state.tokenize.isInAttribute) {\n if (state.tagStart == state.indented)\n return state.stringStartCol + 1;\n else\n return state.indented + indentUnit;\n }\n if (context && context.noIndent) return CodeMirror.Pass;\n if (state.tokenize != inTag && state.tokenize != inText)\n return fullLine ? fullLine.match(/^(\\s*)/)[0].length : 0;\n // Indent the starts of attribute names.\n if (state.tagName) {\n if (config.multilineTagIndentPastTag !== false)\n return state.tagStart + state.tagName.length + 2;\n else\n return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1);\n }\n if (config.alignCDATA && /$/,\n blockCommentStart: \"\",\n\n configuration: config.htmlMode ? \"html\" : \"xml\",\n helperType: config.htmlMode ? \"html\" : \"xml\",\n\n skipAttribute: function(state) {\n if (state.state == attrValueState)\n state.state = attrState\n }\n };\n});\n\nCodeMirror.defineMIME(\"text/xml\", \"xml\");\nCodeMirror.defineMIME(\"application/xml\", \"xml\");\nif (!CodeMirror.mimeModes.hasOwnProperty(\"text/html\"))\n CodeMirror.defineMIME(\"text/html\", {name: \"xml\", htmlMode: true});\n\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"), require(\"../xml/xml\"), require(\"../javascript/javascript\"), require(\"../css/css\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\", \"../xml/xml\", \"../javascript/javascript\", \"../css/css\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n\n var defaultTags = {\n script: [\n [\"lang\", /(javascript|babel)/i, \"javascript\"],\n [\"type\", /^(?:text|application)\\/(?:x-)?(?:java|ecma)script$|^module$|^$/i, \"javascript\"],\n [\"type\", /./, \"text/plain\"],\n [null, null, \"javascript\"]\n ],\n style: [\n [\"lang\", /^css$/i, \"css\"],\n [\"type\", /^(text\\/)?(x-)?(stylesheet|css)$/i, \"css\"],\n [\"type\", /./, \"text/plain\"],\n [null, null, \"css\"]\n ]\n };\n\n function maybeBackup(stream, pat, style) {\n var cur = stream.current(), close = cur.search(pat);\n if (close > -1) {\n stream.backUp(cur.length - close);\n } else if (cur.match(/<\\/?$/)) {\n stream.backUp(cur.length);\n if (!stream.match(pat, false)) stream.match(cur);\n }\n return style;\n }\n\n var attrRegexpCache = {};\n function getAttrRegexp(attr) {\n var regexp = attrRegexpCache[attr];\n if (regexp) return regexp;\n return attrRegexpCache[attr] = new RegExp(\"\\\\s+\" + attr + \"\\\\s*=\\\\s*('|\\\")?([^'\\\"]+)('|\\\")?\\\\s*\");\n }\n\n function getAttrValue(text, attr) {\n var match = text.match(getAttrRegexp(attr))\n return match ? /^\\s*(.*?)\\s*$/.exec(match[2])[1] : \"\"\n }\n\n function getTagRegexp(tagName, anchored) {\n return new RegExp((anchored ? \"^\" : \"\") + \"<\\/\\s*\" + tagName + \"\\s*>\", \"i\");\n }\n\n function addTags(from, to) {\n for (var tag in from) {\n var dest = to[tag] || (to[tag] = []);\n var source = from[tag];\n for (var i = source.length - 1; i >= 0; i--)\n dest.unshift(source[i])\n }\n }\n\n function findMatchingMode(tagInfo, tagText) {\n for (var i = 0; i < tagInfo.length; i++) {\n var spec = tagInfo[i];\n if (!spec[0] || spec[1].test(getAttrValue(tagText, spec[0]))) return spec[2];\n }\n }\n\n CodeMirror.defineMode(\"htmlmixed\", function (config, parserConfig) {\n var htmlMode = CodeMirror.getMode(config, {\n name: \"xml\",\n htmlMode: true,\n multilineTagIndentFactor: parserConfig.multilineTagIndentFactor,\n multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag\n });\n\n var tags = {};\n var configTags = parserConfig && parserConfig.tags, configScript = parserConfig && parserConfig.scriptTypes;\n addTags(defaultTags, tags);\n if (configTags) addTags(configTags, tags);\n if (configScript) for (var i = configScript.length - 1; i >= 0; i--)\n tags.script.unshift([\"type\", configScript[i].matches, configScript[i].mode])\n\n function html(stream, state) {\n var style = htmlMode.token(stream, state.htmlState), tag = /\\btag\\b/.test(style), tagName\n if (tag && !/[<>\\s\\/]/.test(stream.current()) &&\n (tagName = state.htmlState.tagName && state.htmlState.tagName.toLowerCase()) &&\n tags.hasOwnProperty(tagName)) {\n state.inTag = tagName + \" \"\n } else if (state.inTag && tag && />$/.test(stream.current())) {\n var inTag = /^([\\S]+) (.*)/.exec(state.inTag)\n state.inTag = null\n var modeSpec = stream.current() == \">\" && findMatchingMode(tags[inTag[1]], inTag[2])\n var mode = CodeMirror.getMode(config, modeSpec)\n var endTagA = getTagRegexp(inTag[1], true), endTag = getTagRegexp(inTag[1], false);\n state.token = function (stream, state) {\n if (stream.match(endTagA, false)) {\n state.token = html;\n state.localState = state.localMode = null;\n return null;\n }\n return maybeBackup(stream, endTag, state.localMode.token(stream, state.localState));\n };\n state.localMode = mode;\n state.localState = CodeMirror.startState(mode, htmlMode.indent(state.htmlState, \"\"));\n } else if (state.inTag) {\n state.inTag += stream.current()\n if (stream.eol()) state.inTag += \" \"\n }\n return style;\n };\n\n return {\n startState: function () {\n var state = CodeMirror.startState(htmlMode);\n return {token: html, inTag: null, localMode: null, localState: null, htmlState: state};\n },\n\n copyState: function (state) {\n var local;\n if (state.localState) {\n local = CodeMirror.copyState(state.localMode, state.localState);\n }\n return {token: state.token, inTag: state.inTag,\n localMode: state.localMode, localState: local,\n htmlState: CodeMirror.copyState(htmlMode, state.htmlState)};\n },\n\n token: function (stream, state) {\n return state.token(stream, state);\n },\n\n indent: function (state, textAfter, line) {\n if (!state.localMode || /^\\s*<\\//.test(textAfter))\n return htmlMode.indent(state.htmlState, textAfter);\n else if (state.localMode.indent)\n return state.localMode.indent(state.localState, textAfter, line);\n else\n return CodeMirror.Pass;\n },\n\n innerMode: function (state) {\n return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode};\n }\n };\n }, \"xml\", \"javascript\", \"css\");\n\n CodeMirror.defineMIME(\"text/html\", \"htmlmixed\");\n});\n","import Backbone from 'backbone';\nvar CodeMirror = require('codemirror/lib/codemirror');\nvar htmlMode = require('codemirror/mode/htmlmixed/htmlmixed');\nvar cssMode = require('codemirror/mode/css/css');\nvar formatting = require('codemirror-formatting');\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n input: '',\n label: '',\n codeName: '',\n theme: '',\n readOnly: true,\n lineNumbers: true\n },\n\n /** @inheritdoc */\n init(el) {\n this.editor = CodeMirror.fromTextArea(el, {\n dragDrop: false,\n lineWrapping: true,\n mode: this.get('codeName'),\n ...this.attributes\n });\n\n return this;\n },\n\n /** @inheritdoc */\n setContent(v) {\n if (!this.editor) return;\n this.editor.setValue(v);\n if (this.editor.autoFormatRange) {\n CodeMirror.commands.selectAll(this.editor);\n this.editor.autoFormatRange(\n this.editor.getCursor(true),\n this.editor.getCursor(false)\n );\n CodeMirror.commands.goDocStart(this.editor);\n }\n }\n});\n","import { extend } from 'underscore';\nimport Backbone from 'backbone';\n\nmodule.exports = Backbone.Model.extend({\n mapModel(model) {\n var code = '';\n var script = model.get('script');\n var type = model.get('type');\n var comps = model.get('components');\n var id = model.getId();\n\n if (script) {\n // If the component has scripts we need to expose his ID\n var attr = model.get('attributes');\n attr = extend({}, attr, { id });\n model.set('attributes', attr);\n var scrStr = model.getScriptString();\n\n // If the script was updated, I'll put its code in a separate container\n if (model.get('scriptUpdated')) {\n this.mapJs[type + '-' + id] = { ids: [id], code: scrStr };\n } else {\n var mapType = this.mapJs[type];\n\n if (mapType) {\n mapType.ids.push(id);\n } else {\n this.mapJs[type] = { ids: [id], code: scrStr };\n }\n }\n }\n\n comps.each(function(model) {\n code += this.mapModel(model);\n }, this);\n\n return code;\n },\n\n build(model) {\n this.mapJs = {};\n this.mapModel(model);\n\n var code = '';\n\n for (var type in this.mapJs) {\n var mapType = this.mapJs[type];\n var ids = '#' + mapType.ids.join(', #');\n code += `\n var items = document.querySelectorAll('${ids}');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){${mapType.code}}.bind(items[i]))();\n }`;\n }\n\n return code;\n }\n});\n","import { each } from 'underscore';\nimport Backbone from 'backbone';\n\nmodule.exports = Backbone.Model.extend({\n /** @inheritdoc */\n build(model) {\n var json = model.toJSON();\n this.beforeEach(json);\n\n each(\n json,\n function(v, attr) {\n var obj = json[attr];\n if (obj instanceof Backbone.Model) {\n json[attr] = this.build(obj);\n } else if (obj instanceof Backbone.Collection) {\n var coll = obj;\n json[attr] = [];\n if (coll.length) {\n coll.each(function(el, index) {\n json[attr][index] = this.build(el);\n }, this);\n }\n }\n },\n this\n );\n\n return json;\n },\n\n /**\n * Execute on each object\n * @param {Object} obj\n */\n beforeEach(obj) {\n delete obj.status;\n }\n});\n","import { isUndefined } from 'underscore';\n\nmodule.exports = require('backbone').Model.extend({\n initialize() {\n this.compCls = [];\n this.ids = [];\n },\n\n /**\n * Get CSS from a component\n * @param {Model} model\n * @return {String}\n */\n buildFromModel(model, opts = {}) {\n let code = '';\n const em = this.em;\n const avoidInline = em && em.getConfig('avoidInlineStyle');\n const style = model.styleToString();\n const classes = model.get('classes');\n const wrappesIsBody = opts.wrappesIsBody;\n const isWrapper = model.get('wrapper');\n this.ids.push(`#${model.getId()}`);\n\n // Let's know what classes I've found\n classes.each(model => this.compCls.push(model.getFullName()));\n\n if ((!avoidInline || isWrapper) && style) {\n let selector = `#${model.getId()}`;\n selector = wrappesIsBody && isWrapper ? 'body' : selector;\n code = `${selector}{${style}}`;\n }\n\n const components = model.components();\n components.each(model => (code += this.buildFromModel(model, opts)));\n return code;\n },\n\n build(model, opts = {}) {\n const cssc = opts.cssc;\n const em = opts.em || '';\n this.em = em;\n this.compCls = [];\n this.ids = [];\n var code = this.buildFromModel(model, opts);\n const clearStyles =\n isUndefined(opts.clearStyles) && em\n ? em.getConfig('clearStyles')\n : opts.clearStyles;\n\n if (cssc) {\n const rules = cssc.getAll();\n const atRules = {};\n const dump = [];\n\n rules.each(rule => {\n const atRule = rule.getAtRule();\n\n if (atRule) {\n const mRules = atRules[atRule];\n if (mRules) {\n mRules.push(rule);\n } else {\n atRules[atRule] = [rule];\n }\n return;\n }\n\n code += this.buildFromRule(rule, dump, opts);\n });\n\n // Get at-rules\n for (let atRule in atRules) {\n let rulesStr = '';\n const mRules = atRules[atRule];\n mRules.forEach(\n rule => (rulesStr += this.buildFromRule(rule, dump, opts))\n );\n\n if (rulesStr) {\n code += `${atRule}{${rulesStr}}`;\n }\n }\n\n em && clearStyles && rules.remove(dump);\n }\n\n return code;\n },\n\n /**\n * Get CSS from the rule model\n * @param {Model} rule\n * @return {string} CSS string\n */\n buildFromRule(rule, dump, opts = {}) {\n let result = '';\n const selectorStrNoAdd = rule.selectorsToString({ skipAdd: 1 });\n const selectorsAdd = rule.get('selectorsAdd');\n const singleAtRule = rule.get('singleAtRule');\n let found;\n\n // This will not render a rule if there is no its component\n rule.get('selectors').each(selector => {\n const name = selector.getFullName();\n if (\n this.compCls.indexOf(name) >= 0 ||\n this.ids.indexOf(name) >= 0 ||\n opts.keepUnusedStyles\n ) {\n found = 1;\n }\n });\n\n if ((selectorStrNoAdd && found) || selectorsAdd || singleAtRule) {\n const block = rule.getDeclaration();\n block && (result += block);\n } else {\n dump.push(rule);\n }\n\n return result;\n }\n});\n","import Backbone from 'backbone';\n\nmodule.exports = Backbone.Model.extend({\n build(model, opts = {}) {\n const models = model.get('components');\n\n if (opts.exportWrapper) {\n return opts.wrappesIsBody\n ? `${this.buildModels(models)}`\n : model.toHTML();\n }\n\n return this.buildModels(models);\n },\n\n buildModels(models) {\n let code = '';\n models.each(model => {\n code += model.toHTML();\n });\n return code;\n }\n});\n","module.exports = {\n // Style prefix\n stylePrefix: 'cm-',\n\n inlineCss: false\n};\n","/**\n * - [addGenerator](#addgenerator)\n * - [getGenerator](#getgenerator)\n * - [getGenerators](#getgenerators)\n * - [addViewer](#addviewer)\n * - [getViewer](#getviewer)\n * - [getViewers](#getviewers)\n * - [updateViewer](#updateviewer)\n * - [getCode](#getcode)\n *\n *\n * Before using methods you should get first the module from the editor instance, in this way:\n *\n * ```js\n * var codeManager = editor.CodeManager;\n * ```\n *\n * @module CodeManager\n */\nmodule.exports = () => {\n var c = {},\n defaults = require('./config/config'),\n gHtml = require('./model/HtmlGenerator'),\n gCss = require('./model/CssGenerator'),\n gJson = require('./model/JsonGenerator'),\n gJs = require('./model/JsGenerator'),\n eCM = require('./model/CodeMirrorEditor'),\n editorView = require('./view/EditorView');\n\n var generators = {},\n defGenerators = {},\n viewers = {},\n defViewers = {};\n\n return {\n getConfig() {\n return c;\n },\n\n config: c,\n\n EditorView: editorView,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'CodeManager',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n defGenerators.html = new gHtml();\n defGenerators.css = new gCss();\n defGenerators.json = new gJson();\n defGenerators.js = new gJs();\n defViewers.CodeMirror = new eCM();\n this.loadDefaultGenerators().loadDefaultViewers();\n\n return this;\n },\n\n /**\n * Add new code generator to the collection\n * @param {string} id Code generator ID\n * @param {Object} generator Code generator wrapper\n * @param {Function} generator.build Function that builds the code\n * @return {this}\n * @example\n * codeManager.addGenerator('html7',{\n * build: function(model){\n * return 'myCode';\n * }\n * });\n * */\n addGenerator(id, generator) {\n generators[id] = generator;\n return this;\n },\n\n /**\n * Get code generator by id\n * @param {string} id Code generator ID\n * @return {Object|null}\n * @example\n * var generator = codeManager.getGenerator('html7');\n * generator.build = function(model){\n * //extend\n * };\n * */\n getGenerator(id) {\n return generators[id] || null;\n },\n\n /**\n * Returns all code generators\n * @return {Array}\n * */\n getGenerators() {\n return generators;\n },\n\n /**\n * Add new code viewer\n * @param {string} id Code viewer ID\n * @param {Object} viewer Code viewer wrapper\n * @param {Function} viewer.init Set element on which viewer will be displayed\n * @param {Function} viewer.setContent Set content to the viewer\n * @return {this}\n * @example\n * codeManager.addViewer('ace',{\n * init: function(el){\n * var ace = require('ace-editor');\n * this.editor = ace.edit(el.id);\n * },\n * setContent: function(code){\n * this.editor.setValue(code);\n * }\n * });\n * */\n addViewer(id, viewer) {\n viewers[id] = viewer;\n return this;\n },\n\n /**\n * Get code viewer by id\n * @param {string} id Code viewer ID\n * @return {Object|null}\n * @example\n * var viewer = codeManager.getViewer('ace');\n * */\n getViewer(id) {\n return viewers[id] || null;\n },\n\n /**\n * Returns all code viewers\n * @return {Array}\n * */\n getViewers() {\n return viewers;\n },\n\n /**\n * Update code viewer content\n * @param {Object} viewer Viewer instance\n * @param {string} code Code string\n * @example\n * var AceViewer = codeManager.getViewer('ace');\n * // ...\n * var viewer = AceViewer.init(el);\n * // ...\n * codeManager.updateViewer(AceViewer, 'code');\n * */\n updateViewer(viewer, code) {\n viewer.setContent(code);\n },\n\n /**\n * Get code from model\n * @param {Object} model Any kind of model that will be passed to the build method of generator\n * @param {string} genId Code generator id\n * @param {Object} [opt] Options\n * @return {string}\n * @example\n * var codeStr = codeManager.getCode(model, 'html');\n * */\n getCode(model, genId, opt = {}) {\n opt.em = c.em;\n var generator = this.getGenerator(genId);\n return generator ? generator.build(model, opt) : '';\n },\n\n /**\n * Load default code generators\n * @return {this}\n * @private\n * */\n loadDefaultGenerators() {\n for (var id in defGenerators) this.addGenerator(id, defGenerators[id]);\n\n return this;\n },\n\n /**\n * Load default code viewers\n * @return {this}\n * @private\n * */\n loadDefaultViewers() {\n for (var id in defViewers) this.addViewer(id, defViewers[id]);\n\n return this;\n }\n };\n};\n","module.exports = require('backbone').View.extend({\n template({ pfx, ppfx, content, title }) {\n return `
\n
\n
${title}
\n
\n
\n
\n
${content}
\n
\n
\n
\n
`;\n },\n\n events: {\n click: 'onClick',\n 'click [data-close-modal]': 'hide'\n },\n\n initialize(o) {\n const model = this.model;\n const config = o.config || {};\n const pfx = config.stylePrefix || '';\n this.config = config;\n this.pfx = pfx;\n this.ppfx = config.pStylePrefix || '';\n this.listenTo(model, 'change:open', this.updateOpen);\n this.listenTo(model, 'change:title', this.updateTitle);\n this.listenTo(model, 'change:content', this.updateContent);\n },\n\n onClick(e) {\n const bkd = this.config.backdrop;\n bkd && e.target === this.el && this.hide();\n },\n\n /**\n * Returns collector element\n * @return {HTMLElement}\n * @private\n */\n getCollector() {\n if (!this.$collector)\n this.$collector = this.$el.find('.' + this.pfx + 'collector');\n return this.$collector;\n },\n\n /**\n * Returns content element\n * @return {HTMLElement}\n * @private\n */\n getContent() {\n const pfx = this.pfx;\n\n if (!this.$content) {\n this.$content = this.$el.find(`.${pfx}content #${pfx}c`);\n }\n\n return this.$content;\n },\n\n /**\n * Returns title element\n * @return {HTMLElement}\n * @private\n */\n getTitle() {\n if (!this.$title) this.$title = this.$el.find('.' + this.pfx + 'title');\n return this.$title.get(0);\n },\n\n /**\n * Update content\n * @private\n * */\n updateContent() {\n var content = this.getContent();\n const children = content.children();\n const coll = this.getCollector();\n const body = this.model.get('content');\n children.length && coll.append(children);\n content.empty().append(body);\n },\n\n /**\n * Update title\n * @private\n * */\n updateTitle() {\n var title = this.getTitle();\n if (title) title.innerHTML = this.model.get('title');\n },\n\n /**\n * Update open\n * @private\n * */\n updateOpen() {\n this.el.style.display = this.model.get('open') ? '' : 'none';\n },\n\n /**\n * Hide modal\n * @private\n * */\n hide() {\n this.model.set('open', 0);\n },\n\n /**\n * Show modal\n * @private\n * */\n show() {\n this.model.set('open', 1);\n },\n\n render() {\n const el = this.$el;\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const obj = this.model.toJSON();\n obj.pfx = this.pfx;\n obj.ppfx = this.ppfx;\n el.html(this.template(obj));\n el.attr('class', `${pfx}container`);\n this.updateOpen();\n return this;\n }\n});\n","var Backbone = require('backbone');\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n title: '',\n content: '',\n open: false\n }\n});\n","module.exports = {\n stylePrefix: 'mdl-',\n\n title: '',\n\n content: '',\n\n backdrop: true\n};\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/modal_dialog/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * modal: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const modal = editor.Modal;\n * ```\n *\n * * [open](#open)\n * * [close](#close)\n * * [isOpen](#isopen)\n * * [setTitle](#settitle)\n * * [getTitle](#gettitle)\n * * [setContent](#setcontent)\n * * [getContent](#getcontent)\n *\n * @module Modal\n */\n\nmodule.exports = () => {\n var c = {},\n defaults = require('./config/config'),\n ModalM = require('./model/Modal'),\n ModalView = require('./view/ModalView');\n var model, modal;\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Modal',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n model = new ModalM(c);\n modal = new ModalView({\n model,\n config: c\n });\n\n return this;\n },\n\n postRender(view) {\n const el = view.model.getConfig().el || view.el;\n this.render().appendTo(el);\n },\n\n /**\n * Open the modal window\n * @return {this}\n */\n open() {\n modal.show();\n return this;\n },\n\n /**\n * Close the modal window\n * @return {this}\n */\n close() {\n modal.hide();\n return this;\n },\n\n /**\n * Checks if the modal window is open\n * @return {Boolean}\n */\n isOpen() {\n return !!model.get('open');\n },\n\n /**\n * Set the title to the modal window\n * @param {string} title Title\n * @return {this}\n * @example\n * modal.setTitle('New title');\n */\n setTitle(title) {\n model.set('title', title);\n return this;\n },\n\n /**\n * Returns the title of the modal window\n * @return {string}\n */\n getTitle() {\n return model.get('title');\n },\n\n /**\n * Set the content of the modal window\n * @param {string|HTMLElement} content Content\n * @return {this}\n * @example\n * modal.setContent('
Some HTML content
');\n */\n setContent(content) {\n model.set('content', ' ');\n model.set('content', content);\n return this;\n },\n\n /**\n * Get the content of the modal window\n * @return {string}\n */\n getContent() {\n return model.get('content');\n },\n\n /**\n * Returns content element\n * @return {HTMLElement}\n * @private\n */\n getContentEl() {\n return modal.getContent().get(0);\n },\n\n /**\n * Returns modal model\n * @return {Model}\n * @private\n */\n getModel() {\n return model;\n },\n\n /**\n * Render the modal window\n * @return {HTMLElement}\n * @private\n */\n render() {\n return modal.render().$el;\n }\n };\n};\n","const Selector = require('./../model/Selector');\nconst inputProp = 'contentEditable';\n\nmodule.exports = require('backbone').View.extend({\n template() {\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const label = this.model.get('label') || '';\n return `\n \n ${label}\n \n ⨯\n \n `;\n },\n\n events: {\n 'click [data-tag-remove]': 'removeTag',\n 'click [data-tag-status]': 'changeStatus',\n 'dblclick [data-tag-name]': 'startEditTag',\n 'focusout [data-tag-name]': 'endEditTag'\n },\n\n initialize(o) {\n this.config = o.config || {};\n this.coll = o.coll || null;\n this.pfx = this.config.stylePrefix || '';\n this.ppfx = this.config.pStylePrefix || '';\n this.target = this.config.em;\n this.listenTo(this.model, 'change:active', this.updateStatus);\n },\n\n /**\n * Returns the element which containes the anme of the tag\n * @return {HTMLElement}\n */\n getInputEl() {\n if (!this.inputEl) {\n this.inputEl = this.el.querySelector('[data-tag-name]');\n }\n\n return this.inputEl;\n },\n\n /**\n * Start editing tag\n * @private\n */\n startEditTag() {\n const inputEl = this.getInputEl();\n inputEl[inputProp] = true;\n inputEl.focus();\n },\n\n /**\n * End editing tag. If the class typed already exists the\n * old one will be restored otherwise will be changed\n * @private\n */\n endEditTag() {\n const model = this.model;\n const inputEl = this.getInputEl();\n const label = inputEl.textContent;\n const name = Selector.escapeName(label);\n const em = this.target;\n const sm = em && em.get('SelectorManager');\n inputEl[inputProp] = false;\n\n if (sm) {\n if (sm.get(name)) {\n inputEl.innerText = model.get('label');\n } else {\n model.set({ name, label });\n }\n }\n },\n\n /**\n * Update status of the tag\n * @private\n */\n changeStatus() {\n this.model.set('active', !this.model.get('active'));\n },\n\n /**\n * Remove tag from the selected component\n * @param {Object} e\n * @private\n */\n removeTag(e) {\n const em = this.target;\n const model = this.model;\n const coll = this.coll;\n const el = this.el;\n const sel = em && em.getSelected();\n sel && sel.get & sel.get('classes').remove(model);\n coll && coll.remove(model);\n setTimeout(() => this.remove(), 0);\n },\n\n /**\n * Update status of the checkbox\n * @private\n */\n updateStatus() {\n var chkOn = 'fa-check-square-o';\n var chkOff = 'fa-square-o';\n\n if (!this.$chk) this.$chk = this.$el.find('#' + this.pfx + 'checkbox');\n\n if (this.model.get('active')) {\n this.$chk.removeClass(chkOff).addClass(chkOn);\n this.$el.removeClass('opac50');\n } else {\n this.$chk.removeClass(chkOn).addClass(chkOff);\n this.$el.addClass('opac50');\n }\n },\n\n render() {\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n this.$el.html(this.template());\n this.$el.attr('class', `${pfx}tag ${ppfx}three-bg`);\n this.updateStatus();\n return this;\n }\n});\n","import _ from 'underscore';\nimport Backbone from 'backbone';\nvar ClassTagView = require('./ClassTagView');\n\nmodule.exports = Backbone.View.extend({\n template: _.template(`\n
up\">\n
label\"><%= label %>
\n
status-c\">\n input-c\">\n
field <%= ppfx %>select\">\n input-holder\">\n \n \n
sel-arrow\">\n
d-s-arrow\">
\n
\n
\n
\n
\n
\n
tags-field\" class=\"<%= ppfx %>field\">\n
tags-c\">
\n new\" />\n add-tag\" class=\"fa fa-plus\">\n
\n
sel-help\">\n
label\"><%= selectedLabel %>
\n
sel\">
\n
\n
`),\n\n events: {},\n\n initialize(o = {}) {\n this.config = o.config || {};\n this.pfx = this.config.stylePrefix || '';\n this.ppfx = this.config.pStylePrefix || '';\n this.className = this.pfx + 'tags';\n this.addBtnId = this.pfx + 'add-tag';\n this.newInputId = this.pfx + 'new';\n this.stateInputId = this.pfx + 'states';\n this.stateInputC = this.pfx + 'input-c';\n this.states = this.config.states || [];\n this.events['click #' + this.addBtnId] = 'startNewTag';\n this.events['blur #' + this.newInputId] = 'endNewTag';\n this.events['keyup #' + this.newInputId] = 'onInputKeyUp';\n this.events['change #' + this.stateInputId] = 'stateChanged';\n\n this.target = this.config.em;\n this.em = this.target;\n\n this.listenTo(this.target, 'component:toggled', this.componentChanged);\n this.listenTo(this.target, 'component:update:classes', this.updateSelector);\n\n this.listenTo(this.collection, 'add', this.addNew);\n this.listenTo(this.collection, 'reset', this.renderClasses);\n this.listenTo(this.collection, 'remove', this.tagRemoved);\n\n this.delegateEvents();\n },\n\n /**\n * Triggered when a tag is removed from collection\n * @param {Object} model Removed model\n * @private\n */\n tagRemoved(model) {\n this.updateStateVis();\n },\n\n /**\n * Create select input with states\n * @return {string} String of options\n * @private\n */\n getStateOptions() {\n var strInput = '';\n for (var i = 0; i < this.states.length; i++) {\n strInput +=\n '';\n }\n return strInput;\n },\n\n /**\n * Add new model\n * @param {Object} model\n * @private\n */\n addNew(model) {\n this.addToClasses(model);\n },\n\n /**\n * Start tag creation\n * @param {Object} e\n * @private\n */\n startNewTag(e) {\n this.$addBtn.get(0).style.display = 'none';\n this.$input.show().focus();\n },\n\n /**\n * End tag creation\n * @param {Object} e\n * @private\n */\n endNewTag(e) {\n this.$addBtn.get(0).style.display = '';\n this.$input.hide().val('');\n },\n\n /**\n * Checks what to do on keyup event\n * @param {Object} e\n * @private\n */\n onInputKeyUp(e) {\n if (e.keyCode === 13) this.addNewTag(this.$input.val());\n else if (e.keyCode === 27) this.endNewTag();\n },\n\n /**\n * Triggered when component is changed\n * @param {Object} e\n * @private\n */\n componentChanged(e) {\n this.compTarget = this.target.getSelected();\n const target = this.compTarget;\n let validSelectors = [];\n\n if (target) {\n this.getStates().val(target.get('state'));\n validSelectors = target.get('classes').getValid();\n }\n\n this.collection.reset(validSelectors);\n this.updateStateVis();\n },\n\n /**\n * Update states visibility. Hides states in case there is no tags\n * inside collection\n * @private\n */\n updateStateVis() {\n const em = this.em;\n const avoidInline = em && em.getConfig('avoidInlineStyle');\n\n if (this.collection.length || avoidInline)\n this.getStatesC().css('display', 'block');\n else this.getStatesC().css('display', 'none');\n this.updateSelector();\n },\n\n /**\n * Udpate selector helper\n * @return {this}\n * @private\n */\n updateSelector() {\n const selected = this.target.getSelected();\n this.compTarget = selected;\n\n if (!selected || !selected.get) {\n return;\n }\n\n const state = selected.get('state');\n const coll = this.collection;\n let result = coll.getFullString(coll.getStyleable());\n result = result || `#${selected.getId()}`;\n result += state ? `:${state}` : '';\n const el = this.el.querySelector('#' + this.pfx + 'sel');\n el && (el.innerHTML = result);\n },\n\n /**\n * Triggered when the select with states is changed\n * @param {Object} e\n * @private\n */\n stateChanged(e) {\n if (this.compTarget) {\n this.compTarget.set('state', this.$states.val());\n this.updateSelector();\n }\n },\n\n /**\n * Add new tag to collection, if possible, and to the component\n * @param {Object} e\n * @private\n */\n addNewTag(label) {\n const target = this.target;\n const component = this.compTarget;\n\n if (!label.trim()) {\n return;\n }\n\n if (target) {\n const sm = target.get('SelectorManager');\n var model = sm.add({ label });\n\n if (component) {\n var compCls = component.get('classes');\n var lenB = compCls.length;\n compCls.add(model);\n var lenA = compCls.length;\n this.collection.add(model);\n this.updateStateVis();\n }\n }\n this.endNewTag();\n },\n\n /**\n * Add new object to collection\n * @param {Object} model Model\n * @param {Object} fragmentEl Fragment collection\n * @return {Object} Object created\n * @private\n * */\n addToClasses(model, fragmentEl) {\n var fragment = fragmentEl || null;\n\n var view = new ClassTagView({\n model,\n config: this.config,\n coll: this.collection\n });\n var rendered = view.render().el;\n\n if (fragment) fragment.appendChild(rendered);\n else this.getClasses().append(rendered);\n\n return rendered;\n },\n\n /**\n * Render the collection of classes\n * @return {this}\n * @private\n */\n renderClasses() {\n var fragment = document.createDocumentFragment();\n\n this.collection.each(function(model) {\n this.addToClasses(model, fragment);\n }, this);\n\n if (this.getClasses())\n this.getClasses()\n .empty()\n .append(fragment);\n\n return this;\n },\n\n /**\n * Return classes element\n * @return {HTMLElement}\n * @private\n */\n getClasses() {\n if (!this.$classes)\n this.$classes = this.$el.find('#' + this.pfx + 'tags-c');\n return this.$classes;\n },\n\n /**\n * Return states element\n * @return {HTMLElement}\n * @private\n */\n getStates() {\n if (!this.$states) this.$states = this.$el.find('#' + this.stateInputId);\n return this.$states;\n },\n\n /**\n * Return states container element\n * @return {HTMLElement}\n * @private\n */\n getStatesC() {\n if (!this.$statesC) this.$statesC = this.$el.find('#' + this.stateInputC);\n return this.$statesC;\n },\n\n render() {\n const ppfx = this.ppfx;\n const config = this.config;\n const $el = this.$el;\n $el.html(\n this.template({\n selectedLabel: config.selectedLabel,\n statesLabel: config.statesLabel,\n label: config.label,\n pfx: this.pfx,\n ppfx: this.ppfx\n })\n );\n this.$input = $el.find('input#' + this.newInputId);\n this.$addBtn = $el.find('#' + this.addBtnId);\n this.$classes = $el.find('#' + this.pfx + 'tags-c');\n this.$states = $el.find('#' + this.stateInputId);\n this.$statesC = $el.find('#' + this.stateInputC);\n this.$states.append(this.getStateOptions());\n this.renderClasses();\n $el.attr('class', `${this.className} ${ppfx}one-bg ${ppfx}two-color`);\n return this;\n }\n});\n","module.exports = {\n // Style prefix\n stylePrefix: 'clm-',\n\n // Specify the element to use as a container, string (query) or HTMLElement\n // With the empty value, nothing will be rendered\n appendTo: '',\n\n // Default selectors\n selectors: [],\n\n // Label for selectors\n label: 'Classes',\n\n // Label for states\n statesLabel: '- State -',\n\n selectedLabel: 'Selected',\n\n // States\n states: [\n { name: 'hover', label: 'Hover' },\n { name: 'active', label: 'Click' },\n { name: 'nth-of-type(2n)', label: 'Even/Odd' }\n ]\n};\n","/**\n * Selectors in GrapesJS are used in CSS Composer inside Rules and in Components as classes. To get better this concept let's take\n * a look at this code:\n *\n * ```css\n * span > #send-btn.btn{\n * ...\n * }\n * ```\n * ```html\n * \n * \n * \n * ```\n *\n * In this scenario we get:\n * * span -> selector of type `tag`\n * * send-btn -> selector of type `id`\n * * btn -> selector of type `class`\n *\n * So, for example, being `btn` the same class entity it'll be easier to refactor and track things.\n *\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/selector_manager/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * selectorManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const selectorManager = editor.SelectorManager;\n * ```\n *\n * * [getConfig](#getconfig)\n * * [add](#add)\n * * [addClass](#addclass)\n * * [get](#get)\n * * [getAll](#getAll)\n *\n * @module SelectorManager\n */\n\nimport { isString, isElement, isObject } from 'underscore';\n\nconst isId = str => isString(str) && str[0] == '#';\nconst isClass = str => isString(str) && str[0] == '.';\n\nmodule.exports = config => {\n var c = config || {},\n defaults = require('./config/config'),\n Selector = require('./model/Selector'),\n Selectors = require('./model/Selectors'),\n ClassTagsView = require('./view/ClassTagsView');\n var selectors, selectorTags;\n\n return {\n Selector,\n\n Selectors,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'SelectorManager',\n\n /**\n * Get configuration object\n * @return {Object}\n */\n getConfig() {\n return c;\n },\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @return {this}\n * @private\n */\n init(conf) {\n c = conf || {};\n\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n const em = c.em;\n const ppfx = c.pStylePrefix;\n\n if (ppfx) {\n c.stylePrefix = ppfx + c.stylePrefix;\n }\n\n selectorTags = new ClassTagsView({\n collection: new Selectors([], { em, config: c }),\n config: c\n });\n\n // Global selectors container\n selectors = new Selectors(c.selectors);\n selectors.on('add', model => em.trigger('selector:add', model));\n\n return this;\n },\n\n postRender() {\n const elTo = this.getConfig().appendTo;\n\n if (elTo) {\n const el = isElement(elTo) ? elTo : document.querySelector(elTo);\n el.appendChild(this.render([]));\n }\n },\n\n /**\n * Add a new selector to collection if it's not already exists. Class type is a default one\n * @param {String} name Selector name\n * @param {Object} opts Selector options\n * @param {String} [opts.label=''] Label for the selector, if it's not provided the label will be the same as the name\n * @param {String} [opts.type=1] Type of the selector. At the moment, only 'class' (1) is available\n * @return {Model}\n * @example\n * var selector = selectorManager.add('selectorName');\n * // Same as\n * var selector = selectorManager.add('selectorName', {\n * type: 1,\n * label: 'selectorName'\n * });\n * */\n add(name, opts = {}) {\n if (isObject(name)) {\n opts = name;\n } else {\n opts.name = name;\n }\n\n if (isId(opts.name)) {\n opts.name = opts.name.substr(1);\n opts.type = Selector.TYPE_ID;\n }\n\n if (opts.label && !opts.name) {\n opts.name = Selector.escapeName(opts.label);\n }\n\n const cname = opts.name;\n const selector = cname\n ? this.get(cname, opts.type)\n : selectors.where(opts)[0];\n\n if (!selector) {\n return selectors.add(opts);\n }\n\n return selector;\n },\n\n /**\n * Add class selectors\n * @param {Array|string} classes Array or string of classes\n * @return {Array} Array of added selectors\n * @example\n * sm.addClass('class1');\n * sm.addClass('class1 class2');\n * sm.addClass(['class1', 'class2']);\n * // -> [SelectorObject, ...]\n */\n addClass(classes) {\n const added = [];\n\n if (isString(classes)) {\n classes = classes.trim().split(' ');\n }\n\n classes.forEach(name => added.push(selectors.add({ name })));\n return added;\n },\n\n /**\n * Get the selector by its name\n * @param {String} name Selector name\n * @param {String} tyoe Selector type\n * @return {Model|null}\n * @example\n * var selector = selectorManager.get('selectorName');\n * */\n get(name, type = Selector.TYPE_CLASS) {\n if (isId(name)) {\n name = name.substr(1);\n type = Selector.TYPE_ID;\n }\n return selectors.where({ name, type })[0];\n },\n\n /**\n * Get all selectors\n * @return {Collection}\n * */\n getAll() {\n return selectors;\n },\n\n /**\n * Render class selectors. If an array of selectors is provided a new instance of the collection will be rendered\n * @param {Array} selectors\n * @return {HTMLElement}\n * @private\n */\n render(selectors) {\n if (selectors) {\n var view = new ClassTagsView({\n collection: new Selectors(selectors),\n config: c\n });\n return view.render().el;\n } else return selectorTags.render().el;\n }\n };\n};\n","import { keys } from 'underscore';\n\n// At-rules\n// https://developer.mozilla.org/it/docs/Web/API/CSSRule#Type_constants\nconst atRules = {\n 4: 'media',\n 5: 'font-face',\n 6: 'page',\n 7: 'keyframes',\n 11: 'counter-style',\n 12: 'supports',\n 13: 'document',\n 14: 'font-feature-values',\n 15: 'viewport'\n};\nconst atRuleKeys = keys(atRules);\nconst singleAtRules = ['5', '6', '11', '15'];\n\nmodule.exports = config => ({\n /**\n * Parse selector string to array.\n * Only classe based are valid as CSS rules inside editor, not valid\n * selectors will be dropped as additional\n * It's ok with the last part of the string as state (:hover, :active)\n * @param {string} str Selectors string\n * @return {Object}\n * @example\n * var res = ParserCss.parseSelector('.test1, .test1.test2, .test2 .test3');\n * console.log(res);\n * // {\n * //result: [['test1'], ['test1', 'test2']],\n * //add: ['.test2 .test3']\n * //}\n */\n parseSelector(str = '') {\n const add = [];\n const result = [];\n const sels = str.split(',');\n\n for (var i = 0, len = sels.length; i < len; i++) {\n var sel = sels[i].trim();\n\n // Will accept only concatenated classes and last\n // class might be with state (eg. :hover), nothing else.\n // Can also accept SINGLE ID selectors, eg. `#myid`, `#myid:hover`\n // Composed are not valid: `#myid.some-class`, `#myid.some-class:hover`\n if (\n /^(\\.{1}[\\w\\-]+)+(:{1,2}[\\w\\-()]+)?$/gi.test(sel) ||\n /^(#{1}[\\w\\-]+){1}(:{1,2}[\\w\\-()]+)?$/gi.test(sel)\n ) {\n var cls = sel.split('.').filter(Boolean);\n result.push(cls);\n } else {\n add.push(sel);\n }\n }\n\n return {\n result,\n add\n };\n },\n\n /**\n * Parse style declarations of the node\n * @param {CSSRule} node\n * @return {Object}\n */\n parseStyle(node) {\n const stl = node.style;\n const style = {};\n\n for (var i = 0, len = stl.length; i < len; i++) {\n const propName = stl[i];\n const propValue = stl.getPropertyValue(propName);\n const important = stl.getPropertyPriority(propName);\n style[propName] = `${propValue}${important ? ` !${important}` : ''}`;\n }\n\n return style;\n },\n\n /**\n * Get the condition when possible\n * @param {CSSRule} node\n * @return {string}\n */\n parseCondition(node) {\n const condition =\n node.conditionText ||\n (node.media && node.media.mediaText) ||\n node.name ||\n node.selectorText ||\n '';\n return condition.trim();\n },\n\n /**\n * Fetch data from node\n * @param {StyleSheet|CSSRule} el\n * @return {Array}\n */\n parseNode(el) {\n var result = [];\n var nodes = el.cssRules || [];\n\n for (var i = 0, len = nodes.length; i < len; i++) {\n const node = nodes[i];\n const type = node.type.toString();\n let singleAtRule = 0;\n let atRuleType = '';\n let condition = '';\n // keyText is for CSSKeyframeRule\n let sels = node.selectorText || node.keyText;\n const isSingleAtRule = singleAtRules.indexOf(type) >= 0;\n\n // Check if the node is an at-rule\n if (isSingleAtRule) {\n singleAtRule = 1;\n atRuleType = atRules[type];\n condition = this.parseCondition(node);\n } else if (atRuleKeys.indexOf(type) >= 0) {\n var subRules = this.parseNode(node);\n condition = this.parseCondition(node);\n\n for (var s = 0, lens = subRules.length; s < lens; s++) {\n var subRule = subRules[s];\n condition && (subRule.mediaText = condition);\n subRule.atRuleType = atRules[type];\n }\n result = result.concat(subRules);\n }\n\n if (!sels && !isSingleAtRule) continue;\n const style = this.parseStyle(node);\n const selsParsed = this.parseSelector(sels);\n const selsAdd = selsParsed.add;\n sels = selsParsed.result;\n\n let lastRule;\n // For each group of selectors\n for (var k = 0, len3 = sels.length; k < len3; k++) {\n var selArr = sels[k];\n var model = {};\n singleAtRule && (model.singleAtRule = singleAtRule);\n atRuleType && (model.atRuleType = atRuleType);\n\n //Isolate state from selector\n var stateArr = selArr[selArr.length - 1].split(/:(.+)/);\n if (stateArr[1]) {\n selArr[selArr.length - 1] = stateArr[0];\n model.state = stateArr[1];\n stateArr.splice(stateArr.length - 1, 1);\n }\n\n model.selectors = selArr;\n model.style = style;\n lastRule = model;\n result.push(model);\n }\n\n // Need to push somewhere not class-based selectors, if some rule was\n // created will push them there, otherwise will create a new rule\n if (selsAdd.length) {\n var selsAddStr = selsAdd.join(', ');\n if (lastRule) {\n lastRule.selectorsAdd = selsAddStr;\n } else {\n const model = {\n selectors: [],\n selectorsAdd: selsAddStr,\n style\n };\n singleAtRule && (model.singleAtRule = singleAtRule);\n atRuleType && (model.atRuleType = atRuleType);\n condition && (model.mediaText = condition);\n result.push(model);\n }\n }\n // console.log('LAST PUSH', result[result.length - 1]);\n }\n\n return result;\n },\n\n /**\n * Parse CSS string to a desired model object\n * @param {string} str HTML string\n * @return {Object|Array}\n */\n parse(str) {\n const el = document.createElement('style');\n el.innerHTML = str;\n\n // There is no .sheet before adding it to the \n document.head.appendChild(el);\n const sheet = el.sheet;\n document.head.removeChild(el);\n const result = this.parseNode(sheet);\n\n return result.length == 1 ? result[0] : result;\n }\n});\n","module.exports = {\n textTags: ['br', 'b', 'i', 'u', 'a', 'ul', 'ol']\n};\n","module.exports = () => {\n var c = {},\n defaults = require('./config/config'),\n parserCss = require('./model/ParserCss'),\n parserHtml = require('./model/ParserHtml');\n var pHtml, pCss;\n\n return {\n compTypes: '',\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Parser',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @param {Array} [config.blocks=[]] Default blocks\n * @return {this}\n * @example\n * ...\n * {\n * blocks: [\n * {id:'h1-block' label: 'Heading', content:'

...

'},\n * ...\n * ],\n * }\n * ...\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n pHtml = new parserHtml(c);\n pCss = new parserCss(c);\n return this;\n },\n\n /**\n * Parse HTML string and return valid model\n * @param {string} str HTML string\n * @return {Object}\n */\n parseHtml(str) {\n pHtml.compTypes = this.compTypes;\n return pHtml.parse(str, pCss);\n },\n\n parseCss(str) {\n return pCss.parse(str);\n }\n };\n};\n","import _ from 'underscore';\nimport Backbone from 'backbone';\n\nmodule.exports = Backbone.View.extend({\n template: _.template(`\n
device-label\"><%= deviceLabel %>
\n
field <%= ppfx %>select\">\n input-holder\">\n \n \n
sel-arrow\">\n
d-s-arrow\">
\n
\n
\n `),\n\n events: {\n change: 'updateDevice'\n },\n\n initialize(o) {\n this.config = o.config || {};\n this.em = this.config.em;\n this.ppfx = this.config.pStylePrefix || '';\n this.events['click .' + this.ppfx + 'add-trasp'] = this.startAdd;\n this.listenTo(this.em, 'change:device', this.updateSelect);\n this.delegateEvents();\n },\n\n /**\n * Start adding new device\n * @return {[type]} [description]\n * @private\n */\n startAdd() {},\n\n /**\n * Update device of the editor\n * @private\n */\n updateDevice() {\n var em = this.em;\n if (em) {\n var devEl = this.devicesEl;\n var val = devEl ? devEl.val() : '';\n em.set('device', val);\n }\n },\n\n /**\n * Update select value on device update\n * @private\n */\n updateSelect() {\n var em = this.em;\n var devEl = this.devicesEl;\n if (em && em.getDeviceModel && devEl) {\n var device = em.getDeviceModel();\n var name = device ? device.get('name') : '';\n devEl.val(name);\n }\n },\n\n /**\n * Return devices options\n * @return {string} String of options\n * @private\n */\n getOptions() {\n var result = '';\n this.collection.each(device => {\n var name = device.get('name');\n result += '';\n });\n return result;\n },\n\n render() {\n var pfx = this.ppfx;\n this.$el.html(\n this.template({\n ppfx: pfx,\n deviceLabel: this.config.deviceLabel\n })\n );\n this.devicesEl = this.$el.find('.' + pfx + 'devices');\n this.devicesEl.append(this.getOptions());\n this.el.className = pfx + 'devices-c';\n return this;\n }\n});\n","import Backbone from 'backbone';\n\nmodule.exports = Backbone.Model.extend({\n idAttribute: 'name',\n\n defaults: {\n name: '',\n\n // Width to set for the editor iframe\n width: '',\n\n // Height to set for the editor iframe\n height: '',\n\n // The width which will be used in media queries,\n // If empty the width will be used\n widthMedia: null\n },\n\n initialize() {\n if (this.get('widthMedia') == null) {\n this.set('widthMedia', this.get('width'));\n }\n }\n});\n","import Backbone from 'backbone';\nvar Device = require('./Device');\n\nmodule.exports = Backbone.Collection.extend({\n model: Device\n});\n","module.exports = {\n devices: [],\n\n deviceLabel: 'Device'\n};\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/device_manager/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * deviceManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const deviceManager = editor.DeviceManager;\n * ```\n *\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getAll)\n *\n * @module DeviceManager\n */\n\nmodule.exports = () => {\n var c = {},\n defaults = require('./config/config'),\n Devices = require('./model/Devices'),\n DevicesView = require('./view/DevicesView');\n var devices, view;\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'DeviceManager',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @param {Array} [config.devices=[]] Default devices\n * @example\n * ...\n * {\n * devices: [\n * {name: 'Desktop', width: ''}\n * {name: 'Tablet', width: '991px'}\n * ],\n * }\n * ...\n * @return {this}\n * @private\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n devices = new Devices(c.devices);\n view = new DevicesView({\n collection: devices,\n config: c\n });\n return this;\n },\n\n /**\n * Add new device to the collection. URLs are supposed to be unique\n * @param {string} name Device name\n * @param {string} width Width of the device\n * @param {Object} opts Custom options\n * @return {Device} Added device\n * @example\n * deviceManager.add('Tablet', '900px');\n * deviceManager.add('Tablet2', '900px', {\n * height: '300px',\n * widthMedia: '810px', // the width that will be used for the CSS media\n * });\n */\n add(name, width, opts) {\n var obj = opts || {};\n obj.name = name;\n obj.width = width;\n return devices.add(obj);\n },\n\n /**\n * Return device by name\n * @param {string} name Name of the device\n * @example\n * var device = deviceManager.get('Tablet');\n * console.log(JSON.stringify(device));\n * // {name: 'Tablet', width: '900px'}\n */\n get(name) {\n return devices.get(name);\n },\n\n /**\n * Return all devices\n * @return {Collection}\n * @example\n * var devices = deviceManager.getAll();\n * console.log(JSON.stringify(devices));\n * // [{name: 'Desktop', width: ''}, ...]\n */\n getAll() {\n return devices;\n },\n\n /**\n * Render devices\n * @return {string} HTML string\n * @private\n */\n render() {\n return view.render().el;\n }\n };\n};\n","export default function(callback) {\n var constructor = this.constructor;\n return this.then(\n function(value) {\n return constructor.resolve(callback()).then(function() {\n return value;\n });\n },\n function(reason) {\n return constructor.resolve(callback()).then(function() {\n return constructor.reject(reason);\n });\n }\n );\n}\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a ` : '';\n return html;\n },\n\n /**\n * Returns CSS built inside canvas\n * @param {Object} [opts={}] Options\n * @return {string} CSS string\n * @private\n */\n getCss(opts = {}) {\n const config = this.config;\n const wrappesIsBody = config.wrappesIsBody;\n const avoidProt = opts.avoidProtected;\n const keepUnusedStyles = !isUndefined(opts.keepUnusedStyles)\n ? opts.keepUnusedStyles\n : config.keepUnusedStyles;\n const cssc = this.get('CssComposer');\n const wrp = this.get('DomComponents').getComponent();\n const protCss = !avoidProt ? config.protectedCss : '';\n\n return (\n protCss +\n this.get('CodeManager').getCode(wrp, 'css', {\n cssc,\n wrappesIsBody,\n keepUnusedStyles\n })\n );\n },\n\n /**\n * Returns JS of all components\n * @return {string} JS string\n * @private\n */\n getJs() {\n var wrp = this.get('DomComponents').getWrapper();\n return this.get('CodeManager')\n .getCode(wrp, 'js')\n .trim();\n },\n\n /**\n * Store data to the current storage\n * @param {Function} clb Callback function\n * @return {Object} Stored data\n * @private\n */\n store(clb) {\n var sm = this.get('StorageManager');\n var store = {};\n if (!sm) return;\n\n // Fetch what to store\n this.get('storables').forEach(m => {\n var obj = m.store(1);\n for (var el in obj) store[el] = obj[el];\n });\n\n sm.store(store, res => {\n clb && clb(res);\n this.set('changesCount', 0);\n this.trigger('storage:store', store);\n });\n\n return store;\n },\n\n /**\n * Load data from the current storage\n * @param {Function} clb Callback function\n * @private\n */\n load(clb = null) {\n this.getCacheLoad(1, res => {\n this.get('storables').forEach(module => module.load(res));\n clb && clb(res);\n });\n },\n\n /**\n * Returns cached load\n * @param {Boolean} force Force to reload\n * @param {Function} clb Callback function\n * @return {Object}\n * @private\n */\n getCacheLoad(force, clb) {\n var f = force ? 1 : 0;\n if (this.cacheLoad && !f) return this.cacheLoad;\n var sm = this.get('StorageManager');\n var load = [];\n\n if (!sm) return {};\n\n this.get('storables').forEach(m => {\n var key = m.storageKey;\n key = typeof key === 'function' ? key() : key;\n var keys = key instanceof Array ? key : [key];\n keys.forEach(k => {\n load.push(k);\n });\n });\n\n sm.load(load, res => {\n this.cacheLoad = res;\n clb && clb(res);\n setTimeout(() => this.trigger('storage:load', res), 0);\n });\n },\n\n /**\n * Returns device model by name\n * @return {Device|null}\n * @private\n */\n getDeviceModel() {\n var name = this.get('device');\n return this.get('DeviceManager').get(name);\n },\n\n /**\n * Run default command if setted\n * @param {Object} [opts={}] Options\n * @private\n */\n runDefault(opts = {}) {\n var command = this.get('Commands').get(this.config.defaultCommand);\n if (!command || this.defaultRunning) return;\n command.stop(this, this, opts);\n command.run(this, this, opts);\n this.defaultRunning = 1;\n },\n\n /**\n * Stop default command\n * @param {Object} [opts={}] Options\n * @private\n */\n stopDefault(opts = {}) {\n var command = this.get('Commands').get(this.config.defaultCommand);\n if (!command) return;\n command.stop(this, this, opts);\n this.defaultRunning = 0;\n },\n\n /**\n * Update canvas dimensions and refresh data useful for tools positioning\n * @private\n */\n refreshCanvas() {\n this.set('canvasOffset', this.get('Canvas').getOffset());\n },\n\n /**\n * Clear all selected stuf inside the window, sometimes is useful to call before\n * doing some dragging opearation\n * @param {Window} win If not passed the current one will be used\n * @private\n */\n clearSelection(win) {\n var w = win || window;\n w.getSelection().removeAllRanges();\n },\n\n /**\n * Get the current media text\n * @return {string}\n */\n getCurrentMedia() {\n const config = this.config;\n const device = this.getDeviceModel();\n const condition = config.mediaCondition;\n const preview = config.devicePreviewMode;\n const width = device && device.get('widthMedia');\n return device && width && !preview ? `(${condition}: ${width})` : '';\n },\n\n /**\n * Return the component wrapper\n * @return {Component}\n */\n getWrapper() {\n return this.get('DomComponents').getWrapper();\n },\n\n /**\n * Return the count of changes made to the content and not yet stored.\n * This count resets at any `store()`\n * @return {number}\n */\n getDirtyCount() {\n return this.get('changesCount');\n },\n\n /**\n * Destroy editor\n */\n destroyAll() {\n const {\n DomComponents,\n CssComposer,\n UndoManager,\n Panels,\n Canvas\n } = this.attributes;\n DomComponents.clear();\n CssComposer.clear();\n UndoManager.clear().removeAll();\n Panels.getPanels().reset();\n Canvas.getCanvasView().remove();\n this.view.remove();\n this.stopListening();\n $(this.config.el)\n .empty()\n .attr(this.attrsOrig);\n },\n\n setEditing(value) {\n this.set('editing', value);\n return this;\n },\n\n isEditing() {\n return !!this.get('editing');\n },\n\n /**\n * Set/get data from the HTMLElement\n * @param {HTMLElement} el\n * @param {string} name Data name\n * @param {any} value Date value\n * @return {any}\n * @private\n */\n data(el, name, value) {\n const varName = '_gjs-data';\n\n if (!el[varName]) {\n el[varName] = {};\n }\n\n if (isUndefined(value)) {\n return el[varName][name];\n } else {\n el[varName][name] = value;\n }\n }\n});\n","module.exports = {\n // Style prefix\n stylePrefix: 'gjs-',\n\n // HTML string or object of components\n components: '',\n\n // CSS string or object of rules\n style: '',\n\n // If true, will fetch HTML and CSS from selected container\n fromElement: 0,\n\n // Show an alert before unload the page with unsaved changes\n noticeOnUnload: true,\n\n // Show paddings and margins\n showOffsets: false,\n\n // Show paddings and margins on selected component\n showOffsetsSelected: false,\n\n // On creation of a new Component (via object), if the 'style' attribute is not\n // empty, all those roles will be moved in its new class\n forceClass: true,\n\n // Height for the editor container\n height: '900px',\n\n // Width for the editor container\n width: '100%',\n\n // By default Grapes injects base CSS into the canvas. For example, it sets body margin to 0\n // and sets a default background color of white. This CSS is desired in most cases.\n // use this property if you wish to overwrite the base CSS to your own CSS. This is most\n // useful if for example your template is not based off a document with 0 as body margin.\n baseCss: `\n * {\n box-sizing: border-box;\n }\n html, body, #wrapper {\n min-height: 100%;\n }\n body {\n margin: 0;\n height: 100%;\n background-color: #fff\n }\n #wrapper {\n overflow: auto;\n overflow-x: hidden;\n }\n\n * ::-webkit-scrollbar-track {\n background: rgba(0, 0, 0, 0.1)\n }\n\n * ::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2)\n }\n\n * ::-webkit-scrollbar {\n width: 10px\n }\n `,\n\n // CSS that could only be seen (for instance, inside the code viewer)\n protectedCss: '* { box-sizing: border-box; } body {margin: 0;}',\n\n // CSS for the iframe which containing the canvas, useful if you need to custom something inside\n // (eg. the style of the selected component)\n canvasCss: '',\n\n // Default command\n defaultCommand: 'select-comp',\n\n // Show a toolbar when the component is selected\n showToolbar: 1,\n\n // Allow script tag importing\n allowScripts: 0,\n\n // If true render a select of available devices\n showDevices: 1,\n\n // When enabled, on device change media rules won't be created\n devicePreviewMode: 0,\n\n // THe condition to use for media queries, eg. 'max-width'\n // Comes handy for mobile-first cases\n mediaCondition: 'max-width',\n\n // Starting tag for variable inside scripts in Components\n tagVarStart: '{[ ',\n\n // Ending tag for variable inside scripts in Components\n tagVarEnd: ' ]}',\n\n // When false, removes empty text nodes when parsed, unless they contain a space\n keepEmptyTextNodes: 0,\n\n // Return JS of components inside HTML from 'editor.getHtml()'\n jsInHtml: true,\n\n // Enable native HTML5 drag and drop\n nativeDnD: 1,\n\n // Enable multiple selection\n multipleSelection: 1,\n\n // Show the wrapper component in the final code, eg. in editor.getHtml()\n exportWrapper: 0,\n\n // The wrapper, if visible, will be shown as a ``\n wrappesIsBody: 1,\n\n // Usually when you update the `style` of the component this changes the\n // element's `style` attribute. Unfortunately, inline styling doesn't allow\n // use of media queries (@media) or even pseudo selectors (eg. :hover).\n // When `avoidInlineStyle` is true all styles are inserted inside the css rule\n avoidInlineStyle: 0,\n\n // Avoid default properties from storable JSON data, like `components` and `styles`.\n // With this option enabled your data will be smaller (usefull if need to\n // save some storage space)\n avoidDefaults: 0,\n\n // (experimental)\n // The structure of components is always on the screen but it's not the same\n // for style rules. When you delete a component you might leave a lot of styles\n // which will never be used again, therefore they might be removed.\n // With this option set to true, styles not used from the CSS generator (so in\n // any case where `CssGenerator.build` is used) will be removed automatically.\n // But be careful, not always leaving the style not used mean you wouldn't\n // use it later, but this option comes really handy when deal with big templates.\n clearStyles: 0,\n\n // Dom element\n el: '',\n\n // Configurations for Undo Manager\n undoManager: {},\n\n //Configurations for Asset Manager\n assetManager: {},\n\n //Configurations for Canvas\n canvas: {},\n\n //Configurations for Layers\n layers: {},\n\n //Configurations for Storage Manager\n storageManager: {},\n\n //Configurations for Rich Text Editor\n rte: {},\n\n //Configurations for DomComponents\n domComponents: {},\n\n //Configurations for Modal Dialog\n modal: {},\n\n //Configurations for Code Manager\n codeManager: {},\n\n //Configurations for Panels\n panels: {},\n\n //Configurations for Commands\n commands: {},\n\n //Configurations for Css Composer\n cssComposer: {},\n\n //Configurations for Selector Manager\n selectorManager: {},\n\n //Configurations for Device Manager\n deviceManager: {\n devices: [\n {\n name: 'Desktop',\n width: ''\n },\n {\n name: 'Tablet',\n width: '768px',\n widthMedia: '992px'\n },\n {\n name: 'Mobile landscape',\n width: '568px',\n widthMedia: '768px'\n },\n {\n name: 'Mobile portrait',\n width: '320px',\n widthMedia: '480px'\n }\n ]\n },\n\n //Configurations for Style Manager\n styleManager: {\n sectors: [\n {\n name: 'General',\n open: false,\n buildProps: [\n 'float',\n 'display',\n 'position',\n 'top',\n 'right',\n 'left',\n 'bottom'\n ]\n },\n {\n name: 'Dimension',\n open: false,\n buildProps: [\n 'width',\n 'height',\n 'max-width',\n 'min-height',\n 'margin',\n 'padding'\n ]\n },\n {\n name: 'Typography',\n open: false,\n buildProps: [\n 'font-family',\n 'font-size',\n 'font-weight',\n 'letter-spacing',\n 'color',\n 'line-height',\n 'text-align',\n 'text-shadow'\n ],\n properties: [\n {\n property: 'text-align',\n list: [\n { value: 'left', className: 'fa fa-align-left' },\n { value: 'center', className: 'fa fa-align-center' },\n { value: 'right', className: 'fa fa-align-right' },\n { value: 'justify', className: 'fa fa-align-justify' }\n ]\n }\n ]\n },\n {\n name: 'Decorations',\n open: false,\n buildProps: [\n 'border-radius-c',\n 'background-color',\n 'border-radius',\n 'border',\n 'box-shadow',\n 'background'\n ]\n },\n {\n name: 'Extra',\n open: false,\n buildProps: ['transition', 'perspective', 'transform']\n }\n ]\n },\n\n // Configurations for Block Manager\n blockManager: {},\n\n // Configurations for Trait Manager\n traitManager: {},\n\n // Texts\n textViewCode: 'Code',\n\n // Keep unused styles within the editor\n keepUnusedStyles: 0\n};\n","/**\n * Editor contains the top level API which you'll probably use to customize the editor or extend it with plugins.\n * You get the Editor instance on init method and you can pass options via its [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/editor/config/config.js)\n *\n * ```js\n * const editor = grapesjs.init({\n * // options\n * });\n * ```\n *\n * ## Available Events\n *\n * You can make use of available events in this way\n * ```js\n * editor.on('EVENT-NAME', (some, argument) => {\n * // do something\n * })\n * ```\n *\n * ### Components\n * * `component:add` - Triggered when a new component is added to the editor, the model is passed as an argument to the callback\n * * `component:remove` - Triggered when a component is removed, the model is passed as an argument to the callback\n * * `component:clone` - Triggered when a new component is added by a clone command, the model is passed as an argument to the callback\n * * `component:update` - Triggered when a component is updated (moved, styled, etc.), the model is passed as an argument to the callback\n * * `component:update:{propertyName}` - Listen any property change, the model is passed as an argument to the callback\n * * `component:styleUpdate` - Triggered when the style of the component is updated, the model is passed as an argument to the callback\n * * `component:styleUpdate:{propertyName}` - Listen for a specific style property change, the model is passed as an argument to the callback\n * * `component:selected` - New component selected, the selected model is passed as an argument to the callback\n * * `component:deselected` - Component deselected, the deselected model is passed as an argument to the callback\n * * `component:toggled` - Component selection changed, toggled model is passed as an argument to the callback\n * ### Blocks\n * * `block:add` - New block added\n * * `block:remove` - Block removed\n * * `block:drag:start` - Started dragging block, model of the block is passed as an argument\n * * `block:drag` - Dragging block, the block's model and the drag event are passed as arguments\n * * `block:drag:stop` - Dragging of the block is stopped. As agruments for the callback you get, the dropped component model (if dropped successfully) and the model of the block\n * ### Assets\n * * `asset:add` - New asset added\n * * `asset:remove` - Asset removed\n * * `asset:upload:start` - Before the upload is started\n * * `asset:upload:end` - After the upload is ended\n * * `asset:upload:error` - On any error in upload, passes the error as an argument\n * * `asset:upload:response` - On upload response, passes the result as an argument\n * ### Keymaps\n * * `keymap:add` - New keymap added. The new keyamp object is passed as an argument\n * * `keymap:remove` - Keymap removed. The removed keyamp object is passed as an argument\n * * `keymap:emit` - Some keymap emitted, in arguments you get keymapId, shortcutUsed, Event\n * * `keymap:emit:{keymapId}` - `keymapId` emitted, in arguments you get keymapId, shortcutUsed, Event\n * ### Style Manager\n * * `styleManager:change` - Triggered on style property change from new selected component, the view of the property is passed as an argument to the callback\n * * `styleManager:change:{propertyName}` - As above but for a specific style property\n * ### Storages\n * * `storage:start` - Before the storage request is started\n * * `storage:start:store` - Before the store request. The object to store is passed as an argumnet (which you can edit)\n * * `storage:start:load` - Before the load request. Items to load are passed as an argumnet (which you can edit)\n * * `storage:load` - Triggered when something was loaded from the storage, loaded object passed as an argumnet\n * * `storage:store` - Triggered when something is stored to the storage, stored object passed as an argumnet\n * * `storage:end` - After the storage request is ended\n * * `storage:end:store` - After the store request\n * * `storage:end:load` - After the load request\n * * `storage:error` - On any error on storage request, passes the error as an argument\n * * `storage:error:store` - Error on store request, passes the error as an argument\n * * `storage:error:load` - Error on load request, passes the error as an argument\n * ### Canvas\n * * `canvas:dragenter` - When something is dragged inside the canvas, `DataTransfer` instance passed as an argument\n * * `canvas:dragover` - When something is dragging on canvas, `DataTransfer` instance passed as an argument\n * * `canvas:drop` - Something is dropped in canvas, `DataTransfer` instance and the dropped model are passed as arguments\n * * `canvas:dragend` - When a drag operation is ended, `DataTransfer` instance passed as an argument\n * * `canvas:dragdata` - On any dataTransfer parse, `DataTransfer` instance and the `result` are passed as arguments.\n * By changing `result.content` you're able to customize what is dropped\n * ### Selectors\n * * `selector:add` - Triggers when a new selector/class is created\n * ### RTE\n * * `rte:enable` - RTE enabled. The view, on which RTE is enabled, is passed as an argument\n * * `rte:disable` - RTE disabled. The view, on which RTE is disabled, is passed as an argument\n * ### Commands\n * * `run:{commandName}` - Triggered when some command is called to run (eg. editor.runCommand('preview'))\n * * `stop:{commandName}` - Triggered when some command is called to stop (eg. editor.stopCommand('preview'))\n * * `run:{commandName}:before` - Triggered before the command is called\n * * `stop:{commandName}:before` - Triggered before the command is called to stop\n * * `abort:{commandName}` - Triggered when the command execution is aborted (`editor.on(`run:preview:before`, opts => opts.abort = 1);`)\n * ### General\n * * `canvasScroll` - Triggered when the canvas is scrolle\n * * `undo` - Undo executed\n * * `redo` - Redo executed\n * * `load` - When the editor is loaded\n *\n * @module Editor\n */\nimport $ from 'cash-dom';\n\nmodule.exports = config => {\n var c = config || {},\n defaults = require('./config/config'),\n EditorModel = require('./model/Editor'),\n EditorView = require('./view/EditorView');\n\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n c.pStylePrefix = c.stylePrefix;\n var em = new EditorModel(c);\n var editorView = new EditorView({\n model: em,\n config: c\n });\n\n return {\n $,\n\n /**\n * @property {EditorModel}\n * @private\n */\n editor: em,\n\n /**\n * @property {DomComponents}\n * @private\n */\n DomComponents: em.get('DomComponents'),\n\n /**\n * @property {LayerManager}\n * @private\n */\n LayerManager: em.get('LayerManager'),\n\n /**\n * @property {CssComposer}\n * @private\n */\n CssComposer: em.get('CssComposer'),\n\n /**\n * @property {StorageManager}\n * @private\n */\n StorageManager: em.get('StorageManager'),\n\n /**\n * @property {AssetManager}\n * @private\n */\n AssetManager: em.get('AssetManager'),\n\n /**\n * @property {BlockManager}\n * @private\n */\n BlockManager: em.get('BlockManager'),\n\n /**\n * @property {TraitManager}\n * @private\n */\n TraitManager: em.get('TraitManager'),\n\n /**\n * @property {SelectorManager}\n * @private\n */\n SelectorManager: em.get('SelectorManager'),\n\n /**\n * @property {CodeManager}\n * @private\n */\n CodeManager: em.get('CodeManager'),\n\n /**\n * @property {Commands}\n * @private\n */\n Commands: em.get('Commands'),\n\n /**\n * @property {Keymaps}\n * @private\n */\n Keymaps: em.get('Keymaps'),\n\n /**\n * @property {Modal}\n * @private\n */\n Modal: em.get('Modal'),\n\n /**\n * @property {Panels}\n * @private\n */\n Panels: em.get('Panels'),\n\n /**\n * @property {StyleManager}\n * @private\n */\n StyleManager: em.get('StyleManager'),\n\n /**\n * @property {Canvas}\n * @private\n */\n Canvas: em.get('Canvas'),\n\n /**\n * @property {UndoManager}\n * @private\n */\n UndoManager: em.get('UndoManager'),\n\n /**\n * @property {DeviceManager}\n * @private\n */\n DeviceManager: em.get('DeviceManager'),\n\n /**\n * @property {RichTextEditor}\n * @private\n */\n RichTextEditor: em.get('RichTextEditor'),\n\n /**\n * @property {Utils}\n * @private\n */\n Utils: em.get('Utils'),\n\n /**\n * @property {Utils}\n * @private\n */\n Config: em.get('Config'),\n\n /**\n * Initialize editor model\n * @return {this}\n * @private\n */\n init() {\n em.init(this);\n return this;\n },\n\n /**\n * Returns configuration object\n * @param {string} [prop] Property name\n * @return {any} Returns the configuration object or\n * the value of the specified property\n */\n getConfig(prop) {\n return em.getConfig(prop);\n },\n\n /**\n * Returns HTML built inside canvas\n * @return {string} HTML string\n */\n getHtml(opts) {\n return em.getHtml(opts);\n },\n\n /**\n * Returns CSS built inside canvas\n * @param {Object} [opts={}] Options\n * @return {string} CSS string\n */\n getCss(opts) {\n return em.getCss(opts);\n },\n\n /**\n * Returns JS of all components\n * @return {string} JS string\n */\n getJs() {\n return em.getJs();\n },\n\n /**\n * Returns components in JSON format object\n * @return {Object}\n */\n getComponents() {\n return em.get('DomComponents').getComponents();\n },\n\n /**\n * Set components inside editor's canvas. This method overrides actual components\n * @param {Array|Object|string} components HTML string or components model\n * @return {this}\n * @example\n * editor.setComponents('
New component
');\n * // or\n * editor.setComponents({\n * type: 'text',\n * classes:['cls'],\n * content: 'New component'\n * });\n */\n setComponents(components) {\n em.setComponents(components);\n return this;\n },\n\n /**\n * Add components\n * @param {Array|Object|string} components HTML string or components model\n * @param {Object} opts Options\n * @param {Boolean} [opts.avoidUpdateStyle=false] If the HTML string contains styles,\n * by default, they will be created and, if already exist, updated. When this option\n * is true, styles already created will not be updated.\n * @return {Model|Array}\n * @example\n * editor.addComponents('
New component
');\n * // or\n * editor.addComponents({\n * type: 'text',\n * classes:['cls'],\n * content: 'New component'\n * });\n */\n addComponents(components, opts) {\n return this.getComponents().add(components, opts);\n },\n\n /**\n * Returns style in JSON format object\n * @return {Object}\n */\n getStyle() {\n return em.get('CssComposer').getAll();\n },\n\n /**\n * Set style inside editor's canvas. This method overrides actual style\n * @param {Array|Object|string} style CSS string or style model\n * @return {this}\n * @example\n * editor.setStyle('.cls{color: red}');\n * //or\n * editor.setStyle({\n * selectors: ['cls']\n * style: { color: 'red' }\n * });\n */\n setStyle(style) {\n em.setStyle(style);\n return this;\n },\n\n /**\n * Returns the last selected component, if there is one\n * @return {Model}\n */\n getSelected() {\n return em.getSelected();\n },\n\n /**\n * Returns an array of all selected components\n * @return {Array}\n */\n getSelectedAll() {\n return em.getSelectedAll();\n },\n\n /**\n * Get a stylable entity from the selected component.\n * If you select a component without classes the entity is the Component\n * itself and all changes will go inside its 'style' attribute. Otherwise,\n * if the selected component has one or more classes, the function will\n * return the corresponding CSS Rule\n * @return {Model}\n */\n getSelectedToStyle() {\n let selected = em.getSelected();\n\n if (selected) {\n return this.StyleManager.getModelToStyle(selected);\n }\n },\n\n /**\n * Select a component\n * @param {Component|HTMLElement} el Component to select\n * @return {this}\n * @example\n * // Select dropped block\n * editor.on('block:drag:stop', function(model) {\n * editor.select(model);\n * });\n */\n select(el) {\n em.setSelected(el);\n return this;\n },\n\n /**\n * Add component to selection\n * @param {Component|HTMLElement|Array} el Component to select\n * @return {this}\n * @example\n * editor.selectAdd(model);\n */\n selectAdd(el) {\n em.addSelected(el);\n return this;\n },\n\n /**\n * Remove component from selection\n * @param {Component|HTMLElement|Array} el Component to select\n * @return {this}\n * @example\n * editor.selectRemove(model);\n */\n selectRemove(el) {\n em.removeSelected(el);\n return this;\n },\n\n /**\n * Toggle component selection\n * @param {Component|HTMLElement|Array} el Component to select\n * @return {this}\n * @example\n * editor.selectToggle(model);\n */\n selectToggle(el) {\n em.toggleSelected(el);\n return this;\n },\n\n /**\n * Set device to the editor. If the device exists it will\n * change the canvas to the proper width\n * @param {string} name Name of the device\n * @return {this}\n * @example\n * editor.setDevice('Tablet');\n */\n setDevice(name) {\n em.set('device', name);\n return this;\n },\n\n /**\n * Return the actual active device\n * @return {string} Device name\n * @example\n * var device = editor.getDevice();\n * console.log(device);\n * // 'Tablet'\n */\n getDevice() {\n return em.get('device');\n },\n\n /**\n * Execute command\n * @param {string} id Command ID\n * @param {Object} options Custom options\n * @return {*} The return is defined by the command\n * @example\n * editor.runCommand('myCommand', {someValue: 1});\n */\n runCommand(id, options = {}) {\n let result;\n const command = em.get('Commands').get(id);\n if (command) result = command.callRun(this, options);\n\n return result;\n },\n\n /**\n * Stop the command if stop method was provided\n * @param {string} id Command ID\n * @param {Object} options Custom options\n * @return {*} The return is defined by the command\n * @example\n * editor.stopCommand('myCommand', {someValue: 1});\n */\n stopCommand(id, options = {}) {\n let result;\n const command = em.get('Commands').get(id);\n if (command) result = command.callStop(this, options);\n\n return result;\n },\n\n /**\n * Store data to the current storage\n * @param {Function} clb Callback function\n * @return {Object} Stored data\n */\n store(clb) {\n return em.store(clb);\n },\n\n /**\n * Load data from the current storage\n * @param {Function} clb Callback function\n * @return {Object} Stored data\n */\n load(clb) {\n return em.load(clb);\n },\n\n /**\n * Returns container element. The one which was indicated as 'container'\n * on init method\n * @return {HTMLElement}\n */\n getContainer() {\n return c.el;\n },\n\n /**\n * Return the count of changes made to the content and not yet stored.\n * This count resets at any `store()`\n * @return {number}\n */\n getDirtyCount() {\n return em.getDirtyCount();\n },\n\n /**\n * Update editor dimensions and refresh data useful for positioning of tools\n *\n * This method could be useful when you update, for example, some position\n * of the editor element (eg. canvas, panels, etc.) with CSS, where without\n * refresh you'll get misleading position of tools (eg. rich text editor,\n * component highlighter, etc.)\n *\n * @private\n */\n refresh() {\n em.refreshCanvas();\n },\n\n /**\n * Replace the built-in Rich Text Editor with a custom one.\n * @param {Object} obj Custom RTE Interface\n * @example\n * editor.setCustomRte({\n * // Function for enabling custom RTE\n * // el is the HTMLElement of the double clicked Text Component\n * // rte is the same instance you have returned the first time you call\n * // enable(). This is useful if need to check if the RTE is already enabled so\n * // ion this case you'll need to return the RTE and the end of the function\n * enable: function(el, rte) {\n * rte = new MyCustomRte(el, {}); // this depends on the Custom RTE API\n * ...\n * return rte; // return the RTE instance\n * },\n *\n * // Disable the editor, called for example when you unfocus the Text Component\n * disable: function(el, rte) {\n * rte.blur(); // this depends on the Custom RTE API\n * }\n *\n * // Called when the Text Component is focused again. If you returned the RTE instance\n * // from the enable function, the enable won't be called again instead will call focus,\n * // in this case to avoid double binding of the editor\n * focus: function (el, rte) {\n * rte.focus(); // this depends on the Custom RTE API\n * }\n * });\n */\n setCustomRte(obj) {\n this.RichTextEditor.customRte = obj;\n },\n\n /**\n * Attach event\n * @param {string} event Event name\n * @param {Function} callback Callback function\n * @return {this}\n */\n on(event, callback) {\n return em.on(event, callback);\n },\n\n /**\n * Detach event\n * @param {string} event Event name\n * @param {Function} callback Callback function\n * @return {this}\n */\n off(event, callback) {\n return em.off(event, callback);\n },\n\n /**\n * Trigger event\n * @param {string} event Event to trigger\n * @return {this}\n */\n trigger(event) {\n return em.trigger.apply(em, arguments);\n },\n\n /**\n * Destroy the editor\n */\n destroy() {\n return em.destroyAll();\n },\n\n /**\n * Returns editor element\n * @return {HTMLElement}\n * @private\n */\n getEl() {\n return editorView.el;\n },\n\n /**\n * Returns editor model\n * @return {Model}\n * @private\n */\n getModel() {\n return em;\n },\n\n /**\n * Render editor\n * @return {HTMLElement}\n */\n render() {\n // Do post render stuff after the iframe is loaded otherwise it'll\n // be empty during tests\n em.on('loaded', () => {\n this.UndoManager.clear();\n em.get('modules').forEach(module => {\n module.postRender && module.postRender(editorView);\n });\n });\n\n editorView.render();\n return editorView.el;\n }\n };\n};\n","import $ from 'cash-dom';\nimport Editor from './editor';\nimport { isElement } from 'underscore';\nimport polyfills from 'utils/polyfills';\nimport PluginManager from './plugin_manager';\n\npolyfills();\n\nmodule.exports = (() => {\n const plugins = new PluginManager();\n const editors = [];\n const defaultConfig = {\n // If true renders editor on init\n autorender: 1,\n\n // Array of plugins to init\n plugins: [],\n\n // Custom options for plugins\n pluginsOpts: {}\n };\n\n return {\n $,\n\n editors,\n\n plugins,\n\n // Will be replaced on build\n version: '<# VERSION #>',\n\n /**\n * Initializes an editor based on passed options\n * @param {Object} config Configuration object\n * @param {string|HTMLElement} config.container Selector which indicates where render the editor\n * @param {Boolean} [config.autorender=true] If true, auto-render the content\n * @param {Array} [config.plugins=[]] Array of plugins to execute on start\n * @param {Object} [config.pluginsOpts={}] Custom options for plugins\n * @return {Editor} Editor instance\n * @example\n * var editor = grapesjs.init({\n * container: '#myeditor',\n * components: '
Hello world
',\n * style: '.hello{color: red}',\n * })\n */\n init(config = {}) {\n const els = config.container;\n if (!els) throw new Error(\"'container' is required\");\n config = { ...defaultConfig, ...config };\n config.el = isElement(els) ? els : document.querySelector(els);\n const editor = new Editor(config).init();\n\n // Load plugins\n config.plugins.forEach(pluginId => {\n const plugin = plugins.get(pluginId);\n\n if (plugin) {\n plugin(editor, config.pluginsOpts[pluginId] || {});\n } else {\n console.warn(`Plugin ${pluginId} not found`);\n }\n });\n\n // Execute `onLoad` on modules once all plugins are initialized.\n // A plugin might have extended/added some custom type so this\n // is a good point to load stuff like components, css rules, etc.\n editor.getModel().loadOnStart();\n config.autorender && editor.render();\n editors.push(editor);\n\n return editor;\n }\n };\n})();\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://grapesjs/webpack/universalModuleDefinition","webpack://grapesjs/webpack/bootstrap","webpack://grapesjs/./node_modules/backbone/backbone.js","webpack://grapesjs/./node_modules/underscore/underscore.js","webpack://grapesjs/./src/utils/mixins.js","webpack://grapesjs/./src/dom_components/view/ComponentView.js","webpack://grapesjs/./src/dom_components/model/Component.js","webpack://grapesjs/./src/style_manager/view/PropertyView.js","webpack://grapesjs/./node_modules/codemirror/lib/codemirror.js","webpack://grapesjs/./src/commands/view/CreateComponent.js","webpack://grapesjs/./src/commands/view/SelectComponent.js","webpack://grapesjs/./src/trait_manager/view/TraitView.js","webpack://grapesjs/./src/selector_manager/model/Selector.js","webpack://grapesjs/(webpack)/buildin/global.js","webpack://grapesjs/./src/commands/view/InsertCustom.js","webpack://grapesjs/./src/commands/view/SelectPosition.js","webpack://grapesjs/./src/dom_components/view/ComponentImageView.js","webpack://grapesjs/./src/style_manager/view/PropertyIntegerView.js","webpack://grapesjs/./src/style_manager/view/PropertiesView.js","webpack://grapesjs/./src/style_manager/model/Property.js","webpack://grapesjs/./src/style_manager/model/Properties.js","webpack://grapesjs/./src/selector_manager/model/Selectors.js","webpack://grapesjs/./node_modules/cash-dom/dist/cash.js","webpack://grapesjs/./src/commands/view/Drag.js","webpack://grapesjs/./src/commands/view/Resize.js","webpack://grapesjs/./src/commands/view/Preview.js","webpack://grapesjs/./src/commands/view/Fullscreen.js","webpack://grapesjs/./src/commands/view/SelectParent.js","webpack://grapesjs/./src/commands/view/ShowOffset.js","webpack://grapesjs/./src/commands/view/OpenAssets.js","webpack://grapesjs/./src/commands/view/OpenBlocks.js","webpack://grapesjs/./src/commands/view/OpenTraitManager.js","webpack://grapesjs/./src/commands/view/OpenStyleManager.js","webpack://grapesjs/./src/commands/view/OpenLayers.js","webpack://grapesjs/./src/commands/view/SwitchVisibility.js","webpack://grapesjs/./src/commands/view/TextComponent.js","webpack://grapesjs/./src/commands/view/MoveComponent.js","webpack://grapesjs/./src/commands/view/ImageComponent.js","webpack://grapesjs/./src/commands/view/DeleteComponent.js","webpack://grapesjs/./src/commands/view/ExportTemplate.js","webpack://grapesjs/./src/commands/view/CommandAbstract.js","webpack://grapesjs/./src/dom_components/model/ComponentText.js","webpack://grapesjs/./src/dom_components/model/ComponentImage.js","webpack://grapesjs/./src/dom_components/model/ComponentTableBody.js","webpack://grapesjs/./src/domain_abstract/ui/InputNumber.js","webpack://grapesjs/./src/style_manager/view/PropertyCompositeView.js","webpack://grapesjs/./src/block_manager/model/Category.js","webpack://grapesjs/./src/commands/view/PasteComponent.js","webpack://grapesjs/./src/commands/view/CopyComponent.js","webpack://grapesjs/./src/commands/view/ComponentPrev.js","webpack://grapesjs/./src/commands/view/ComponentNext.js","webpack://grapesjs/./src/commands/view/ComponentExit.js","webpack://grapesjs/./src/commands/view/ComponentEnter.js","webpack://grapesjs/./src/commands/view/ComponentDelete.js","webpack://grapesjs/./src/commands/view/CanvasClear.js","webpack://grapesjs/./src/navigator/view/ItemView.js","webpack://grapesjs/./src/navigator/index.js","webpack://grapesjs/./src/dom_components/view/ComponentTextView.js","webpack://grapesjs/./src/dom_components/view/ComponentLinkView.js","webpack://grapesjs/./src/dom_components/view/ComponentsView.js","webpack://grapesjs/./src/dom_components/model/Components.js","webpack://grapesjs/./src/domain_abstract/view/DomainViews.js","webpack://grapesjs/./src/css_composer/view/CssRuleView.js","webpack://grapesjs/./src/domain_abstract/model/Styleable.js","webpack://grapesjs/./src/css_composer/model/CssRule.js","webpack://grapesjs/./src/asset_manager/view/FileUploader.js","webpack://grapesjs/./src/asset_manager/view/AssetView.js","webpack://grapesjs/./src/asset_manager/view/AssetImageView.js","webpack://grapesjs/./src/style_manager/model/PropertyInteger.js","webpack://grapesjs/./src/style_manager/model/PropertyRadio.js","webpack://grapesjs/./src/style_manager/view/PropertyFileView.js","webpack://grapesjs/./src/domain_abstract/ui/InputColor.js","webpack://grapesjs/./src/style_manager/view/PropertyColorView.js","webpack://grapesjs/./src/style_manager/view/PropertySelectView.js","webpack://grapesjs/./src/style_manager/view/PropertyRadioView.js","webpack://grapesjs/./src/domain_abstract/ui/Input.js","webpack://grapesjs/./src/style_manager/view/PropertyStackView.js","webpack://grapesjs/./src/style_manager/model/PropertyComposite.js","webpack://grapesjs/./src/domain_abstract/model/TypeableCollection.js","webpack://grapesjs/./src/style_manager/index.js","webpack://grapesjs/./src/panels/view/PanelView.js","webpack://grapesjs/./src/panels/model/Buttons.js","webpack://grapesjs/./src/panels/model/Panel.js","webpack://grapesjs/./node_modules/codemirror/mode/css/css.js","webpack://grapesjs/./src/parser/model/ParserHtml.js","webpack://grapesjs/./src/utils/fetch.js","webpack://grapesjs/./node_modules/backbone-undo/node_modules/underscore/underscore.js","webpack://grapesjs/./node_modules/keymaster/keymaster.js","webpack://grapesjs/./src/plugin_manager/config/config.js","webpack://grapesjs/./src/plugin_manager/index.js","webpack://grapesjs/./src/utils/polyfills.js","webpack://grapesjs/./src/editor/view/EditorView.js","webpack://grapesjs/./src/utils/extender.js","webpack://grapesjs/./src/block_manager/view/CategoryView.js","webpack://grapesjs/./src/block_manager/view/BlockView.js","webpack://grapesjs/./src/block_manager/view/BlocksView.js","webpack://grapesjs/./src/block_manager/model/Categories.js","webpack://grapesjs/./src/block_manager/model/Block.js","webpack://grapesjs/./src/block_manager/model/Blocks.js","webpack://grapesjs/./src/block_manager/config/config.js","webpack://grapesjs/./src/block_manager/index.js","webpack://grapesjs/./src/commands/view sync ^\\.\\/.*$","webpack://grapesjs/./src/dom_components/model/ToolbarButton.js","webpack://grapesjs/./src/dom_components/model/Toolbar.js","webpack://grapesjs/./src/dom_components/view/ToolbarButtonView.js","webpack://grapesjs/./src/dom_components/view/ToolbarView.js","webpack://grapesjs/./src/commands/config/config.js","webpack://grapesjs/./src/commands/index.js","webpack://grapesjs/./src/canvas/view/FrameView.js","webpack://grapesjs/./src/canvas/view/CanvasView.js","webpack://grapesjs/./src/canvas/model/Frame.js","webpack://grapesjs/./src/canvas/model/Canvas.js","webpack://grapesjs/./src/canvas/config/config.js","webpack://grapesjs/./src/utils/Droppable.js","webpack://grapesjs/./src/canvas/index.js","webpack://grapesjs/./src/navigator/view/ItemsView.js","webpack://grapesjs/./src/navigator/config/config.js","webpack://grapesjs/./src/dom_components/view/ComponentTextNodeView.js","webpack://grapesjs/./src/dom_components/model/ComponentTextNode.js","webpack://grapesjs/./src/dom_components/view/ComponentSvgView.js","webpack://grapesjs/./src/dom_components/model/ComponentSvg.js","webpack://grapesjs/./src/dom_components/view/ComponentScriptView.js","webpack://grapesjs/./src/dom_components/model/ComponentScript.js","webpack://grapesjs/./src/dom_components/view/ComponentVideoView.js","webpack://grapesjs/./src/dom_components/model/ComponentVideo.js","webpack://grapesjs/./src/dom_components/view/ComponentLabelView.js","webpack://grapesjs/./src/dom_components/model/ComponentLabel.js","webpack://grapesjs/./src/dom_components/model/ComponentLink.js","webpack://grapesjs/./src/dom_components/view/ComponentMapView.js","webpack://grapesjs/./src/dom_components/model/ComponentMap.js","webpack://grapesjs/./src/dom_components/view/ComponentTableFootView.js","webpack://grapesjs/./src/dom_components/model/ComponentTableFoot.js","webpack://grapesjs/./src/dom_components/view/ComponentTableBodyView.js","webpack://grapesjs/./src/dom_components/view/ComponentTableHeadView.js","webpack://grapesjs/./src/dom_components/model/ComponentTableHead.js","webpack://grapesjs/./src/dom_components/view/ComponentTableView.js","webpack://grapesjs/./src/dom_components/model/ComponentTable.js","webpack://grapesjs/./src/dom_components/view/ComponentTableRowView.js","webpack://grapesjs/./src/dom_components/model/ComponentTableRow.js","webpack://grapesjs/./src/dom_components/view/ComponentTableCellView.js","webpack://grapesjs/./src/dom_components/model/ComponentTableCell.js","webpack://grapesjs/./src/trait_manager/model/TraitFactory.js","webpack://grapesjs/./src/trait_manager/model/Trait.js","webpack://grapesjs/./src/trait_manager/model/Traits.js","webpack://grapesjs/./src/dom_components/config/config.js","webpack://grapesjs/./src/dom_components/index.js","webpack://grapesjs/./src/trait_manager/view/TraitColorView.js","webpack://grapesjs/./src/trait_manager/view/TraitNumberView.js","webpack://grapesjs/./src/trait_manager/view/TraitCheckboxView.js","webpack://grapesjs/./src/trait_manager/view/TraitSelectView.js","webpack://grapesjs/./src/trait_manager/view/TraitsView.js","webpack://grapesjs/./src/trait_manager/config/config.js","webpack://grapesjs/./src/trait_manager/index.js","webpack://grapesjs/./src/css_composer/view/CssGroupRuleView.js","webpack://grapesjs/./src/css_composer/view/CssRulesView.js","webpack://grapesjs/./src/css_composer/model/CssRules.js","webpack://grapesjs/./src/css_composer/config/config.js","webpack://grapesjs/./src/css_composer/index.js","webpack://grapesjs/./src/asset_manager/view/AssetsView.js","webpack://grapesjs/./src/asset_manager/model/Asset.js","webpack://grapesjs/./src/asset_manager/model/AssetImage.js","webpack://grapesjs/./src/asset_manager/model/Assets.js","webpack://grapesjs/./src/asset_manager/config/config.js","webpack://grapesjs/./src/asset_manager/index.js","webpack://grapesjs/./src/style_manager/view/SectorView.js","webpack://grapesjs/./src/style_manager/view/SectorsView.js","webpack://grapesjs/./src/style_manager/model/PropertyFactory.js","webpack://grapesjs/./src/style_manager/view/PropertySliderView.js","webpack://grapesjs/./src/style_manager/model/PropertySlider.js","webpack://grapesjs/./src/style_manager/view/LayerView.js","webpack://grapesjs/./src/style_manager/view/LayersView.js","webpack://grapesjs/./src/utils/ColorPicker.js","webpack://grapesjs/./src/style_manager/model/Layer.js","webpack://grapesjs/./src/style_manager/model/Layers.js","webpack://grapesjs/./src/style_manager/model/PropertyStack.js","webpack://grapesjs/./src/style_manager/model/Sector.js","webpack://grapesjs/./src/style_manager/model/Sectors.js","webpack://grapesjs/./src/style_manager/config/config.js","webpack://grapesjs/./src/rich_text_editor/config/config.js","webpack://grapesjs/./src/rich_text_editor/model/RichTextEditor.js","webpack://grapesjs/./src/rich_text_editor/index.js","webpack://grapesjs/./src/panels/view/PanelsView.js","webpack://grapesjs/./src/panels/view/ButtonView.js","webpack://grapesjs/./src/panels/view/ButtonsView.js","webpack://grapesjs/./src/panels/model/Panels.js","webpack://grapesjs/./src/panels/model/Button.js","webpack://grapesjs/./src/panels/config/config.js","webpack://grapesjs/./src/panels/index.js","webpack://grapesjs/./src/code_manager/view/EditorView.js","webpack://grapesjs/./node_modules/codemirror-formatting/formatting.js","webpack://grapesjs/./node_modules/codemirror/mode/javascript/javascript.js","webpack://grapesjs/./node_modules/codemirror/mode/xml/xml.js","webpack://grapesjs/./node_modules/codemirror/mode/htmlmixed/htmlmixed.js","webpack://grapesjs/./src/code_manager/model/CodeMirrorEditor.js","webpack://grapesjs/./src/code_manager/model/JsGenerator.js","webpack://grapesjs/./src/code_manager/model/JsonGenerator.js","webpack://grapesjs/./src/code_manager/model/CssGenerator.js","webpack://grapesjs/./src/code_manager/model/HtmlGenerator.js","webpack://grapesjs/./src/code_manager/config/config.js","webpack://grapesjs/./src/code_manager/index.js","webpack://grapesjs/./src/modal_dialog/view/ModalView.js","webpack://grapesjs/./src/modal_dialog/model/Modal.js","webpack://grapesjs/./src/modal_dialog/config/config.js","webpack://grapesjs/./src/modal_dialog/index.js","webpack://grapesjs/./src/selector_manager/view/ClassTagView.js","webpack://grapesjs/./src/selector_manager/view/ClassTagsView.js","webpack://grapesjs/./src/selector_manager/config/config.js","webpack://grapesjs/./src/selector_manager/index.js","webpack://grapesjs/./src/parser/model/ParserCss.js","webpack://grapesjs/./src/parser/config/config.js","webpack://grapesjs/./src/parser/index.js","webpack://grapesjs/./src/device_manager/view/DevicesView.js","webpack://grapesjs/./src/device_manager/model/Device.js","webpack://grapesjs/./src/device_manager/model/Devices.js","webpack://grapesjs/./src/device_manager/config/config.js","webpack://grapesjs/./src/device_manager/index.js","webpack://grapesjs/./node_modules/promise-polyfill/src/finally.js","webpack://grapesjs/./node_modules/process/browser.js","webpack://grapesjs/./node_modules/setimmediate/setImmediate.js","webpack://grapesjs/./node_modules/timers-browserify/main.js","webpack://grapesjs/./node_modules/promise-polyfill/src/index.js","webpack://grapesjs/./src/storage_manager/model/RemoteStorage.js","webpack://grapesjs/./src/storage_manager/model/LocalStorage.js","webpack://grapesjs/./src/storage_manager/config/config.js","webpack://grapesjs/./src/storage_manager/index.js","webpack://grapesjs/./node_modules/backbone-undo/node_modules/backbone/backbone.js","webpack://grapesjs/./node_modules/backbone-undo/Backbone.Undo.js","webpack://grapesjs/./src/undo_manager/index.js","webpack://grapesjs/./src/keymaps/index.js","webpack://grapesjs/./src/utils/Dragger.js","webpack://grapesjs/./src/utils/Resizer.js","webpack://grapesjs/./src/utils/Sorter.js","webpack://grapesjs/./src/utils/index.js","webpack://grapesjs/(webpack)/buildin/module.js","webpack://grapesjs/./src/editor/model/Editor.js","webpack://grapesjs/./src/editor/config/config.js","webpack://grapesjs/./src/editor/index.js","webpack://grapesjs/./src/index.js"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","self","global","undefined","_","$","Backbone","previousBackbone","slice","Array","VERSION","noConflict","this","emulateHTTP","emulateJSON","addUnderscoreMethods","Class","methods","attribute","each","length","method","iteratee","context","cb","defaultVal","args","arguments","unshift","apply","addMethod","instance","isFunction","isObject","_isModel","modelMatcher","isString","model","attrs","matcher","matches","attributes","Events","eventSplitter","eventsApi","events","callback","opts","names","keys","test","split","on","internalOn","obj","listening","_events","onApi","ctx","listeners","_listeners","id","listenTo","_listenId","uniqueId","listeningTo","_listeningTo","thisId","objId","count","options","handlers","push","off","offApi","stopListening","ids","remaining","j","handler","_callback","once","onceMap","listenToOnce","map","offer","trigger","Math","max","triggerApi","objEvents","allEvents","all","triggerEvents","concat","ev","a1","a2","a3","unbind","extend","Model","cid","cidPrefix","collection","parse","defaults","result","set","changed","initialize","validationError","idAttribute","toJSON","clone","sync","attr","escape","has","val","_validate","unset","silent","changes","changing","_changing","_previousAttributes","current","prev","isEqual","_pending","clear","hasChanged","isEmpty","changedAttributes","diff","old","size","previous","previousAttributes","fetch","success","resp","serverAttrs","wrapError","save","wait","validate","isNew","patch","xhr","destroy","defer","url","base","urlError","replace","encodeURIComponent","constructor","isValid","error","values","pairs","invert","pick","omit","chain","Collection","models","comparator","_reset","reset","setOptions","add","remove","merge","addOptions","splice","array","insert","at","min","tail","singular","isArray","removed","_removeModels","added","merged","toAdd","toMerge","toRemove","modelMap","sort","sortable","sortAttr","existing","_prepareModel","_addReference","orderChanged","some","index","_removeReference","previousModels","pop","shift","_byId","modelId","where","first","findWhere","Error","sortBy","pluck","callbackOpts","indexOf","_onModelEvent","event","prevId","forEach","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","any","include","includes","contains","invoke","toArray","head","take","initial","rest","drop","last","without","difference","shuffle","lastIndexOf","sample","partition","groupBy","countBy","indexBy","findIndex","findLastIndex","View","viewOptions","_ensureElement","delegateEventSplitter","tagName","selector","$el","render","_removeElement","setElement","element","undelegateEvents","_setElement","delegateEvents","el","match","delegate","eventName","listener","undelegate","_createElement","document","createElement","className","_setAttributes","type","methodMap","params","dataType","data","contentType","JSON","stringify","_method","beforeSend","setRequestHeader","processData","textStatus","errorThrown","ajax","update","delete","read","Router","routes","_bindRoutes","optionalParam","namedParam","splatParam","escapeRegExp","route","isRegExp","_routeToRegExp","router","history","fragment","_extractParameters","execute","navigate","optional","RegExp","exec","param","decodeURIComponent","History","checkUrl","location","routeStripper","rootStripper","pathStripper","started","interval","atRoot","path","pathname","getSearch","matchRoot","decodeFragment","rootPath","decodeURI","href","getHash","getPath","charAt","getFragment","_usePushState","_wantsHashChange","start","hashChange","_hasHashChange","documentMode","_useHashChange","_wantsPushState","pushState","_hasPushState","iframe","src","style","display","tabIndex","body","iWindow","insertBefore","firstChild","contentWindow","open","close","hash","addEventListener","attachEvent","_checkUrlInterval","setInterval","loadUrl","stop","removeEventListener","detachEvent","removeChild","clearInterval","e","title","assign","_updateHash","protoProps","staticProps","child","parent","__super__","previousUnderscore","ArrayProto","ObjProto","SymbolProto","toString","nativeIsArray","nativeKeys","nativeCreate","Ctor","_wrapped","nodeType","builtinIteratee","optimizeCb","func","argCount","accumulator","identity","Infinity","restArguments","startIndex","baseCreate","shallowProperty","deepGet","MAX_ARRAY_INDEX","pow","getLength","isArrayLike","results","currentKey","createReduce","dir","memo","reducer","predicate","findKey","list","negate","item","fromIndex","guard","contextPath","computed","lastComputed","v","random","rand","temp","criteria","left","right","a","b","group","behavior","reStrSymbol","pass","compact","Boolean","flatten","input","shallow","strict","output","idx","isArguments","len","otherArrays","uniq","unique","isSorted","isBoolean","seen","union","arrays","intersection","argsLength","unzip","zip","createPredicateIndexFinder","sortedIndex","low","high","mid","floor","createIndexFinder","predicateFind","isNaN","range","step","ceil","chunk","executeBound","sourceFunc","boundFunc","callingContext","TypeError","bound","callArgs","partial","boundArgs","placeholder","position","bindAll","memoize","hasher","cache","address","delay","setTimeout","throttle","timeout","later","leading","now","throttled","clearTimeout","trailing","cancel","debounce","immediate","debounced","callNow","wrap","wrapper","compose","after","times","before","hasEnumBug","propertyIsEnumerable","nonEnumerableProps","collectNonEnumProps","nonEnumIdx","proto","prop","allKeys","mapObject","functions","createAssigner","keysFunc","source","extendOwn","eq","deepEq","keyInObj","String","props","tap","interceptor","isMatch","aStack","bStack","valueOf","areArrays","aCtor","bCtor","isElement","nodelist","childNodes","Int8Array","isFinite","isSymbol","parseFloat","isNumber","isNull","isUndefined","constant","noop","propertyOf","accum","Date","getTime","escapeMap","&","<",">","\"","'","`","unescapeMap","createEscaper","escaper","join","testRegexp","replaceRegexp","string","unescape","fallback","idCounter","prefix","templateSettings","evaluate","interpolate","noMatch","escapes","\\","\r","\n","
","
","escapeChar","template","text","settings","oldSettings","offset","variable","Function","argument","_chain","chainResult","mixin","_underscore","elProt","Element","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","upFirst","toUpperCase","toLowerCase","fn","_loop","elem","_loop2","hasDnd","em","nativeDnD","getModel","camelCase","getElement","getEl","shallowDiff","objOrig","objNew","keysNew","origValue","newValue","normalizeFloat","valueDef","stepDecimals","side","toFixed","getUnitFromValue","ComponentsView","getClasses","opt","config","pfx","stylePrefix","ppfx","pStylePrefix","classe","class","classes","updateStyle","updateAttributes","updateHighlight","updateStatus","updateState","updateContent","handleChange","onActive","updateClasses","view","importClasses","init","emitUpdate","clm","cl","addClass","removeClass","status","selectedCls","selectedParentCls","freezedCls","hoveredCls","actualCls","getAttribute","cls","avoidHover","trim","setAttribute","hl","getId","getStyle","setStyle","styleToString","str","removeAttr","data-gjs-type","getChildrenContainer","innerHTML","prevDef","preventDefault","updateScript","getCanvasView","container","getChildrenSelector","querySelector","getTemplate","renderChildren","componentTypes","childrenView","appendChild","disableNode","children","renderAttributes","onRender","_mixins","Components","Selector","Selectors","Traits","componentList","componentIndex","Component","Styleable","removable","draggable","droppable","badgable","stylable","stylable-require","unstylable","highlightable","copyable","resizable","editable","layerable","selectable","hoverable","void","state","content","icon","script","traits","propagate","toolbar","_this","parentAttr","newAttr","toPropagate","voidElements","ccid","createId","scriptUpdated","traitsUpdated","tagUpdated","attrUpdated","initClasses","loadTraits","initComponents","initToolbar","is","query","$els","closest","coll","replaceWith","_this2","attrPrev","attrCurrent","pr","setAttributes","setClass","addAttributes","newAttrs","getAttributes","getConfig","rule","getIdRule","_this3","parseStyle","cc","propOrig","setIdRule","_extends","sm","hasStyle","avoidInline","TYPE_ID","selectors","TYPE_CLASS","normalizeClasses","comps","avoidChildren","append","components","found","trait","getInitValue","tb","command","trt","setTarget","arr","res","md","getName","customName","tag","getIcon","toHTML","sTag","customAttr","getAttrToHTML","code","comp","_len","_key","setId","getScriptString","_this4","scr","scrStr","tagVarStart","tagVarEnd","reg","onAll","clb","resetId","oldId","newId","isComponent","ilen","nextId","getList","templateLabel","templateInput","getDefaultValue","change","target","propTarget","onChange","onInputRender","customValue","inputHolderId","sector","targetUpdated","modelValueChanged","updateVisibility","updatedCls","computedCls","labelEl","clearStyle","getClearEl","clearProperties","stopPropagation","clearValue","clearEl","getTarget","getTargetModel","getHelperModel","helper","inputValueChanged","setValue","getInputValue","fromInput","elementUpdated","setStatus","checkVisibility","targetValue","getTargetValue","ignoreDefault","defaultValue","computedValue","getComputedValue","highlightChanged","showComputed","highlightComputed","fromTarget","hideNotStylable","isTargetStylable","isComponentStylable","show","hide","customFetchValue","ignoreCustomValue","computedDef","computedDefault","avoid","avoidComputed","notToSkip","getInputEl","getFullValue","fromParent","updateTargetStyle","trg","toRequire","stylableReq","component","getSelected","setRawValue","parseValue","cleanValue","targetUpdate","userAgent","navigator","platform","gecko","ie_upto10","ie_11up","edge","ie","ie_version","webkit","qtwebkit","chrome","presto","safari","vendor","mac_geMountainLion","phantom","ios","android","mobile","mac","chromeOS","windows","presto_version","Number","flipCtrlCmd","captureRightClick","classTest","rmClass","node","removeChildren","removeChildrenAndAdd","elt","cssText","createTextNode","eltP","parentNode","host","activeElt","activeElement","shadowRoot","joinClasses","as","createRange","end","endNode","setEnd","setStart","createTextRange","moveToElementText","collapse","moveEnd","moveStart","selectInput","f","copyObj","overwrite","countColumn","tabSize","startValue","search","nextTab","selectionStart","selectionEnd","_e","Delayed","ms","scrollerGap","Pass","sel_dontScroll","scroll","sel_mouse","origin","sel_move","findColumn","goal","pos","col","skipped","spaceStrs","spaceStr","lst","out","nothing","createObj","inst","nonASCIISingleCaseWordChar","isWordCharBasic","ch","isWordChar","extendingChars","isExtendingChar","charCodeAt","skipExtendingChars","findFirst","pred","from","to","midF","getLine","doc","lines","sz","chunkSize","getBetween","line","iter","getLines","updateLineHeight","height","lineNo","cur","no","lineAtHeight","h","outer","i$1","lh","isLine","lineNumberFor","lineNumberFormatter","firstLineNumber","Pos","sticky","cmp","equalCursorPos","copyPos","x","maxPos","minPos","clipLine","clipPos","linelen","clipToLen","clipPosArray","sawReadOnlySpans","sawCollapsedSpans","MarkedSpan","marker","getMarkedSpanFor","spans","span","removeMarkedSpan","stretchSpansOverChange","full","oldFirst","markedSpans","oldLast","startCh","endCh","isInsert","nw","startsBefore","inclusiveLeft","insertLeft","endsAfter","inclusiveRight","markedSpansBefore","markedSpansAfter","sameLine","span$1","found$1","clearEmptySpans","newMarkers","gapMarkers","gap","i$2","i$3","clearWhenEmpty","detachMarkedSpans","detachLine","attachMarkedSpans","attachLine","extraLeft","extraRight","compareCollapsedMarkers","lenDiff","aPos","bPos","fromCmp","toCmp","collapsedSpanAtSide","sps","sp","collapsed","collapsedSpanAtStart","collapsedSpanAtEnd","collapsedSpanAround","conflictingCollapsedRange","lineNo$$1","visualLine","visualLineNo","lineN","vis","visualLineEndNo","lastLine","lineIsHidden","widgetNode","lineIsHiddenInner","heightAtLine","lineObj","lineLength","findMaxLine","cm","maxLine","maxLineLength","maxLineChanged","bidiOther","getBidiPartAt","order","bidiOrdering","lowTypes","arabicTypes","charType","bidiRE","isNeutral","isStrong","countsAsLeft","countsAsNum","BidiSpan","level","direction","outerType","types","type$1","prev$1","type$2","i$4","type$3","i$5","cur$1","type$4","i$6","end$1","replace$1","j$1","i$7","j$2","nstart","reverse","getOrder","noHandlers","emitter","map$$1","_handlers","getHandlers","signal","signalDOMEvent","override","defaultPrevented","e_defaultPrevented","codemirrorIgnore","signalCursorActivity","cursorActivity","curOp","cursorActivityHandlers","hasHandler","eventMixin","ctor","e_preventDefault","returnValue","e_stopPropagation","cancelBubble","e_stop","e_target","srcElement","e_button","which","button","ctrlKey","zwspSupported","badBidiRects","dragAndDrop","div","zeroWidthElement","measure","offsetHeight","offsetWidth","hasBadBidiRects","txt","r0","getBoundingClientRect","r1","splitLinesAuto","nl","rt","hasSelection","getSelection","te","range$$1","ownerDocument","selection","parentElement","compareEndPoints","hasCopyEvent","oncopy","badZoomedRects","modes","mimeModes","resolveMode","spec","getMode","mfactory","modeObj","modeExtensions","exts","helperType","modeProps","prop$1","extendMode","properties","copyState","nstate","innerMode","info","startState","StringStream","lineOracle","lastColumnPos","lastColumnValue","lineStart","eol","sol","peek","next","eat","eatWhile","eatSpace","skipToEnd","skipTo","backUp","column","indentation","pattern","consume","caseInsensitive","cased","substr","hideFirstChars","inner","lookAhead","oracle","baseToken","SavedContext","Context","maxLookAhead","baseTokens","baseTokenPos","highlightLine","forceToEnd","st","modeGen","lineClasses","runMode","loop","overlay","overlays","i_end","opaque","styles","bgClass","textClass","getLineStyles","updateFrontier","getContextBefore","resetState","maxHighlightLength","stateAfter","styleClasses","highlightFrontier","modeFrontier","precise","minindent","minline","lim","indented","findStartLine","saved","fromSaved","processLine","viewFrom","viewTo","nextLine","startAt","stream","callBlankLine","readToken","blankLine","token","copy","Token","takeToken","asArray","tokens","extractLineClasses","lineClass","flattenSpans","curStart","curStyle","addModeClass","mName","Line","estimateHeight","cleanUpLine","styleToClassCache","styleToClassCacheWithMode","interpretTokenStyle","buildLineContent","lineView","builder","pre","trailingSpace","splitSpaces","getOption","addToken","buildToken","buildTokenBadBidi","allowFrontierUpdate","externalMeasured","insertLineContent","maps","caches","lastChild","defaultSpecialCharPlaceholder","startStyle","endStyle","css","displayText","trailingBefore","spaceBefore","special","specialChars","mustWrap","createDocumentFragment","lastIndex","txt$1","tabWidth","specialCharPlaceholder","fullStyle","part","buildCollapsedSpan","ignoreWidget","widget","needsContentAttribute","setUneditable","allText","spanStyle","spanEndStyle","spanStartStyle","nextChange","foundBookmarks","endStyles","upto","tokenText","LineView","visualLineContinued","hidden","buildViewArray","nextPos","operationGroup","orphanDelayedCallbacks","signalLater","delayedCallbacks","fireOrphanDelayed","delayed","updateLineForChanges","dims","updateLineText","updateLineGutter","updateLineClasses","updateLineWidgets","ensureLineWrapped","replaceChild","zIndex","getLineContent","ext","built","background","updateLineBackground","wrapClass","gutter","gutterBackground","gutterClass","fixedGutter","fixedPos","gutterTotalWidth","markers","gutterMarkers","lineNumbers","wrap$1","gutterWrap","lineNumber","gutterLeft","k","gutters","gutterWidth","alignable","nextSibling","insertLineWidgets","buildLineElement","insertLineWidgetsFor","allowAbove","widgets","ws","handleMouseEvents","positionLineWidget","above","noHScroll","width","wrapperWidth","coverGutter","paddingLeft","marginLeft","widgetHeight","parentStyle","clientWidth","eventInWidget","sizer","mover","paddingTop","lineSpace","offsetTop","paddingVert","paddingH","cachedPaddingH","getComputedStyle","currentStyle","parseInt","paddingRight","scrollGap","nativeBarWidth","displayWidth","scroller","barWidth","displayHeight","clientHeight","barHeight","mapFromLineView","measureChar","bias","measureCharPrepared","prepareMeasureForLine","findViewForLine","findViewIndex","getDimensions","forceUpdate","lineMeasure","updateExternalMeasurement","rect","hasHeights","prepared","varHeight","wrapping","lineWrapping","curWidth","heights","rects","getClientRects","abs","bottom","top","ensureLineHeights","place","nodeAndOffsetInLineMap","coverStart","coverEnd","getUsefulRect","screen","logicalXDPI","deviceXDPI","normal","fromRange","hasBadZoomedRects","scaleX","scaleY","logicalYDPI","deviceYDPI","maybeUpdateRectForZooming","rSpan","charWidth","nullRect","rtop","rbot","bot","bogus","singleCursorHeightPerLine","rbottom","measureCharInner","measureText","mStart","mEnd","clearLineMeasurementCacheFor","clearLineMeasurementCache","externalMeasure","clearCaches","cachedCharWidth","cachedTextHeight","lineNumChars","pageScrollX","pageXOffset","documentElement","scrollLeft","pageScrollY","marginTop","pageYOffset","scrollTop","widgetTopHeight","intoCoordSystem","includeWidgets","yOff","viewOffset","lOff","xOff","fromCoordSystem","coords","localBox","lineSpaceBox","charCoords","cursorCoords","preparedMeasure","getBidi","partPos","other","estimateCoords","PosWithInfo","outside","xRel","coordsChar","y","coordsCharInner","rangeEnd","wrappedLineExtent","begin","wrappedLineExtentChar","targetTop","boxIsAfter","box","widgetHeight$$1","ltr","_lineNo","ref","closestDist","endX","dist","baseX","chAround","boxAround","atLeft","atStart","textHeight","anchor","clientLeft","offsetLeft","compensateForHScroll","th","perLine","widgetsHeight","estimateLineHeights","est","estHeight","posFromMouse","liberal","forRect","space","clientX","clientY","colDiff","round","updateSelection","showSelection","prepareSelection","primary","curFragment","cursors","selFragment","sel","ranges","primIndex","empty","showCursorWhenSelecting","drawSelectionCursor","drawSelectionRange","cursor","cursorHeight","otherCursor","cmpCoords","padding","leftSide","rightSide","sizerWidth","docLTR","drawForLine","fromArg","toArg","lineLen","wrapX","extent","iterateBidiSections","fromPos","toPos","openStart","openEnd","openLeft","openRight","topLeft","topRight","botLeft","botRight","sFrom","sTo","fromLine","toLine","singleVLine","leftEnd","rightStart","restartBlink","focused","blinker","cursorDiv","visibility","cursorBlinkRate","ensureFocus","focus","onFocus","delayBlurEvent","delayingBlurEvent","onBlur","readOnly","selForContextMenu","receivedFocus","updateHeightsInViewport","prevBottom","lineDiv","updateWidgetHeight","w","visibleLines","viewport","ensure","ensureFrom","ensureTo","alignHorizontally","alignWidgets","gutterW","align","maybeUpdateLineNumberWidth","innerW","lineGutter","lineNumInnerWidth","lineNumWidth","updateGutterSpace","calculateScrollPos","snapMargin","screentop","docBottom","atTop","atBottom","newTop","screenleft","screenw","tooWide","addToScrollTop","resolveScrollToPos","ensureCursorVisible","getCursor","scrollToPos","margin","cursorScrollMargin","scrollToCoords","scrollToCoordsRange","sPos","updateScrollTop","updateDisplaySimple","setScrollTop","startWorker","forceScroll","scrollHeight","scrollbars","setScrollLeft","isScroller","scrollWidth","measureForScrollbars","docH","viewHeight","viewWidth","barLeft","docHeight","NativeScrollbars","vert","horiz","checkedZeroWidth","minHeight","minWidth","needsH","needsV","sWidth","totalHeight","totalWidth","zeroWidthHack","disableHoriz","enableZeroWidthBar","disableVert","pointerEvents","bar","maybeDisable","elt$$1","elementFromPoint","NullScrollbars","updateScrollbars","startWidth","startHeight","updateScrollbarsInner","sizes","paddingBottom","heightForcer","borderBottom","scrollbarFiller","coverGutterNextToScrollbar","gutterFiller","scrollbarModel","native","null","initScrollbars","scrollbarStyle","axis","nextOpId","startOperation","viewChanged","updateInput","typing","changeObjs","cursorActivityCalled","selectionChanged","updateMaxLine","op","ops","ownsGroup","pushOperation","endOperation","endCb","callbacks","fireCallbacksForOps","finishOperation","endOperation_R1","endOperation_W1","endOperation_R2","endOperation_W2","endOperation_finish","endOperations","scrollbarsClipped","marginBottom","borderRightWidth","maybeClipScrollbars","mustUpdate","DisplayUpdate","updatedDisplay","updateDisplayIfNeeded","barMeasure","adjustWidthTo","maxScrollLeft","preparedSelection","takeFocus","setDocumentHeight","postUpdateDisplay","wheelStartX","wheelStartY","limit","endCoords","scrollPos","startTop","startLeft","scrollPosIntoView","doScroll","innerHeight","scrollNode","scrollIntoView","maybeScrollWindow","maybeHiddenMarkers","unhidden","maybeUnhiddenMarkers","finish","runInOp","operation","methodOp","docMethodOp","regChange","lendiff","updateLineNumbers","resetView","cut","viewCuttingPoint","cut$1","cutTop","cutBot","regLineChange","oldN","newN","countDirtyView","dirty","time","highlight","highlightWorker","workTime","changedLines","oldStyles","highlighted","oldCls","newCls","ischange","workDelay","force","visible","editorIsHidden","wrapperHeight","oldDisplayWidth","renderedView","viewportMargin","different","lastWrapHeight","lastWrapWidth","adjustView","toUpdate","selSnapshot","hasFocus","active","anchorNode","anchorOffset","focusNode","focusOffset","selectionSnapshot","updateNumbersFrom","rm","currentWheelTarget","updateNumber","patchDisplay","snapshot","removeAllRanges","addRange","restoreSelection","selectionDiv","reportedViewFrom","reportedViewTo","updateGutters","specs","gElt","setGuttersForLineNumbers","wheelSamples","wheelPixelsPerUnit","wheelEventDelta","dx","wheelDeltaX","dy","wheelDeltaY","detail","HORIZONTAL_AXIS","VERTICAL_AXIS","wheelDelta","wheelEventPixels","delta","onScrollWheel","canScrollX","canScrollY","pixels","wheelDX","wheelDY","movedX","movedY","Selection","equals","here","there","deepCopy","Range","somethingSelected","normalizeSelection","prim","inv","simpleSelection","changeEnd","adjustForChange","computeSelAfterChange","offsetPos","loadMode","modeOption","resetModeState","isWholeLineUpdate","wholeLineUpdateBefore","updateDoc","estimateHeight$$1","spansFor","updateLine","linesFor","firstLine","lastText","lastSpans","nlines","added$1","added$2","linkedDocs","sharedHistOnly","skip","sharedHist","linked","rel","shared","attachDoc","setDirectionClass","startGen","done","undone","undoDepth","lastModTime","lastSelTime","lastOp","lastSelOp","lastOrigin","lastSelOrigin","generation","maxGeneration","historyChangeFromChange","histChange","attachLocalSpans","clearSelectionEvents","addChangeToHistory","selAfter","opId","hist","historyEventDelay","lastChangeEvent","pushSelectionToHistory","addSelectionToHistory","selectionEventCanBeMerged","clearRedo","dest","removeClearedSpans","explicitlyCleared","mergeOldSpans","getOldSpans","stretched","oldCur","stretchCur","copyHistoryArray","newGroup","instantiateSel","newChanges","extendRange","posBefore","extendSelection","setSelection","extendSelections","heads","newSel","replaceOneSelection","setSimpleSelection","setSelectionReplaceHistory","setSelectionNoUndo","NaN","filterSelectionChange","setSelectionInner","skipAtomicInSelection","reCheckSelection","mayClear","newAnchor","skipAtomic","newHead","skipAtomicInner","oldPos","atomic","near","movePos","far","cantEdit","selectAll","filterChange","canceled","makeChange","ignoreReadOnly","suppressEdits","mark","parts","mk","newParts","dfrom","dto","removeReadOnlyRanges","makeChangeInner","makeChangeSingleDoc","rebased","rebaseHist","makeChangeFromHistory","allowSelectionOnly","suppress","antiChanges","returned","shiftDoc","distance","recomputeMaxLength","checkWidthStart","retreatFrontier","changesHandler","changeHandler","makeChangeSingleDocInEditor","replaceRange","splitLines","rebaseHistSelSingle","rebaseHistArray","sub","ok","copied","changeLine","handle","changeType","LeafChunk","BranchChunk","removeInner","insertInner","iterN","oldHeight","leaf","maybeSpill","me","spilled","sibling","myIndex","used","LineWidget","adjustScrollWhenAboveVisible","this$1","oldH","nextMarkerId","TextMarker","markText","cloneNode","isParent","SharedTextMarker","markTextShared","replacedWith","addToHistory","curLine","addMarkedSpan","clearOnEnter","clearHistory","withOp","visual","dHeight","findSharedMarkers","findMarks","detachSharedMarkers","subMarker","nextDocId","Doc","lineSep","cleanGeneration","getValue","lineSeparator","getRange","getLineHandle","getLineNumber","getLineHandleVisualStart","lineCount","listSelections","setCursor","extendSelectionsBy","setSelections","addSelection","getSelections","replaceSelection","dup","replaceSelections","hint","oldPrev","newPrev","computeReplacedSel","undo","redo","undoSelection","redoSelection","setExtending","getExtending","historySize","markClean","changeGeneration","forceSplit","isClean","gen","getHistory","setHistory","histData","setGutterMarker","gutterID","clearGutter","lineInfo","addLineClass","removeLineClass","addLineWidget","insertAt","aboveVisible","removeLineWidget","setBookmark","realOpts","findMarksAt","getAllMarks","posFromIndex","sepSize","indexFromPos","copyHistory","linkedDoc","mFrom","mTo","subMark","copySharedMarkers","unlinkDoc","CodeMirror$1","link","splitIds","iterLinkedDocs","getEditor","setDirection","directionChanged","eachLine","lastDrop","onDrop","clearDragCursor","files","dataTransfer","isReadOnly","FileReader","File","loadFile","file","allowDropFileTypes","reader","onload","readAsText","draggingText","text$1","getData","selected","dragCursor","forEachCodeMirror","getElementsByClassName","byClass","CodeMirror","globalsRegistered","ensureGlobalHandlers","resizeTimer","onResize","registerGlobalHandlers","setSize","keyNames","3","8","9","13","16","17","18","19","20","27","32","33","34","35","36","37","38","39","40","44","45","46","59","61","91","92","93","106","107","109","110","111","127","145","173","186","187","188","189","190","191","192","219","220","221","222","63232","63233","63234","63235","63272","63273","63275","63276","63277","63302","fromCharCode","keyMap","normalizeKeyName","alt","ctrl","cmd","mod","normalizeKeyMap","keymap","keyname","lookupKey","getKeyMap","fallthrough","isModifierKey","keyCode","addModifierNames","noShift","altKey","metaKey","shiftKey","keyName","altGraphKey","deleteNearSelection","compute","kill","toKill","replaced","moveCharLogically","moveLogically","endOfLine","visually","moveInStorageOrder","prep","basic","Left","Right","Up","Down","End","Home","PageUp","PageDown","Delete","Backspace","Shift-Backspace","Tab","Shift-Tab","Enter","Insert","Esc","pcDefault","Ctrl-A","Ctrl-D","Ctrl-Z","Shift-Ctrl-Z","Ctrl-Y","Ctrl-Home","Ctrl-End","Ctrl-Up","Ctrl-Down","Ctrl-Left","Ctrl-Right","Alt-Left","Alt-Right","Ctrl-Backspace","Ctrl-Delete","Ctrl-S","Ctrl-F","Ctrl-G","Shift-Ctrl-G","Shift-Ctrl-F","Shift-Ctrl-R","Ctrl-[","Ctrl-]","Ctrl-U","Shift-Ctrl-U","Alt-U","emacsy","Ctrl-B","Ctrl-P","Ctrl-N","Alt-F","Alt-B","Ctrl-E","Ctrl-V","Shift-Ctrl-V","Ctrl-H","Alt-D","Alt-Backspace","Ctrl-K","Ctrl-T","Ctrl-O","macDefault","Cmd-A","Cmd-D","Cmd-Z","Shift-Cmd-Z","Cmd-Y","Cmd-Home","Cmd-Up","Cmd-End","Cmd-Down","Cmd-Left","Cmd-Right","Ctrl-Alt-Backspace","Alt-Delete","Cmd-S","Cmd-F","Cmd-G","Shift-Cmd-G","Cmd-Alt-F","Shift-Cmd-Alt-F","Cmd-[","Cmd-]","Cmd-Backspace","Cmd-Delete","Cmd-U","Shift-Cmd-U","commands","singleSelection","killLine","deleteLine","delLineLeft","delWrappedLineLeft","leftPos","delWrappedLineRight","rightPos","goDocStart","goDocEnd","goLineStart","goLineStartSmart","lineStartSmart","goLineEnd","visualLineEnd","lineEnd","goLineRight","goLineLeft","goLineLeftSmart","goLineUp","moveV","goLineDown","goPageUp","goPageDown","goCharLeft","moveH","goCharRight","goColumnLeft","goColumnRight","goWordLeft","goGroupRight","goGroupLeft","goWordRight","delCharBefore","deleteH","delCharAfter","delWordBefore","delWordAfter","delGroupBefore","delGroupAfter","indentAuto","indentSelection","indentMore","indentLess","insertTab","insertSoftTab","spaces","defaultTab","execCommand","transposeChars","newlineAndIndent","sels","indentLine","openLine","toggleOverwrite","firstNonWS","inWS","doHandleBinding","dropShift","ensurePolled","prevShift","stopSeq","dispatchKey","seq","keySeq","dispatchKeyInner","keyMaps","extraKeys","lookupKeyForEditor","handleKeyBinding","motion","lastStoppedKey","onKeyDown","handled","up","showCrossHair","onKeyUp","onKeyPress","charCode","handleCharBinding","lastClick","lastDoubleClick","PastClick","onMouseDown","activeTouch","supportsTouch","clickInGutter","repeat","compare","clickRepeat","selectingText","handleMappedButton","contained","option","unit","addNew","moveOnDrag","configureMouse","dragDrop","moved","dragEnd","mouseMove","dragStart","e2","leftButtonStartDrag","ourRange","ourIndex","startSel","rangeForUnit","lastPos","extendTo","startCol","posCol","oldRange","ranges$1","anchorLine","boundary","headIndex","usePart","bidiSimplify","editorSize","counter","move","buttons","curCount","leftButtonSelect","leftButtonDown","onContextMenu","findWordAt","gutterEvent","prevent","mX","mY","touches","lineBox","g","contextMenuInGutter","themeChanged","theme","Init","optionHandlers","guttersChanged","dragDropChanged","wasOn","funcs","dragFunctions","toggle","enter","over","leave","wrappingChanged","inputStyles","inputStyle","pasteIncoming","cutIncoming","autofocus","word","touchFinished","prevTouch","finishTouch","farAway","touch","radiusX","radiusY","isMouseLikeTouchEvent","pageX","pageY","frag","onDragOver","setData","effectAllowed","setDragImage","img","_top","onDragStart","inp","getField","registerEventHandlers","finishInit","initHooks","textRendering","how","aggressive","indent","curSpace","curSpaceString","indentUnit","indentString","indentWithTabs","pos$1","defineInitHook","lastCopied","setLastCopied","newLastCopied","applyTextInput","inserted","deleted","paste","textLines","multiPaste","pasteLinesPerSelection","lineWise","changeEvent","triggerElectric","handlePaste","pasted","clipboardData","disableInput","electricChars","smartIndent","getModeAt","electricInput","copyableRanges","lineRange","disableBrowserMagic","field","spellcheck","hiddenTextarea","border","findPosH","origDir","moveOnce","boundToLine","bidi","mv","getWrappedLineExtent","searchInVisualLine","getRes","nextCh","moveVisually","findNextLine","sawType","getHelper","hitSide","findPosV","pageSize","moveAmount","ContentEditableInput","lastAnchorNode","lastAnchorOffset","lastFocusNode","lastFocusOffset","polling","composing","gracePeriod","readDOMTimeout","posToDOM","badPos","bad","domToPos","lineNode","locateNodeInLineView","textNode","topNode","nodeValue","curNode","textContent","previousSibling","dist$1","onCopyCut","lineWiseCopyCut","clearData","kludge","hadFocus","showPrimarySelection","updateFromDOM","readFromDOMSoon","forceCompositionEnd","showMultipleSelections","curAnchor","curFocus","rng","rangeCount","getRangeAt","startGracePeriod","rememberSelection","selectionInEditor","commonAncestorContainer","blur","pollSelection","pollInterval","poll","scan","isInGutter","triggerOnKeyDown","pollContent","fromNode","toNode","toIndex","newText","closing","extraLinebreak","addText","walk","cmText","markerID","recognizeMarker","isBlock","nodeName","domTextBetween","oldText","cutFront","cutEnd","oldTop","maxCutFront","newBot","oldBot","maxCutEnd","chFrom","chTo","contentEditable","readOnlyChanged","resetPosition","TextareaInput","prevInput","pollingFast","createField","textarea","prepareCopyCut","fastPoll","_display","moveInputWithCursor","headPos","wrapOff","lineOff","teTop","teLeft","drawn","contextMenuPending","slowPoll","missed","same","resetSelectionOnContextMenu","oldCSS","oldWrapperCSS","oldScrollY","wrapperBox","scrollY","scrollTo","detectingSelectAll","prepareSelectAllHack","mouseup","rehide","extval","disabled","deflt","notOnInit","defineOption","newBreaks","refresh","getInputField","detach","attach","integer","defineOptions","helpers","setOption","getDoc","addKeyMap","removeKeyMap","addOverlay","score","priority","insertSorted","modeSpec","removeOverlay","newRanges","getTokenAt","getLineTokens","getTokenTypeAt","getHelpers","help","_global","getStateAfter","defaultTextHeight","defaultCharWidth","getViewport","addWidget","vspace","hspace","triggerOnKeyPress","triggerOnKeyUp","triggerOnMouseDown","amount","rtlMoveVisually","goalColumn","goals","startChar","check","getScrollInfo","scrollToRange","interpret","swapDoc","getWrapperElement","getScrollerElement","getGutterElement","registerHelper","registerGlobalHelper","addEditorMethods","dontDelegate","contenteditable","defineMode","dependencies","defineMIME","mime","defineExtension","defineDocExtension","fromTextArea","tabindex","realSubmit","form","leaveSubmitMethodAlone","submit","wrappedSubmit","getTextArea","toTextArea","cmpPos","addLegacyProps","version","SelectPosition","hType","newFixedH","allowDraw","enable","$wr","startDraw","ghost","canvas","getGhostEl","stopSelectPosition","frameOff","getOffsetDim","startPos","isDragged","tempComponent","beforeDraw","updateSize","toggleEvents","draw","endDraw","$canvas","rollback","updateComponentSize","setRequirements","lp","sorter","prevTarget","startSelectPosition","afterDraw","$trg","trgModel","trgCollection","console","warn","compStl","minComponentW","minComponentH","overflow","absoluteMode","nearFloat","lastDims","float","firstCentered","getCanvasWrapper","u","ghStl","ESCAPE_KEY","run","editor","sender","$wrapper","ToolbarView","Toolbar","showOffsets","canvasOff","adjScroll","startSelectComponent","updateAttached","toggleSelectComponent","stopSelectComponent","getCanvasBody","win","getContentWindow","onHover","onOut","onClick","onFrameScroll","onSelect","onHovered","setHovered","forceChange","getElementPos","updateBadge","updateHighlighter","showElementOffset","hideBadge","hideHighlighter","hideElementOffset","runCommand","elPos","stopCommand","showFixedElementOffset","hideFixedElementOffset","getHighlighter","multiple","selectToggle","clearSelection","Canvas","getWindow","getSelectedAll","selColl","selIndex","selectAdd","initResize","customeLabel","customBadgeLabel","cacheEl","badge","getBadge","badgeLabel","bStyle","canvasPos","getPosition","badgeH","badgeW","hlStyle","updateToolbar","resizeClass","modelToStyle","toggleBodyClass","docs","onStart","resizer","keyHeight","keyWidth","currentUnit","getModelToStyle","computedStyle","modelStyle","currentWidth","currentHeight","startDim","unitHeight","unitWidth","onMove","onEnd","updateTarget","store","selectedHandler","onlyHeight","onlyWidth","avoidStore","updateEvent","_typeof","toolbarEl","getToolbarEl","toolbarStyle","showToolbar","opacity","toolbarView","updateToolbarPos","getTargetToElementDim","elementWidth","targetWidth","getCanvasPosition","clean","selEl","hoverClass","getBadgeEl","updated","cleanPrevious","frameEl","preserveSelected","setSelected","labelClass","fieldClass","inputhClass","onValueChange","tmpl","getValueForTarget","setInputValue","setTargetValue","renderLabel","label","getLabel","html","$input","plh","getModelValue","renderField","inputWrap","private","protected","escapeName","getFullName","eval","CreateComponent","_len2","_key2","insertComponent","buildContent","beforeInsert","terminateAfterInsert","afterInsert","isPointed","utils","editorModel","Sorter","placer","getPlacerEl","containerSel","itemSel","wmargin","nested","canvasRelative","startSort","getFrameEl","posTargetCollection","posIndex","posMethod","cDim","endMove","posIsLastEl","posTargetEl","outsideElem","posTargetModel","isLast","ComponentView","dblclick","click","updateSrc","openModal","classEmpty","modal","am","fetchFile","FileUploader","uploadFile","accept","Modal","AssetManager","actCls","PropertyView","parsed","inputInst","inputEl","unitEl","$unit","addTo","typeView","functionName","fixedValues","important","complete","setValueFromInput","imp","valueStr","substring","Property","TypeableCollection","isType","deepClone","cloned","getStyleable","getValid","getFullString","__WEBPACK_AMD_DEFINE_FACTORY__","idMatch","classMatch","htmlMatch","singlet","elems","getElementsByTagName","querySelectorAll","parseHTML","implementation","createHTMLDocument","onReady","readyState","cash","getElementById","oMatchesSelector","getCompareFunction","second","isNumeric","uid","getDataCache","dataset","removeData","notWhiteMatch","hasClass","classList","removeAttribute","removeProp","toggleClass","camelRegex","whiteSpace","letter","getPrefixedProp","ucProp","removeEvent","eventCache","encode","selectedIndex","getSelectSingle_","getSelectMultiple_","insertContent","prepend","insertAdjacentHTML","insertElement","prefixedProp","lower","margins","runOnce","originalCallback","finalCallback","registerEvent","one","ready","evt","createEvent","initEvent","dispatchEvent","serialize","elements","insertAfter","appendTo","outerHTML","prependTo","docEl","clientTop","offsetParent","nextElementSibling","not","parents","previousElementSibling","siblings","dragger","canvasView","mousePosFetcher","getMouseRelativePos","posFetcher","Utils","Dragger","canvasResizer","ratioDefault","getResizerEl","forceNew","Resizer","getPanels","panels","Panels","getPanelsEl","tglPointers","elP","getBody","stopDefault","editorEl","Config","onclick","canvasS","runDefault","isEnabled","fullscreenElement","webkitFullscreenElement","mozFullScreenElement","requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen","disable","exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen","fsChanged","getContainer","getOffsetMethod","showOffsetsSelected","stateVar","offsetViewer","marginT","marginB","marginL","marginR","padT","padB","padL","padR","stateLow","marginName","paddingName","marginV","paddingV","fullMargName","fullPadName","marginLeftSt","marginTopSt","marginBottomSt","mtStyle","mbStyle","mlStyle","mrStyle","ptStyle","pbStyle","plStyle","prStyle","posLeft","marginSideH","marginSideT","marginRight","padTop","padBot","padSideH","padSideT","padRight","amContainer","modalTitle","onDblClick","rendered","assets","getAll","uploadEl","setTitle","setContent","bm","BlockManager","pn","blocks","getPanel","addPanel","tm","TraitManager","$cn","tmView","getTraitsViewer","confTm","$cn2","$header","textNoElement","labelContainer","toggleTm","dvm","DeviceManager","showDevices","SelectorManager","StyleManager","smConfig","panel","toggleSm","lm","LayerManager","layers","ed","SelectComponent","badgeClass","noSelClass","getHighlighterEl","wp","initSorter","toggleClipboard","drag","contentDocument","onEndMove","initSorterFromModel","onEndMoveFromModel","initSorterFromModels","lastModel","toMove","$badge","$hl","InsertCustom","onmousedown","mouseover","startDelete","mouseout","stopDelete","onDelete","$this","attachBadge","removeBadge","updateBadgeLabel","CodeManager","$editors","oHtmlEd","buildEditor","oCsslEd","htmlEditor","cssEditor","textViewCode","getHtml","getCss","codeName","codeMirror","getViewer","EditorView","plhClass","freezClass","getCanvas","canvasTool","getCanvasTools","bodyEl","getWrapperEl","getToolsEl","callRun","abort","callStop","hasButtonBool","parseUri","uri","qrs","pair","hostname","protocol","port","columns","rows","rowsToAdd","columnsToAdd","Input","change input","change select","click [data-arrow-up]","click [data-arrow-down]","mousedown [data-arrows]","inputClass","contClass","handleModelChange","valid","validateInputValue","deepCheck","validObj","handleUnitChange","getUnitEl","units","upArrowClick","normalizeValue","downArrowClick","downIncrement","moveIncrement","upIncrement","prValue","defValue","fixed","regFixed","valCopy","uN","propView","$props","propsView","getPropsConfig","that","mIndex","valueOnIndex","clp","isEditing","cop","toSelect","_toConsumableArray","DomComponents","CssComposer","ItemsView","mousedown [data-toggle-move]","click [data-toggle-visible]","click [data-toggle-select]","mouseover [data-toggle-select]","click [data-toggle-open]","dblclick [data-name]","focusout [data-name]","hidable","countChildren","clsNoChild","clsTitle","clsTitleC","clsCaret","clsInput","inputNameCls","gut","isVisible","clsCount","clsMove","clsChildren","checkChildren","updateOpening","viewLayer","getVisibilityEl","eyeEl","hClass","toggleVisibility","handleEdit","getInputName","handleEditEnd","inputName","opened","getCaret","toggleOpening","handleSelect","fromLayers","scrollCanvas","handleHover","showHover","freeze","unfreeze","highlightHover","noChildCls","cnt","isCountable","hideTextnode","caret","setRoot","getWrapper","showWrapper","onLoad","ItemView","componentChanged","postRender","elTo","getRoot","scrollLayers","disableEditing","enableEditing","rte","rteEnabled","activeRte","err","customRte","onInput","disablePropagation","mixins","setEditing","elDocs","resetChildren","addToCollection","temporary","fragmentEl","compView","viewObject","dt","it","parentEl","onAdd","df","cssc","parseHtml","avoidUpdateStyle","addCollection","setClassRule","itemView","itemsView","itemType","typeField","toCSS","default","extendStyle","propNew","addStyle","removeStyle","selectorsAdd","mediaText","atRuleType","singleAtRule","slct","getAtRule","condition","typeStr","selectorsToString","addSelector","stateStr","skipAdd","getDeclaration","atRule","block","ruleProps","wd","re","globalCollection","uploadId","disableUpload","upload","embedAsBase64","onUploadStart","onUploadEnd","onUploadError","onUploadResponse","json","autoAdd","FormData","uploadName","headers","_fetch2","credentials","then","Promise","catch","initDrop","uploadForm","ondragover","ondragleave","ondrop","initDropzone","addedCls","edEl","dropzoneCls","cleanEditorElCls","onDragLeave","openAssetsOnDrop","dropzoneContent","uploadText","response","promises","mimeTypeMatcher","promise","resolve","image","Image","readAsDataURL","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","iterator","return","getPreview","getInfo","click [data-toggle=asset-remove]","dim","getFilename","onRemove","stopImmediatePropagation","InputNumber","_input$validateInputV","onOptionChange","getOptions","_attributes","addOption","assetsLabel","$preview","$previewBox","componentValue","setPreviewView","setPreview","pv","spreadUrl","preview","removeFile","openAssetManager","asset","_ColorPicker2","holderClass","def","colorEl","getColorEl","valueClr","backgroundColor","spectrum","noneColor","cpStyle","elToAppend","colorPickerConfig","getColor","color","getAlpha","toHexString","toRgbString","previousColor","containerClassName","maxSelectionSize","showPalette","showAlpha","chooseText","cancelText","palette","InputColor","$color","updateOptions","optionsStr","styleAttr","inputH","itemCls","inputStr","labelTxt","titleAttr","inputHld","inputChk","getCheckedEl","inputIn","checked","PropertyCompositeView","LayersView","indexChanged","refreshLayers","getLayers","addLayer","layer","getLayerValues","layersObj","getLayersFromStyle","getLayersFromValue","stackIndex","fieldEl","PropertiesView","propsConfig","subModel","subProp","getPropertyValues","stackModel","detached","separator","Properties","updateValues","defaultProps","baseType","getBaseType","getType","typeFound","recognizeType","getTypes","addType","definition","ModelInst","ViewInst","sectors","SectView","Sectors","SectorsView","addSector","getSector","removeSector","getSectors","addProperty","sectorId","getProperty","removeProperty","getProperties","um","cssC","devicePreviewMode","hasClasses","deviceW","getCurrentMedia","avoidInlineStyle","createType","_ref","_ref$model","_ref$view","ButtonsView","appendContent","tc","cr","bc","resz","resLen","tl","tr","bl","br","silentFrames","avoidContainerUpdate","forContainer","styleWidth","styleHeight","Button","deactivateAllExceptOne","except","deactivateAll","disableAllButtons","disableAllButtonsExceptOne","Buttons","btn","keySet","parserConfig","inline","propertyKeywords","tokenHooks","documentTypes","mediaTypes","mediaFeatures","mediaValueKeywords","nonStandardPropertyKeywords","fontProperties","counterDescriptors","colorKeywords","valueKeywords","allowNested","lineComment","supportsAtComponent","ret","tp","tokenString","quote","escaped","tokenize","tokenParenthesized","pushContext","popContext","states","popAndPass","wordAsValue","stateArg","maybeprop","propBlock","_stream","parens","pseudo","atBlock","atComponentBlock","atBlock_parens","restricted_atBlock_before","restricted_atBlock","keyframes","interpolation","textAfter","cx","blockCommentStart","blockCommentEnd","blockCommentContinue","fold","documentTypes_","mediaTypes_","mediaFeatures_","mediaValueKeywords_","propertyKeywords_","nonStandardPropertyKeywords_","colorKeywords_","valueKeywords_","allWords","tokenCComment","maybeEnd","/",":","#","@","compTypes","decls","decl","parseClass","parseNode","nodes","attrsLen","nodePrev","nodeChild","ct","modelAttrStart","modelAttr","valueLen","firstChar","lastChar","keepEmptyTextNodes","allTxt","foundTextNode","ci","cType","textTags","parserCss","scripts","allowScripts","styleStr","rej","req","XMLHttpRequest","withCredentials","statusText","responseText","onerror","onProgress","onprogress","send","FuncProto","nativeBind","undefinedOnly","isFunc","shuffled","fail","timestamp","oiteratee","_mods","_scope","_MODIFIERS","⇧","⌥","⌃","control","⌘","_MAP","backspace","tab","esc","down","del","home","pageup","pagedown",",",".","-","=",";","[","]","_downKeys","compareArray","modifierMap","updateModifierKey","assignKey","scope","mods","getKeys","getMods","shortcut","getScope","mi","addEvent","modifiersMatch","dispatch","previousKey","setScope","deleteScope","isPressed","getPressedKeyCodes","multipleKeys","plugins","plugin","agent","rules","isIE","originalCreateHTMLDocument","DOMImplementation","conf","disableButtons","contEl","ViewProt","eventNsMap","vid","eventMap","_ref2","_ref3","getEvents","getNamespaces","namespaces","_this5","Event","bval","baseVal","keydown","defaultView","Window","items","ar","inArray","isDefaultPrevented","caretR","caretD","iconClass","activeClass","getIconEl","getBlocksEl","iconEl","blocksEl","mousedown","dragstart","dragend","endDrag","startDrag","getSorter","refreshCanvas","setDragHelper","setDropContent","handleDragStart","isObj","handleDrag","handleDragEnd","oldActive","dragResult","dragContent","BlockView","CategoryView","categories","renderedCategories","noCatClass","blockContClass","catsClass","tac","grabbingCls","onDrag","category","catModel","catId","catView","getCategoriesEl","catsEl","Category","activate","Block","blocksVisible","blocksView","Blocks","BlockCategories","BlocksView","getAllVisible","getCategories","toRender","./CanvasClear","./CanvasClear.js","./CommandAbstract","./CommandAbstract.js","./ComponentDelete","./ComponentDelete.js","./ComponentEnter","./ComponentEnter.js","./ComponentExit","./ComponentExit.js","./ComponentNext","./ComponentNext.js","./ComponentPrev","./ComponentPrev.js","./CopyComponent","./CopyComponent.js","./CreateComponent","./CreateComponent.js","./DeleteComponent","./DeleteComponent.js","./Drag","./Drag.js","./ExportTemplate","./ExportTemplate.js","./Fullscreen","./Fullscreen.js","./ImageComponent","./ImageComponent.js","./InsertCustom","./InsertCustom.js","./MoveComponent","./MoveComponent.js","./OpenAssets","./OpenAssets.js","./OpenBlocks","./OpenBlocks.js","./OpenLayers","./OpenLayers.js","./OpenStyleManager","./OpenStyleManager.js","./OpenTraitManager","./OpenTraitManager.js","./PasteComponent","./PasteComponent.js","./Preview","./Preview.js","./Resize","./Resize.js","./SelectComponent","./SelectComponent.js","./SelectParent","./SelectParent.js","./SelectPosition","./SelectPosition.js","./ShowOffset","./ShowOffset.js","./SwitchVisibility","./SwitchVisibility.js","./TextComponent","./TextComponent.js","webpackContext","webpackContextResolve","ToolbarButton","handleClick","DomainViews","ToolbarButtonView","defaultCommands","CommandAbstract","ViewCode","fullscreen","resize","selAll","nativeDrag","defComOptions","hideTlb","log","elRect","cmdMove","Commands","UndoManager","loadDefaultCommands","motionsEv","allowfullscreen","updateDim","device","getDeviceModel","currW","currH","newW","newH","noChanges","udpateOffset","getOffset","contents","FrameView","clearOff","frame","isElInViewport","frameRect","getFrameOffset","rTop","rLeft","toolsEl","renderScripts","appendScript","renderBody","confCanvas","protCss","protectedCss","externalStyles","frameCss","baseCss","canvasCss","getJsContainer","onscroll","fdoc","oEvent","keyCodeVal","createCustomEvent","docBody","frmOff","cvsOff","getCanvasOffset","eo","frmTop","avoidFrameOffset","frmLeft","bEl","fo","co","scriptContainer","jsContainer","hlEl","badgeEl","placerEl","ghostEl","resizerEl","offsetEl","fixedOffsetEl","Frame","rulers","Droppable","_classCallCheck","handleDragEnter","handleDragOver","handleDrop","handleDragLeave","updateCounter","endDrop","eventMoving","getContentByData","CanvasView","setWrapper","startAutoscroll","stopAutoscroll","autoscroll","wrp","getDocument","getOffsetViewerEl","getFixedOffsetViewerEl","setCustomBadgeLabel","toRight","targetHeight","eventToTrigger","elTop","elLeft","topPos","elementTop","elementLeft","elementHeight","canvasTop","canvasLeft","addTop","addLeft","subWinOffset","parentWindow","frameElement","yOffset","xOffset","getMouseRelativeCanvas","isInputFocused","dragging","toListen","getScrollListeners","frameWindow","nextTop","limitBottom","getFrameWrapperEl","sortContainer","ignoreViewChildren","created","srcModel","getSourceModel","avoidSelectOnEnd","createElementNS","SVGElement","scriptCount","svar","svarNext","OComponentView","updateVideo","updateProvider","prov","renderByProvider","getYoutubeSrc","getYoutubeNoCookieSrc","getVimeoSrc","videoEl","autoplay","controls","renderYoutube","renderYoutubeNoCookie","renderVimeo","renderSource","initVideoEl","frameBorder","OComponent","yt","vi","ytnc","videoId","provider","ytUrl","ytncUrl","viUrl","muted","modestbranding","sources","getYoutubeTraits","getVimeoTraits","getSourceTraits","parseFromSrc","updateTraits","qr","getProviderTrait","changeProp","getAutoplayTrait","getLoopTrait","getControlsTrait","isYtProv","isYtncProv","isViProv","isExtProv","getIframe","ifrm","mapUrl","mapType","zoom","frameborder","getMapUrl","addr","q","z","ComponentTableBody","cells","build","objs","labelPlhText","labelPlhHref","optionsTarget","targetEvent","final","toSet","Trait","TraitFactory","handleAdd","tmOpts","tf","wrapperId","wrapperName","imageCompClass","oAssetsOnCreate","storeWrapper","componentView","storageKey","smc","stm","storeHtml","storeComponents","componentHovered","selectRemove","setComponents","postLoad","handleChanges","handleUpdates","handleRemoves","els","load","getCacheLoad","getComponents","noStore","toStore","getComponent","addComponent","compType","TraitView","inputNumber","iconCls","TraitSelectView","TraitCheckboxView","TraitNumberView","TraitColorView","number","checkbox","updatedCollection","defaultOpts","TraitsView","TraitsViewer","CssRuleView","CssGroupRuleView","getBlockId","widthMedia","atRules","renderStarted","atRuleEl","styleEl","appendData","clsName","defaultBlockId","blockId","getMediaWidth","contRules","MAX_VALUE","CssRule","parseCss","staticRules","rulesView","CssRules","CssRulesView","storeCss","storeStyles","elStyle","sl","newSels","le","selec","modelExists","styleUpdate","media","getClassRule","inputPlaceholder","addBtnText","renderAssets","addToAsset","removedAsset","deselectAll","handleSubmit","getAddInput","getAssetsEl","inputUrl","toggleNoAssets","addAsset","assetsEl","noAssets","fuRendered","fu","getExtension","Asset","unitDim","dropzone","Assets","AssetsView","FileUpload","editorView","click [data-sector-title]","updateOpen","getPropertiesEl","$caret","renderProperties","SectorView","dummy","pt","helperRule","appendStateRule","ss","fonts","font","change [type=range]","input [type=range]","getSliderEl","slider","inputValueChangedSoft","showInput","click [data-close-layer]","mousedown [data-move-layer]","customPreview","onPreview","updatePreview","valueInt","previewEl","getPreviewEl","getPropertiesWrapper","propsWrapEl","wrapEl","LayerView","beforeShow","flat","allowEmpty","showButtons","clickoutFiresChange","showInitial","showPaletteOnly","hideAfterPaletteSelect","togglePaletteOnly","showSelectionPalette","localStorageKey","togglePaletteMoreText","togglePaletteLessText","clearText","noColorSelectedText","preferredFormat","replacerClassName","selectionPalette","spectrums","IE","rgbaSupport","replaceInput","markup","gradientFix","paletteTemplate","tiny","tinycolor","toHsl","formattedString","swatchStyle","toFilter","callbackContext","instanceOptions","reflow","isDragging","dragWidth","dragHeight","dragHelperHeight","slideHeight","alphaWidth","alphaSlideHelperWidth","slideHelperHeight","currentHue","currentSaturation","currentValue","currentAlpha","paletteArray","paletteLookup","draggingClass","shiftMovementDirection","boundElement","pickerContainer","dragHelper","slideHelper","alphaSliderInner","alphaSlider","alphaSlideHelper","textInput","paletteContainer","initialColorContainer","cancelButton","clearButton","chooseButton","toggleButton","isInput","isInputTypeColor","inputTypeColorSupport","shouldReplace","replacer","offsetElement","previewElement","initialColor","colorOnShow","currentPreferredFormat","applyOptions","rgb","updateSelectionPaletteFromStorage","localStorage","oldPalette","addColorToSelectionPalette","drawPalette","currentColor","getUniqueSelectionPalette","drawInitial","dragStop","setFromTextInput","updateOriginalInput","hideAll","$doc","onkeydown","clickout","updateUI","revert","ignoreFormatChange","newColor","newHsv","toHsv","getFormat","fromRatio","format","updateHelperLocations","flatColor","realColor","displayColor","realHex","realRgb","alpha","toRgb","realAlpha","gradient","gradientType","dragX","dragY","alphaX","slideY","fireCallback","picker","dpWidth","outerWidth","dpHeight","outerHeight","inputHeight","docElem","cW","cH","scL","scT","paletteElementClick","ignore","oldDragX","oldDragY","furtherFromX","paletteEvent","spect","optionName","optionValue","coord","onmove","onstart","onstop","maxHeight","maxWidth","hasTouch","duringDragEvents","t0","originalEvent","extra","loadOpts","_cachedResult","colorInput","localization","palettes","processNativeColorInputs","colorInputs","trimLeft","trimRight","tinyCounter","math","mathRound","mathMin","mathMax","mathRandom","named","matchers","rgba","hsl","hsla","hsv","hsva","hex8","parseIntFromHex","convertHexToDecimal","hex6","hex3","stringInputToObject","bound01","rgbToRgb","convertToPercentage","hsvToRgb","hue2rgb","hslToRgb","boundAlpha","inputToRGB","_originalInput","_r","_g","_b","_a","_roundA","_format","_gradientType","_ok","_tc_id","rgbToHsl","rgbToHsv","rgbToHex","allow3Char","hex","pad2","rgbaToHex","convertDecimalToHex","desaturate","clamp01","saturate","greyscale","lighten","brighten","darken","spin","hue","complement","triad","tetrad","splitcomplement","analogous","slices","monochromatic","modification","isDark","getBrightness","isLight","getOriginalInput","setAlpha","toHsvString","toHslString","toHex","toHex8","toHex8String","toPercentageRgb","toPercentageRgbString","toName","hexNames","secondColor","hex8String","secondHex8String","formatSet","hasAlpha","_applyModification","_applyCombination","color1","color2","mix","w1","rgb1","rgb2","w2","readability","c1","c2","brightnessA","brightnessB","colorDiff","brightness","isReadable","mostReadable","baseColor","colorList","bestColor","bestScore","bestIsReadable","readable","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","burntsienna","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","flipped","flip","isOnePointZero","processPercent","isPercentage","CSS_UNIT","PERMISSIVE_MATCH3","PERMISSIVE_MATCH4","getPropertyValue","Layer","onReset","noIncrement","cleaned","layerValue","styleObj","propModel","propertyObj","layerProprs","propertyName","Layers","layersColl","PropertyFactory","buildProps","extendBuilded","builded","buildProperties","extendProperties","propsModel","moProps","ex","pLen","mProps","isolated","mProp","mPProps","buildP","propFactory","Sector","adjustToolbar","actions","RTE_KEY","defActions","bold","italic","underline","strikethrough","insertHTML","RichTextEditor","setEl","updateActiveActions","settAct","action","actionbar","actionbarCont","actionbarContainer","addAction","styleWithCSS","syncActions","getActions","queryCommandSupported","queryCommandState","enabled","actionbarEl","deleteContents","nd","insertNode","lastEl","globalRte","hideToolbar","initRte","udpatePosition","PanelView","activeCls","disableCls","btnsVisCls","updateActive","checkActive","updateBtnsVis","updateClassName","updateDisable","$buttons","commandName","cmdIsFunc","clicked","toogleActive","_model$attributes","togglable","ButtonView","parentM","Panel","runDefaultCommand","stopDefaultCommand","swv","expt","ola","obl","ful","prv","delayBtnsShow","PanelsViewObj","PanelsView","removePanel","addButton","panelId","removeButton","getButton","commentStart","commentEnd","newlineAfterToken","_type","jsonMode","lexical","inlineElements","configuration","isComment","curMode","selText","endIndex","cmInstance","atSol","newline","statementIndent","jsonldMode","jsonld","isTS","typescript","wordRE","wordCharacters","keywords","kw","A","B","C","D","operator","atom","if","while","with","else","do","try","finally","break","continue","new","throw","debugger","var","const","let","function","for","switch","case","in","typeof","instanceof","true","false","super","yield","export","import","extends","await","isOperatorChar","isJsonldKeyword","cont","tokenBase","tokenComment","expressionAllowed","inSet","readRegexp","tokenQuasi","lastType","brackets","findFatArrow","fatArrowAt","arrow","depth","sawSomething","bracket","atomicTypes","regexp","jsonld-keyword","JSLexical","inScope","varname","localVars","vars","marked","inList","register","newContext","registerVarScoped","Var","globalVars","isModifier","defaultVars","pushcontext","pushblockcontext","popcontext","pushlex","lex","poplex","expect","wanted","exp","statement","vardef","parenExpr","maybeexpression","maybeelse","functiondef","forspec","enumdef","typeexpr","expression","maybelabel","maybeCatchBinding","afterExport","afterImport","funarg","expressionInner","expressionNoComma","noComma","arrowBodyNoComma","arrowBody","commasep","maybeop","maybeoperatorNoComma","maybeoperatorComma","classExpression","arrayLiteral","contCommasep","objprop","quasi","targetNoComma","maybeTypeArgs","maybeTarget","expr","continueQuasi","getterSetter","afterprop","maybetype","what","sep","proceed","mayberettype","isKW","afterType","typeprop","typearg","maybeReturnType","typeparam","maybeTypeDefault","maybeAssign","vardefCont","proppattern","forspec1","forspec2","formaybeinof","forspec3","classNameAfter","classBody","classfield","maybeFrom","exportField","importSpec","maybeMoreImports","maybeAs","enummember","basecolumn","combinator","parseJS","isContinuedStatement","doubleIndentSwitch","closeBrackets","skipExpression","htmlConfig","autoSelfClosers","area","embed","hr","keygen","meta","track","wbr","menuitem","implicitlyClosed","dd","li","optgroup","rp","tbody","td","tfoot","contextGrabbers","article","aside","blockquote","dl","fieldset","footer","h1","h2","h3","h4","h5","h6","header","hgroup","menu","nav","ol","section","table","ul","thead","doNotIndent","allowUnquoted","allowMissing","caseFold","xmlConfig","allowMissingTagName","editorConf","config_","htmlMode","inText","parser","inBlock","doctype","inTag","baseState","tagStart","closure","isInAttribute","inAttribute","stringStartCol","terminator","maybePopContext","nextTagName","parentTagName","tagNameState","closeTagNameState","attrState","matchClosing","closeState","closeStateErr","attrEqState","startOfLine","noIndent","attrValueState","attrContinuedState","isInText","baseIndent","fullLine","multilineTagIndentPastTag","multilineTagIndentFactor","alignCDATA","tagAfter","grabbers","skipAttribute","defaultTags","attrRegexpCache","getAttrValue","getAttrRegexp","getTagRegexp","anchored","addTags","tags","configTags","configScript","scriptTypes","htmlState","tagInfo","tagText","findMatchingMode","endTagA","endTag","localState","localMode","pat","maybeBackup","local","getContent","autoFormatRange","mapModel","mapJs","beforeEach","compCls","buildFromModel","wrappesIsBody","isWrapper","clearStyles","dump","mRules","buildFromRule","rulesStr","selectorStrNoAdd","keepUnusedStyles","exportWrapper","buildModels","inlineCss","gHtml","gCss","gJson","gJs","eCM","generators","defGenerators","viewers","defViewers","js","loadDefaultGenerators","loadDefaultViewers","addGenerator","generator","getGenerator","getGenerators","addViewer","viewer","getViewers","createViewer","txtarea","updateViewer","getCode","genId","click [data-close-modal]","updateTitle","backdrop","getCollector","$collector","$content","getTitle","$title","ModalM","ModalView","isOpen","getContentEl","click [data-tag-remove]","click [data-tag-status]","dblclick [data-tag-name]","focusout [data-tag-name]","startEditTag","endEditTag","innerText","changeStatus","removeTag","chkOn","$chk","ClassTagView","addBtnId","newInputId","stateInputId","stateInputC","updateSelector","renderClasses","tagRemoved","updateStateVis","getStateOptions","strInput","addToClasses","startNewTag","$addBtn","endNewTag","onInputKeyUp","addNewTag","compTarget","validSelectors","getStates","getStatesC","stateChanged","$states","$classes","$statesC","selectedLabel","statesLabel","isId","selectorTags","ClassTagsView","cname","4","5","6","7","11","12","14","15","atRuleKeys","singleAtRules","parseSelector","stl","propName","propValue","getPropertyPriority","parseCondition","conditionText","selectorText","cssRules","keyText","isSingleAtRule","subRules","lens","subRule","selsParsed","selsAdd","lastRule","len3","selArr","stateArr","selsAddStr","sheet","pHtml","pCss","parserHtml","startAdd","updateSelect","updateDevice","devEl","devicesEl","deviceLabel","Device","devices","Devices","DevicesView","reason","cachedSetTimeout","cachedClearTimeout","process","defaultSetTimout","defaultClearTimeout","runTimeout","fun","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","runClearTimeout","Item","nextTick","browser","env","argv","versions","addListener","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","binding","cwd","chdir","umask","setImmediate","registerImmediate","nextHandle","tasksByHandle","currentlyRunningATask","attachTo","getPrototypeOf","runIfPresent","postMessage","importScripts","postMessageIsAsynchronous","oldOnMessage","onmessage","canUsePostMessage","messagePrefix","onGlobalMessage","installPostMessageImplementation","MessageChannel","channel","port1","port2","installMessageChannelImplementation","onreadystatechange","installReadyStateChangeImplementation","task","clearImmediate","Timeout","clearFn","_id","_clearFn","unref","enroll","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","_onTimeout","setTimeoutFunc","_state","_handled","_value","_deferreds","doResolve","deferred","_immediateFn","onFulfilled","onRejected","finale","thisArg","_unhandledRejectionFn","prom","promiseFinally","race","urlStore","urlLoad","onComplete","contentTypeJson","onError","clbErr","onResponse","request","typeJson","bodyObj","fetchOptions","bodyKey","checkLocal","checkStorageEnvironment","setItem","getItem","removeItem","autosave","autoload","stepsBeforeSave","jqXHR","LocalStorage","RemoteStorage","storages","defaultStorages","remote","currentStorage","loadDefaultProviders","setCurrent","isAutosave","setAutosave","getStepsBeforeSave","setStepsBeforeSave","storage","getStorages","getCurrent","keysF","itemKey","itemKeyR","getCurrentStorage","eventStart","eventEnd","eventError","canAutoload","orderedModels","addOpts","Surrogate","core_slice","hasKeys","getMagicFusionIndex","callstackWasIndexed","magicFusionIndex","ObjectRegistry","registeredObjects","cidIndexes","onoff","objects","objectRegistry","unregister","actionUndoRedo","undoTypes","managerUndoRedo","manager","stack","magic","everything","isCurrentlyUndoRedoing","pointer","isUndo","addToStack","undoTypesType","validateUndoActionCreation","maximumStackLength","isRegistered","UndoTypes","unsetData","afterAttributes","keysAfter","keysPrevious","OwnedUndoTypes","manipulateUndoType","manipType","undoType","fns","undoTypesInstance","Action","UndoStack","setMaxLength","startTracking","stopTracking","isTracking","_addToStack","unregisterAll","undoAll","redoAll","isAvailable","undoManager","addUndoType","changeUndoType","removeUndoType","defaultAttributes","beforeCache","configDef","customUndoType","bf","af","entity","removeAll","hasUndo","hasRedo","getStack","getInstance","keymaster","keymaps","core:undo","core:redo","core:copy","core:paste","core:component-next","core:component-prev","core:component-enter","core:component-exit","core:component-delete","defKeys","setKey","getElementRect","getBoundingRect","handleMouseDown","handleKey","getDocumentEl","dragHandlers","getMousePos","lockedAxis","isHandler","mouseFetch","currentPos","relX","relY","absX","absY","moveX","moveY","xPos","setX","yPos","setY","minDim","maxDim","setup","hdl","createHandler","frames","contStyle","attrName","handlerAttr","clickedHandler","rectDim","handleKeyDown","toggleFrames","calc","updateRect","conStyle","getSelectedHandler","rectEl","deltaX","deltaY","startW","startH","ratioActive","ratio","elT","elL","borderOffset","freezeClass","onMoveClb","relative","ignoreModels","offTop","offLeft","$document","dropContent","selectOnEnd","getContainerEl","getDocuments","canvasDoc","toggleSortCursor","clonedEl","moveDragHelper","posY","posX","dragHelperStyle","useBody","createPlaceholder","ins","contSel","dropModel","eV","tempModel","selectTargetModel","prevModel","targetModel","dsp","eO","rY","rX","mousePos","eventMove","dimsFromTarget","findPosition","movePlaceholder","prevTargetDim","$plh","isInFlow","styleInFlow","validTarget","dropInfo","dragInfo","targetP","validResult","getDim","cacheDimsP","getChildrenDim","cacheDims","nearBorders","targetParent","getTargetFromEl","targetPrev","nearElBorders","_getCurrentPos","getCurrentPos","leftLimit","xLimit","dimRight","yLimit","xCenter","yCenter","dimDown","trgDim","un","elDim","borderColor","borderWidth","brd","marg","brdCol","margI","dst","srcEl","modelToDrop","modelTemp","warns","targetCollection","webpackPolyfill","deprecate","paths","deps","timedInterval","editing","clipboard","designerMode","previousModel","changesCount","storables","toLoad","fromElement","attrsOrig","loadModule","updateChanges","eventFrom","eventTo","loadOnStart","noticeOnUnload","onbeforeunload","moduleName","Mod","cfg","removeSelected","addSelected","toggleSelected","_this6","jsInHtml","getJs","avoidProt","avoidProtected","_this7","_this8","_this9","cacheLoad","defaultCommand","defaultRunning","mediaCondition","getDirtyCount","destroyAll","forceClass","multipleSelection","avoidDefaults","assetManager","storageManager","domComponents","codeManager","cssComposer","selectorManager","deviceManager","styleManager","blockManager","traitManager","EditorModel","StorageManager","Keymaps","addComponents","getSelectedToStyle","setDevice","getDevice","setCustomRte","_polyfills2","PluginManager","editors","defaultConfig","autorender","pluginsOpts","Editor","pluginId"],"mappings":";CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,UAAAH,GACA,iBAAAC,QACAA,QAAA,SAAAD,IAEAD,EAAA,SAAAC,IARA,CASCK,OAAA,WACD,mBCTA,IAAAC,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAP,QAGA,IAAAC,EAAAI,EAAAE,IACAC,EAAAD,EACAE,GAAA,EACAT,YAUA,OANAU,EAAAH,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAQ,GAAA,EAGAR,EAAAD,QA0DA,OArDAM,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gC,KAAA,WAYA,IAAAC,GACA,sCACA3C,EAAAL,EAAAgD,GAEAC,GACA,iEACA,uBACA3C,EAAAN,EAAAiD,GAEAC,GACA,mEACA,qEACA,uDACA,4DACA,wEACA,8DACA,4DACA,8DACA,uEACA,6CACA3C,EAAAP,EAAAkD,GAEAC,GACA,kEACA,2BACA3C,EAAAR,EAAAmD,GAEAC,GACA,8DACA,kEACA,iEACA,oEACA,yEACA,+EACA,gFACA,iEACA,2DACA,iEACA,yDACA,8DACA,oDACA,iEACA,uDACA,uEACA,+DACA,gEACA,sEACA,kEACA,sEACA,mFACA,6DACA,qEACA,qEACA,wDACA,gDACA,wDACA,qEACA,mEACA,mEACA,8EACA,qFACA,4DACA,wEACA,wEACA,sEACA,mEACA,wEACA,+EACA,8DACA,gEACA,4FACA,gEACA,4DACA,oEACA,0DACA,2CACA,kEACA,sEACA,+DACA,sCACA,iEACA,sEACA,wEACA,kEACA,iEACA,+GACA,sEACA,8DACA,yEACA,iEACA,kFACA,yDACA,wEACA,8DACA,mEACA,sEACA,8DACA,6DACA,0EACA,oFACA,mEACA,sDACA,kEACA,6EACA,uEACA,kFACA,qCAEA,0EACA,8EACA,oDACA,sEACA,6EACA,0EACA,qEACA,oEACA,2DACAjD,EAAAH,EAAAoD,GAEAC,GACA,6EACA,4EACA,kEACA,kFACA,yCACA5C,EAAAT,EAAAqD,GAKA3C,EAAAV,GAFA,2EACA,4CAMAW,EAAAX,GAFA,gEACA,yCAGAsD,GACA,+DACA,8DACA,0EACA,kEACA,kEACA,gEACA,6DACA,4DACA,+DACA,kEACA,0DACA,oEACA,wEACA,8DACA,oEACA,uEACA,yEACA,oEACA,wEACA,qEACA,2DACA,qEACA,wEACA,+DACA,+DACA,qCACA1C,EAAAZ,EAAAsD,GAEAC,GACA,oEACA,gFACA,kEACA,oGACA,oFACA,6EACA,mFACA,8EACA,mEACA,uEACA,mEACA,qFACA,qDACA,qFACA,kFACA,6EACA,gFACA,kEACA,0BACA,8EACA,2EACA,yEACA,mDACA,oDACA,kDACA,qDACA,4EACA,kFACA,mGACA,6EACA,+EACA,4DACA,4EACA,oEACA,uEACA,gGACA,mEACA,+CACA,qEACA,sEACA,mFACA,gEACA,kEACA,qFACA,yDACA,kEACA,wDACA,oEACA,yEACA,oEACA,oDACA,uEACA,gFACA,gEACA,mEACA,mGACA,8DACA,uEACA,+EACA,yEACA,+DACA,8DACA,gDACA,oEACA,qEACA,4EACA,2FACA,iEACA,qDACA,sFACA,oEACA,uDACA,sEACA,yEACA,6EACA,gIACA,uEACA,oFACA,iEACA,wEACA,QACA,uEACA,iEACA,mEACA,qEACA,0DACA,iEACA,0EACA,iEACA,uEACA,0EACA,0DACA,4FACA,uBACA1C,EAAAb,EAAAuD,GAEAC,EAAAR,EAAAx8G,OAAAy8G,GAAAz8G,OAAA08G,GAAA18G,OAAA28G,GACA38G,OAAA48G,GAAA58G,OAAA68G,GAAA78G,OAAA88G,GACA98G,OAAA+8G,GAGA,SAAAE,EAAA/zE,EAAAriB,GAEA,IADA,IAAA6P,EAAAwmF,GAAA,EACA,OAAAxmF,EAAAwS,EAAA5D,SAAA,CACA,GAAA43E,GAAA,KAAAxmF,EAAA,CACA7P,EAAAi0F,SAAA,KACA,MAEAoC,EAAA,KAAAxmF,EAEA,4BAXAioC,EAAAmkB,eAAA,kBAAAk6B,GAcAr+C,EAAA0kB,WAAA,YACAw2B,gBACAC,aACAC,gBACAC,qBACAL,mBACAM,8BACAC,iBACAC,qBACAC,gBACAC,gBACAT,YACAuD,IAAA,SAAAj0E,EAAAriB,GACA,QAAAqiB,EAAA3D,IAAA,OACA1e,EAAAi0F,SAAAmC,EACAA,EAAA/zE,EAAAriB,MAGAruB,KAAA,QAGAmmE,EAAA0kB,WAAA,eACAy2B,aACAC,gBACAC,qBACAL,mBACAM,8BACAG,gBACAC,gBACAH,iBACAI,aAAA,EACAC,YAAA,KACAX,YACAuD,IAAA,SAAAj0E,EAAAriB,GACA,OAAAqiB,EAAA3D,IAAA,MACA2D,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BAOJrtF,EAAOlnE,WAAWoxJ,cAClBjwJ,EAAOizJ,YAAcltF,EAAO98E,SAC5B8pK,EAAQ51K,KAAK4oF,GAENA,IAhEK","file":"dist/grapes.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"grapesjs\"] = factory();\n\telse\n\t\troot[\"grapesjs\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 235);\n","// Backbone.js 1.3.3\n\n// (c) 2010-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n// Backbone may be freely distributed under the MIT license.\n// For all details and documentation:\n// http://backbonejs.org\n\n(function(factory) {\n\n // Establish the root object, `window` (`self`) in the browser, or `global` on the server.\n // We use `self` instead of `window` for `WebWorker` support.\n var root = (typeof self == 'object' && self.self === self && self) ||\n (typeof global == 'object' && global.global === global && global);\n\n // Set up Backbone appropriately for the environment. Start with AMD.\n if (typeof define === 'function' && define.amd) {\n define(['underscore', 'jquery', 'exports'], function(_, $, exports) {\n // Export global even in AMD case in case this script is loaded with\n // others that may still expect a global Backbone.\n root.Backbone = factory(root, exports, _, $);\n });\n\n // Next for Node.js or CommonJS. jQuery may not be needed as a module.\n } else if (typeof exports !== 'undefined') {\n var _ = require('underscore'), $;\n try { $ = require('jquery'); } catch (e) {}\n factory(root, exports, _, $);\n\n // Finally, as a browser global.\n } else {\n root.Backbone = factory(root, {}, root._, (root.jQuery || root.Zepto || root.ender || root.$));\n }\n\n})(function(root, Backbone, _, $) {\n\n // Initial Setup\n // -------------\n\n // Save the previous value of the `Backbone` variable, so that it can be\n // restored later on, if `noConflict` is used.\n var previousBackbone = root.Backbone;\n\n // Create a local reference to a common array method we'll want to use later.\n var slice = Array.prototype.slice;\n\n // Current version of the library. Keep in sync with `package.json`.\n Backbone.VERSION = '1.3.3';\n\n // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns\n // the `$` variable.\n Backbone.$ = $;\n\n // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable\n // to its previous owner. Returns a reference to this Backbone object.\n Backbone.noConflict = function() {\n root.Backbone = previousBackbone;\n return this;\n };\n\n // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option\n // will fake `\"PATCH\"`, `\"PUT\"` and `\"DELETE\"` requests via the `_method` parameter and\n // set a `X-Http-Method-Override` header.\n Backbone.emulateHTTP = false;\n\n // Turn on `emulateJSON` to support legacy servers that can't deal with direct\n // `application/json` requests ... this will encode the body as\n // `application/x-www-form-urlencoded` instead and will send the model in a\n // form param named `model`.\n Backbone.emulateJSON = false;\n\n // Proxy Backbone class methods to Underscore functions, wrapping the model's\n // `attributes` object or collection's `models` array behind the scenes.\n //\n // collection.filter(function(model) { return model.get('age') > 10 });\n // collection.each(this.addView);\n //\n // `Function#apply` can be slow so we use the method's arg count, if we know it.\n var addMethod = function(length, method, attribute) {\n switch (length) {\n case 1: return function() {\n return _[method](this[attribute]);\n };\n case 2: return function(value) {\n return _[method](this[attribute], value);\n };\n case 3: return function(iteratee, context) {\n return _[method](this[attribute], cb(iteratee, this), context);\n };\n case 4: return function(iteratee, defaultVal, context) {\n return _[method](this[attribute], cb(iteratee, this), defaultVal, context);\n };\n default: return function() {\n var args = slice.call(arguments);\n args.unshift(this[attribute]);\n return _[method].apply(_, args);\n };\n }\n };\n var addUnderscoreMethods = function(Class, methods, attribute) {\n _.each(methods, function(length, method) {\n if (_[method]) Class.prototype[method] = addMethod(length, method, attribute);\n });\n };\n\n // Support `collection.sortBy('attr')` and `collection.findWhere({id: 1})`.\n var cb = function(iteratee, instance) {\n if (_.isFunction(iteratee)) return iteratee;\n if (_.isObject(iteratee) && !instance._isModel(iteratee)) return modelMatcher(iteratee);\n if (_.isString(iteratee)) return function(model) { return model.get(iteratee); };\n return iteratee;\n };\n var modelMatcher = function(attrs) {\n var matcher = _.matches(attrs);\n return function(model) {\n return matcher(model.attributes);\n };\n };\n\n // Backbone.Events\n // ---------------\n\n // A module that can be mixed in to *any object* in order to provide it with\n // a custom event channel. You may bind a callback to an event with `on` or\n // remove with `off`; `trigger`-ing an event fires all callbacks in\n // succession.\n //\n // var object = {};\n // _.extend(object, Backbone.Events);\n // object.on('expand', function(){ alert('expanded'); });\n // object.trigger('expand');\n //\n var Events = Backbone.Events = {};\n\n // Regular expression used to split event strings.\n var eventSplitter = /\\s+/;\n\n // Iterates over the standard `event, callback` (as well as the fancy multiple\n // space-separated events `\"change blur\", callback` and jQuery-style event\n // maps `{event: callback}`).\n var eventsApi = function(iteratee, events, name, callback, opts) {\n var i = 0, names;\n if (name && typeof name === 'object') {\n // Handle event maps.\n if (callback !== void 0 && 'context' in opts && opts.context === void 0) opts.context = callback;\n for (names = _.keys(name); i < names.length ; i++) {\n events = eventsApi(iteratee, events, names[i], name[names[i]], opts);\n }\n } else if (name && eventSplitter.test(name)) {\n // Handle space-separated event names by delegating them individually.\n for (names = name.split(eventSplitter); i < names.length; i++) {\n events = iteratee(events, names[i], callback, opts);\n }\n } else {\n // Finally, standard events.\n events = iteratee(events, name, callback, opts);\n }\n return events;\n };\n\n // Bind an event to a `callback` function. Passing `\"all\"` will bind\n // the callback to all events fired.\n Events.on = function(name, callback, context) {\n return internalOn(this, name, callback, context);\n };\n\n // Guard the `listening` argument from the public API.\n var internalOn = function(obj, name, callback, context, listening) {\n obj._events = eventsApi(onApi, obj._events || {}, name, callback, {\n context: context,\n ctx: obj,\n listening: listening\n });\n\n if (listening) {\n var listeners = obj._listeners || (obj._listeners = {});\n listeners[listening.id] = listening;\n }\n\n return obj;\n };\n\n // Inversion-of-control versions of `on`. Tell *this* object to listen to\n // an event in another object... keeping track of what it's listening to\n // for easier unbinding later.\n Events.listenTo = function(obj, name, callback) {\n if (!obj) return this;\n var id = obj._listenId || (obj._listenId = _.uniqueId('l'));\n var listeningTo = this._listeningTo || (this._listeningTo = {});\n var listening = listeningTo[id];\n\n // This object is not listening to any other events on `obj` yet.\n // Setup the necessary references to track the listening callbacks.\n if (!listening) {\n var thisId = this._listenId || (this._listenId = _.uniqueId('l'));\n listening = listeningTo[id] = {obj: obj, objId: id, id: thisId, listeningTo: listeningTo, count: 0};\n }\n\n // Bind callbacks on obj, and keep track of them on listening.\n internalOn(obj, name, callback, this, listening);\n return this;\n };\n\n // The reducing API that adds a callback to the `events` object.\n var onApi = function(events, name, callback, options) {\n if (callback) {\n var handlers = events[name] || (events[name] = []);\n var context = options.context, ctx = options.ctx, listening = options.listening;\n if (listening) listening.count++;\n\n handlers.push({callback: callback, context: context, ctx: context || ctx, listening: listening});\n }\n return events;\n };\n\n // Remove one or many callbacks. If `context` is null, removes all\n // callbacks with that function. If `callback` is null, removes all\n // callbacks for the event. If `name` is null, removes all bound\n // callbacks for all events.\n Events.off = function(name, callback, context) {\n if (!this._events) return this;\n this._events = eventsApi(offApi, this._events, name, callback, {\n context: context,\n listeners: this._listeners\n });\n return this;\n };\n\n // Tell this object to stop listening to either specific events ... or\n // to every object it's currently listening to.\n Events.stopListening = function(obj, name, callback) {\n var listeningTo = this._listeningTo;\n if (!listeningTo) return this;\n\n var ids = obj ? [obj._listenId] : _.keys(listeningTo);\n\n for (var i = 0; i < ids.length; i++) {\n var listening = listeningTo[ids[i]];\n\n // If listening doesn't exist, this object is not currently\n // listening to obj. Break out early.\n if (!listening) break;\n\n listening.obj.off(name, callback, this);\n }\n\n return this;\n };\n\n // The reducing API that removes a callback from the `events` object.\n var offApi = function(events, name, callback, options) {\n if (!events) return;\n\n var i = 0, listening;\n var context = options.context, listeners = options.listeners;\n\n // Delete all events listeners and \"drop\" events.\n if (!name && !callback && !context) {\n var ids = _.keys(listeners);\n for (; i < ids.length; i++) {\n listening = listeners[ids[i]];\n delete listeners[listening.id];\n delete listening.listeningTo[listening.objId];\n }\n return;\n }\n\n var names = name ? [name] : _.keys(events);\n for (; i < names.length; i++) {\n name = names[i];\n var handlers = events[name];\n\n // Bail out if there are no events stored.\n if (!handlers) break;\n\n // Replace events if there are any remaining. Otherwise, clean up.\n var remaining = [];\n for (var j = 0; j < handlers.length; j++) {\n var handler = handlers[j];\n if (\n callback && callback !== handler.callback &&\n callback !== handler.callback._callback ||\n context && context !== handler.context\n ) {\n remaining.push(handler);\n } else {\n listening = handler.listening;\n if (listening && --listening.count === 0) {\n delete listeners[listening.id];\n delete listening.listeningTo[listening.objId];\n }\n }\n }\n\n // Update tail event if the list has any events. Otherwise, clean up.\n if (remaining.length) {\n events[name] = remaining;\n } else {\n delete events[name];\n }\n }\n return events;\n };\n\n // Bind an event to only be triggered a single time. After the first time\n // the callback is invoked, its listener will be removed. If multiple events\n // are passed in using the space-separated syntax, the handler will fire\n // once for each event, not once for a combination of all events.\n Events.once = function(name, callback, context) {\n // Map the event into a `{event: once}` object.\n var events = eventsApi(onceMap, {}, name, callback, _.bind(this.off, this));\n if (typeof name === 'string' && context == null) callback = void 0;\n return this.on(events, callback, context);\n };\n\n // Inversion-of-control versions of `once`.\n Events.listenToOnce = function(obj, name, callback) {\n // Map the event into a `{event: once}` object.\n var events = eventsApi(onceMap, {}, name, callback, _.bind(this.stopListening, this, obj));\n return this.listenTo(obj, events);\n };\n\n // Reduces the event callbacks into a map of `{event: onceWrapper}`.\n // `offer` unbinds the `onceWrapper` after it has been called.\n var onceMap = function(map, name, callback, offer) {\n if (callback) {\n var once = map[name] = _.once(function() {\n offer(name, once);\n callback.apply(this, arguments);\n });\n once._callback = callback;\n }\n return map;\n };\n\n // Trigger one or many events, firing all bound callbacks. Callbacks are\n // passed the same arguments as `trigger` is, apart from the event name\n // (unless you're listening on `\"all\"`, which will cause your callback to\n // receive the true name of the event as the first argument).\n Events.trigger = function(name) {\n if (!this._events) return this;\n\n var length = Math.max(0, arguments.length - 1);\n var args = Array(length);\n for (var i = 0; i < length; i++) args[i] = arguments[i + 1];\n\n eventsApi(triggerApi, this._events, name, void 0, args);\n return this;\n };\n\n // Handles triggering the appropriate event callbacks.\n var triggerApi = function(objEvents, name, callback, args) {\n if (objEvents) {\n var events = objEvents[name];\n var allEvents = objEvents.all;\n if (events && allEvents) allEvents = allEvents.slice();\n if (events) triggerEvents(events, args);\n if (allEvents) triggerEvents(allEvents, [name].concat(args));\n }\n return objEvents;\n };\n\n // A difficult-to-believe, but optimized internal dispatch function for\n // triggering events. Tries to keep the usual cases speedy (most internal\n // Backbone events have 3 arguments).\n var triggerEvents = function(events, args) {\n var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2];\n switch (args.length) {\n case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return;\n case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return;\n case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return;\n case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return;\n default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args); return;\n }\n };\n\n // Aliases for backwards compatibility.\n Events.bind = Events.on;\n Events.unbind = Events.off;\n\n // Allow the `Backbone` object to serve as a global event bus, for folks who\n // want global \"pubsub\" in a convenient place.\n _.extend(Backbone, Events);\n\n // Backbone.Model\n // --------------\n\n // Backbone **Models** are the basic data object in the framework --\n // frequently representing a row in a table in a database on your server.\n // A discrete chunk of data and a bunch of useful, related methods for\n // performing computations and transformations on that data.\n\n // Create a new model with the specified attributes. A client id (`cid`)\n // is automatically generated and assigned for you.\n var Model = Backbone.Model = function(attributes, options) {\n var attrs = attributes || {};\n options || (options = {});\n this.cid = _.uniqueId(this.cidPrefix);\n this.attributes = {};\n if (options.collection) this.collection = options.collection;\n if (options.parse) attrs = this.parse(attrs, options) || {};\n var defaults = _.result(this, 'defaults');\n attrs = _.defaults(_.extend({}, defaults, attrs), defaults);\n this.set(attrs, options);\n this.changed = {};\n this.initialize.apply(this, arguments);\n };\n\n // Attach all inheritable methods to the Model prototype.\n _.extend(Model.prototype, Events, {\n\n // A hash of attributes whose current and previous value differ.\n changed: null,\n\n // The value returned during the last failed validation.\n validationError: null,\n\n // The default name for the JSON `id` attribute is `\"id\"`. MongoDB and\n // CouchDB users may want to set this to `\"_id\"`.\n idAttribute: 'id',\n\n // The prefix is used to create the client id which is used to identify models locally.\n // You may want to override this if you're experiencing name clashes with model ids.\n cidPrefix: 'c',\n\n // Initialize is an empty function by default. Override it with your own\n // initialization logic.\n initialize: function(){},\n\n // Return a copy of the model's `attributes` object.\n toJSON: function(options) {\n return _.clone(this.attributes);\n },\n\n // Proxy `Backbone.sync` by default -- but override this if you need\n // custom syncing semantics for *this* particular model.\n sync: function() {\n return Backbone.sync.apply(this, arguments);\n },\n\n // Get the value of an attribute.\n get: function(attr) {\n return this.attributes[attr];\n },\n\n // Get the HTML-escaped value of an attribute.\n escape: function(attr) {\n return _.escape(this.get(attr));\n },\n\n // Returns `true` if the attribute contains a value that is not null\n // or undefined.\n has: function(attr) {\n return this.get(attr) != null;\n },\n\n // Special-cased proxy to underscore's `_.matches` method.\n matches: function(attrs) {\n return !!_.iteratee(attrs, this)(this.attributes);\n },\n\n // Set a hash of model attributes on the object, firing `\"change\"`. This is\n // the core primitive operation of a model, updating the data and notifying\n // anyone who needs to know about the change in state. The heart of the beast.\n set: function(key, val, options) {\n if (key == null) return this;\n\n // Handle both `\"key\", value` and `{key: value}` -style arguments.\n var attrs;\n if (typeof key === 'object') {\n attrs = key;\n options = val;\n } else {\n (attrs = {})[key] = val;\n }\n\n options || (options = {});\n\n // Run validation.\n if (!this._validate(attrs, options)) return false;\n\n // Extract attributes and options.\n var unset = options.unset;\n var silent = options.silent;\n var changes = [];\n var changing = this._changing;\n this._changing = true;\n\n if (!changing) {\n this._previousAttributes = _.clone(this.attributes);\n this.changed = {};\n }\n\n var current = this.attributes;\n var changed = this.changed;\n var prev = this._previousAttributes;\n\n // For each `set` attribute, update or delete the current value.\n for (var attr in attrs) {\n val = attrs[attr];\n if (!_.isEqual(current[attr], val)) changes.push(attr);\n if (!_.isEqual(prev[attr], val)) {\n changed[attr] = val;\n } else {\n delete changed[attr];\n }\n unset ? delete current[attr] : current[attr] = val;\n }\n\n // Update the `id`.\n if (this.idAttribute in attrs) this.id = this.get(this.idAttribute);\n\n // Trigger all relevant attribute changes.\n if (!silent) {\n if (changes.length) this._pending = options;\n for (var i = 0; i < changes.length; i++) {\n this.trigger('change:' + changes[i], this, current[changes[i]], options);\n }\n }\n\n // You might be wondering why there's a `while` loop here. Changes can\n // be recursively nested within `\"change\"` events.\n if (changing) return this;\n if (!silent) {\n while (this._pending) {\n options = this._pending;\n this._pending = false;\n this.trigger('change', this, options);\n }\n }\n this._pending = false;\n this._changing = false;\n return this;\n },\n\n // Remove an attribute from the model, firing `\"change\"`. `unset` is a noop\n // if the attribute doesn't exist.\n unset: function(attr, options) {\n return this.set(attr, void 0, _.extend({}, options, {unset: true}));\n },\n\n // Clear all attributes on the model, firing `\"change\"`.\n clear: function(options) {\n var attrs = {};\n for (var key in this.attributes) attrs[key] = void 0;\n return this.set(attrs, _.extend({}, options, {unset: true}));\n },\n\n // Determine if the model has changed since the last `\"change\"` event.\n // If you specify an attribute name, determine if that attribute has changed.\n hasChanged: function(attr) {\n if (attr == null) return !_.isEmpty(this.changed);\n return _.has(this.changed, attr);\n },\n\n // Return an object containing all the attributes that have changed, or\n // false if there are no changed attributes. Useful for determining what\n // parts of a view need to be updated and/or what attributes need to be\n // persisted to the server. Unset attributes will be set to undefined.\n // You can also pass an attributes object to diff against the model,\n // determining if there *would be* a change.\n changedAttributes: function(diff) {\n if (!diff) return this.hasChanged() ? _.clone(this.changed) : false;\n var old = this._changing ? this._previousAttributes : this.attributes;\n var changed = {};\n for (var attr in diff) {\n var val = diff[attr];\n if (_.isEqual(old[attr], val)) continue;\n changed[attr] = val;\n }\n return _.size(changed) ? changed : false;\n },\n\n // Get the previous value of an attribute, recorded at the time the last\n // `\"change\"` event was fired.\n previous: function(attr) {\n if (attr == null || !this._previousAttributes) return null;\n return this._previousAttributes[attr];\n },\n\n // Get all of the attributes of the model at the time of the previous\n // `\"change\"` event.\n previousAttributes: function() {\n return _.clone(this._previousAttributes);\n },\n\n // Fetch the model from the server, merging the response with the model's\n // local attributes. Any changed attributes will trigger a \"change\" event.\n fetch: function(options) {\n options = _.extend({parse: true}, options);\n var model = this;\n var success = options.success;\n options.success = function(resp) {\n var serverAttrs = options.parse ? model.parse(resp, options) : resp;\n if (!model.set(serverAttrs, options)) return false;\n if (success) success.call(options.context, model, resp, options);\n model.trigger('sync', model, resp, options);\n };\n wrapError(this, options);\n return this.sync('read', this, options);\n },\n\n // Set a hash of model attributes, and sync the model to the server.\n // If the server returns an attributes hash that differs, the model's\n // state will be `set` again.\n save: function(key, val, options) {\n // Handle both `\"key\", value` and `{key: value}` -style arguments.\n var attrs;\n if (key == null || typeof key === 'object') {\n attrs = key;\n options = val;\n } else {\n (attrs = {})[key] = val;\n }\n\n options = _.extend({validate: true, parse: true}, options);\n var wait = options.wait;\n\n // If we're not waiting and attributes exist, save acts as\n // `set(attr).save(null, opts)` with validation. Otherwise, check if\n // the model will be valid when the attributes, if any, are set.\n if (attrs && !wait) {\n if (!this.set(attrs, options)) return false;\n } else if (!this._validate(attrs, options)) {\n return false;\n }\n\n // After a successful server-side save, the client is (optionally)\n // updated with the server-side state.\n var model = this;\n var success = options.success;\n var attributes = this.attributes;\n options.success = function(resp) {\n // Ensure attributes are restored during synchronous saves.\n model.attributes = attributes;\n var serverAttrs = options.parse ? model.parse(resp, options) : resp;\n if (wait) serverAttrs = _.extend({}, attrs, serverAttrs);\n if (serverAttrs && !model.set(serverAttrs, options)) return false;\n if (success) success.call(options.context, model, resp, options);\n model.trigger('sync', model, resp, options);\n };\n wrapError(this, options);\n\n // Set temporary attributes if `{wait: true}` to properly find new ids.\n if (attrs && wait) this.attributes = _.extend({}, attributes, attrs);\n\n var method = this.isNew() ? 'create' : (options.patch ? 'patch' : 'update');\n if (method === 'patch' && !options.attrs) options.attrs = attrs;\n var xhr = this.sync(method, this, options);\n\n // Restore attributes.\n this.attributes = attributes;\n\n return xhr;\n },\n\n // Destroy this model on the server if it was already persisted.\n // Optimistically removes the model from its collection, if it has one.\n // If `wait: true` is passed, waits for the server to respond before removal.\n destroy: function(options) {\n options = options ? _.clone(options) : {};\n var model = this;\n var success = options.success;\n var wait = options.wait;\n\n var destroy = function() {\n model.stopListening();\n model.trigger('destroy', model, model.collection, options);\n };\n\n options.success = function(resp) {\n if (wait) destroy();\n if (success) success.call(options.context, model, resp, options);\n if (!model.isNew()) model.trigger('sync', model, resp, options);\n };\n\n var xhr = false;\n if (this.isNew()) {\n _.defer(options.success);\n } else {\n wrapError(this, options);\n xhr = this.sync('delete', this, options);\n }\n if (!wait) destroy();\n return xhr;\n },\n\n // Default URL for the model's representation on the server -- if you're\n // using Backbone's restful methods, override this to change the endpoint\n // that will be called.\n url: function() {\n var base =\n _.result(this, 'urlRoot') ||\n _.result(this.collection, 'url') ||\n urlError();\n if (this.isNew()) return base;\n var id = this.get(this.idAttribute);\n return base.replace(/[^\\/]$/, '$&/') + encodeURIComponent(id);\n },\n\n // **parse** converts a response into the hash of attributes to be `set` on\n // the model. The default implementation is just to pass the response along.\n parse: function(resp, options) {\n return resp;\n },\n\n // Create a new model with identical attributes to this one.\n clone: function() {\n return new this.constructor(this.attributes);\n },\n\n // A model is new if it has never been saved to the server, and lacks an id.\n isNew: function() {\n return !this.has(this.idAttribute);\n },\n\n // Check if the model is currently in a valid state.\n isValid: function(options) {\n return this._validate({}, _.extend({}, options, {validate: true}));\n },\n\n // Run validation against the next complete set of model attributes,\n // returning `true` if all is well. Otherwise, fire an `\"invalid\"` event.\n _validate: function(attrs, options) {\n if (!options.validate || !this.validate) return true;\n attrs = _.extend({}, this.attributes, attrs);\n var error = this.validationError = this.validate(attrs, options) || null;\n if (!error) return true;\n this.trigger('invalid', this, error, _.extend(options, {validationError: error}));\n return false;\n }\n\n });\n\n // Underscore methods that we want to implement on the Model, mapped to the\n // number of arguments they take.\n var modelMethods = {keys: 1, values: 1, pairs: 1, invert: 1, pick: 0,\n omit: 0, chain: 1, isEmpty: 1};\n\n // Mix in each Underscore method as a proxy to `Model#attributes`.\n addUnderscoreMethods(Model, modelMethods, 'attributes');\n\n // Backbone.Collection\n // -------------------\n\n // If models tend to represent a single row of data, a Backbone Collection is\n // more analogous to a table full of data ... or a small slice or page of that\n // table, or a collection of rows that belong together for a particular reason\n // -- all of the messages in this particular folder, all of the documents\n // belonging to this particular author, and so on. Collections maintain\n // indexes of their models, both in order, and for lookup by `id`.\n\n // Create a new **Collection**, perhaps to contain a specific type of `model`.\n // If a `comparator` is specified, the Collection will maintain\n // its models in sort order, as they're added and removed.\n var Collection = Backbone.Collection = function(models, options) {\n options || (options = {});\n if (options.model) this.model = options.model;\n if (options.comparator !== void 0) this.comparator = options.comparator;\n this._reset();\n this.initialize.apply(this, arguments);\n if (models) this.reset(models, _.extend({silent: true}, options));\n };\n\n // Default options for `Collection#set`.\n var setOptions = {add: true, remove: true, merge: true};\n var addOptions = {add: true, remove: false};\n\n // Splices `insert` into `array` at index `at`.\n var splice = function(array, insert, at) {\n at = Math.min(Math.max(at, 0), array.length);\n var tail = Array(array.length - at);\n var length = insert.length;\n var i;\n for (i = 0; i < tail.length; i++) tail[i] = array[i + at];\n for (i = 0; i < length; i++) array[i + at] = insert[i];\n for (i = 0; i < tail.length; i++) array[i + length + at] = tail[i];\n };\n\n // Define the Collection's inheritable methods.\n _.extend(Collection.prototype, Events, {\n\n // The default model for a collection is just a **Backbone.Model**.\n // This should be overridden in most cases.\n model: Model,\n\n // Initialize is an empty function by default. Override it with your own\n // initialization logic.\n initialize: function(){},\n\n // The JSON representation of a Collection is an array of the\n // models' attributes.\n toJSON: function(options) {\n return this.map(function(model) { return model.toJSON(options); });\n },\n\n // Proxy `Backbone.sync` by default.\n sync: function() {\n return Backbone.sync.apply(this, arguments);\n },\n\n // Add a model, or list of models to the set. `models` may be Backbone\n // Models or raw JavaScript objects to be converted to Models, or any\n // combination of the two.\n add: function(models, options) {\n return this.set(models, _.extend({merge: false}, options, addOptions));\n },\n\n // Remove a model, or a list of models from the set.\n remove: function(models, options) {\n options = _.extend({}, options);\n var singular = !_.isArray(models);\n models = singular ? [models] : models.slice();\n var removed = this._removeModels(models, options);\n if (!options.silent && removed.length) {\n options.changes = {added: [], merged: [], removed: removed};\n this.trigger('update', this, options);\n }\n return singular ? removed[0] : removed;\n },\n\n // Update a collection by `set`-ing a new list of models, adding new ones,\n // removing models that are no longer present, and merging models that\n // already exist in the collection, as necessary. Similar to **Model#set**,\n // the core operation for updating the data contained by the collection.\n set: function(models, options) {\n if (models == null) return;\n\n options = _.extend({}, setOptions, options);\n if (options.parse && !this._isModel(models)) {\n models = this.parse(models, options) || [];\n }\n\n var singular = !_.isArray(models);\n models = singular ? [models] : models.slice();\n\n var at = options.at;\n if (at != null) at = +at;\n if (at > this.length) at = this.length;\n if (at < 0) at += this.length + 1;\n\n var set = [];\n var toAdd = [];\n var toMerge = [];\n var toRemove = [];\n var modelMap = {};\n\n var add = options.add;\n var merge = options.merge;\n var remove = options.remove;\n\n var sort = false;\n var sortable = this.comparator && at == null && options.sort !== false;\n var sortAttr = _.isString(this.comparator) ? this.comparator : null;\n\n // Turn bare objects into model references, and prevent invalid models\n // from being added.\n var model, i;\n for (i = 0; i < models.length; i++) {\n model = models[i];\n\n // If a duplicate is found, prevent it from being added and\n // optionally merge it into the existing model.\n var existing = this.get(model);\n if (existing) {\n if (merge && model !== existing) {\n var attrs = this._isModel(model) ? model.attributes : model;\n if (options.parse) attrs = existing.parse(attrs, options);\n existing.set(attrs, options);\n toMerge.push(existing);\n if (sortable && !sort) sort = existing.hasChanged(sortAttr);\n }\n if (!modelMap[existing.cid]) {\n modelMap[existing.cid] = true;\n set.push(existing);\n }\n models[i] = existing;\n\n // If this is a new, valid model, push it to the `toAdd` list.\n } else if (add) {\n model = models[i] = this._prepareModel(model, options);\n if (model) {\n toAdd.push(model);\n this._addReference(model, options);\n modelMap[model.cid] = true;\n set.push(model);\n }\n }\n }\n\n // Remove stale models.\n if (remove) {\n for (i = 0; i < this.length; i++) {\n model = this.models[i];\n if (!modelMap[model.cid]) toRemove.push(model);\n }\n if (toRemove.length) this._removeModels(toRemove, options);\n }\n\n // See if sorting is needed, update `length` and splice in new models.\n var orderChanged = false;\n var replace = !sortable && add && remove;\n if (set.length && replace) {\n orderChanged = this.length !== set.length || _.some(this.models, function(m, index) {\n return m !== set[index];\n });\n this.models.length = 0;\n splice(this.models, set, 0);\n this.length = this.models.length;\n } else if (toAdd.length) {\n if (sortable) sort = true;\n splice(this.models, toAdd, at == null ? this.length : at);\n this.length = this.models.length;\n }\n\n // Silently sort the collection if appropriate.\n if (sort) this.sort({silent: true});\n\n // Unless silenced, it's time to fire all appropriate add/sort/update events.\n if (!options.silent) {\n for (i = 0; i < toAdd.length; i++) {\n if (at != null) options.index = at + i;\n model = toAdd[i];\n model.trigger('add', model, this, options);\n }\n if (sort || orderChanged) this.trigger('sort', this, options);\n if (toAdd.length || toRemove.length || toMerge.length) {\n options.changes = {\n added: toAdd,\n removed: toRemove,\n merged: toMerge\n };\n this.trigger('update', this, options);\n }\n }\n\n // Return the added (or merged) model (or models).\n return singular ? models[0] : models;\n },\n\n // When you have more items than you want to add or remove individually,\n // you can reset the entire set with a new list of models, without firing\n // any granular `add` or `remove` events. Fires `reset` when finished.\n // Useful for bulk operations and optimizations.\n reset: function(models, options) {\n options = options ? _.clone(options) : {};\n for (var i = 0; i < this.models.length; i++) {\n this._removeReference(this.models[i], options);\n }\n options.previousModels = this.models;\n this._reset();\n models = this.add(models, _.extend({silent: true}, options));\n if (!options.silent) this.trigger('reset', this, options);\n return models;\n },\n\n // Add a model to the end of the collection.\n push: function(model, options) {\n return this.add(model, _.extend({at: this.length}, options));\n },\n\n // Remove a model from the end of the collection.\n pop: function(options) {\n var model = this.at(this.length - 1);\n return this.remove(model, options);\n },\n\n // Add a model to the beginning of the collection.\n unshift: function(model, options) {\n return this.add(model, _.extend({at: 0}, options));\n },\n\n // Remove a model from the beginning of the collection.\n shift: function(options) {\n var model = this.at(0);\n return this.remove(model, options);\n },\n\n // Slice out a sub-array of models from the collection.\n slice: function() {\n return slice.apply(this.models, arguments);\n },\n\n // Get a model from the set by id, cid, model object with id or cid\n // properties, or an attributes object that is transformed through modelId.\n get: function(obj) {\n if (obj == null) return void 0;\n return this._byId[obj] ||\n this._byId[this.modelId(obj.attributes || obj)] ||\n obj.cid && this._byId[obj.cid];\n },\n\n // Returns `true` if the model is in the collection.\n has: function(obj) {\n return this.get(obj) != null;\n },\n\n // Get the model at the given index.\n at: function(index) {\n if (index < 0) index += this.length;\n return this.models[index];\n },\n\n // Return models with matching attributes. Useful for simple cases of\n // `filter`.\n where: function(attrs, first) {\n return this[first ? 'find' : 'filter'](attrs);\n },\n\n // Return the first model with matching attributes. Useful for simple cases\n // of `find`.\n findWhere: function(attrs) {\n return this.where(attrs, true);\n },\n\n // Force the collection to re-sort itself. You don't need to call this under\n // normal circumstances, as the set will maintain sort order as each item\n // is added.\n sort: function(options) {\n var comparator = this.comparator;\n if (!comparator) throw new Error('Cannot sort a set without a comparator');\n options || (options = {});\n\n var length = comparator.length;\n if (_.isFunction(comparator)) comparator = _.bind(comparator, this);\n\n // Run sort based on type of `comparator`.\n if (length === 1 || _.isString(comparator)) {\n this.models = this.sortBy(comparator);\n } else {\n this.models.sort(comparator);\n }\n if (!options.silent) this.trigger('sort', this, options);\n return this;\n },\n\n // Pluck an attribute from each model in the collection.\n pluck: function(attr) {\n return this.map(attr + '');\n },\n\n // Fetch the default set of models for this collection, resetting the\n // collection when they arrive. If `reset: true` is passed, the response\n // data will be passed through the `reset` method instead of `set`.\n fetch: function(options) {\n options = _.extend({parse: true}, options);\n var success = options.success;\n var collection = this;\n options.success = function(resp) {\n var method = options.reset ? 'reset' : 'set';\n collection[method](resp, options);\n if (success) success.call(options.context, collection, resp, options);\n collection.trigger('sync', collection, resp, options);\n };\n wrapError(this, options);\n return this.sync('read', this, options);\n },\n\n // Create a new instance of a model in this collection. Add the model to the\n // collection immediately, unless `wait: true` is passed, in which case we\n // wait for the server to agree.\n create: function(model, options) {\n options = options ? _.clone(options) : {};\n var wait = options.wait;\n model = this._prepareModel(model, options);\n if (!model) return false;\n if (!wait) this.add(model, options);\n var collection = this;\n var success = options.success;\n options.success = function(m, resp, callbackOpts) {\n if (wait) collection.add(m, callbackOpts);\n if (success) success.call(callbackOpts.context, m, resp, callbackOpts);\n };\n model.save(null, options);\n return model;\n },\n\n // **parse** converts a response into a list of models to be added to the\n // collection. The default implementation is just to pass it through.\n parse: function(resp, options) {\n return resp;\n },\n\n // Create a new collection with an identical list of models as this one.\n clone: function() {\n return new this.constructor(this.models, {\n model: this.model,\n comparator: this.comparator\n });\n },\n\n // Define how to uniquely identify models in the collection.\n modelId: function(attrs) {\n return attrs[this.model.prototype.idAttribute || 'id'];\n },\n\n // Private method to reset all internal state. Called when the collection\n // is first initialized or reset.\n _reset: function() {\n this.length = 0;\n this.models = [];\n this._byId = {};\n },\n\n // Prepare a hash of attributes (or other model) to be added to this\n // collection.\n _prepareModel: function(attrs, options) {\n if (this._isModel(attrs)) {\n if (!attrs.collection) attrs.collection = this;\n return attrs;\n }\n options = options ? _.clone(options) : {};\n options.collection = this;\n var model = new this.model(attrs, options);\n if (!model.validationError) return model;\n this.trigger('invalid', this, model.validationError, options);\n return false;\n },\n\n // Internal method called by both remove and set.\n _removeModels: function(models, options) {\n var removed = [];\n for (var i = 0; i < models.length; i++) {\n var model = this.get(models[i]);\n if (!model) continue;\n\n var index = this.indexOf(model);\n this.models.splice(index, 1);\n this.length--;\n\n // Remove references before triggering 'remove' event to prevent an\n // infinite loop. #3693\n delete this._byId[model.cid];\n var id = this.modelId(model.attributes);\n if (id != null) delete this._byId[id];\n\n if (!options.silent) {\n options.index = index;\n model.trigger('remove', model, this, options);\n }\n\n removed.push(model);\n this._removeReference(model, options);\n }\n return removed;\n },\n\n // Method for checking whether an object should be considered a model for\n // the purposes of adding to the collection.\n _isModel: function(model) {\n return model instanceof Model;\n },\n\n // Internal method to create a model's ties to a collection.\n _addReference: function(model, options) {\n this._byId[model.cid] = model;\n var id = this.modelId(model.attributes);\n if (id != null) this._byId[id] = model;\n model.on('all', this._onModelEvent, this);\n },\n\n // Internal method to sever a model's ties to a collection.\n _removeReference: function(model, options) {\n delete this._byId[model.cid];\n var id = this.modelId(model.attributes);\n if (id != null) delete this._byId[id];\n if (this === model.collection) delete model.collection;\n model.off('all', this._onModelEvent, this);\n },\n\n // Internal method called every time a model in the set fires an event.\n // Sets need to update their indexes when models change ids. All other\n // events simply proxy through. \"add\" and \"remove\" events that originate\n // in other collections are ignored.\n _onModelEvent: function(event, model, collection, options) {\n if (model) {\n if ((event === 'add' || event === 'remove') && collection !== this) return;\n if (event === 'destroy') this.remove(model, options);\n if (event === 'change') {\n var prevId = this.modelId(model.previousAttributes());\n var id = this.modelId(model.attributes);\n if (prevId !== id) {\n if (prevId != null) delete this._byId[prevId];\n if (id != null) this._byId[id] = model;\n }\n }\n }\n this.trigger.apply(this, arguments);\n }\n\n });\n\n // Underscore methods that we want to implement on the Collection.\n // 90% of the core usefulness of Backbone Collections is actually implemented\n // right here:\n var collectionMethods = {forEach: 3, each: 3, map: 3, collect: 3, reduce: 0,\n foldl: 0, inject: 0, reduceRight: 0, foldr: 0, find: 3, detect: 3, filter: 3,\n select: 3, reject: 3, every: 3, all: 3, some: 3, any: 3, include: 3, includes: 3,\n contains: 3, invoke: 0, max: 3, min: 3, toArray: 1, size: 1, first: 3,\n head: 3, take: 3, initial: 3, rest: 3, tail: 3, drop: 3, last: 3,\n without: 0, difference: 0, indexOf: 3, shuffle: 1, lastIndexOf: 3,\n isEmpty: 1, chain: 1, sample: 3, partition: 3, groupBy: 3, countBy: 3,\n sortBy: 3, indexBy: 3, findIndex: 3, findLastIndex: 3};\n\n // Mix in each Underscore method as a proxy to `Collection#models`.\n addUnderscoreMethods(Collection, collectionMethods, 'models');\n\n // Backbone.View\n // -------------\n\n // Backbone Views are almost more convention than they are actual code. A View\n // is simply a JavaScript object that represents a logical chunk of UI in the\n // DOM. This might be a single item, an entire list, a sidebar or panel, or\n // even the surrounding frame which wraps your whole app. Defining a chunk of\n // UI as a **View** allows you to define your DOM events declaratively, without\n // having to worry about render order ... and makes it easy for the view to\n // react to specific changes in the state of your models.\n\n // Creating a Backbone.View creates its initial element outside of the DOM,\n // if an existing element is not provided...\n var View = Backbone.View = function(options) {\n this.cid = _.uniqueId('view');\n _.extend(this, _.pick(options, viewOptions));\n this._ensureElement();\n this.initialize.apply(this, arguments);\n };\n\n // Cached regex to split keys for `delegate`.\n var delegateEventSplitter = /^(\\S+)\\s*(.*)$/;\n\n // List of view options to be set as properties.\n var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events'];\n\n // Set up all inheritable **Backbone.View** properties and methods.\n _.extend(View.prototype, Events, {\n\n // The default `tagName` of a View's element is `\"div\"`.\n tagName: 'div',\n\n // jQuery delegate for element lookup, scoped to DOM elements within the\n // current view. This should be preferred to global lookups where possible.\n $: function(selector) {\n return this.$el.find(selector);\n },\n\n // Initialize is an empty function by default. Override it with your own\n // initialization logic.\n initialize: function(){},\n\n // **render** is the core function that your view should override, in order\n // to populate its element (`this.el`), with the appropriate HTML. The\n // convention is for **render** to always return `this`.\n render: function() {\n return this;\n },\n\n // Remove this view by taking the element out of the DOM, and removing any\n // applicable Backbone.Events listeners.\n remove: function() {\n this._removeElement();\n this.stopListening();\n return this;\n },\n\n // Remove this view's element from the document and all event listeners\n // attached to it. Exposed for subclasses using an alternative DOM\n // manipulation API.\n _removeElement: function() {\n this.$el.remove();\n },\n\n // Change the view's element (`this.el` property) and re-delegate the\n // view's events on the new element.\n setElement: function(element) {\n this.undelegateEvents();\n this._setElement(element);\n this.delegateEvents();\n return this;\n },\n\n // Creates the `this.el` and `this.$el` references for this view using the\n // given `el`. `el` can be a CSS selector or an HTML string, a jQuery\n // context or an element. Subclasses can override this to utilize an\n // alternative DOM manipulation API and are only required to set the\n // `this.el` property.\n _setElement: function(el) {\n this.$el = el instanceof Backbone.$ ? el : Backbone.$(el);\n this.el = this.$el[0];\n },\n\n // Set callbacks, where `this.events` is a hash of\n //\n // *{\"event selector\": \"callback\"}*\n //\n // {\n // 'mousedown .title': 'edit',\n // 'click .button': 'save',\n // 'click .open': function(e) { ... }\n // }\n //\n // pairs. Callbacks will be bound to the view, with `this` set properly.\n // Uses event delegation for efficiency.\n // Omitting the selector binds the event to `this.el`.\n delegateEvents: function(events) {\n events || (events = _.result(this, 'events'));\n if (!events) return this;\n this.undelegateEvents();\n for (var key in events) {\n var method = events[key];\n if (!_.isFunction(method)) method = this[method];\n if (!method) continue;\n var match = key.match(delegateEventSplitter);\n this.delegate(match[1], match[2], _.bind(method, this));\n }\n return this;\n },\n\n // Add a single event listener to the view's element (or a child element\n // using `selector`). This only works for delegate-able events: not `focus`,\n // `blur`, and not `change`, `submit`, and `reset` in Internet Explorer.\n delegate: function(eventName, selector, listener) {\n this.$el.on(eventName + '.delegateEvents' + this.cid, selector, listener);\n return this;\n },\n\n // Clears all callbacks previously bound to the view by `delegateEvents`.\n // You usually don't need to use this, but may wish to if you have multiple\n // Backbone views attached to the same DOM element.\n undelegateEvents: function() {\n if (this.$el) this.$el.off('.delegateEvents' + this.cid);\n return this;\n },\n\n // A finer-grained `undelegateEvents` for removing a single delegated event.\n // `selector` and `listener` are both optional.\n undelegate: function(eventName, selector, listener) {\n this.$el.off(eventName + '.delegateEvents' + this.cid, selector, listener);\n return this;\n },\n\n // Produces a DOM element to be assigned to your view. Exposed for\n // subclasses using an alternative DOM manipulation API.\n _createElement: function(tagName) {\n return document.createElement(tagName);\n },\n\n // Ensure that the View has a DOM element to render into.\n // If `this.el` is a string, pass it through `$()`, take the first\n // matching element, and re-assign it to `el`. Otherwise, create\n // an element from the `id`, `className` and `tagName` properties.\n _ensureElement: function() {\n if (!this.el) {\n var attrs = _.extend({}, _.result(this, 'attributes'));\n if (this.id) attrs.id = _.result(this, 'id');\n if (this.className) attrs['class'] = _.result(this, 'className');\n this.setElement(this._createElement(_.result(this, 'tagName')));\n this._setAttributes(attrs);\n } else {\n this.setElement(_.result(this, 'el'));\n }\n },\n\n // Set attributes from a hash on this view's element. Exposed for\n // subclasses using an alternative DOM manipulation API.\n _setAttributes: function(attributes) {\n this.$el.attr(attributes);\n }\n\n });\n\n // Backbone.sync\n // -------------\n\n // Override this function to change the manner in which Backbone persists\n // models to the server. You will be passed the type of request, and the\n // model in question. By default, makes a RESTful Ajax request\n // to the model's `url()`. Some possible customizations could be:\n //\n // * Use `setTimeout` to batch rapid-fire updates into a single request.\n // * Send up the models as XML instead of JSON.\n // * Persist models via WebSockets instead of Ajax.\n //\n // Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests\n // as `POST`, with a `_method` parameter containing the true HTTP method,\n // as well as all requests with the body as `application/x-www-form-urlencoded`\n // instead of `application/json` with the model in a param named `model`.\n // Useful when interfacing with server-side languages like **PHP** that make\n // it difficult to read the body of `PUT` requests.\n Backbone.sync = function(method, model, options) {\n var type = methodMap[method];\n\n // Default options, unless specified.\n _.defaults(options || (options = {}), {\n emulateHTTP: Backbone.emulateHTTP,\n emulateJSON: Backbone.emulateJSON\n });\n\n // Default JSON-request options.\n var params = {type: type, dataType: 'json'};\n\n // Ensure that we have a URL.\n if (!options.url) {\n params.url = _.result(model, 'url') || urlError();\n }\n\n // Ensure that we have the appropriate request data.\n if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) {\n params.contentType = 'application/json';\n params.data = JSON.stringify(options.attrs || model.toJSON(options));\n }\n\n // For older servers, emulate JSON by encoding the request into an HTML-form.\n if (options.emulateJSON) {\n params.contentType = 'application/x-www-form-urlencoded';\n params.data = params.data ? {model: params.data} : {};\n }\n\n // For older servers, emulate HTTP by mimicking the HTTP method with `_method`\n // And an `X-HTTP-Method-Override` header.\n if (options.emulateHTTP && (type === 'PUT' || type === 'DELETE' || type === 'PATCH')) {\n params.type = 'POST';\n if (options.emulateJSON) params.data._method = type;\n var beforeSend = options.beforeSend;\n options.beforeSend = function(xhr) {\n xhr.setRequestHeader('X-HTTP-Method-Override', type);\n if (beforeSend) return beforeSend.apply(this, arguments);\n };\n }\n\n // Don't process data on a non-GET request.\n if (params.type !== 'GET' && !options.emulateJSON) {\n params.processData = false;\n }\n\n // Pass along `textStatus` and `errorThrown` from jQuery.\n var error = options.error;\n options.error = function(xhr, textStatus, errorThrown) {\n options.textStatus = textStatus;\n options.errorThrown = errorThrown;\n if (error) error.call(options.context, xhr, textStatus, errorThrown);\n };\n\n // Make the request, allowing the user to override any Ajax options.\n var xhr = options.xhr = Backbone.ajax(_.extend(params, options));\n model.trigger('request', model, xhr, options);\n return xhr;\n };\n\n // Map from CRUD to HTTP for our default `Backbone.sync` implementation.\n var methodMap = {\n 'create': 'POST',\n 'update': 'PUT',\n 'patch': 'PATCH',\n 'delete': 'DELETE',\n 'read': 'GET'\n };\n\n // Set the default implementation of `Backbone.ajax` to proxy through to `$`.\n // Override this if you'd like to use a different library.\n Backbone.ajax = function() {\n return Backbone.$.ajax.apply(Backbone.$, arguments);\n };\n\n // Backbone.Router\n // ---------------\n\n // Routers map faux-URLs to actions, and fire events when routes are\n // matched. Creating a new one sets its `routes` hash, if not set statically.\n var Router = Backbone.Router = function(options) {\n options || (options = {});\n if (options.routes) this.routes = options.routes;\n this._bindRoutes();\n this.initialize.apply(this, arguments);\n };\n\n // Cached regular expressions for matching named param parts and splatted\n // parts of route strings.\n var optionalParam = /\\((.*?)\\)/g;\n var namedParam = /(\\(\\?)?:\\w+/g;\n var splatParam = /\\*\\w+/g;\n var escapeRegExp = /[\\-{}\\[\\]+?.,\\\\\\^$|#\\s]/g;\n\n // Set up all inheritable **Backbone.Router** properties and methods.\n _.extend(Router.prototype, Events, {\n\n // Initialize is an empty function by default. Override it with your own\n // initialization logic.\n initialize: function(){},\n\n // Manually bind a single named route to a callback. For example:\n //\n // this.route('search/:query/p:num', 'search', function(query, num) {\n // ...\n // });\n //\n route: function(route, name, callback) {\n if (!_.isRegExp(route)) route = this._routeToRegExp(route);\n if (_.isFunction(name)) {\n callback = name;\n name = '';\n }\n if (!callback) callback = this[name];\n var router = this;\n Backbone.history.route(route, function(fragment) {\n var args = router._extractParameters(route, fragment);\n if (router.execute(callback, args, name) !== false) {\n router.trigger.apply(router, ['route:' + name].concat(args));\n router.trigger('route', name, args);\n Backbone.history.trigger('route', router, name, args);\n }\n });\n return this;\n },\n\n // Execute a route handler with the provided parameters. This is an\n // excellent place to do pre-route setup or post-route cleanup.\n execute: function(callback, args, name) {\n if (callback) callback.apply(this, args);\n },\n\n // Simple proxy to `Backbone.history` to save a fragment into the history.\n navigate: function(fragment, options) {\n Backbone.history.navigate(fragment, options);\n return this;\n },\n\n // Bind all defined routes to `Backbone.history`. We have to reverse the\n // order of the routes here to support behavior where the most general\n // routes can be defined at the bottom of the route map.\n _bindRoutes: function() {\n if (!this.routes) return;\n this.routes = _.result(this, 'routes');\n var route, routes = _.keys(this.routes);\n while ((route = routes.pop()) != null) {\n this.route(route, this.routes[route]);\n }\n },\n\n // Convert a route string into a regular expression, suitable for matching\n // against the current location hash.\n _routeToRegExp: function(route) {\n route = route.replace(escapeRegExp, '\\\\$&')\n .replace(optionalParam, '(?:$1)?')\n .replace(namedParam, function(match, optional) {\n return optional ? match : '([^/?]+)';\n })\n .replace(splatParam, '([^?]*?)');\n return new RegExp('^' + route + '(?:\\\\?([\\\\s\\\\S]*))?$');\n },\n\n // Given a route, and a URL fragment that it matches, return the array of\n // extracted decoded parameters. Empty or unmatched parameters will be\n // treated as `null` to normalize cross-browser behavior.\n _extractParameters: function(route, fragment) {\n var params = route.exec(fragment).slice(1);\n return _.map(params, function(param, i) {\n // Don't decode the search params.\n if (i === params.length - 1) return param || null;\n return param ? decodeURIComponent(param) : null;\n });\n }\n\n });\n\n // Backbone.History\n // ----------------\n\n // Handles cross-browser history management, based on either\n // [pushState](http://diveintohtml5.info/history.html) and real URLs, or\n // [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange)\n // and URL fragments. If the browser supports neither (old IE, natch),\n // falls back to polling.\n var History = Backbone.History = function() {\n this.handlers = [];\n this.checkUrl = _.bind(this.checkUrl, this);\n\n // Ensure that `History` can be used outside of the browser.\n if (typeof window !== 'undefined') {\n this.location = window.location;\n this.history = window.history;\n }\n };\n\n // Cached regex for stripping a leading hash/slash and trailing space.\n var routeStripper = /^[#\\/]|\\s+$/g;\n\n // Cached regex for stripping leading and trailing slashes.\n var rootStripper = /^\\/+|\\/+$/g;\n\n // Cached regex for stripping urls of hash.\n var pathStripper = /#.*$/;\n\n // Has the history handling already been started?\n History.started = false;\n\n // Set up all inheritable **Backbone.History** properties and methods.\n _.extend(History.prototype, Events, {\n\n // The default interval to poll for hash changes, if necessary, is\n // twenty times a second.\n interval: 50,\n\n // Are we at the app root?\n atRoot: function() {\n var path = this.location.pathname.replace(/[^\\/]$/, '$&/');\n return path === this.root && !this.getSearch();\n },\n\n // Does the pathname match the root?\n matchRoot: function() {\n var path = this.decodeFragment(this.location.pathname);\n var rootPath = path.slice(0, this.root.length - 1) + '/';\n return rootPath === this.root;\n },\n\n // Unicode characters in `location.pathname` are percent encoded so they're\n // decoded for comparison. `%25` should not be decoded since it may be part\n // of an encoded parameter.\n decodeFragment: function(fragment) {\n return decodeURI(fragment.replace(/%25/g, '%2525'));\n },\n\n // In IE6, the hash fragment and search params are incorrect if the\n // fragment contains `?`.\n getSearch: function() {\n var match = this.location.href.replace(/#.*/, '').match(/\\?.+/);\n return match ? match[0] : '';\n },\n\n // Gets the true hash value. Cannot use location.hash directly due to bug\n // in Firefox where location.hash will always be decoded.\n getHash: function(window) {\n var match = (window || this).location.href.match(/#(.*)$/);\n return match ? match[1] : '';\n },\n\n // Get the pathname and search params, without the root.\n getPath: function() {\n var path = this.decodeFragment(\n this.location.pathname + this.getSearch()\n ).slice(this.root.length - 1);\n return path.charAt(0) === '/' ? path.slice(1) : path;\n },\n\n // Get the cross-browser normalized URL fragment from the path or hash.\n getFragment: function(fragment) {\n if (fragment == null) {\n if (this._usePushState || !this._wantsHashChange) {\n fragment = this.getPath();\n } else {\n fragment = this.getHash();\n }\n }\n return fragment.replace(routeStripper, '');\n },\n\n // Start the hash change handling, returning `true` if the current URL matches\n // an existing route, and `false` otherwise.\n start: function(options) {\n if (History.started) throw new Error('Backbone.history has already been started');\n History.started = true;\n\n // Figure out the initial configuration. Do we need an iframe?\n // Is pushState desired ... is it available?\n this.options = _.extend({root: '/'}, this.options, options);\n this.root = this.options.root;\n this._wantsHashChange = this.options.hashChange !== false;\n this._hasHashChange = 'onhashchange' in window && (document.documentMode === void 0 || document.documentMode > 7);\n this._useHashChange = this._wantsHashChange && this._hasHashChange;\n this._wantsPushState = !!this.options.pushState;\n this._hasPushState = !!(this.history && this.history.pushState);\n this._usePushState = this._wantsPushState && this._hasPushState;\n this.fragment = this.getFragment();\n\n // Normalize root to always include a leading and trailing slash.\n this.root = ('/' + this.root + '/').replace(rootStripper, '/');\n\n // Transition from hashChange to pushState or vice versa if both are\n // requested.\n if (this._wantsHashChange && this._wantsPushState) {\n\n // If we've started off with a route from a `pushState`-enabled\n // browser, but we're currently in a browser that doesn't support it...\n if (!this._hasPushState && !this.atRoot()) {\n var rootPath = this.root.slice(0, -1) || '/';\n this.location.replace(rootPath + '#' + this.getPath());\n // Return immediately as browser will do redirect to new url\n return true;\n\n // Or if we've started out with a hash-based route, but we're currently\n // in a browser where it could be `pushState`-based instead...\n } else if (this._hasPushState && this.atRoot()) {\n this.navigate(this.getHash(), {replace: true});\n }\n\n }\n\n // Proxy an iframe to handle location events if the browser doesn't\n // support the `hashchange` event, HTML5 history, or the user wants\n // `hashChange` but not `pushState`.\n if (!this._hasHashChange && this._wantsHashChange && !this._usePushState) {\n this.iframe = document.createElement('iframe');\n this.iframe.src = 'javascript:0';\n this.iframe.style.display = 'none';\n this.iframe.tabIndex = -1;\n var body = document.body;\n // Using `appendChild` will throw on IE < 9 if the document is not ready.\n var iWindow = body.insertBefore(this.iframe, body.firstChild).contentWindow;\n iWindow.document.open();\n iWindow.document.close();\n iWindow.location.hash = '#' + this.fragment;\n }\n\n // Add a cross-platform `addEventListener` shim for older browsers.\n var addEventListener = window.addEventListener || function(eventName, listener) {\n return attachEvent('on' + eventName, listener);\n };\n\n // Depending on whether we're using pushState or hashes, and whether\n // 'onhashchange' is supported, determine how we check the URL state.\n if (this._usePushState) {\n addEventListener('popstate', this.checkUrl, false);\n } else if (this._useHashChange && !this.iframe) {\n addEventListener('hashchange', this.checkUrl, false);\n } else if (this._wantsHashChange) {\n this._checkUrlInterval = setInterval(this.checkUrl, this.interval);\n }\n\n if (!this.options.silent) return this.loadUrl();\n },\n\n // Disable Backbone.history, perhaps temporarily. Not useful in a real app,\n // but possibly useful for unit testing Routers.\n stop: function() {\n // Add a cross-platform `removeEventListener` shim for older browsers.\n var removeEventListener = window.removeEventListener || function(eventName, listener) {\n return detachEvent('on' + eventName, listener);\n };\n\n // Remove window listeners.\n if (this._usePushState) {\n removeEventListener('popstate', this.checkUrl, false);\n } else if (this._useHashChange && !this.iframe) {\n removeEventListener('hashchange', this.checkUrl, false);\n }\n\n // Clean up the iframe if necessary.\n if (this.iframe) {\n document.body.removeChild(this.iframe);\n this.iframe = null;\n }\n\n // Some environments will throw when clearing an undefined interval.\n if (this._checkUrlInterval) clearInterval(this._checkUrlInterval);\n History.started = false;\n },\n\n // Add a route to be tested when the fragment changes. Routes added later\n // may override previous routes.\n route: function(route, callback) {\n this.handlers.unshift({route: route, callback: callback});\n },\n\n // Checks the current URL to see if it has changed, and if it has,\n // calls `loadUrl`, normalizing across the hidden iframe.\n checkUrl: function(e) {\n var current = this.getFragment();\n\n // If the user pressed the back button, the iframe's hash will have\n // changed and we should use that for comparison.\n if (current === this.fragment && this.iframe) {\n current = this.getHash(this.iframe.contentWindow);\n }\n\n if (current === this.fragment) return false;\n if (this.iframe) this.navigate(current);\n this.loadUrl();\n },\n\n // Attempt to load the current URL fragment. If a route succeeds with a\n // match, returns `true`. If no defined routes matches the fragment,\n // returns `false`.\n loadUrl: function(fragment) {\n // If the root doesn't match, no routes can match either.\n if (!this.matchRoot()) return false;\n fragment = this.fragment = this.getFragment(fragment);\n return _.some(this.handlers, function(handler) {\n if (handler.route.test(fragment)) {\n handler.callback(fragment);\n return true;\n }\n });\n },\n\n // Save a fragment into the hash history, or replace the URL state if the\n // 'replace' option is passed. You are responsible for properly URL-encoding\n // the fragment in advance.\n //\n // The options object can contain `trigger: true` if you wish to have the\n // route callback be fired (not usually desirable), or `replace: true`, if\n // you wish to modify the current URL without adding an entry to the history.\n navigate: function(fragment, options) {\n if (!History.started) return false;\n if (!options || options === true) options = {trigger: !!options};\n\n // Normalize the fragment.\n fragment = this.getFragment(fragment || '');\n\n // Don't include a trailing slash on the root.\n var rootPath = this.root;\n if (fragment === '' || fragment.charAt(0) === '?') {\n rootPath = rootPath.slice(0, -1) || '/';\n }\n var url = rootPath + fragment;\n\n // Strip the hash and decode for matching.\n fragment = this.decodeFragment(fragment.replace(pathStripper, ''));\n\n if (this.fragment === fragment) return;\n this.fragment = fragment;\n\n // If pushState is available, we use it to set the fragment as a real URL.\n if (this._usePushState) {\n this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);\n\n // If hash changes haven't been explicitly disabled, update the hash\n // fragment to store history.\n } else if (this._wantsHashChange) {\n this._updateHash(this.location, fragment, options.replace);\n if (this.iframe && fragment !== this.getHash(this.iframe.contentWindow)) {\n var iWindow = this.iframe.contentWindow;\n\n // Opening and closing the iframe tricks IE7 and earlier to push a\n // history entry on hash-tag change. When replace is true, we don't\n // want this.\n if (!options.replace) {\n iWindow.document.open();\n iWindow.document.close();\n }\n\n this._updateHash(iWindow.location, fragment, options.replace);\n }\n\n // If you've told us that you explicitly don't want fallback hashchange-\n // based history, then `navigate` becomes a page refresh.\n } else {\n return this.location.assign(url);\n }\n if (options.trigger) return this.loadUrl(fragment);\n },\n\n // Update the hash location, either replacing the current entry, or adding\n // a new one to the browser history.\n _updateHash: function(location, fragment, replace) {\n if (replace) {\n var href = location.href.replace(/(javascript:|#).*$/, '');\n location.replace(href + '#' + fragment);\n } else {\n // Some browsers require that `hash` contains a leading #.\n location.hash = '#' + fragment;\n }\n }\n\n });\n\n // Create the default Backbone.history.\n Backbone.history = new History;\n\n // Helpers\n // -------\n\n // Helper function to correctly set up the prototype chain for subclasses.\n // Similar to `goog.inherits`, but uses a hash of prototype properties and\n // class properties to be extended.\n var extend = function(protoProps, staticProps) {\n var parent = this;\n var child;\n\n // The constructor function for the new subclass is either defined by you\n // (the \"constructor\" property in your `extend` definition), or defaulted\n // by us to simply call the parent constructor.\n if (protoProps && _.has(protoProps, 'constructor')) {\n child = protoProps.constructor;\n } else {\n child = function(){ return parent.apply(this, arguments); };\n }\n\n // Add static properties to the constructor function, if supplied.\n _.extend(child, parent, staticProps);\n\n // Set the prototype chain to inherit from `parent`, without calling\n // `parent`'s constructor function and add the prototype properties.\n child.prototype = _.create(parent.prototype, protoProps);\n child.prototype.constructor = child;\n\n // Set a convenience property in case the parent's prototype is needed\n // later.\n child.__super__ = parent.prototype;\n\n return child;\n };\n\n // Set up inheritance for the model, collection, router, view and history.\n Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend;\n\n // Throw an error when a URL is needed, and none is supplied.\n var urlError = function() {\n throw new Error('A \"url\" property or function must be specified');\n };\n\n // Wrap an optional error callback with a fallback error event.\n var wrapError = function(model, options) {\n var error = options.error;\n options.error = function(resp) {\n if (error) error.call(options.context, model, resp, options);\n model.trigger('error', model, resp, options);\n };\n };\n\n return Backbone;\n});\n","// Underscore.js 1.9.1\n// http://underscorejs.org\n// (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n// Underscore may be freely distributed under the MIT license.\n\n(function() {\n\n // Baseline setup\n // --------------\n\n // Establish the root object, `window` (`self`) in the browser, `global`\n // on the server, or `this` in some virtual machines. We use `self`\n // instead of `window` for `WebWorker` support.\n var root = typeof self == 'object' && self.self === self && self ||\n typeof global == 'object' && global.global === global && global ||\n this ||\n {};\n\n // Save the previous value of the `_` variable.\n var previousUnderscore = root._;\n\n // Save bytes in the minified (but not gzipped) version:\n var ArrayProto = Array.prototype, ObjProto = Object.prototype;\n var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;\n\n // Create quick reference variables for speed access to core prototypes.\n var push = ArrayProto.push,\n slice = ArrayProto.slice,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n // All **ECMAScript 5** native function implementations that we hope to use\n // are declared here.\n var nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeCreate = Object.create;\n\n // Naked function reference for surrogate-prototype-swapping.\n var Ctor = function(){};\n\n // Create a safe reference to the Underscore object for use below.\n var _ = function(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n };\n\n // Export the Underscore object for **Node.js**, with\n // backwards-compatibility for their old module API. If we're in\n // the browser, add `_` as a global object.\n // (`nodeType` is checked to ensure that `module`\n // and `exports` are not HTML elements.)\n if (typeof exports != 'undefined' && !exports.nodeType) {\n if (typeof module != 'undefined' && !module.nodeType && module.exports) {\n exports = module.exports = _;\n }\n exports._ = _;\n } else {\n root._ = _;\n }\n\n // Current version.\n _.VERSION = '1.9.1';\n\n // Internal function that returns an efficient (for current engines) version\n // of the passed-in callback, to be repeatedly applied in other Underscore\n // functions.\n var optimizeCb = function(func, context, argCount) {\n if (context === void 0) return func;\n switch (argCount == null ? 3 : argCount) {\n case 1: return function(value) {\n return func.call(context, value);\n };\n // The 2-argument case is omitted because we’re not using it.\n case 3: return function(value, index, collection) {\n return func.call(context, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(context, accumulator, value, index, collection);\n };\n }\n return function() {\n return func.apply(context, arguments);\n };\n };\n\n var builtinIteratee;\n\n // An internal function to generate callbacks that can be applied to each\n // element in a collection, returning the desired result — either `identity`,\n // an arbitrary callback, a property matcher, or a property accessor.\n var cb = function(value, context, argCount) {\n if (_.iteratee !== builtinIteratee) return _.iteratee(value, context);\n if (value == null) return _.identity;\n if (_.isFunction(value)) return optimizeCb(value, context, argCount);\n if (_.isObject(value) && !_.isArray(value)) return _.matcher(value);\n return _.property(value);\n };\n\n // External wrapper for our callback generator. Users may customize\n // `_.iteratee` if they want additional predicate/iteratee shorthand styles.\n // This abstraction hides the internal-only argCount argument.\n _.iteratee = builtinIteratee = function(value, context) {\n return cb(value, context, Infinity);\n };\n\n // Some functions take a variable number of arguments, or a few expected\n // arguments at the beginning and then a variable number of values to operate\n // on. This helper accumulates all remaining arguments past the function’s\n // argument length (or an explicit `startIndex`), into an array that becomes\n // the last argument. Similar to ES6’s \"rest parameter\".\n var restArguments = function(func, startIndex) {\n startIndex = startIndex == null ? func.length - 1 : +startIndex;\n return function() {\n var length = Math.max(arguments.length - startIndex, 0),\n rest = Array(length),\n index = 0;\n for (; index < length; index++) {\n rest[index] = arguments[index + startIndex];\n }\n switch (startIndex) {\n case 0: return func.call(this, rest);\n case 1: return func.call(this, arguments[0], rest);\n case 2: return func.call(this, arguments[0], arguments[1], rest);\n }\n var args = Array(startIndex + 1);\n for (index = 0; index < startIndex; index++) {\n args[index] = arguments[index];\n }\n args[startIndex] = rest;\n return func.apply(this, args);\n };\n };\n\n // An internal function for creating a new object that inherits from another.\n var baseCreate = function(prototype) {\n if (!_.isObject(prototype)) return {};\n if (nativeCreate) return nativeCreate(prototype);\n Ctor.prototype = prototype;\n var result = new Ctor;\n Ctor.prototype = null;\n return result;\n };\n\n var shallowProperty = function(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n };\n\n var has = function(obj, path) {\n return obj != null && hasOwnProperty.call(obj, path);\n }\n\n var deepGet = function(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n };\n\n // Helper for collection methods to determine whether a collection\n // should be iterated as an array or as an object.\n // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\n var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\n var getLength = shallowProperty('length');\n var isArrayLike = function(collection) {\n var length = getLength(collection);\n return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;\n };\n\n // Collection Functions\n // --------------------\n\n // The cornerstone, an `each` implementation, aka `forEach`.\n // Handles raw objects in addition to array-likes. Treats all\n // sparse array-likes as if they were dense.\n _.each = _.forEach = function(obj, iteratee, context) {\n iteratee = optimizeCb(iteratee, context);\n var i, length;\n if (isArrayLike(obj)) {\n for (i = 0, length = obj.length; i < length; i++) {\n iteratee(obj[i], i, obj);\n }\n } else {\n var keys = _.keys(obj);\n for (i = 0, length = keys.length; i < length; i++) {\n iteratee(obj[keys[i]], keys[i], obj);\n }\n }\n return obj;\n };\n\n // Return the results of applying the iteratee to each element.\n _.map = _.collect = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n results = Array(length);\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n results[index] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Create a reducing function iterating left or right.\n var createReduce = function(dir) {\n // Wrap code that reassigns argument variables in a separate function than\n // the one that accesses `arguments.length` to avoid a perf hit. (#1991)\n var reducer = function(obj, iteratee, memo, initial) {\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n index = dir > 0 ? 0 : length - 1;\n if (!initial) {\n memo = obj[keys ? keys[index] : index];\n index += dir;\n }\n for (; index >= 0 && index < length; index += dir) {\n var currentKey = keys ? keys[index] : index;\n memo = iteratee(memo, obj[currentKey], currentKey, obj);\n }\n return memo;\n };\n\n return function(obj, iteratee, memo, context) {\n var initial = arguments.length >= 3;\n return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);\n };\n };\n\n // **Reduce** builds up a single result from a list of values, aka `inject`,\n // or `foldl`.\n _.reduce = _.foldl = _.inject = createReduce(1);\n\n // The right-associative version of reduce, also known as `foldr`.\n _.reduceRight = _.foldr = createReduce(-1);\n\n // Return the first value which passes a truth test. Aliased as `detect`.\n _.find = _.detect = function(obj, predicate, context) {\n var keyFinder = isArrayLike(obj) ? _.findIndex : _.findKey;\n var key = keyFinder(obj, predicate, context);\n if (key !== void 0 && key !== -1) return obj[key];\n };\n\n // Return all the elements that pass a truth test.\n // Aliased as `select`.\n _.filter = _.select = function(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n _.each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n };\n\n // Return all the elements for which a truth test fails.\n _.reject = function(obj, predicate, context) {\n return _.filter(obj, _.negate(cb(predicate)), context);\n };\n\n // Determine whether all of the elements match a truth test.\n // Aliased as `all`.\n _.every = _.all = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (!predicate(obj[currentKey], currentKey, obj)) return false;\n }\n return true;\n };\n\n // Determine if at least one element in the object matches a truth test.\n // Aliased as `any`.\n _.some = _.any = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (predicate(obj[currentKey], currentKey, obj)) return true;\n }\n return false;\n };\n\n // Determine if the array or object contains a given item (using `===`).\n // Aliased as `includes` and `include`.\n _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n return _.indexOf(obj, item, fromIndex) >= 0;\n };\n\n // Invoke a method (with arguments) on every item in a collection.\n _.invoke = restArguments(function(obj, path, args) {\n var contextPath, func;\n if (_.isFunction(path)) {\n func = path;\n } else if (_.isArray(path)) {\n contextPath = path.slice(0, -1);\n path = path[path.length - 1];\n }\n return _.map(obj, function(context) {\n var method = func;\n if (!method) {\n if (contextPath && contextPath.length) {\n context = deepGet(context, contextPath);\n }\n if (context == null) return void 0;\n method = context[path];\n }\n return method == null ? method : method.apply(context, args);\n });\n });\n\n // Convenience version of a common use case of `map`: fetching a property.\n _.pluck = function(obj, key) {\n return _.map(obj, _.property(key));\n };\n\n // Convenience version of a common use case of `filter`: selecting only objects\n // containing specific `key:value` pairs.\n _.where = function(obj, attrs) {\n return _.filter(obj, _.matcher(attrs));\n };\n\n // Convenience version of a common use case of `find`: getting the first object\n // containing specific `key:value` pairs.\n _.findWhere = function(obj, attrs) {\n return _.find(obj, _.matcher(attrs));\n };\n\n // Return the maximum element (or element-based computation).\n _.max = function(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Return the minimum element (or element-based computation).\n _.min = function(obj, iteratee, context) {\n var result = Infinity, lastComputed = Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value < result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed < lastComputed || computed === Infinity && result === Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Shuffle a collection.\n _.shuffle = function(obj) {\n return _.sample(obj, Infinity);\n };\n\n // Sample **n** random values from a collection using the modern version of the\n // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n // If **n** is not specified, returns a single random element.\n // The internal `guard` argument allows it to work with `map`.\n _.sample = function(obj, n, guard) {\n if (n == null || guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n return obj[_.random(obj.length - 1)];\n }\n var sample = isArrayLike(obj) ? _.clone(obj) : _.values(obj);\n var length = getLength(sample);\n n = Math.max(Math.min(n, length), 0);\n var last = length - 1;\n for (var index = 0; index < n; index++) {\n var rand = _.random(index, last);\n var temp = sample[index];\n sample[index] = sample[rand];\n sample[rand] = temp;\n }\n return sample.slice(0, n);\n };\n\n // Sort the object's values by a criterion produced by an iteratee.\n _.sortBy = function(obj, iteratee, context) {\n var index = 0;\n iteratee = cb(iteratee, context);\n return _.pluck(_.map(obj, function(value, key, list) {\n return {\n value: value,\n index: index++,\n criteria: iteratee(value, key, list)\n };\n }).sort(function(left, right) {\n var a = left.criteria;\n var b = right.criteria;\n if (a !== b) {\n if (a > b || a === void 0) return 1;\n if (a < b || b === void 0) return -1;\n }\n return left.index - right.index;\n }), 'value');\n };\n\n // An internal function used for aggregate \"group by\" operations.\n var group = function(behavior, partition) {\n return function(obj, iteratee, context) {\n var result = partition ? [[], []] : {};\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index) {\n var key = iteratee(value, index, obj);\n behavior(result, value, key);\n });\n return result;\n };\n };\n\n // Groups the object's values by a criterion. Pass either a string attribute\n // to group by, or a function that returns the criterion.\n _.groupBy = group(function(result, value, key) {\n if (has(result, key)) result[key].push(value); else result[key] = [value];\n });\n\n // Indexes the object's values by a criterion, similar to `groupBy`, but for\n // when you know that your index values will be unique.\n _.indexBy = group(function(result, value, key) {\n result[key] = value;\n });\n\n // Counts instances of an object that group by a certain criterion. Pass\n // either a string attribute to count by, or a function that returns the\n // criterion.\n _.countBy = group(function(result, value, key) {\n if (has(result, key)) result[key]++; else result[key] = 1;\n });\n\n var reStrSymbol = /[^\\ud800-\\udfff]|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff]/g;\n // Safely create a real, live array from anything iterable.\n _.toArray = function(obj) {\n if (!obj) return [];\n if (_.isArray(obj)) return slice.call(obj);\n if (_.isString(obj)) {\n // Keep surrogate pair characters together\n return obj.match(reStrSymbol);\n }\n if (isArrayLike(obj)) return _.map(obj, _.identity);\n return _.values(obj);\n };\n\n // Return the number of elements in an object.\n _.size = function(obj) {\n if (obj == null) return 0;\n return isArrayLike(obj) ? obj.length : _.keys(obj).length;\n };\n\n // Split a collection into two arrays: one whose elements all satisfy the given\n // predicate, and one whose elements all do not satisfy the predicate.\n _.partition = group(function(result, value, pass) {\n result[pass ? 0 : 1].push(value);\n }, true);\n\n // Array Functions\n // ---------------\n\n // Get the first element of an array. Passing **n** will return the first N\n // values in the array. Aliased as `head` and `take`. The **guard** check\n // allows it to work with `_.map`.\n _.first = _.head = _.take = function(array, n, guard) {\n if (array == null || array.length < 1) return n == null ? void 0 : [];\n if (n == null || guard) return array[0];\n return _.initial(array, array.length - n);\n };\n\n // Returns everything but the last entry of the array. Especially useful on\n // the arguments object. Passing **n** will return all the values in\n // the array, excluding the last N.\n _.initial = function(array, n, guard) {\n return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n };\n\n // Get the last element of an array. Passing **n** will return the last N\n // values in the array.\n _.last = function(array, n, guard) {\n if (array == null || array.length < 1) return n == null ? void 0 : [];\n if (n == null || guard) return array[array.length - 1];\n return _.rest(array, Math.max(0, array.length - n));\n };\n\n // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.\n // Especially useful on the arguments object. Passing an **n** will return\n // the rest N values in the array.\n _.rest = _.tail = _.drop = function(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n };\n\n // Trim out all falsy values from an array.\n _.compact = function(array) {\n return _.filter(array, Boolean);\n };\n\n // Internal implementation of a recursive `flatten` function.\n var flatten = function(input, shallow, strict, output) {\n output = output || [];\n var idx = output.length;\n for (var i = 0, length = getLength(input); i < length; i++) {\n var value = input[i];\n if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {\n // Flatten current level of array or arguments object.\n if (shallow) {\n var j = 0, len = value.length;\n while (j < len) output[idx++] = value[j++];\n } else {\n flatten(value, shallow, strict, output);\n idx = output.length;\n }\n } else if (!strict) {\n output[idx++] = value;\n }\n }\n return output;\n };\n\n // Flatten out an array, either recursively (by default), or just one level.\n _.flatten = function(array, shallow) {\n return flatten(array, shallow, false);\n };\n\n // Return a version of the array that does not contain the specified value(s).\n _.without = restArguments(function(array, otherArrays) {\n return _.difference(array, otherArrays);\n });\n\n // Produce a duplicate-free version of the array. If the array has already\n // been sorted, you have the option of using a faster algorithm.\n // The faster algorithm will not work with an iteratee if the iteratee\n // is not a one-to-one function, so providing an iteratee will disable\n // the faster algorithm.\n // Aliased as `unique`.\n _.uniq = _.unique = function(array, isSorted, iteratee, context) {\n if (!_.isBoolean(isSorted)) {\n context = iteratee;\n iteratee = isSorted;\n isSorted = false;\n }\n if (iteratee != null) iteratee = cb(iteratee, context);\n var result = [];\n var seen = [];\n for (var i = 0, length = getLength(array); i < length; i++) {\n var value = array[i],\n computed = iteratee ? iteratee(value, i, array) : value;\n if (isSorted && !iteratee) {\n if (!i || seen !== computed) result.push(value);\n seen = computed;\n } else if (iteratee) {\n if (!_.contains(seen, computed)) {\n seen.push(computed);\n result.push(value);\n }\n } else if (!_.contains(result, value)) {\n result.push(value);\n }\n }\n return result;\n };\n\n // Produce an array that contains the union: each distinct element from all of\n // the passed-in arrays.\n _.union = restArguments(function(arrays) {\n return _.uniq(flatten(arrays, true, true));\n });\n\n // Produce an array that contains every item shared between all the\n // passed-in arrays.\n _.intersection = function(array) {\n var result = [];\n var argsLength = arguments.length;\n for (var i = 0, length = getLength(array); i < length; i++) {\n var item = array[i];\n if (_.contains(result, item)) continue;\n var j;\n for (j = 1; j < argsLength; j++) {\n if (!_.contains(arguments[j], item)) break;\n }\n if (j === argsLength) result.push(item);\n }\n return result;\n };\n\n // Take the difference between one array and a number of other arrays.\n // Only the elements present in just the first array will remain.\n _.difference = restArguments(function(array, rest) {\n rest = flatten(rest, true, true);\n return _.filter(array, function(value){\n return !_.contains(rest, value);\n });\n });\n\n // Complement of _.zip. Unzip accepts an array of arrays and groups\n // each array's elements on shared indices.\n _.unzip = function(array) {\n var length = array && _.max(array, getLength).length || 0;\n var result = Array(length);\n\n for (var index = 0; index < length; index++) {\n result[index] = _.pluck(array, index);\n }\n return result;\n };\n\n // Zip together multiple lists into a single array -- elements that share\n // an index go together.\n _.zip = restArguments(_.unzip);\n\n // Converts lists into objects. Pass either a single array of `[key, value]`\n // pairs, or two parallel arrays of the same length -- one of keys, and one of\n // the corresponding values. Passing by pairs is the reverse of _.pairs.\n _.object = function(list, values) {\n var result = {};\n for (var i = 0, length = getLength(list); i < length; i++) {\n if (values) {\n result[list[i]] = values[i];\n } else {\n result[list[i][0]] = list[i][1];\n }\n }\n return result;\n };\n\n // Generator function to create the findIndex and findLastIndex functions.\n var createPredicateIndexFinder = function(dir) {\n return function(array, predicate, context) {\n predicate = cb(predicate, context);\n var length = getLength(array);\n var index = dir > 0 ? 0 : length - 1;\n for (; index >= 0 && index < length; index += dir) {\n if (predicate(array[index], index, array)) return index;\n }\n return -1;\n };\n };\n\n // Returns the first index on an array-like that passes a predicate test.\n _.findIndex = createPredicateIndexFinder(1);\n _.findLastIndex = createPredicateIndexFinder(-1);\n\n // Use a comparator function to figure out the smallest index at which\n // an object should be inserted so as to maintain order. Uses binary search.\n _.sortedIndex = function(array, obj, iteratee, context) {\n iteratee = cb(iteratee, context, 1);\n var value = iteratee(obj);\n var low = 0, high = getLength(array);\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n }\n return low;\n };\n\n // Generator function to create the indexOf and lastIndexOf functions.\n var createIndexFinder = function(dir, predicateFind, sortedIndex) {\n return function(array, item, idx) {\n var i = 0, length = getLength(array);\n if (typeof idx == 'number') {\n if (dir > 0) {\n i = idx >= 0 ? idx : Math.max(idx + length, i);\n } else {\n length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n }\n } else if (sortedIndex && idx && length) {\n idx = sortedIndex(array, item);\n return array[idx] === item ? idx : -1;\n }\n if (item !== item) {\n idx = predicateFind(slice.call(array, i, length), _.isNaN);\n return idx >= 0 ? idx + i : -1;\n }\n for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n if (array[idx] === item) return idx;\n }\n return -1;\n };\n };\n\n // Return the position of the first occurrence of an item in an array,\n // or -1 if the item is not included in the array.\n // If the array is large and already in sort order, pass `true`\n // for **isSorted** to use binary search.\n _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex);\n _.lastIndexOf = createIndexFinder(-1, _.findLastIndex);\n\n // Generate an integer Array containing an arithmetic progression. A port of\n // the native Python `range()` function. See\n // [the Python documentation](http://docs.python.org/library/functions.html#range).\n _.range = function(start, stop, step) {\n if (stop == null) {\n stop = start || 0;\n start = 0;\n }\n if (!step) {\n step = stop < start ? -1 : 1;\n }\n\n var length = Math.max(Math.ceil((stop - start) / step), 0);\n var range = Array(length);\n\n for (var idx = 0; idx < length; idx++, start += step) {\n range[idx] = start;\n }\n\n return range;\n };\n\n // Chunk a single array into multiple arrays, each containing `count` or fewer\n // items.\n _.chunk = function(array, count) {\n if (count == null || count < 1) return [];\n var result = [];\n var i = 0, length = array.length;\n while (i < length) {\n result.push(slice.call(array, i, i += count));\n }\n return result;\n };\n\n // Function (ahem) Functions\n // ------------------\n\n // Determines whether to execute a function as a constructor\n // or a normal function with the provided arguments.\n var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {\n if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n var self = baseCreate(sourceFunc.prototype);\n var result = sourceFunc.apply(self, args);\n if (_.isObject(result)) return result;\n return self;\n };\n\n // Create a function bound to a given object (assigning `this`, and arguments,\n // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\n // available.\n _.bind = restArguments(function(func, context, args) {\n if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');\n var bound = restArguments(function(callArgs) {\n return executeBound(func, bound, context, this, args.concat(callArgs));\n });\n return bound;\n });\n\n // Partially apply a function by creating a version that has had some of its\n // arguments pre-filled, without changing its dynamic `this` context. _ acts\n // as a placeholder by default, allowing any combination of arguments to be\n // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.\n _.partial = restArguments(function(func, boundArgs) {\n var placeholder = _.partial.placeholder;\n var bound = function() {\n var position = 0, length = boundArgs.length;\n var args = Array(length);\n for (var i = 0; i < length; i++) {\n args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];\n }\n while (position < arguments.length) args.push(arguments[position++]);\n return executeBound(func, bound, this, this, args);\n };\n return bound;\n });\n\n _.partial.placeholder = _;\n\n // Bind a number of an object's methods to that object. Remaining arguments\n // are the method names to be bound. Useful for ensuring that all callbacks\n // defined on an object belong to it.\n _.bindAll = restArguments(function(obj, keys) {\n keys = flatten(keys, false, false);\n var index = keys.length;\n if (index < 1) throw new Error('bindAll must be passed function names');\n while (index--) {\n var key = keys[index];\n obj[key] = _.bind(obj[key], obj);\n }\n });\n\n // Memoize an expensive function by storing its results.\n _.memoize = function(func, hasher) {\n var memoize = function(key) {\n var cache = memoize.cache;\n var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n if (!has(cache, address)) cache[address] = func.apply(this, arguments);\n return cache[address];\n };\n memoize.cache = {};\n return memoize;\n };\n\n // Delays a function for the given number of milliseconds, and then calls\n // it with the arguments supplied.\n _.delay = restArguments(function(func, wait, args) {\n return setTimeout(function() {\n return func.apply(null, args);\n }, wait);\n });\n\n // Defers a function, scheduling it to run after the current call stack has\n // cleared.\n _.defer = _.partial(_.delay, _, 1);\n\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time. Normally, the throttled function will run\n // as much as it can, without ever going more than once per `wait` duration;\n // but if you'd like to disable the execution on the leading edge, pass\n // `{leading: false}`. To disable execution on the trailing edge, ditto.\n _.throttle = function(func, wait, options) {\n var timeout, context, args, result;\n var previous = 0;\n if (!options) options = {};\n\n var later = function() {\n previous = options.leading === false ? 0 : _.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n\n var throttled = function() {\n var now = _.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n\n throttled.cancel = function() {\n clearTimeout(timeout);\n previous = 0;\n timeout = context = args = null;\n };\n\n return throttled;\n };\n\n // Returns a function, that, as long as it continues to be invoked, will not\n // be triggered. The function will be called after it stops being called for\n // N milliseconds. If `immediate` is passed, trigger the function on the\n // leading edge, instead of the trailing.\n _.debounce = function(func, wait, immediate) {\n var timeout, result;\n\n var later = function(context, args) {\n timeout = null;\n if (args) result = func.apply(context, args);\n };\n\n var debounced = restArguments(function(args) {\n if (timeout) clearTimeout(timeout);\n if (immediate) {\n var callNow = !timeout;\n timeout = setTimeout(later, wait);\n if (callNow) result = func.apply(this, args);\n } else {\n timeout = _.delay(later, wait, this, args);\n }\n\n return result;\n });\n\n debounced.cancel = function() {\n clearTimeout(timeout);\n timeout = null;\n };\n\n return debounced;\n };\n\n // Returns the first function passed as an argument to the second,\n // allowing you to adjust arguments, run code before and after, and\n // conditionally execute the original function.\n _.wrap = function(func, wrapper) {\n return _.partial(wrapper, func);\n };\n\n // Returns a negated version of the passed-in predicate.\n _.negate = function(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n };\n };\n\n // Returns a function that is the composition of a list of functions, each\n // consuming the return value of the function that follows.\n _.compose = function() {\n var args = arguments;\n var start = args.length - 1;\n return function() {\n var i = start;\n var result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n };\n\n // Returns a function that will only be executed on and after the Nth call.\n _.after = function(times, func) {\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n };\n\n // Returns a function that will only be executed up to (but not including) the Nth call.\n _.before = function(times, func) {\n var memo;\n return function() {\n if (--times > 0) {\n memo = func.apply(this, arguments);\n }\n if (times <= 1) func = null;\n return memo;\n };\n };\n\n // Returns a function that will be executed at most one time, no matter how\n // often you call it. Useful for lazy initialization.\n _.once = _.partial(_.before, 2);\n\n _.restArguments = restArguments;\n\n // Object Functions\n // ----------------\n\n // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\n var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\n var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\n var collectNonEnumProps = function(obj, keys) {\n var nonEnumIdx = nonEnumerableProps.length;\n var constructor = obj.constructor;\n var proto = _.isFunction(constructor) && constructor.prototype || ObjProto;\n\n // Constructor is a special case.\n var prop = 'constructor';\n if (has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);\n\n while (nonEnumIdx--) {\n prop = nonEnumerableProps[nonEnumIdx];\n if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {\n keys.push(prop);\n }\n }\n };\n\n // Retrieve the names of an object's own properties.\n // Delegates to **ECMAScript 5**'s native `Object.keys`.\n _.keys = function(obj) {\n if (!_.isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var keys = [];\n for (var key in obj) if (has(obj, key)) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve all the property names of an object.\n _.allKeys = function(obj) {\n if (!_.isObject(obj)) return [];\n var keys = [];\n for (var key in obj) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve the values of an object's properties.\n _.values = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[keys[i]];\n }\n return values;\n };\n\n // Returns the results of applying the iteratee to each element of the object.\n // In contrast to _.map it returns an object.\n _.mapObject = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = _.keys(obj),\n length = keys.length,\n results = {};\n for (var index = 0; index < length; index++) {\n var currentKey = keys[index];\n results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Convert an object into a list of `[key, value]` pairs.\n // The opposite of _.object.\n _.pairs = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var pairs = Array(length);\n for (var i = 0; i < length; i++) {\n pairs[i] = [keys[i], obj[keys[i]]];\n }\n return pairs;\n };\n\n // Invert the keys and values of an object. The values must be serializable.\n _.invert = function(obj) {\n var result = {};\n var keys = _.keys(obj);\n for (var i = 0, length = keys.length; i < length; i++) {\n result[obj[keys[i]]] = keys[i];\n }\n return result;\n };\n\n // Return a sorted list of the function names available on the object.\n // Aliased as `methods`.\n _.functions = _.methods = function(obj) {\n var names = [];\n for (var key in obj) {\n if (_.isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n };\n\n // An internal function for creating assigner functions.\n var createAssigner = function(keysFunc, defaults) {\n return function(obj) {\n var length = arguments.length;\n if (defaults) obj = Object(obj);\n if (length < 2 || obj == null) return obj;\n for (var index = 1; index < length; index++) {\n var source = arguments[index],\n keys = keysFunc(source),\n l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (!defaults || obj[key] === void 0) obj[key] = source[key];\n }\n }\n return obj;\n };\n };\n\n // Extend a given object with all the properties in passed-in object(s).\n _.extend = createAssigner(_.allKeys);\n\n // Assigns a given object with all the own properties in the passed-in object(s).\n // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\n _.extendOwn = _.assign = createAssigner(_.keys);\n\n // Returns the first key on an object that passes a predicate test.\n _.findKey = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = _.keys(obj), key;\n for (var i = 0, length = keys.length; i < length; i++) {\n key = keys[i];\n if (predicate(obj[key], key, obj)) return key;\n }\n };\n\n // Internal pick helper function to determine if `obj` has key `key`.\n var keyInObj = function(value, key, obj) {\n return key in obj;\n };\n\n // Return a copy of the object only containing the whitelisted properties.\n _.pick = restArguments(function(obj, keys) {\n var result = {}, iteratee = keys[0];\n if (obj == null) return result;\n if (_.isFunction(iteratee)) {\n if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);\n keys = _.allKeys(obj);\n } else {\n iteratee = keyInObj;\n keys = flatten(keys, false, false);\n obj = Object(obj);\n }\n for (var i = 0, length = keys.length; i < length; i++) {\n var key = keys[i];\n var value = obj[key];\n if (iteratee(value, key, obj)) result[key] = value;\n }\n return result;\n });\n\n // Return a copy of the object without the blacklisted properties.\n _.omit = restArguments(function(obj, keys) {\n var iteratee = keys[0], context;\n if (_.isFunction(iteratee)) {\n iteratee = _.negate(iteratee);\n if (keys.length > 1) context = keys[1];\n } else {\n keys = _.map(flatten(keys, false, false), String);\n iteratee = function(value, key) {\n return !_.contains(keys, key);\n };\n }\n return _.pick(obj, iteratee, context);\n });\n\n // Fill in a given object with default properties.\n _.defaults = createAssigner(_.allKeys, true);\n\n // Creates an object that inherits from the given prototype object.\n // If additional properties are provided then they will be added to the\n // created object.\n _.create = function(prototype, props) {\n var result = baseCreate(prototype);\n if (props) _.extendOwn(result, props);\n return result;\n };\n\n // Create a (shallow-cloned) duplicate of an object.\n _.clone = function(obj) {\n if (!_.isObject(obj)) return obj;\n return _.isArray(obj) ? obj.slice() : _.extend({}, obj);\n };\n\n // Invokes interceptor with the obj, and then returns obj.\n // The primary purpose of this method is to \"tap into\" a method chain, in\n // order to perform operations on intermediate results within the chain.\n _.tap = function(obj, interceptor) {\n interceptor(obj);\n return obj;\n };\n\n // Returns whether an object has a given set of `key:value` pairs.\n _.isMatch = function(object, attrs) {\n var keys = _.keys(attrs), length = keys.length;\n if (object == null) return !length;\n var obj = Object(object);\n for (var i = 0; i < length; i++) {\n var key = keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) return false;\n }\n return true;\n };\n\n\n // Internal recursive comparison function for `isEqual`.\n var eq, deepEq;\n eq = function(a, b, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n // `null` or `undefined` only equal to itself (strict comparison).\n if (a == null || b == null) return false;\n // `NaN`s are equivalent, but non-reflexive.\n if (a !== a) return b !== b;\n // Exhaust primitive checks\n var type = typeof a;\n if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;\n return deepEq(a, b, aStack, bStack);\n };\n\n // Internal recursive comparison function for `isEqual`.\n deepEq = function(a, b, aStack, bStack) {\n // Unwrap any wrapped objects.\n if (a instanceof _) a = a._wrapped;\n if (b instanceof _) b = b._wrapped;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n case '[object RegExp]':\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return '' + a === '' + b;\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN.\n if (+a !== +a) return +b !== +b;\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n case '[object Symbol]':\n return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);\n }\n\n var areArrays = className === '[object Array]';\n if (!areArrays) {\n if (typeof a != 'object' || typeof b != 'object') return false;\n\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&\n _.isFunction(bCtor) && bCtor instanceof bCtor)\n && ('constructor' in a && 'constructor' in b)) {\n return false;\n }\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n }\n\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false;\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var keys = _.keys(a), key;\n length = keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (_.keys(b).length !== length) return false;\n while (length--) {\n // Deep compare each member\n key = keys[length];\n if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n };\n\n // Perform a deep comparison to check if two objects are equal.\n _.isEqual = function(a, b) {\n return eq(a, b);\n };\n\n // Is a given array, string, or object empty?\n // An \"empty\" object has no enumerable own-properties.\n _.isEmpty = function(obj) {\n if (obj == null) return true;\n if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;\n return _.keys(obj).length === 0;\n };\n\n // Is a given value a DOM element?\n _.isElement = function(obj) {\n return !!(obj && obj.nodeType === 1);\n };\n\n // Is a given value an array?\n // Delegates to ECMA5's native Array.isArray\n _.isArray = nativeIsArray || function(obj) {\n return toString.call(obj) === '[object Array]';\n };\n\n // Is a given variable an object?\n _.isObject = function(obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object' && !!obj;\n };\n\n // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isMap, isWeakMap, isSet, isWeakSet.\n _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error', 'Symbol', 'Map', 'WeakMap', 'Set', 'WeakSet'], function(name) {\n _['is' + name] = function(obj) {\n return toString.call(obj) === '[object ' + name + ']';\n };\n });\n\n // Define a fallback version of the method in browsers (ahem, IE < 9), where\n // there isn't any inspectable \"Arguments\" type.\n if (!_.isArguments(arguments)) {\n _.isArguments = function(obj) {\n return has(obj, 'callee');\n };\n }\n\n // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,\n // IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).\n var nodelist = root.document && root.document.childNodes;\n if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {\n _.isFunction = function(obj) {\n return typeof obj == 'function' || false;\n };\n }\n\n // Is a given object a finite number?\n _.isFinite = function(obj) {\n return !_.isSymbol(obj) && isFinite(obj) && !isNaN(parseFloat(obj));\n };\n\n // Is the given value `NaN`?\n _.isNaN = function(obj) {\n return _.isNumber(obj) && isNaN(obj);\n };\n\n // Is a given value a boolean?\n _.isBoolean = function(obj) {\n return obj === true || obj === false || toString.call(obj) === '[object Boolean]';\n };\n\n // Is a given value equal to null?\n _.isNull = function(obj) {\n return obj === null;\n };\n\n // Is a given variable undefined?\n _.isUndefined = function(obj) {\n return obj === void 0;\n };\n\n // Shortcut function for checking if an object has a given property directly\n // on itself (in other words, not on a prototype).\n _.has = function(obj, path) {\n if (!_.isArray(path)) {\n return has(obj, path);\n }\n var length = path.length;\n for (var i = 0; i < length; i++) {\n var key = path[i];\n if (obj == null || !hasOwnProperty.call(obj, key)) {\n return false;\n }\n obj = obj[key];\n }\n return !!length;\n };\n\n // Utility Functions\n // -----------------\n\n // Run Underscore.js in *noConflict* mode, returning the `_` variable to its\n // previous owner. Returns a reference to the Underscore object.\n _.noConflict = function() {\n root._ = previousUnderscore;\n return this;\n };\n\n // Keep the identity function around for default iteratees.\n _.identity = function(value) {\n return value;\n };\n\n // Predicate-generating functions. Often useful outside of Underscore.\n _.constant = function(value) {\n return function() {\n return value;\n };\n };\n\n _.noop = function(){};\n\n // Creates a function that, when passed an object, will traverse that object’s\n // properties down the given `path`, specified as an array of keys or indexes.\n _.property = function(path) {\n if (!_.isArray(path)) {\n return shallowProperty(path);\n }\n return function(obj) {\n return deepGet(obj, path);\n };\n };\n\n // Generates a function for a given object that returns a given property.\n _.propertyOf = function(obj) {\n if (obj == null) {\n return function(){};\n }\n return function(path) {\n return !_.isArray(path) ? obj[path] : deepGet(obj, path);\n };\n };\n\n // Returns a predicate for checking whether an object has a given set of\n // `key:value` pairs.\n _.matcher = _.matches = function(attrs) {\n attrs = _.extendOwn({}, attrs);\n return function(obj) {\n return _.isMatch(obj, attrs);\n };\n };\n\n // Run a function **n** times.\n _.times = function(n, iteratee, context) {\n var accum = Array(Math.max(0, n));\n iteratee = optimizeCb(iteratee, context, 1);\n for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n return accum;\n };\n\n // Return a random integer between min and max (inclusive).\n _.random = function(min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n return min + Math.floor(Math.random() * (max - min + 1));\n };\n\n // A (possibly faster) way to get the current timestamp as an integer.\n _.now = Date.now || function() {\n return new Date().getTime();\n };\n\n // List of HTML entities for escaping.\n var escapeMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n };\n var unescapeMap = _.invert(escapeMap);\n\n // Functions for escaping and unescaping strings to/from HTML interpolation.\n var createEscaper = function(map) {\n var escaper = function(match) {\n return map[match];\n };\n // Regexes for identifying a key that needs to be escaped.\n var source = '(?:' + _.keys(map).join('|') + ')';\n var testRegexp = RegExp(source);\n var replaceRegexp = RegExp(source, 'g');\n return function(string) {\n string = string == null ? '' : '' + string;\n return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n };\n };\n _.escape = createEscaper(escapeMap);\n _.unescape = createEscaper(unescapeMap);\n\n // Traverses the children of `obj` along `path`. If a child is a function, it\n // is invoked with its parent as context. Returns the value of the final\n // child, or `fallback` if any child is undefined.\n _.result = function(obj, path, fallback) {\n if (!_.isArray(path)) path = [path];\n var length = path.length;\n if (!length) {\n return _.isFunction(fallback) ? fallback.call(obj) : fallback;\n }\n for (var i = 0; i < length; i++) {\n var prop = obj == null ? void 0 : obj[path[i]];\n if (prop === void 0) {\n prop = fallback;\n i = length; // Ensure we don't continue iterating.\n }\n obj = _.isFunction(prop) ? prop.call(obj) : prop;\n }\n return obj;\n };\n\n // Generate a unique integer id (unique within the entire client session).\n // Useful for temporary DOM ids.\n var idCounter = 0;\n _.uniqueId = function(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n };\n\n // By default, Underscore uses ERB-style template delimiters, change the\n // following template settings to use alternative delimiters.\n _.templateSettings = {\n evaluate: /<%([\\s\\S]+?)%>/g,\n interpolate: /<%=([\\s\\S]+?)%>/g,\n escape: /<%-([\\s\\S]+?)%>/g\n };\n\n // When customizing `templateSettings`, if you don't want to define an\n // interpolation, evaluation or escaping regex, we need one that is\n // guaranteed not to match.\n var noMatch = /(.)^/;\n\n // Certain characters need to be escaped so that they can be put into a\n // string literal.\n var escapes = {\n \"'\": \"'\",\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n var escapeRegExp = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\n var escapeChar = function(match) {\n return '\\\\' + escapes[match];\n };\n\n // JavaScript micro-templating, similar to John Resig's implementation.\n // Underscore templating handles arbitrary delimiters, preserves whitespace,\n // and correctly escapes quotes within interpolated code.\n // NB: `oldSettings` only exists for backwards compatibility.\n _.template = function(text, settings, oldSettings) {\n if (!settings && oldSettings) settings = oldSettings;\n settings = _.defaults({}, settings, _.templateSettings);\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g');\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0;\n var source = \"__p+='\";\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset).replace(escapeRegExp, escapeChar);\n index = offset + match.length;\n\n if (escape) {\n source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n } else if (interpolate) {\n source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n } else if (evaluate) {\n source += \"';\\n\" + evaluate + \"\\n__p+='\";\n }\n\n // Adobe VMs need the match returned to produce the correct offset.\n return match;\n });\n source += \"';\\n\";\n\n // If a variable is not specified, place data values in local scope.\n if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\n source = \"var __t,__p='',__j=Array.prototype.join,\" +\n \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n source + 'return __p;\\n';\n\n var render;\n try {\n render = new Function(settings.variable || 'obj', '_', source);\n } catch (e) {\n e.source = source;\n throw e;\n }\n\n var template = function(data) {\n return render.call(this, data, _);\n };\n\n // Provide the compiled source as a convenience for precompilation.\n var argument = settings.variable || 'obj';\n template.source = 'function(' + argument + '){\\n' + source + '}';\n\n return template;\n };\n\n // Add a \"chain\" function. Start chaining a wrapped Underscore object.\n _.chain = function(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n };\n\n // OOP\n // ---------------\n // If Underscore is called as a function, it returns a wrapped object that\n // can be used OO-style. This wrapper holds altered versions of all the\n // underscore functions. Wrapped objects may be chained.\n\n // Helper function to continue chaining intermediate results.\n var chainResult = function(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n };\n\n // Add your own custom functions to the Underscore object.\n _.mixin = function(obj) {\n _.each(_.functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n };\n\n // Add all of the Underscore functions to the wrapper object.\n _.mixin(_);\n\n // Add all mutator Array functions to the wrapper.\n _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n method.apply(obj, arguments);\n if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];\n return chainResult(this, obj);\n };\n });\n\n // Add all accessor Array functions to the wrapper.\n _.each(['concat', 'join', 'slice'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n return chainResult(this, method.apply(this._wrapped, arguments));\n };\n });\n\n // Extracts the result from a wrapped and chained object.\n _.prototype.value = function() {\n return this._wrapped;\n };\n\n // Provide unwrapping proxy for some methods used in engine operations\n // such as arithmetic and JSON stringification.\n _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;\n\n _.prototype.toString = function() {\n return String(this._wrapped);\n };\n\n // AMD registration happens at the end for compatibility with AMD loaders\n // that may not enforce next-turn semantics on modules. Even though general\n // practice for AMD registration is to be anonymous, underscore registers\n // as a named module because, like jQuery, it is a base library that is\n // popular enough to be bundled in a third party lib, but not be part of\n // an AMD load request. Those cases could generate an error when an\n // anonymous define() is called outside of a loader request.\n if (typeof define == 'function' && define.amd) {\n define('underscore', [], function() {\n return _;\n });\n }\n}());\n","import { omit, keys, isUndefined, isElement } from 'underscore';\n\nconst elProt = window.Element.prototype;\nconst matches =\n elProt.matches ||\n elProt.webkitMatchesSelector ||\n elProt.mozMatchesSelector ||\n elProt.msMatchesSelector;\n\n/**\n * Returns shallow diff between 2 objects\n * @param {Object} objOrig\n * @param {Objec} objNew\n * @return {Object}\n * @example\n * var a = {foo: 'bar', baz: 1, faz: 'sop'};\n * var b = {foo: 'bar', baz: 2, bar: ''};\n * shallowDiff(a, b);\n * // -> {baz: 2, faz: null, bar: ''};\n */\nconst shallowDiff = (objOrig, objNew) => {\n const result = {};\n const keysNew = keys(objNew);\n\n for (let prop in objOrig) {\n if (objOrig.hasOwnProperty(prop)) {\n const origValue = objOrig[prop];\n const newValue = objNew[prop];\n\n if (keysNew.indexOf(prop) >= 0) {\n if (origValue !== newValue) {\n result[prop] = newValue;\n }\n } else {\n result[prop] = null;\n }\n }\n }\n\n for (let prop in objNew) {\n if (objNew.hasOwnProperty(prop)) {\n if (isUndefined(objOrig[prop])) {\n result[prop] = objNew[prop];\n }\n }\n }\n\n return result;\n};\n\nconst on = (el, ev, fn) => {\n ev = ev.split(/\\s+/);\n el = el instanceof Array ? el : [el];\n\n for (let i = 0; i < ev.length; ++i) {\n el.forEach(elem => elem.addEventListener(ev[i], fn));\n }\n};\n\nconst off = (el, ev, fn) => {\n ev = ev.split(/\\s+/);\n el = el instanceof Array ? el : [el];\n\n for (let i = 0; i < ev.length; ++i) {\n el.forEach(elem => elem.removeEventListener(ev[i], fn));\n }\n};\n\nconst getUnitFromValue = value => {\n return value.replace(parseFloat(value), '');\n};\n\nconst upFirst = value => value[0].toUpperCase() + value.toLowerCase().slice(1);\n\nconst camelCase = value => {\n const values = value.split('-');\n return values[0].toLowerCase() + values.slice(1).map(upFirst);\n};\n\nconst normalizeFloat = (value, step = 1, valueDef = 0) => {\n let stepDecimals = 0;\n if (isNaN(value)) return valueDef;\n value = parseFloat(value);\n\n if (Math.floor(value) !== value) {\n const side = step.toString().split('.')[1];\n stepDecimals = side ? side.length : 0;\n }\n\n return stepDecimals ? parseFloat(value.toFixed(stepDecimals)) : value;\n};\n\nconst hasDnd = em => {\n return (\n 'draggable' in document.createElement('i') &&\n (em ? em.get('Config').nativeDnD : 1)\n );\n};\n\n/**\n * Ensure to fetch the element from the input argument\n * @param {HTMLElement|Component} el Component or HTML element\n * @return {HTMLElement}\n */\nconst getElement = el => {\n if (isElement(el)) {\n return el;\n } else if (el && el.getEl) {\n return el.getEl();\n }\n};\n\n/**\n * Ensure to fetch the model from the input argument\n * @param {HTMLElement|Component} el Component or HTML element\n * @return {Component}\n */\nconst getModel = (el, $) => {\n let model = el;\n isElement(el) && (model = $(el).data('model'));\n return model;\n};\n\nexport {\n on,\n off,\n hasDnd,\n upFirst,\n matches,\n getModel,\n camelCase,\n getElement,\n shallowDiff,\n normalizeFloat,\n getUnitFromValue\n};\n","import Backbone from 'backbone';\nimport { isArray, isEmpty } from 'underscore';\n\nconst ComponentsView = require('./ComponentsView');\n\nmodule.exports = Backbone.View.extend({\n className() {\n return this.getClasses();\n },\n\n tagName() {\n return this.model.get('tagName');\n },\n\n initialize(opt = {}) {\n const model = this.model;\n const config = opt.config || {};\n this.opts = opt;\n this.config = config;\n this.em = config.em || '';\n this.pfx = config.stylePrefix || '';\n this.ppfx = config.pStylePrefix || '';\n this.attr = model.get('attributes');\n this.classe = this.attr.class || [];\n const $el = this.$el;\n const classes = model.get('classes');\n this.listenTo(model, 'change:style', this.updateStyle);\n this.listenTo(model, 'change:attributes', this.updateAttributes);\n this.listenTo(model, 'change:highlightable', this.updateHighlight);\n this.listenTo(model, 'change:status', this.updateStatus);\n this.listenTo(model, 'change:state', this.updateState);\n this.listenTo(model, 'change:script', this.render);\n this.listenTo(model, 'change:content', this.updateContent);\n this.listenTo(model, 'change', this.handleChange);\n this.listenTo(model, 'active', this.onActive);\n this.listenTo(classes, 'add remove change', this.updateClasses);\n $el.data('model', model);\n $el.data('collection', model.get('components'));\n model.view = this;\n classes.length && this.importClasses();\n this.init();\n },\n\n /**\n * Initialize callback\n */\n init() {},\n\n /**\n * Callback executed when the `active` event is triggered on component\n */\n onActive() {},\n\n /**\n * Handle any property change\n * @private\n */\n handleChange() {\n const model = this.model;\n model.emitUpdate();\n\n for (let prop in model.changed) {\n model.emitUpdate(prop);\n }\n },\n\n /**\n * Import, if possible, classes inside main container\n * @private\n * */\n importClasses() {\n var clm = this.config.em.get('SelectorManager');\n\n if (clm) {\n this.model.get('classes').each(m => {\n clm.add(m.get('name'));\n });\n }\n },\n\n /**\n * Fires on state update. If the state is not empty will add a helper class\n * @param {Event} e\n * @private\n * */\n updateState(e) {\n var cl = 'hc-state';\n var state = this.model.get('state');\n\n if (state) {\n this.$el.addClass(cl);\n } else {\n this.$el.removeClass(cl);\n }\n },\n\n /**\n * Update item on status change\n * @param {Event} e\n * @private\n * */\n updateStatus(opts = {}) {\n const em = this.em;\n const el = this.el;\n const status = this.model.get('status');\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const selectedCls = `${pfx}selected`;\n const selectedParentCls = `${selectedCls}-parent`;\n const freezedCls = `${ppfx}freezed`;\n const hoveredCls = `${ppfx}hovered`;\n const toRemove = [selectedCls, selectedParentCls, freezedCls, hoveredCls];\n this.$el.removeClass(toRemove.join(' '));\n var actualCls = el.getAttribute('class') || '';\n var cls = '';\n\n switch (status) {\n case 'selected':\n cls = `${actualCls} ${selectedCls}`;\n break;\n case 'selected-parent':\n cls = `${actualCls} ${selectedParentCls}`;\n break;\n case 'freezed':\n cls = `${actualCls} ${freezedCls}`;\n break;\n case 'freezed-selected':\n cls = `${actualCls} ${freezedCls} ${selectedCls}`;\n break;\n case 'hovered':\n cls = !opts.avoidHover ? `${actualCls} ${hoveredCls}` : '';\n break;\n }\n\n cls = cls.trim();\n cls && el.setAttribute('class', cls);\n },\n\n /**\n * Update highlight attribute\n * @private\n * */\n updateHighlight() {\n const hl = this.model.get('highlightable');\n this.setAttribute('data-highlightable', hl ? 1 : '');\n },\n\n /**\n * Update style attribute\n * @private\n * */\n updateStyle() {\n const em = this.em;\n const model = this.model;\n\n if (em && em.get('avoidInlineStyle')) {\n this.el.id = model.getId();\n const style = model.getStyle();\n !isEmpty(style) && model.setStyle(style);\n } else {\n this.setAttribute('style', model.styleToString());\n }\n },\n\n /**\n * Update classe attribute\n * @private\n * */\n updateClasses() {\n const str = this.model\n .get('classes')\n .pluck('name')\n .join(' ');\n this.setAttribute('class', str);\n\n // Regenerate status class\n this.updateStatus();\n },\n\n /**\n * Update single attribute\n * @param {[type]} name [description]\n * @param {[type]} value [description]\n */\n setAttribute(name, value) {\n const el = this.$el;\n value ? el.attr(name, value) : el.removeAttr(name);\n },\n\n /**\n * Get classes from attributes.\n * This method is called before initialize\n *\n * @return {Array}|null\n * @private\n * */\n getClasses() {\n var attr = this.model.get('attributes'),\n classes = attr['class'] || [];\n classes = isArray(classes) ? classes : [classes];\n\n if (classes.length) {\n return classes.join(' ');\n } else {\n return null;\n }\n },\n\n /**\n * Update attributes\n * @private\n * */\n updateAttributes() {\n const model = this.model;\n const attrs = { 'data-gjs-type': model.get('type') || 'default' };\n const attr = model.get('attributes');\n const src = model.get('src');\n\n for (let key in attr) {\n attrs[key] = attr[key];\n }\n\n src && (attrs.src = src);\n this.$el.attr(attrs);\n this.updateHighlight();\n this.updateStyle();\n },\n\n /**\n * Update component content\n * @private\n * */\n updateContent() {\n this.getChildrenContainer().innerHTML = this.model.get('content');\n },\n\n /**\n * Prevent default helper\n * @param {Event} e\n * @private\n */\n prevDef(e) {\n e.preventDefault();\n },\n\n /**\n * Render component's script\n * @private\n */\n updateScript() {\n if (!this.model.get('script')) {\n return;\n }\n\n var em = this.em;\n if (em) {\n var canvas = em.get('Canvas');\n canvas.getCanvasView().updateScript(this);\n }\n },\n\n /**\n * Return children container\n * Differently from a simple component where children container is the\n * component itself\n * \n * \n * \n * You could have the children container more deeper\n * \n *
\n *
\n *
\n *
\n * \n *
\n *
\n *
\n * @return HTMLElement\n * @private\n */\n getChildrenContainer() {\n var container = this.el;\n\n if (typeof this.getChildrenSelector == 'function') {\n container = this.el.querySelector(this.getChildrenSelector());\n } else if (typeof this.getTemplate == 'function') {\n // Need to find deepest first child\n }\n\n return container;\n },\n\n /**\n * Render children components\n * @private\n */\n renderChildren() {\n const container = this.getChildrenContainer();\n const view = new ComponentsView({\n collection: this.model.get('components'),\n config: this.config,\n componentTypes: this.opts.componentTypes\n });\n\n view.render(container);\n this.childrenView = view;\n const childNodes = Array.prototype.slice.call(view.el.childNodes);\n\n for (var i = 0, len = childNodes.length; i < len; i++) {\n container.appendChild(childNodes.shift());\n }\n\n // If the children container is not the same as the component\n // (so likely fetched with getChildrenSelector()) is necessary\n // to disable pointer-events for all nested components as they\n // might prevent the component to be selected\n if (container !== this.el) {\n var disableNode = el => {\n var children = Array.prototype.slice.call(el.children);\n children.forEach(el => {\n el.style['pointer-events'] = 'none';\n if (container !== el) {\n disableNode(el);\n }\n });\n };\n disableNode(this.el);\n }\n },\n\n renderAttributes() {\n this.updateAttributes();\n this.updateClasses();\n },\n\n render() {\n this.renderAttributes();\n this.updateContent();\n this.renderChildren();\n this.updateScript();\n this.onRender();\n return this;\n },\n\n onRender() {}\n});\n","import {\n isUndefined,\n isFunction,\n isObject,\n isArray,\n isEmpty,\n isBoolean,\n has,\n clone,\n isString,\n forEach,\n result,\n keys\n} from 'underscore';\nimport { shallowDiff, hasDnd } from 'utils/mixins';\nimport Styleable from 'domain_abstract/model/Styleable';\n\nconst Backbone = require('backbone');\nconst Components = require('./Components');\nconst Selector = require('selector_manager/model/Selector');\nconst Selectors = require('selector_manager/model/Selectors');\nconst Traits = require('trait_manager/model/Traits');\nconst componentList = {};\nlet componentIndex = 0;\n\nconst escapeRegExp = str => {\n return str.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n};\n\nconst avoidInline = em => em && em.getConfig('avoidInlineStyle');\n\nconst Component = Backbone.Model.extend(Styleable).extend(\n {\n defaults: {\n // HTML tag of the component\n tagName: 'div',\n\n // Component type, eg. 'text', 'image', 'video', etc.\n type: '',\n\n // Name of the component. Will be used, for example, in layers and badges\n name: '',\n\n // True if the component is removable from the canvas\n removable: true,\n\n // Indicates if it's possible to drag the component inside others\n // Tip: Indicate an array of selectors where it could be dropped inside\n draggable: true,\n\n // Indicates if it's possible to drop other components inside\n // Tip: Indicate an array of selectors which could be dropped inside\n droppable: true,\n\n // Set false if don't want to see the badge (with the name) over the component\n badgable: true,\n\n // True if it's possible to style it\n // Tip:\n // Indicate an array of CSS properties which is possible to style, eg. ['color', 'width']\n // All other properties will be hidden from the style manager\n stylable: true,\n\n // Indicate an array of style properties to show up which has been marked as `toRequire`\n 'stylable-require': '',\n\n // Indicate an array of style properties which should be hidden from the style manager\n unstylable: '',\n\n // Highlightable with 'dotted' style if true\n highlightable: true,\n\n // True if it's possible to clone the component\n copyable: true,\n\n // Indicates if it's possible to resize the component (at the moment implemented only on Image Components)\n // It's also possible to pass an object as options for the Resizer\n resizable: false,\n\n // Allow to edit the content of the component (used on Text components)\n editable: false,\n\n // Hide the component inside Layers\n layerable: true,\n\n // Allow component to be selected when clicked\n selectable: true,\n\n // Shows a highlight outline when hovering on the element if true\n hoverable: true,\n\n // This property is used by the HTML exporter as void elements do not\n // have closing tag, eg.
,
, etc.\n void: false,\n\n // Indicates if the component is in some CSS state like ':hover', ':active', etc.\n state: '',\n\n // State, eg. 'selected'\n status: '',\n\n // Content of the component (not escaped) which will be appended before children rendering\n content: '',\n\n // Component icon, this string will be inserted before the name, eg. ''\n icon: '',\n\n // Component related style\n style: '',\n\n // Key-value object of the component's attributes\n attributes: '',\n\n // Array of classes\n classes: '',\n\n // Component's javascript\n script: '',\n\n // Traits\n traits: ['id', 'title'],\n\n // Indicates an array of properties which will be inhereted by\n // all NEW appended children\n //\n // If you create a model likes this\n // removable: false,\n // draggable: false,\n // propagate: ['removable', 'draggable']\n // When you append some new component inside, the new added model\n // will get the exact same properties indicated in `propagate` array\n // (as the `propagate` property itself)\n //\n propagate: '',\n\n /**\n * Set an array of items to show up inside the toolbar (eg. move, clone, delete)\n * when the component is selected\n * toolbar: [{\n * attributes: {class: 'fa fa-arrows'},\n * command: 'tlb-move',\n * },{\n * attributes: {class: 'fa fa-clone'},\n * command: 'tlb-clone',\n * }]\n */\n toolbar: null\n },\n\n initialize(props = {}, opt = {}) {\n const em = opt.em;\n\n // Propagate properties from parent if indicated\n const parent = this.parent();\n const parentAttr = parent && parent.attributes;\n\n if (parentAttr && parentAttr.propagate) {\n let newAttr = {};\n const toPropagate = parentAttr.propagate;\n toPropagate.forEach(prop => (newAttr[prop] = parent.get(prop)));\n newAttr.propagate = toPropagate;\n newAttr = { ...newAttr, ...props };\n this.set(newAttr);\n }\n\n const propagate = this.get('propagate');\n propagate &&\n this.set('propagate', isArray(propagate) ? propagate : [propagate]);\n\n // Check void elements\n if (\n opt &&\n opt.config &&\n opt.config.voidElements.indexOf(this.get('tagName')) >= 0\n ) {\n this.set('void', true);\n }\n\n opt.em = em;\n this.opt = opt;\n this.em = em;\n this.config = opt.config || {};\n this.ccid = Component.createId(this);\n this.set('attributes', this.get('attributes') || {});\n this.listenTo(this, 'change:script', this.scriptUpdated);\n this.listenTo(this, 'change:traits', this.traitsUpdated);\n this.listenTo(this, 'change:tagName', this.tagUpdated);\n this.listenTo(this, 'change:attributes', this.attrUpdated);\n this.initClasses();\n this.loadTraits();\n this.initComponents();\n this.initToolbar();\n this.set('status', '');\n\n // Register global updates for collection properties\n ['classes', 'traits'].forEach(name =>\n this.listenTo(this.get(name), 'add remove change', () =>\n this.emitUpdate(name)\n )\n );\n this.init();\n },\n\n /**\n * Check component's type\n * @param {string} type Component type\n * @return {Boolean}\n * @example\n * model.is('image')\n * // -> false\n */\n is(type) {\n return !!(this.get('type') == type);\n },\n\n /**\n * Find inner models by query string\n * ATTENTION: this method works only with alredy rendered component\n * @param {string} query Query string\n * @return {Array} Array of models\n * @example\n * model.find('div > .class');\n * // -> [Component, Component, ...]\n */\n find(query) {\n const result = [];\n\n this.view.$el.find(query).each((el, i, $els) => {\n const $el = $els.eq(i);\n const model = $el.data('model');\n model && result.push(model);\n });\n\n return result;\n },\n\n /**\n * Find closest model by query string\n * ATTENTION: this method works only with alredy rendered component\n * @param {string} query Query string\n * @return {Component}\n * @example\n * model.closest('div');\n */\n closest(query) {\n const result = this.view.$el.closest(query);\n return result.length && result.data('model');\n },\n\n /**\n * Once the tag is updated I have to remove the node and replace it\n */\n tagUpdated() {\n const coll = this.collection;\n const at = coll.indexOf(this);\n coll.remove(this);\n coll.add(this, { at });\n },\n\n /**\n * Replace a component with another one\n * @param {String|Component} el Component or HTML string\n * @return {Array|Component} New added component/s\n * @private\n */\n replaceWith(el) {\n const coll = this.collection;\n const at = coll.indexOf(this);\n coll.remove(this);\n return coll.add(el, { at });\n },\n\n /**\n * Emit changes for each updated attribute\n */\n attrUpdated() {\n const attrPrev = { ...this.previous('attributes') };\n const attrCurrent = { ...this.get('attributes') };\n const diff = shallowDiff(attrPrev, attrCurrent);\n keys(diff).forEach(pr => this.trigger(`change:attributes:${pr}`));\n },\n\n /**\n * Update attributes of the model\n * @param {Object} attrs Key value attributes\n * @example\n * model.setAttributes({id: 'test', 'data-key': 'value'});\n */\n setAttributes(attrs) {\n attrs = { ...attrs };\n\n // Handle classes\n const classes = attrs.class;\n classes && this.setClass(classes);\n delete attrs.class;\n\n // Handle style\n const style = attrs.style;\n style && this.setStyle(style);\n delete attrs.style;\n\n this.set('attributes', attrs);\n },\n\n /**\n * Add attributes to the model\n * @param {Object} attrs Key value attributes\n * @example\n * model.addAttributes({id: 'test'});\n */\n addAttributes(attrs) {\n const newAttrs = { ...this.getAttributes(), ...attrs };\n this.setAttributes(newAttrs);\n },\n\n getStyle() {\n const em = this.em;\n\n if (em && em.getConfig('avoidInlineStyle')) {\n const state = this.get('state');\n const cc = em.get('CssComposer');\n const rule = cc.getIdRule(this.getId(), { state });\n this.rule = rule;\n\n if (rule) {\n return rule.getStyle();\n }\n }\n\n return Styleable.getStyle.call(this);\n },\n\n setStyle(prop = {}, opts = {}) {\n const em = this.em;\n\n if (em && em.getConfig('avoidInlineStyle')) {\n prop = isString(prop) ? this.parseStyle(prop) : prop;\n prop = { ...prop, ...this.get('style') };\n const state = this.get('state');\n const cc = em.get('CssComposer');\n const propOrig = this.getStyle();\n this.rule = cc.setIdRule(this.getId(), prop, { ...opts, state });\n const diff = shallowDiff(propOrig, prop);\n this.set('style', {}, { silent: 1 });\n keys(diff).forEach(pr => this.trigger(`change:style:${pr}`));\n } else {\n prop = Styleable.setStyle.apply(this, arguments);\n }\n\n return prop;\n },\n\n /**\n * Return attributes\n * @return {Object}\n */\n getAttributes() {\n const { em } = this;\n const classes = [];\n const attributes = { ...this.get('attributes') };\n const sm = em && em.get('SelectorManager');\n const id = this.getId();\n\n // Add classes\n this.get('classes').each(cls => classes.push(cls.get('name')));\n classes.length && (attributes.class = classes.join(' '));\n\n // Check if we need an ID on the component\n if (!has(attributes, 'id')) {\n let hasStyle;\n\n // If we don't rely on inline styling we have to check\n // for the ID selector\n if (avoidInline(em)) {\n hasStyle = sm && sm.get(id, sm.Selector.TYPE_ID);\n } else if (!isEmpty(this.getStyle())) {\n hasStyle = 1;\n }\n\n if (hasStyle) {\n attributes.id = this.getId();\n }\n }\n\n return attributes;\n },\n\n /**\n * Add classes\n * @param {Array|string} classes Array or string of classes\n * @return {Array} Array of added selectors\n * @example\n * model.addClass('class1');\n * model.addClass('class1 class2');\n * model.addClass(['class1', 'class2']);\n * // -> [SelectorObject, ...]\n */\n addClass(classes) {\n const added = this.em.get('SelectorManager').addClass(classes);\n return this.get('classes').add(added);\n },\n\n /**\n * Set classes (resets current collection)\n * @param {Array|string} classes Array or string of classes\n * @return {Array} Array of added selectors\n * @example\n * model.setClass('class1');\n * model.setClass('class1 class2');\n * model.setClass(['class1', 'class2']);\n * // -> [SelectorObject, ...]\n */\n setClass(classes) {\n this.get('classes').reset();\n return this.addClass(classes);\n },\n\n /**\n * Remove classes\n * @param {Array|string} classes Array or string of classes\n * @return {Array} Array of removed selectors\n * @example\n * model.removeClass('class1');\n * model.removeClass('class1 class2');\n * model.removeClass(['class1', 'class2']);\n * // -> [SelectorObject, ...]\n */\n removeClass(classes) {\n const removed = [];\n classes = isArray(classes) ? classes : [classes];\n const selectors = this.get('classes');\n const type = Selector.TYPE_CLASS;\n\n classes.forEach(classe => {\n const classes = classe.split(' ');\n classes.forEach(name => {\n const selector = selectors.where({ name, type })[0];\n selector && removed.push(selectors.remove(selector));\n });\n });\n\n return removed;\n },\n\n initClasses() {\n const classes = this.normalizeClasses(this.get('classes') || []);\n this.set('classes', new Selectors(classes));\n return this;\n },\n\n initComponents() {\n // Have to add components after the init, otherwise the parent\n // is not visible\n const comps = new Components(null, this.opt);\n comps.parent = this;\n !this.opt.avoidChildren && comps.reset(this.get('components'));\n this.set('components', comps);\n return this;\n },\n\n /**\n * Initialize callback\n */\n init() {},\n\n /**\n * Add new component children\n * @param {Component|string} components Component to add\n * @param {Object} [opts={}] Options, same as in `model.add()`(from backbone)\n * @return {Array} Array of appended components\n * @example\n * someModel.get('components').length // -> 0\n * const videoComponent = someModel.append('
')[0];\n * // This will add 2 components (`video` and `div`) to your `someModel`\n * someModel.get('components').length // -> 2\n * // You can pass components directly\n * otherModel.append(otherModel2);\n * otherModel.append([otherModel3, otherModel4]);\n */\n append(components, opts = {}) {\n const result = this.components().add(components, opts);\n return isArray(result) ? result : [result];\n },\n\n /**\n * Set new collection if `components` are provided, otherwise the\n * current collection is returned\n * @param {Component|string} [components] Components to set\n * @return {Collection|undefined}\n * @example\n * // Get current collection\n * const collection = model.components();\n * // Set new collection\n * model.components('
');\n */\n components(components) {\n const coll = this.get('components');\n\n if (isUndefined(components)) {\n return coll;\n } else {\n coll.reset();\n components && this.append(components);\n }\n },\n\n /**\n * Get parent model\n * @return {Component}\n */\n parent() {\n const coll = this.collection;\n return coll && coll.parent;\n },\n\n /**\n * Script updated\n */\n scriptUpdated() {\n this.set('scriptUpdated', 1);\n },\n\n /**\n * Once traits are updated I have to populates model's attributes\n */\n traitsUpdated() {\n let found = 0;\n const attrs = { ...this.get('attributes') };\n const traits = this.get('traits');\n\n if (!(traits instanceof Traits)) {\n this.loadTraits();\n return;\n }\n\n traits.each(trait => {\n found = 1;\n if (!trait.get('changeProp')) {\n const name = trait.get('name');\n const value = trait.getInitValue();\n if (name && value) {\n attrs[name] = value;\n }\n }\n });\n\n found && this.set('attributes', attrs);\n },\n\n /**\n * Init toolbar\n */\n initToolbar() {\n var model = this;\n if (!model.get('toolbar')) {\n var tb = [];\n if (model.collection) {\n tb.push({\n attributes: { class: 'fa fa-arrow-up' },\n command: 'select-parent'\n });\n }\n if (model.get('draggable')) {\n tb.push({\n attributes: { class: 'fa fa-arrows', draggable: true },\n //events: hasDnd(this.em) ? { dragstart: 'execCommand' } : '',\n command: 'tlb-move'\n });\n }\n if (model.get('copyable')) {\n tb.push({\n attributes: { class: 'fa fa-clone' },\n command: 'tlb-clone'\n });\n }\n if (model.get('removable')) {\n tb.push({\n attributes: { class: 'fa fa-trash-o' },\n command: 'tlb-delete'\n });\n }\n model.set('toolbar', tb);\n }\n },\n\n /**\n * Load traits\n * @param {Array} traits\n * @private\n */\n loadTraits(traits, opts = {}) {\n var trt = new Traits([], this.opt);\n trt.setTarget(this);\n traits = traits || this.get('traits');\n\n if (traits.length) {\n trt.add(traits);\n }\n\n this.set('traits', trt, opts);\n return this;\n },\n\n /**\n * Normalize input classes from array to array of objects\n * @param {Array} arr\n * @return {Array}\n * @private\n */\n normalizeClasses(arr) {\n var res = [];\n const em = this.em;\n\n if (!em) return;\n\n var clm = em.get('SelectorManager');\n if (!clm) return;\n\n arr.forEach(val => {\n var name = '';\n\n if (typeof val === 'string') name = val;\n else name = val.name;\n\n var model = clm.add(name);\n res.push(model);\n });\n return res;\n },\n\n /**\n * Override original clone method\n * @private\n */\n clone() {\n const em = this.em;\n const style = this.getStyle();\n const attr = { ...this.attributes };\n const opts = { ...this.opt };\n attr.attributes = { ...attr.attributes };\n delete attr.attributes.id;\n attr.components = [];\n attr.classes = [];\n attr.traits = [];\n\n this.get('components').each((md, i) => {\n attr.components[i] = md.clone();\n });\n this.get('traits').each((md, i) => {\n attr.traits[i] = md.clone();\n });\n this.get('classes').each((md, i) => {\n attr.classes[i] = md.get('name');\n });\n\n attr.status = '';\n attr.view = '';\n opts.collection = null;\n\n if (em && em.getConfig('avoidInlineStyle') && !isEmpty(style)) {\n attr.style = style;\n }\n\n return new this.constructor(\n attr,\n opts\n );\n },\n\n /**\n * Get the name of the component\n * @return {string}\n * */\n getName() {\n let customName = this.get('name') || this.get('custom-name');\n let tag = this.get('tagName');\n tag = tag == 'div' ? 'box' : tag;\n let name = this.get('type') || tag;\n name = name.charAt(0).toUpperCase() + name.slice(1);\n return customName || name;\n },\n\n /**\n * Get the icon string\n * @return {string}\n */\n getIcon() {\n let icon = this.get('icon');\n return icon ? icon + ' ' : '';\n },\n\n /**\n * Return HTML string of the component\n * @param {Object} opts Options\n * @return {string} HTML string\n * @private\n */\n toHTML(opts = {}) {\n const model = this;\n const attrs = [];\n const classes = [];\n const tag = model.get('tagName');\n const sTag = model.get('void');\n const customAttr = opts.attributes;\n let attributes = this.getAttrToHTML();\n\n // Get custom attributes if requested\n if (customAttr) {\n if (isFunction(customAttr)) {\n attributes = customAttr(model, attributes) || {};\n } else if (isObject(customAttr)) {\n attributes = customAttr;\n }\n }\n\n for (let attr in attributes) {\n const val = attributes[attr];\n const value = isString(val) ? val.replace(/\"/g, '"') : val;\n\n if (!isUndefined(value)) {\n if (isBoolean(value)) {\n value && attrs.push(attr);\n } else {\n attrs.push(`${attr}=\"${value}\"`);\n }\n }\n }\n\n let attrString = attrs.length ? ` ${attrs.join(' ')}` : '';\n let code = `<${tag}${attrString}${sTag ? '/' : ''}>${model.get(\n 'content'\n )}`;\n model.get('components').each(comp => (code += comp.toHTML(opts)));\n !sTag && (code += ``);\n\n return code;\n },\n\n /**\n * Returns object of attributes for HTML\n * @return {Object}\n * @private\n */\n getAttrToHTML() {\n var attr = this.getAttributes();\n delete attr.style;\n return attr;\n },\n\n /**\n * Return a shallow copy of the model's attributes for JSON\n * stringification.\n * @return {Object}\n * @private\n */\n toJSON(...args) {\n const obj = Backbone.Model.prototype.toJSON.apply(this, args);\n obj.attributes = this.getAttributes();\n delete obj.attributes.class;\n delete obj.toolbar;\n\n if (this.em.getConfig('avoidDefaults')) {\n const defaults = result(this, 'defaults');\n\n forEach(defaults, (value, key) => {\n if (['type', 'content'].indexOf(key) === -1 && obj[key] === value) {\n delete obj[key];\n }\n });\n\n if (isEmpty(obj.type)) {\n delete obj.type;\n }\n\n forEach(['attributes', 'style'], prop => {\n if (isEmpty(defaults[prop]) && isEmpty(obj[prop])) {\n delete obj[prop];\n }\n });\n\n forEach(['classes', 'components'], prop => {\n if (isEmpty(defaults[prop]) && !obj[prop].length) {\n delete obj[prop];\n }\n });\n }\n\n return obj;\n },\n\n /**\n * Return model id\n * @return {string}\n */\n getId() {\n let attrs = this.get('attributes') || {};\n return attrs.id || this.ccid || this.cid;\n },\n\n /**\n * Return model id\n * @param {String} id\n * @return {self}\n */\n setId(id) {\n const attrs = { ...this.get('attributes') };\n attrs.id = id;\n this.set('attributes', attrs);\n return this;\n },\n\n /**\n * Get the DOM element of the model. This works only of the\n * model is alredy rendered\n * @return {HTMLElement}\n */\n getEl() {\n return this.view && this.view.el;\n },\n\n /**\n * Return script in string format, cleans 'function() {..' from scripts\n * if it's a function\n * @param {string|Function} script\n * @return {string}\n * @private\n */\n getScriptString(script) {\n var scr = script || this.get('script');\n\n if (!scr) {\n return scr;\n }\n\n // Need to convert script functions to strings\n if (typeof scr == 'function') {\n var scrStr = scr.toString().trim();\n scrStr = scrStr\n .replace(/^function[\\s\\w]*\\(\\)\\s?\\{/, '')\n .replace(/\\}$/, '');\n scr = scrStr.trim();\n }\n\n var config = this.em.getConfig();\n var tagVarStart = escapeRegExp(config.tagVarStart || '{[ ');\n var tagVarEnd = escapeRegExp(config.tagVarEnd || ' ]}');\n var reg = new RegExp(`${tagVarStart}([\\\\w\\\\d-]*)${tagVarEnd}`, 'g');\n scr = scr.replace(reg, (match, v) => {\n // If at least one match is found I have to track this change for a\n // better optimization inside JS generator\n this.scriptUpdated();\n return this.attributes[v] || '';\n });\n\n return scr;\n },\n\n emitUpdate(property) {\n const em = this.em;\n const event = 'component:update' + (property ? `:${property}` : '');\n em && em.trigger(event, this);\n },\n\n /**\n * Execute callback function on all components\n * @param {Function} clb Callback function, the model is passed as an argument\n * @return {self}\n */\n onAll(clb) {\n if (isFunction(clb)) {\n clb(this);\n this.components().forEach(model => model.onAll(clb));\n }\n return this;\n },\n\n /**\n * Reset id of the component and any of its style rule\n * @param {Object} [opts={}] Options\n * @return {self}\n */\n resetId(opts = {}) {\n const { em } = this;\n const oldId = this.getId();\n if (!oldId) return;\n const newId = Component.createId(this);\n this.setId(newId);\n const rule = em && em.get('CssComposer').getIdRule(oldId);\n const selector = rule && rule.get('selectors').at(0);\n selector && selector.set('name', newId);\n return this;\n }\n },\n {\n /**\n * Detect if the passed element is a valid component.\n * In case the element is valid an object abstracted\n * from the element will be returned\n * @param {HTMLElement}\n * @return {Object}\n * @private\n */\n isComponent(el) {\n return { tagName: el.tagName ? el.tagName.toLowerCase() : '' };\n },\n\n /**\n * Relying simply on the number of components becomes a problem when you\n * store and load them back, you might hit collisions with new components\n * @param {Model} model\n * @return {string}\n */\n createId(model) {\n componentIndex++;\n // Testing 1000000 components with `+ 2` returns 0 collisions\n const ilen = componentIndex.toString().length + 2;\n const uid = (Math.random() + 1.1).toString(36).slice(-ilen);\n const nextId = 'i' + uid;\n componentList[nextId] = model;\n return nextId;\n },\n\n getList() {\n return componentList;\n }\n }\n);\n\nmodule.exports = Component;\n","import Backbone from 'backbone';\nimport { bindAll, isArray, isUndefined } from 'underscore';\nimport { camelCase } from 'utils/mixins';\n\nconst clearProp = 'data-clear-style';\n\nmodule.exports = Backbone.View.extend({\n template(model) {\n const pfx = this.pfx;\n return `\n
\n ${this.templateLabel(model)}\n
\n
\n ${this.templateInput(model)}\n
\n `;\n },\n\n templateLabel(model) {\n const pfx = this.pfx;\n const icon = model.get('icon');\n const info = model.get('info');\n return `\n \n ${model.get('name')}\n \n \n `;\n },\n\n templateInput(model) {\n return `\n
\n \n
\n `;\n },\n\n events: {\n change: 'inputValueChanged',\n [`click [${clearProp}]`]: 'clear'\n },\n\n initialize(o = {}) {\n bindAll(this, 'targetUpdated');\n this.config = o.config || {};\n const em = this.config.em;\n this.em = em;\n this.pfx = this.config.stylePrefix || '';\n this.ppfx = this.config.pStylePrefix || '';\n this.target = o.target || {};\n this.propTarget = o.propTarget || {};\n this.onChange = o.onChange;\n this.onInputRender = o.onInputRender || {};\n this.customValue = o.customValue || {};\n const model = this.model;\n this.property = model.get('property');\n this.input = null;\n const pfx = this.pfx;\n this.inputHolderId = '#' + pfx + 'input-holder';\n this.sector = model.collection && model.collection.sector;\n model.view = this;\n\n if (!model.get('value')) {\n model.set('value', model.getDefaultValue());\n }\n\n em && em.on(`update:component:style:${this.property}`, this.targetUpdated);\n //em && em.on(`styleable:change:${this.property}`, this.targetUpdated);\n this.listenTo(this.propTarget, 'update', this.targetUpdated);\n this.listenTo(model, 'destroy remove', this.remove);\n this.listenTo(model, 'change:value', this.modelValueChanged);\n this.listenTo(model, 'targetUpdated', this.targetUpdated);\n this.listenTo(model, 'change:visible', this.updateVisibility);\n this.listenTo(model, 'change:status', this.updateStatus);\n\n const init = this.init && this.init.bind(this);\n init && init();\n },\n\n /**\n * Triggers when the status changes. The status indicates if the value of\n * the proprerty is changed or inherited\n * @private\n */\n updateStatus() {\n const status = this.model.get('status');\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const config = this.config;\n const updatedCls = `${ppfx}four-color`;\n const computedCls = `${ppfx}color-warn`;\n const labelEl = this.$el.children(`.${pfx}label`);\n const clearStyle = this.getClearEl().style;\n labelEl.removeClass(`${updatedCls} ${computedCls}`);\n clearStyle.display = 'none';\n\n switch (status) {\n case 'updated':\n labelEl.addClass(updatedCls);\n\n if (config.clearProperties) {\n clearStyle.display = 'inline';\n }\n break;\n case 'computed':\n labelEl.addClass(computedCls);\n break;\n }\n },\n\n /**\n * Clear the property from the target\n */\n clear(e) {\n e && e.stopPropagation();\n this.model.clearValue();\n this.targetUpdated();\n },\n\n /**\n * Get clear element\n * @return {HTMLElement}\n */\n getClearEl() {\n if (!this.clearEl) {\n this.clearEl = this.el.querySelector(`[${clearProp}]`);\n }\n\n return this.clearEl;\n },\n\n /**\n * Returns selected target which should have 'style' property\n * @return {Model|null}\n */\n getTarget() {\n return this.getTargetModel();\n },\n\n /**\n * Returns Styleable model\n * @return {Model|null}\n */\n getTargetModel() {\n return this.propTarget && this.propTarget.model;\n },\n\n /**\n * Returns helper Styleable model\n * @return {Model|null}\n */\n getHelperModel() {\n return this.propTarget && this.propTarget.helper;\n },\n\n /**\n * Triggers when the value of element input/s is changed, so have to update\n * the value of the model which will propogate those changes to the target\n */\n inputValueChanged(e) {\n e && e.stopPropagation();\n this.model.setValue(this.getInputValue(), 1, { fromInput: 1 });\n this.elementUpdated();\n },\n\n /**\n * Fired when the element of the property is updated\n */\n elementUpdated() {\n this.setStatus('updated');\n },\n\n setStatus(value) {\n this.model.set('status', value);\n const parent = this.model.parent;\n parent && parent.set('status', value);\n },\n\n /**\n * Fired when the target is changed\n * */\n targetUpdated() {\n if (!this.checkVisibility()) {\n return;\n }\n\n const config = this.config;\n const em = config.em;\n const model = this.model;\n let value = '';\n let status = '';\n let targetValue = this.getTargetValue({ ignoreDefault: 1 });\n let defaultValue = model.getDefaultValue();\n let computedValue = this.getComputedValue();\n\n if (targetValue) {\n value = targetValue;\n\n if (config.highlightChanged) {\n status = 'updated';\n }\n } else if (\n computedValue &&\n config.showComputed &&\n computedValue != defaultValue\n ) {\n value = computedValue;\n\n if (config.highlightComputed) {\n status = 'computed';\n }\n } else {\n value = defaultValue;\n status = '';\n }\n\n model.setValue(value, 0, { fromTarget: 1 });\n this.setStatus(status);\n\n if (em) {\n em.trigger('styleManager:change', this);\n em.trigger(`styleManager:change:${model.get('property')}`, this);\n }\n },\n\n checkVisibility() {\n var result = 1;\n\n // Check if need to hide the property\n if (this.config.hideNotStylable) {\n if (!this.isTargetStylable() || !this.isComponentStylable()) {\n this.hide();\n result = 0;\n } else {\n this.show();\n }\n // Sector is not passed to Composite and Stack types\n if (this.sector) {\n this.sector.trigger('updateVisibility');\n }\n }\n\n return result;\n },\n\n /**\n * Get the value of this property from the target (eg, Component, CSSRule)\n * @param {Object} [opts] Options\n * @param {Boolean} [options.fetchFromFunction]\n * @param {Boolean} [options.ignoreDefault]\n * @return string\n * @private\n */\n getTargetValue(opts = {}) {\n var result;\n var model = this.model;\n var target = this.getTargetModel();\n var customFetchValue = this.customValue;\n\n if (!target) {\n return result;\n }\n\n result = target.getStyle()[model.get('property')];\n\n if (!result && !opts.ignoreDefault) {\n result = model.getDefaultValue();\n }\n\n if (typeof customFetchValue == 'function' && !opts.ignoreCustomValue) {\n let index = model.collection.indexOf(model);\n let customValue = customFetchValue(this, index);\n\n if (customValue) {\n result = customValue;\n }\n }\n\n return result;\n },\n\n /**\n * Returns computed value\n * @return {String}\n * @private\n */\n getComputedValue() {\n const target = this.propTarget;\n const computed = target.computed || {};\n const computedDef = target.computedDefault || {};\n const avoid = this.config.avoidComputed || [];\n const property = this.model.get('property');\n const notToSkip = avoid.indexOf(property) < 0;\n const value = computed[property];\n const valueDef = computedDef[camelCase(property)];\n return computed && notToSkip && valueDef !== value && value;\n },\n\n /**\n * Returns value from input\n * @return {string}\n */\n getInputValue() {\n const input = this.getInputEl();\n return input ? input.value : '';\n },\n\n /**\n * Triggers when the `value` of the model changes, so the target and\n * the input element should be updated\n * @param {Object} e Event\n * @param {Mixed} val Value\n * @param {Object} opt Options\n * */\n modelValueChanged(e, val, opt = {}) {\n const em = this.config.em;\n const model = this.model;\n const value = model.getFullValue();\n const target = this.getTarget();\n const onChange = this.onChange;\n\n // Avoid element update if the change comes from it\n if (!opt.fromInput) {\n this.setValue(value);\n }\n\n // Check if component is allowed to be styled\n if (!target || !this.isTargetStylable() || !this.isComponentStylable()) {\n return;\n }\n\n // Avoid target update if the changes comes from it\n if (!opt.fromTarget) {\n // The onChange is used by Composite/Stack properties, so I'd avoid sending\n // it back if the change comes from one of those\n if (onChange && !opt.fromParent) {\n onChange(target, this, opt);\n } else {\n this.updateTargetStyle(value, null, opt);\n }\n }\n\n if (em) {\n em.trigger('component:update', target);\n em.trigger('component:styleUpdate', target);\n em.trigger('component:styleUpdate:' + model.get('property'), target);\n }\n },\n\n /**\n * Update target style\n * @param {string} value\n * @param {string} name\n * @param {Object} opts\n */\n updateTargetStyle(value, name = '', opts = {}) {\n const property = name || this.model.get('property');\n const target = this.getTarget();\n const style = target.getStyle();\n\n if (value) {\n style[property] = value;\n } else {\n delete style[property];\n }\n\n target.setStyle(style, opts);\n\n // Helper is used by `states` like ':hover' to show its preview\n const helper = this.getHelperModel();\n helper && helper.setStyle(style, opts);\n },\n\n /**\n * Check if target is stylable with this property\n * The target could be the Component as the CSS Rule\n * @return {Boolean}\n */\n isTargetStylable(target) {\n const trg = target || this.getTarget();\n const model = this.model;\n const property = model.get('property');\n const toRequire = model.get('toRequire');\n const unstylable = trg.get('unstylable');\n const stylableReq = trg.get('stylable-require');\n let stylable = trg.get('stylable');\n\n // Stylable could also be an array indicating with which property\n // the target could be styled\n if (isArray(stylable)) {\n stylable = stylable.indexOf(property) >= 0;\n }\n\n // Check if the property was signed as unstylable\n if (isArray(unstylable)) {\n stylable = unstylable.indexOf(property) < 0;\n }\n\n // Check if the property is available only if requested\n if (toRequire) {\n stylable = (stylableReq && stylableReq.indexOf(property) >= 0) || !target;\n }\n\n return stylable;\n },\n\n /**\n * Check if the selected component is stylable with this property\n * The target could be the Component as the CSS Rule\n * @return {Boolean}\n */\n isComponentStylable() {\n const em = this.em;\n const component = em && em.getSelected();\n\n if (!component) {\n return true;\n }\n\n return this.isTargetStylable(component);\n },\n\n /**\n * Passed a raw value you have to update the input element, generally\n * is the value fetched from targets, so you can receive values with\n * functions, units, etc. (eg. `rotateY(45deg)`)\n * get also\n * @param {string} value\n * @private\n */\n setRawValue(value) {\n this.setValue(this.model.parseValue(value));\n },\n\n /**\n * Update the element input.\n * Usually the value is a result of `model.getFullValue()`\n * @param {String} value The value from the model\n * */\n setValue(value) {\n const model = this.model;\n let val = isUndefined(value) ? model.getDefaultValue() : value;\n const input = this.getInputEl();\n input && (input.value = val);\n },\n\n getInputEl() {\n if (!this.input) {\n this.input = this.el.querySelector('input');\n }\n\n return this.input;\n },\n\n updateVisibility() {\n this.el.style.display = this.model.get('visible') ? 'block' : 'none';\n },\n\n show() {\n this.model.set('visible', 1);\n },\n\n hide() {\n this.model.set('visible', 0);\n },\n\n /**\n * Clean input\n * */\n cleanValue() {\n this.setValue('');\n },\n\n render() {\n const pfx = this.pfx;\n const model = this.model;\n const el = this.el;\n el.innerHTML = this.template(model);\n el.className = `${pfx}property ${pfx}${model.get('type')}`;\n this.updateStatus();\n\n const onRender = this.onRender && this.onRender.bind(this);\n onRender && onRender();\n this.setValue(model.get('value'), { targetUpdate: 1 });\n }\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// This is CodeMirror (http://codemirror.net), a code editor\n// implemented in JavaScript on top of the browser's DOM.\n//\n// You can find some technical background for some of the code below\n// at http://marijnhaverbeke.nl/blog/#cm-internals .\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.CodeMirror = factory());\n}(this, (function () { 'use strict';\n\n// Kludges for bugs and behavior differences that can't be feature\n// detected are enabled based on userAgent etc sniffing.\nvar userAgent = navigator.userAgent;\nvar platform = navigator.platform;\n\nvar gecko = /gecko\\/\\d/i.test(userAgent);\nvar ie_upto10 = /MSIE \\d/.test(userAgent);\nvar ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(userAgent);\nvar edge = /Edge\\/(\\d+)/.exec(userAgent);\nvar ie = ie_upto10 || ie_11up || edge;\nvar ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);\nvar webkit = !edge && /WebKit\\//.test(userAgent);\nvar qtwebkit = webkit && /Qt\\/\\d+\\.\\d+/.test(userAgent);\nvar chrome = !edge && /Chrome\\//.test(userAgent);\nvar presto = /Opera\\//.test(userAgent);\nvar safari = /Apple Computer/.test(navigator.vendor);\nvar mac_geMountainLion = /Mac OS X 1\\d\\D([8-9]|\\d\\d)\\D/.test(userAgent);\nvar phantom = /PhantomJS/.test(userAgent);\n\nvar ios = !edge && /AppleWebKit/.test(userAgent) && /Mobile\\/\\w+/.test(userAgent);\nvar android = /Android/.test(userAgent);\n// This is woefully incomplete. Suggestions for alternative methods welcome.\nvar mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);\nvar mac = ios || /Mac/.test(platform);\nvar chromeOS = /\\bCrOS\\b/.test(userAgent);\nvar windows = /win/i.test(platform);\n\nvar presto_version = presto && userAgent.match(/Version\\/(\\d*\\.\\d*)/);\nif (presto_version) { presto_version = Number(presto_version[1]); }\nif (presto_version && presto_version >= 15) { presto = false; webkit = true; }\n// Some browsers use the wrong event properties to signal cmd/ctrl on OS X\nvar flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));\nvar captureRightClick = gecko || (ie && ie_version >= 9);\n\nfunction classTest(cls) { return new RegExp(\"(^|\\\\s)\" + cls + \"(?:$|\\\\s)\\\\s*\") }\n\nvar rmClass = function(node, cls) {\n var current = node.className;\n var match = classTest(cls).exec(current);\n if (match) {\n var after = current.slice(match.index + match[0].length);\n node.className = current.slice(0, match.index) + (after ? match[1] + after : \"\");\n }\n};\n\nfunction removeChildren(e) {\n for (var count = e.childNodes.length; count > 0; --count)\n { e.removeChild(e.firstChild); }\n return e\n}\n\nfunction removeChildrenAndAdd(parent, e) {\n return removeChildren(parent).appendChild(e)\n}\n\nfunction elt(tag, content, className, style) {\n var e = document.createElement(tag);\n if (className) { e.className = className; }\n if (style) { e.style.cssText = style; }\n if (typeof content == \"string\") { e.appendChild(document.createTextNode(content)); }\n else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]); } }\n return e\n}\n// wrapper for elt, which removes the elt from the accessibility tree\nfunction eltP(tag, content, className, style) {\n var e = elt(tag, content, className, style);\n e.setAttribute(\"role\", \"presentation\");\n return e\n}\n\nvar range;\nif (document.createRange) { range = function(node, start, end, endNode) {\n var r = document.createRange();\n r.setEnd(endNode || node, end);\n r.setStart(node, start);\n return r\n}; }\nelse { range = function(node, start, end) {\n var r = document.body.createTextRange();\n try { r.moveToElementText(node.parentNode); }\n catch(e) { return r }\n r.collapse(true);\n r.moveEnd(\"character\", end);\n r.moveStart(\"character\", start);\n return r\n}; }\n\nfunction contains(parent, child) {\n if (child.nodeType == 3) // Android browser always returns false when child is a textnode\n { child = child.parentNode; }\n if (parent.contains)\n { return parent.contains(child) }\n do {\n if (child.nodeType == 11) { child = child.host; }\n if (child == parent) { return true }\n } while (child = child.parentNode)\n}\n\nfunction activeElt() {\n // IE and Edge may throw an \"Unspecified Error\" when accessing document.activeElement.\n // IE < 10 will throw when accessed while the page is loading or in an iframe.\n // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.\n var activeElement;\n try {\n activeElement = document.activeElement;\n } catch(e) {\n activeElement = document.body || null;\n }\n while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement)\n { activeElement = activeElement.shadowRoot.activeElement; }\n return activeElement\n}\n\nfunction addClass(node, cls) {\n var current = node.className;\n if (!classTest(cls).test(current)) { node.className += (current ? \" \" : \"\") + cls; }\n}\nfunction joinClasses(a, b) {\n var as = a.split(\" \");\n for (var i = 0; i < as.length; i++)\n { if (as[i] && !classTest(as[i]).test(b)) { b += \" \" + as[i]; } }\n return b\n}\n\nvar selectInput = function(node) { node.select(); };\nif (ios) // Mobile Safari apparently has a bug where select() is broken.\n { selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; }\nelse if (ie) // Suppress mysterious IE10 errors\n { selectInput = function(node) { try { node.select(); } catch(_e) {} }; }\n\nfunction bind(f) {\n var args = Array.prototype.slice.call(arguments, 1);\n return function(){return f.apply(null, args)}\n}\n\nfunction copyObj(obj, target, overwrite) {\n if (!target) { target = {}; }\n for (var prop in obj)\n { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))\n { target[prop] = obj[prop]; } }\n return target\n}\n\n// Counts the column offset in a string, taking tabs into account.\n// Used mostly to find indentation.\nfunction countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) { end = string.length; }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i);\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n}\n\nvar Delayed = function() {this.id = null;};\nDelayed.prototype.set = function (ms, f) {\n clearTimeout(this.id);\n this.id = setTimeout(f, ms);\n};\n\nfunction indexOf(array, elt) {\n for (var i = 0; i < array.length; ++i)\n { if (array[i] == elt) { return i } }\n return -1\n}\n\n// Number of pixels added to scroller and sizer to hide scrollbar\nvar scrollerGap = 30;\n\n// Returned or thrown by various protocols to signal 'I'm not\n// handling this'.\nvar Pass = {toString: function(){return \"CodeMirror.Pass\"}};\n\n// Reused option objects for setSelection & friends\nvar sel_dontScroll = {scroll: false};\nvar sel_mouse = {origin: \"*mouse\"};\nvar sel_move = {origin: \"+move\"};\n\n// The inverse of countColumn -- find the offset that corresponds to\n// a particular column.\nfunction findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}\n\nvar spaceStrs = [\"\"];\nfunction spaceStr(n) {\n while (spaceStrs.length <= n)\n { spaceStrs.push(lst(spaceStrs) + \" \"); }\n return spaceStrs[n]\n}\n\nfunction lst(arr) { return arr[arr.length-1] }\n\nfunction map(array, f) {\n var out = [];\n for (var i = 0; i < array.length; i++) { out[i] = f(array[i], i); }\n return out\n}\n\nfunction insertSorted(array, value, score) {\n var pos = 0, priority = score(value);\n while (pos < array.length && score(array[pos]) <= priority) { pos++; }\n array.splice(pos, 0, value);\n}\n\nfunction nothing() {}\n\nfunction createObj(base, props) {\n var inst;\n if (Object.create) {\n inst = Object.create(base);\n } else {\n nothing.prototype = base;\n inst = new nothing();\n }\n if (props) { copyObj(props, inst); }\n return inst\n}\n\nvar nonASCIISingleCaseWordChar = /[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/;\nfunction isWordCharBasic(ch) {\n return /\\w/.test(ch) || ch > \"\\x80\" &&\n (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch))\n}\nfunction isWordChar(ch, helper) {\n if (!helper) { return isWordCharBasic(ch) }\n if (helper.source.indexOf(\"\\\\w\") > -1 && isWordCharBasic(ch)) { return true }\n return helper.test(ch)\n}\n\nfunction isEmpty(obj) {\n for (var n in obj) { if (obj.hasOwnProperty(n) && obj[n]) { return false } }\n return true\n}\n\n// Extending unicode characters. A series of a non-extending char +\n// any number of extending chars is treated as a single unit as far\n// as editing and measuring is concerned. This is not fully correct,\n// since some scripts/fonts/browsers also treat other configurations\n// of code points as a group.\nvar extendingChars = /[\\u0300-\\u036f\\u0483-\\u0489\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u065e\\u0670\\u06d6-\\u06dc\\u06de-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07eb-\\u07f3\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0900-\\u0902\\u093c\\u0941-\\u0948\\u094d\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09bc\\u09be\\u09c1-\\u09c4\\u09cd\\u09d7\\u09e2\\u09e3\\u0a01\\u0a02\\u0a3c\\u0a41\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a70\\u0a71\\u0a75\\u0a81\\u0a82\\u0abc\\u0ac1-\\u0ac5\\u0ac7\\u0ac8\\u0acd\\u0ae2\\u0ae3\\u0b01\\u0b3c\\u0b3e\\u0b3f\\u0b41-\\u0b44\\u0b4d\\u0b56\\u0b57\\u0b62\\u0b63\\u0b82\\u0bbe\\u0bc0\\u0bcd\\u0bd7\\u0c3e-\\u0c40\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0cbc\\u0cbf\\u0cc2\\u0cc6\\u0ccc\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0d3e\\u0d41-\\u0d44\\u0d4d\\u0d57\\u0d62\\u0d63\\u0dca\\u0dcf\\u0dd2-\\u0dd4\\u0dd6\\u0ddf\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0eb1\\u0eb4-\\u0eb9\\u0ebb\\u0ebc\\u0ec8-\\u0ecd\\u0f18\\u0f19\\u0f35\\u0f37\\u0f39\\u0f71-\\u0f7e\\u0f80-\\u0f84\\u0f86\\u0f87\\u0f90-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102d-\\u1030\\u1032-\\u1037\\u1039\\u103a\\u103d\\u103e\\u1058\\u1059\\u105e-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108d\\u109d\\u135f\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b7-\\u17bd\\u17c6\\u17c9-\\u17d3\\u17dd\\u180b-\\u180d\\u18a9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193b\\u1a17\\u1a18\\u1a56\\u1a58-\\u1a5e\\u1a60\\u1a62\\u1a65-\\u1a6c\\u1a73-\\u1a7c\\u1a7f\\u1b00-\\u1b03\\u1b34\\u1b36-\\u1b3a\\u1b3c\\u1b42\\u1b6b-\\u1b73\\u1b80\\u1b81\\u1ba2-\\u1ba5\\u1ba8\\u1ba9\\u1c2c-\\u1c33\\u1c36\\u1c37\\u1cd0-\\u1cd2\\u1cd4-\\u1ce0\\u1ce2-\\u1ce8\\u1ced\\u1dc0-\\u1de6\\u1dfd-\\u1dff\\u200c\\u200d\\u20d0-\\u20f0\\u2cef-\\u2cf1\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua66f-\\ua672\\ua67c\\ua67d\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua825\\ua826\\ua8c4\\ua8e0-\\ua8f1\\ua926-\\ua92d\\ua947-\\ua951\\ua980-\\ua982\\ua9b3\\ua9b6-\\ua9b9\\ua9bc\\uaa29-\\uaa2e\\uaa31\\uaa32\\uaa35\\uaa36\\uaa43\\uaa4c\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uabe5\\uabe8\\uabed\\udc00-\\udfff\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe26\\uff9e\\uff9f]/;\nfunction isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) }\n\n// Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range.\nfunction skipExtendingChars(str, pos, dir) {\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n return pos\n}\n\n// Returns the value from the range [`from`; `to`] that satisfies\n// `pred` and is closest to `from`. Assumes that at least `to`\n// satisfies `pred`. Supports `from` being greater than `to`.\nfunction findFirst(pred, from, to) {\n // At any point we are certain `to` satisfies `pred`, don't know\n // whether `from` does.\n var dir = from > to ? -1 : 1;\n for (;;) {\n if (from == to) { return from }\n var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n if (mid == from) { return pred(mid) ? from : to }\n if (pred(mid)) { to = mid; }\n else { from = mid + dir; }\n }\n}\n\n// The display handles the DOM integration, both for input reading\n// and content drawing. It holds references to DOM nodes and\n// display-related state.\n\nfunction Display(place, doc, input) {\n var d = this;\n this.input = input;\n\n // Covers bottom-right square when both scrollbars are present.\n d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n d.scrollbarFiller.setAttribute(\"cm-not-content\", \"true\");\n // Covers bottom of gutter when coverGutterNextToScrollbar is on\n // and h scrollbar is present.\n d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n d.gutterFiller.setAttribute(\"cm-not-content\", \"true\");\n // Will contain the actual code, positioned to cover the viewport.\n d.lineDiv = eltP(\"div\", null, \"CodeMirror-code\");\n // Elements are added to these to represent selection and cursors.\n d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n // A visibility: hidden element used to find the size of things.\n d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n // When lines outside of the viewport are measured, they are drawn in this.\n d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n // Wraps everything that needs to exist inside the vertically-padded coordinate system\n d.lineSpace = eltP(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n null, \"position: relative; outline: none\");\n var lines = eltP(\"div\", [d.lineSpace], \"CodeMirror-lines\");\n // Moved around its parent to cover visible view.\n d.mover = elt(\"div\", [lines], null, \"position: relative\");\n // Set to the height of the document, allowing scrolling.\n d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n d.sizerWidth = null;\n // Behavior of elts with overflow: auto and padding is\n // inconsistent across browsers. This is used to ensure the\n // scrollable area is big enough.\n d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerGap + \"px; width: 1px;\");\n // Will contain the gutters, if any.\n d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n d.lineGutter = null;\n // Actual scrollable element.\n d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n d.scroller.setAttribute(\"tabIndex\", \"-1\");\n // The element in which the editor lives.\n d.wrapper = elt(\"div\", [d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n\n // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; }\n\n if (place) {\n if (place.appendChild) { place.appendChild(d.wrapper); }\n else { place(d.wrapper); }\n }\n\n // Current rendered range (may be bigger than the view window).\n d.viewFrom = d.viewTo = doc.first;\n d.reportedViewFrom = d.reportedViewTo = doc.first;\n // Information about the rendered lines.\n d.view = [];\n d.renderedView = null;\n // Holds info about a single rendered line when it was rendered\n // for measurement, while not in view.\n d.externalMeasured = null;\n // Empty space (in pixels) above the view\n d.viewOffset = 0;\n d.lastWrapHeight = d.lastWrapWidth = 0;\n d.updateLineNumbers = null;\n\n d.nativeBarWidth = d.barHeight = d.barWidth = 0;\n d.scrollbarsClipped = false;\n\n // Used to only resize the line number gutter when necessary (when\n // the amount of lines crosses a boundary that makes its width change)\n d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n // Set to true when a non-horizontal-scrolling line widget is\n // added. As an optimization, line widget aligning is skipped when\n // this is false.\n d.alignWidgets = false;\n\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n // Tracks the maximum line length so that the horizontal scrollbar\n // can be kept static when scrolling.\n d.maxLine = null;\n d.maxLineLength = 0;\n d.maxLineChanged = false;\n\n // Used for measuring wheel scrolling granularity\n d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n // True when shift is held down.\n d.shift = false;\n\n // Used to track whether anything happened since the context menu\n // was opened.\n d.selForContextMenu = null;\n\n d.activeTouch = null;\n\n input.init(d);\n}\n\n// Find the line object corresponding to the given line number.\nfunction getLine(doc, n) {\n n -= doc.first;\n if (n < 0 || n >= doc.size) { throw new Error(\"There is no line \" + (n + doc.first) + \" in the document.\") }\n var chunk = doc;\n while (!chunk.lines) {\n for (var i = 0;; ++i) {\n var child = chunk.children[i], sz = child.chunkSize();\n if (n < sz) { chunk = child; break }\n n -= sz;\n }\n }\n return chunk.lines[n]\n}\n\n// Get the part of a document between two positions, as an array of\n// strings.\nfunction getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}\n// Get the lines between from and to, as array of strings.\nfunction getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}\n\n// Update the height of a line, propagating the height change\n// upwards to parent nodes.\nfunction updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n}\n\n// Given a line object, find its line number by walking up through\n// its parent links.\nfunction lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first\n}\n\n// Find the line at the given vertical position, using the height\n// information in the document tree.\nfunction lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n}\n\nfunction isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size}\n\nfunction lineNumberFor(options, i) {\n return String(options.lineNumberFormatter(i + options.firstLineNumber))\n}\n\n// A Pos instance represents a position within the text.\nfunction Pos(line, ch, sticky) {\n if ( sticky === void 0 ) sticky = null;\n\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n this.line = line;\n this.ch = ch;\n this.sticky = sticky;\n}\n\n// Compare two positions, return 0 if they are the same, a negative\n// number when a is less, and a positive number otherwise.\nfunction cmp(a, b) { return a.line - b.line || a.ch - b.ch }\n\nfunction equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b) == 0 }\n\nfunction copyPos(x) {return Pos(x.line, x.ch)}\nfunction maxPos(a, b) { return cmp(a, b) < 0 ? b : a }\nfunction minPos(a, b) { return cmp(a, b) < 0 ? a : b }\n\n// Most of the external API clips given positions to make sure they\n// actually exist within the document.\nfunction clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))}\nfunction clipPos(doc, pos) {\n if (pos.line < doc.first) { return Pos(doc.first, 0) }\n var last = doc.first + doc.size - 1;\n if (pos.line > last) { return Pos(last, getLine(doc, last).text.length) }\n return clipToLen(pos, getLine(doc, pos.line).text.length)\n}\nfunction clipToLen(pos, linelen) {\n var ch = pos.ch;\n if (ch == null || ch > linelen) { return Pos(pos.line, linelen) }\n else if (ch < 0) { return Pos(pos.line, 0) }\n else { return pos }\n}\nfunction clipPosArray(doc, array) {\n var out = [];\n for (var i = 0; i < array.length; i++) { out[i] = clipPos(doc, array[i]); }\n return out\n}\n\n// Optimize some code when these features are not used.\nvar sawReadOnlySpans = false;\nvar sawCollapsedSpans = false;\n\nfunction seeReadOnlySpans() {\n sawReadOnlySpans = true;\n}\n\nfunction seeCollapsedSpans() {\n sawCollapsedSpans = true;\n}\n\n// TEXTMARKER SPANS\n\nfunction MarkedSpan(marker, from, to) {\n this.marker = marker;\n this.from = from; this.to = to;\n}\n\n// Search an array of spans for a span matching the given marker.\nfunction getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n}\n// Remove a span from an array, returning undefined if no spans are\n// left (we don't store arrays for lines without spans).\nfunction removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n}\n// Add a span to a line.\nfunction addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}\n\n// Used for the algorithm that adjusts markers for a change in the\n// document. These functions cut an array of spans at a given\n// character position, returning an array of remaining chunks (or\n// undefined if nothing remains).\nfunction markedSpansBefore(old, startCh, isInsert) {\n var nw;\n if (old) { for (var i = 0; i < old.length; ++i) {\n var span = old[i], marker = span.marker;\n var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);\n if (startsBefore || span.from == startCh && marker.type == \"bookmark\" && (!isInsert || !span.marker.insertLeft)) {\n var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh);(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));\n }\n } }\n return nw\n}\nfunction markedSpansAfter(old, endCh, isInsert) {\n var nw;\n if (old) { for (var i = 0; i < old.length; ++i) {\n var span = old[i], marker = span.marker;\n var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);\n if (endsAfter || span.from == endCh && marker.type == \"bookmark\" && (!isInsert || span.marker.insertLeft)) {\n var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh);(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,\n span.to == null ? null : span.to - endCh));\n }\n } }\n return nw\n}\n\n// Given a change object, compute the new set of marker spans that\n// cover the line in which the change took place. Removes spans\n// entirely within the change, reconnects spans belonging to the\n// same marker that appear on both sides of the change, and cuts off\n// spans partially within the change. Returns an array of span\n// arrays with one element for each line in (after) the change.\nfunction stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) { span.to = startCh; }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n if (span$1.to != null) { span$1.to += offset; }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n if (!found$1) {\n span$1.from = offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n } else {\n span$1.from += offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first); }\n if (last && last != first) { last = clearEmptySpans(last); }\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers); }\n newMarkers.push(last);\n }\n return newMarkers\n}\n\n// Remove spans that are empty and don't have a clearWhenEmpty\n// option of false.\nfunction clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n}\n\n// Used to 'clip' out readOnly ranges when making a change.\nfunction removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark); }\n } }\n });\n if (!markers) { return null }\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}); }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}); }\n parts.splice.apply(parts, newParts);\n j += newParts.length - 3;\n }\n }\n return parts\n}\n\n// Connect or disconnect spans from a line.\nfunction detachMarkedSpans(line) {\n var spans = line.markedSpans;\n if (!spans) { return }\n for (var i = 0; i < spans.length; ++i)\n { spans[i].marker.detachLine(line); }\n line.markedSpans = null;\n}\nfunction attachMarkedSpans(line, spans) {\n if (!spans) { return }\n for (var i = 0; i < spans.length; ++i)\n { spans[i].marker.attachLine(line); }\n line.markedSpans = spans;\n}\n\n// Helpers used when computing which overlapping collapsed span\n// counts as the larger one.\nfunction extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 }\nfunction extraRight(marker) { return marker.inclusiveRight ? 1 : 0 }\n\n// Returns a number indicating which of two overlapping collapsed\n// spans is larger (and thus includes the other). Falls back to\n// comparing ids when the spans cover exactly the same range.\nfunction compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}\n\n// Find out whether a line ends or starts in a collapsed span. If\n// so, return the marker for that span.\nfunction collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}\nfunction collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }\nfunction collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }\n\nfunction collapsedSpanAround(line, ch) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; }\n } }\n return found\n}\n\n// Test whether there exists a collapsed span that partially\n// overlaps (covers the start or end, but not both) of a new span.\n// Such overlap is not allowed.\nfunction conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}\n\n// A visual line is a line as drawn on the screen. Folding, for\n// example, can cause multiple logical lines to appear on the same\n// visual line. This finds the start of the visual line that the\n// given line is part of (usually that is the line itself).\nfunction visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}\n\nfunction visualLineEnd(line) {\n var merged;\n while (merged = collapsedSpanAtEnd(line))\n { line = merged.find(1, true).line; }\n return line\n}\n\n// Returns an array of logical lines that continue the visual line\n// started by the argument, or undefined if there are no such lines.\nfunction visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}\n\n// Get the line number of the start of the visual line that the\n// given line number is part of.\nfunction visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}\n\n// Get the line number of the start of the next visual line after\n// the given line.\nfunction visualLineEndNo(doc, lineN) {\n if (lineN > doc.lastLine()) { return lineN }\n var line = getLine(doc, lineN), merged;\n if (!lineIsHidden(doc, line)) { return lineN }\n while (merged = collapsedSpanAtEnd(line))\n { line = merged.find(1, true).line; }\n return lineNo(line) + 1\n}\n\n// Compute whether a line is hidden. Lines count as hidden when they\n// are part of a visual line that starts with another line, or when\n// they are entirely covered by collapsed, non-widget span.\nfunction lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n}\nfunction lineIsHiddenInner(doc, line, span) {\n if (span.to == null) {\n var end = span.marker.find(1, true);\n return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker))\n }\n if (span.marker.inclusiveRight && span.to == line.text.length)\n { return true }\n for (var sp = (void 0), i = 0; i < line.markedSpans.length; ++i) {\n sp = line.markedSpans[i];\n if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&\n (sp.to == null || sp.to != span.from) &&\n (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&\n lineIsHiddenInner(doc, line, sp)) { return true }\n }\n}\n\n// Find the height above the given line.\nfunction heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}\n\n// Compute the character length of a line, taking into account\n// collapsed ranges (see markText) that might hide parts, and join\n// other lines onto it.\nfunction lineLength(line) {\n if (line.height == 0) { return 0 }\n var len = line.text.length, merged, cur = line;\n while (merged = collapsedSpanAtStart(cur)) {\n var found = merged.find(0, true);\n cur = found.from.line;\n len += found.from.ch - found.to.ch;\n }\n cur = line;\n while (merged = collapsedSpanAtEnd(cur)) {\n var found$1 = merged.find(0, true);\n len -= cur.text.length - found$1.from.ch;\n cur = found$1.to.line;\n len += cur.text.length - found$1.to.ch;\n }\n return len\n}\n\n// Find the longest line in the document.\nfunction findMaxLine(cm) {\n var d = cm.display, doc = cm.doc;\n d.maxLine = getLine(doc, doc.first);\n d.maxLineLength = lineLength(d.maxLine);\n d.maxLineChanged = true;\n doc.iter(function (line) {\n var len = lineLength(line);\n if (len > d.maxLineLength) {\n d.maxLineLength = len;\n d.maxLine = line;\n }\n });\n}\n\n// BIDI HELPERS\n\nfunction iterateBidiSections(order, from, to, f) {\n if (!order) { return f(from, to, \"ltr\", 0) }\n var found = false;\n for (var i = 0; i < order.length; ++i) {\n var part = order[i];\n if (part.from < to && part.to > from || from == to && part.to == from) {\n f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? \"rtl\" : \"ltr\", i);\n found = true;\n }\n }\n if (!found) { f(from, to, \"ltr\"); }\n}\n\nvar bidiOther = null;\nfunction getBidiPartAt(order, ch, sticky) {\n var found;\n bidiOther = null;\n for (var i = 0; i < order.length; ++i) {\n var cur = order[i];\n if (cur.from < ch && cur.to > ch) { return i }\n if (cur.to == ch) {\n if (cur.from != cur.to && sticky == \"before\") { found = i; }\n else { bidiOther = i; }\n }\n if (cur.from == ch) {\n if (cur.from != cur.to && sticky != \"before\") { found = i; }\n else { bidiOther = i; }\n }\n }\n return found != null ? found : bidiOther\n}\n\n// Bidirectional ordering algorithm\n// See http://unicode.org/reports/tr9/tr9-13.html for the algorithm\n// that this (partially) implements.\n\n// One-char codes used for character types:\n// L (L): Left-to-Right\n// R (R): Right-to-Left\n// r (AL): Right-to-Left Arabic\n// 1 (EN): European Number\n// + (ES): European Number Separator\n// % (ET): European Number Terminator\n// n (AN): Arabic Number\n// , (CS): Common Number Separator\n// m (NSM): Non-Spacing Mark\n// b (BN): Boundary Neutral\n// s (B): Paragraph Separator\n// t (S): Segment Separator\n// w (WS): Whitespace\n// N (ON): Other Neutrals\n\n// Returns null if characters are ordered as they appear\n// (left-to-right), or an array of sections ({from, to, level}\n// objects) in the order in which they occur visually.\nvar bidiOrdering = (function() {\n // Character types for codepoints 0 to 0xff\n var lowTypes = \"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN\";\n // Character types for codepoints 0x600 to 0x6f9\n var arabicTypes = \"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111\";\n function charType(code) {\n if (code <= 0xf7) { return lowTypes.charAt(code) }\n else if (0x590 <= code && code <= 0x5f4) { return \"R\" }\n else if (0x600 <= code && code <= 0x6f9) { return arabicTypes.charAt(code - 0x600) }\n else if (0x6ee <= code && code <= 0x8ac) { return \"r\" }\n else if (0x2000 <= code && code <= 0x200b) { return \"w\" }\n else if (code == 0x200c) { return \"b\" }\n else { return \"L\" }\n }\n\n var bidiRE = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\n var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;\n\n function BidiSpan(level, from, to) {\n this.level = level;\n this.from = from; this.to = to;\n }\n\n return function(str, direction) {\n var outerType = direction == \"ltr\" ? \"L\" : \"R\";\n\n if (str.length == 0 || direction == \"ltr\" && !bidiRE.test(str)) { return false }\n var len = str.length, types = [];\n for (var i = 0; i < len; ++i)\n { types.push(charType(str.charCodeAt(i))); }\n\n // W1. Examine each non-spacing mark (NSM) in the level run, and\n // change the type of the NSM to the type of the previous\n // character. If the NSM is at the start of the level run, it will\n // get the type of sor.\n for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) {\n var type = types[i$1];\n if (type == \"m\") { types[i$1] = prev; }\n else { prev = type; }\n }\n\n // W2. Search backwards from each instance of a European number\n // until the first strong type (R, L, AL, or sor) is found. If an\n // AL is found, change the type of the European number to Arabic\n // number.\n // W3. Change all ALs to R.\n for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) {\n var type$1 = types[i$2];\n if (type$1 == \"1\" && cur == \"r\") { types[i$2] = \"n\"; }\n else if (isStrong.test(type$1)) { cur = type$1; if (type$1 == \"r\") { types[i$2] = \"R\"; } }\n }\n\n // W4. A single European separator between two European numbers\n // changes to a European number. A single common separator between\n // two numbers of the same type changes to that type.\n for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) {\n var type$2 = types[i$3];\n if (type$2 == \"+\" && prev$1 == \"1\" && types[i$3+1] == \"1\") { types[i$3] = \"1\"; }\n else if (type$2 == \",\" && prev$1 == types[i$3+1] &&\n (prev$1 == \"1\" || prev$1 == \"n\")) { types[i$3] = prev$1; }\n prev$1 = type$2;\n }\n\n // W5. A sequence of European terminators adjacent to European\n // numbers changes to all European numbers.\n // W6. Otherwise, separators and terminators change to Other\n // Neutral.\n for (var i$4 = 0; i$4 < len; ++i$4) {\n var type$3 = types[i$4];\n if (type$3 == \",\") { types[i$4] = \"N\"; }\n else if (type$3 == \"%\") {\n var end = (void 0);\n for (end = i$4 + 1; end < len && types[end] == \"%\"; ++end) {}\n var replace = (i$4 && types[i$4-1] == \"!\") || (end < len && types[end] == \"1\") ? \"1\" : \"N\";\n for (var j = i$4; j < end; ++j) { types[j] = replace; }\n i$4 = end - 1;\n }\n }\n\n // W7. Search backwards from each instance of a European number\n // until the first strong type (R, L, or sor) is found. If an L is\n // found, then change the type of the European number to L.\n for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) {\n var type$4 = types[i$5];\n if (cur$1 == \"L\" && type$4 == \"1\") { types[i$5] = \"L\"; }\n else if (isStrong.test(type$4)) { cur$1 = type$4; }\n }\n\n // N1. A sequence of neutrals takes the direction of the\n // surrounding strong text if the text on both sides has the same\n // direction. European and Arabic numbers act as if they were R in\n // terms of their influence on neutrals. Start-of-level-run (sor)\n // and end-of-level-run (eor) are used at level run boundaries.\n // N2. Any remaining neutrals take the embedding direction.\n for (var i$6 = 0; i$6 < len; ++i$6) {\n if (isNeutral.test(types[i$6])) {\n var end$1 = (void 0);\n for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {}\n var before = (i$6 ? types[i$6-1] : outerType) == \"L\";\n var after = (end$1 < len ? types[end$1] : outerType) == \"L\";\n var replace$1 = before == after ? (before ? \"L\" : \"R\") : outerType;\n for (var j$1 = i$6; j$1 < end$1; ++j$1) { types[j$1] = replace$1; }\n i$6 = end$1 - 1;\n }\n }\n\n // Here we depart from the documented algorithm, in order to avoid\n // building up an actual levels array. Since there are only three\n // levels (0, 1, 2) in an implementation that doesn't take\n // explicit embedding into account, we can build up the order on\n // the fly, without following the level-based algorithm.\n var order = [], m;\n for (var i$7 = 0; i$7 < len;) {\n if (countsAsLeft.test(types[i$7])) {\n var start = i$7;\n for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {}\n order.push(new BidiSpan(0, start, i$7));\n } else {\n var pos = i$7, at = order.length;\n for (++i$7; i$7 < len && types[i$7] != \"L\"; ++i$7) {}\n for (var j$2 = pos; j$2 < i$7;) {\n if (countsAsNum.test(types[j$2])) {\n if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); }\n var nstart = j$2;\n for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}\n order.splice(at, 0, new BidiSpan(2, nstart, j$2));\n pos = j$2;\n } else { ++j$2; }\n }\n if (pos < i$7) { order.splice(at, 0, new BidiSpan(1, pos, i$7)); }\n }\n }\n if (direction == \"ltr\") {\n if (order[0].level == 1 && (m = str.match(/^\\s+/))) {\n order[0].from = m[0].length;\n order.unshift(new BidiSpan(0, 0, m[0].length));\n }\n if (lst(order).level == 1 && (m = str.match(/\\s+$/))) {\n lst(order).to -= m[0].length;\n order.push(new BidiSpan(0, len - m[0].length, len));\n }\n }\n\n return direction == \"rtl\" ? order.reverse() : order\n }\n})();\n\n// Get the bidi ordering for the given line (and cache it). Returns\n// false for lines that are fully left-to-right, and an array of\n// BidiSpan objects otherwise.\nfunction getOrder(line, direction) {\n var order = line.order;\n if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n return order\n}\n\n// EVENT HANDLING\n\n// Lightweight event framework. on/off also work on DOM nodes,\n// registering native DOM handlers.\n\nvar noHandlers = [];\n\nvar on = function(emitter, type, f) {\n if (emitter.addEventListener) {\n emitter.addEventListener(type, f, false);\n } else if (emitter.attachEvent) {\n emitter.attachEvent(\"on\" + type, f);\n } else {\n var map$$1 = emitter._handlers || (emitter._handlers = {});\n map$$1[type] = (map$$1[type] || noHandlers).concat(f);\n }\n};\n\nfunction getHandlers(emitter, type) {\n return emitter._handlers && emitter._handlers[type] || noHandlers\n}\n\nfunction off(emitter, type, f) {\n if (emitter.removeEventListener) {\n emitter.removeEventListener(type, f, false);\n } else if (emitter.detachEvent) {\n emitter.detachEvent(\"on\" + type, f);\n } else {\n var map$$1 = emitter._handlers, arr = map$$1 && map$$1[type];\n if (arr) {\n var index = indexOf(arr, f);\n if (index > -1)\n { map$$1[type] = arr.slice(0, index).concat(arr.slice(index + 1)); }\n }\n }\n}\n\nfunction signal(emitter, type /*, values...*/) {\n var handlers = getHandlers(emitter, type);\n if (!handlers.length) { return }\n var args = Array.prototype.slice.call(arguments, 2);\n for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args); }\n}\n\n// The DOM events that CodeMirror handles can be overridden by\n// registering a (non-DOM) handler on the editor for the event name,\n// and preventDefault-ing the event in that handler.\nfunction signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore\n}\n\nfunction signalCursorActivity(cm) {\n var arr = cm._handlers && cm._handlers.cursorActivity;\n if (!arr) { return }\n var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);\n for (var i = 0; i < arr.length; ++i) { if (indexOf(set, arr[i]) == -1)\n { set.push(arr[i]); } }\n}\n\nfunction hasHandler(emitter, type) {\n return getHandlers(emitter, type).length > 0\n}\n\n// Add on and off methods to a constructor's prototype, to make\n// registering events on such objects more convenient.\nfunction eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f);};\n ctor.prototype.off = function(type, f) {off(this, type, f);};\n}\n\n// Due to the fact that we still support jurassic IE versions, some\n// compatibility wrappers are needed.\n\nfunction e_preventDefault(e) {\n if (e.preventDefault) { e.preventDefault(); }\n else { e.returnValue = false; }\n}\nfunction e_stopPropagation(e) {\n if (e.stopPropagation) { e.stopPropagation(); }\n else { e.cancelBubble = true; }\n}\nfunction e_defaultPrevented(e) {\n return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false\n}\nfunction e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}\n\nfunction e_target(e) {return e.target || e.srcElement}\nfunction e_button(e) {\n var b = e.which;\n if (b == null) {\n if (e.button & 1) { b = 1; }\n else if (e.button & 2) { b = 3; }\n else if (e.button & 4) { b = 2; }\n }\n if (mac && e.ctrlKey && b == 1) { b = 3; }\n return b\n}\n\n// Detect drag-and-drop\nvar dragAndDrop = function() {\n // There is *some* kind of drag-and-drop support in IE6-8, but I\n // couldn't get it to work yet.\n if (ie && ie_version < 9) { return false }\n var div = elt('div');\n return \"draggable\" in div || \"dragDrop\" in div\n}();\n\nvar zwspSupported;\nfunction zeroWidthElement(measure) {\n if (zwspSupported == null) {\n var test = elt(\"span\", \"\\u200b\");\n removeChildrenAndAdd(measure, elt(\"span\", [test, document.createTextNode(\"x\")]));\n if (measure.firstChild.offsetHeight != 0)\n { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); }\n }\n var node = zwspSupported ? elt(\"span\", \"\\u200b\") :\n elt(\"span\", \"\\u00a0\", null, \"display: inline-block; width: 1px; margin-right: -1px\");\n node.setAttribute(\"cm-text\", \"\");\n return node\n}\n\n// Feature-detect IE's crummy client rect reporting for bidi text\nvar badBidiRects;\nfunction hasBadBidiRects(measure) {\n if (badBidiRects != null) { return badBidiRects }\n var txt = removeChildrenAndAdd(measure, document.createTextNode(\"A\\u062eA\"));\n var r0 = range(txt, 0, 1).getBoundingClientRect();\n var r1 = range(txt, 1, 2).getBoundingClientRect();\n removeChildren(measure);\n if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780)\n return badBidiRects = (r1.right - r0.right < 3)\n}\n\n// See if \"\".split is the broken IE version, if so, provide an\n// alternative way to split lines.\nvar splitLinesAuto = \"\\n\\nb\".split(/\\n/).length != 3 ? function (string) {\n var pos = 0, result = [], l = string.length;\n while (pos <= l) {\n var nl = string.indexOf(\"\\n\", pos);\n if (nl == -1) { nl = string.length; }\n var line = string.slice(pos, string.charAt(nl - 1) == \"\\r\" ? nl - 1 : nl);\n var rt = line.indexOf(\"\\r\");\n if (rt != -1) {\n result.push(line.slice(0, rt));\n pos += rt + 1;\n } else {\n result.push(line);\n pos = nl + 1;\n }\n }\n return result\n} : function (string) { return string.split(/\\r\\n?|\\n/); };\n\nvar hasSelection = window.getSelection ? function (te) {\n try { return te.selectionStart != te.selectionEnd }\n catch(e) { return false }\n} : function (te) {\n var range$$1;\n try {range$$1 = te.ownerDocument.selection.createRange();}\n catch(e) {}\n if (!range$$1 || range$$1.parentElement() != te) { return false }\n return range$$1.compareEndPoints(\"StartToEnd\", range$$1) != 0\n};\n\nvar hasCopyEvent = (function () {\n var e = elt(\"div\");\n if (\"oncopy\" in e) { return true }\n e.setAttribute(\"oncopy\", \"return;\");\n return typeof e.oncopy == \"function\"\n})();\n\nvar badZoomedRects = null;\nfunction hasBadZoomedRects(measure) {\n if (badZoomedRects != null) { return badZoomedRects }\n var node = removeChildrenAndAdd(measure, elt(\"span\", \"x\"));\n var normal = node.getBoundingClientRect();\n var fromRange = range(node, 0, 1).getBoundingClientRect();\n return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1\n}\n\n// Known modes, by name and by MIME\nvar modes = {};\nvar mimeModes = {};\n\n// Extra arguments are stored as the mode's dependencies, which is\n// used by (legacy) mechanisms like loadmode.js to automatically\n// load a mode. (Preferred mechanism is the require/define calls.)\nfunction defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}\n\nfunction defineMIME(mime, spec) {\n mimeModes[mime] = spec;\n}\n\n// Given a MIME type, a {name, ...options} config object, or a name\n// string, return a mode config object.\nfunction resolveMode(spec) {\n if (typeof spec == \"string\" && mimeModes.hasOwnProperty(spec)) {\n spec = mimeModes[spec];\n } else if (spec && typeof spec.name == \"string\" && mimeModes.hasOwnProperty(spec.name)) {\n var found = mimeModes[spec.name];\n if (typeof found == \"string\") { found = {name: found}; }\n spec = createObj(found, spec);\n spec.name = found.name;\n } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+xml$/.test(spec)) {\n return resolveMode(\"application/xml\")\n } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+json$/.test(spec)) {\n return resolveMode(\"application/json\")\n }\n if (typeof spec == \"string\") { return {name: spec} }\n else { return spec || {name: \"null\"} }\n}\n\n// Given a mode spec (anything that resolveMode accepts), find and\n// initialize an actual mode object.\nfunction getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n if (!mfactory) { return getMode(options, \"text/plain\") }\n var modeObj = mfactory(options, spec);\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n modeObj[prop] = exts[prop];\n }\n }\n modeObj.name = spec.name;\n if (spec.helperType) { modeObj.helperType = spec.helperType; }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n return modeObj\n}\n\n// This can be used to attach properties to mode objects from\n// outside the actual mode definition.\nvar modeExtensions = {};\nfunction extendMode(mode, properties) {\n var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});\n copyObj(properties, exts);\n}\n\nfunction copyState(mode, state) {\n if (state === true) { return state }\n if (mode.copyState) { return mode.copyState(state) }\n var nstate = {};\n for (var n in state) {\n var val = state[n];\n if (val instanceof Array) { val = val.concat([]); }\n nstate[n] = val;\n }\n return nstate\n}\n\n// Given a mode and a state (for that mode), find the inner mode and\n// state at the position that the state refers to.\nfunction innerMode(mode, state) {\n var info;\n while (mode.innerMode) {\n info = mode.innerMode(state);\n if (!info || info.mode == mode) { break }\n state = info.state;\n mode = info.mode;\n }\n return info || {mode: mode, state: state}\n}\n\nfunction startState(mode, a1, a2) {\n return mode.startState ? mode.startState(a1, a2) : true\n}\n\n// STRING STREAM\n\n// Fed to the mode parsers, provides helper functions to make\n// parsers more succinct.\n\nvar StringStream = function(string, tabSize, lineOracle) {\n this.pos = this.start = 0;\n this.string = string;\n this.tabSize = tabSize || 8;\n this.lastColumnPos = this.lastColumnValue = 0;\n this.lineStart = 0;\n this.lineOracle = lineOracle;\n};\n\nStringStream.prototype.eol = function () {return this.pos >= this.string.length};\nStringStream.prototype.sol = function () {return this.pos == this.lineStart};\nStringStream.prototype.peek = function () {return this.string.charAt(this.pos) || undefined};\nStringStream.prototype.next = function () {\n if (this.pos < this.string.length)\n { return this.string.charAt(this.pos++) }\n};\nStringStream.prototype.eat = function (match) {\n var ch = this.string.charAt(this.pos);\n var ok;\n if (typeof match == \"string\") { ok = ch == match; }\n else { ok = ch && (match.test ? match.test(ch) : match(ch)); }\n if (ok) {++this.pos; return ch}\n};\nStringStream.prototype.eatWhile = function (match) {\n var start = this.pos;\n while (this.eat(match)){}\n return this.pos > start\n};\nStringStream.prototype.eatSpace = function () {\n var this$1 = this;\n\n var start = this.pos;\n while (/[\\s\\u00a0]/.test(this.string.charAt(this.pos))) { ++this$1.pos; }\n return this.pos > start\n};\nStringStream.prototype.skipToEnd = function () {this.pos = this.string.length;};\nStringStream.prototype.skipTo = function (ch) {\n var found = this.string.indexOf(ch, this.pos);\n if (found > -1) {this.pos = found; return true}\n};\nStringStream.prototype.backUp = function (n) {this.pos -= n;};\nStringStream.prototype.column = function () {\n if (this.lastColumnPos < this.start) {\n this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);\n this.lastColumnPos = this.start;\n }\n return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)\n};\nStringStream.prototype.indentation = function () {\n return countColumn(this.string, null, this.tabSize) -\n (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)\n};\nStringStream.prototype.match = function (pattern, consume, caseInsensitive) {\n if (typeof pattern == \"string\") {\n var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; };\n var substr = this.string.substr(this.pos, pattern.length);\n if (cased(substr) == cased(pattern)) {\n if (consume !== false) { this.pos += pattern.length; }\n return true\n }\n } else {\n var match = this.string.slice(this.pos).match(pattern);\n if (match && match.index > 0) { return null }\n if (match && consume !== false) { this.pos += match[0].length; }\n return match\n }\n};\nStringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)};\nStringStream.prototype.hideFirstChars = function (n, inner) {\n this.lineStart += n;\n try { return inner() }\n finally { this.lineStart -= n; }\n};\nStringStream.prototype.lookAhead = function (n) {\n var oracle = this.lineOracle;\n return oracle && oracle.lookAhead(n)\n};\nStringStream.prototype.baseToken = function () {\n var oracle = this.lineOracle;\n return oracle && oracle.baseToken(this.pos)\n};\n\nvar SavedContext = function(state, lookAhead) {\n this.state = state;\n this.lookAhead = lookAhead;\n};\n\nvar Context = function(doc, state, line, lookAhead) {\n this.state = state;\n this.doc = doc;\n this.line = line;\n this.maxLookAhead = lookAhead || 0;\n this.baseTokens = null;\n this.baseTokenPos = 1;\n};\n\nContext.prototype.lookAhead = function (n) {\n var line = this.doc.getLine(this.line + n);\n if (line != null && n > this.maxLookAhead) { this.maxLookAhead = n; }\n return line\n};\n\nContext.prototype.baseToken = function (n) {\n var this$1 = this;\n\n if (!this.baseTokens) { return null }\n while (this.baseTokens[this.baseTokenPos] <= n)\n { this$1.baseTokenPos += 2; }\n var type = this.baseTokens[this.baseTokenPos + 1];\n return {type: type && type.replace(/( |^)overlay .*/, \"\"),\n size: this.baseTokens[this.baseTokenPos] - n}\n};\n\nContext.prototype.nextLine = function () {\n this.line++;\n if (this.maxLookAhead > 0) { this.maxLookAhead--; }\n};\n\nContext.fromSaved = function (doc, saved, line) {\n if (saved instanceof SavedContext)\n { return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead) }\n else\n { return new Context(doc, copyState(doc.mode, saved), line) }\n};\n\nContext.prototype.save = function (copy) {\n var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state;\n return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state\n};\n\n\n// Compute a style array (an array starting with a mode generation\n// -- for invalidation -- followed by pairs of end positions and\n// style strings), which is used to highlight the tokens on the\n// line.\nfunction highlightLine(cm, line, context, forceToEnd) {\n // A styles array always starts with a number identifying the\n // mode/overlays that it is based on (for easy invalidation).\n var st = [cm.state.modeGen], lineClasses = {};\n // Compute the base array of styles\n runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd);\n var state = context.state;\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n context.baseTokens = st;\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n context.state = true;\n runMode(cm, line.text, overlay.mode, context, function (end, style) {\n var start = i;\n // Ensure there's a token end at the current position, and that i points at it\n while (at < end) {\n var i_end = st[i];\n if (i_end > end)\n { st.splice(i, 1, end, st[i+1], i_end); }\n i += 2;\n at = Math.min(end, i_end);\n }\n if (!style) { return }\n if (overlay.opaque) {\n st.splice(start, i - start, end, \"overlay \" + style);\n i = start + 2;\n } else {\n for (; start < i; start += 2) {\n var cur = st[start+1];\n st[start+1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\n }\n }\n }, lineClasses);\n context.state = state;\n context.baseTokens = null;\n context.baseTokenPos = 1;\n };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n}\n\nfunction getLineStyles(cm, line, updateFrontier) {\n if (!line.styles || line.styles[0] != cm.state.modeGen) {\n var context = getContextBefore(cm, lineNo(line));\n var resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state);\n var result = highlightLine(cm, line, context);\n if (resetState) { context.state = resetState; }\n line.stateAfter = context.save(!resetState);\n line.styles = result.styles;\n if (result.classes) { line.styleClasses = result.classes; }\n else if (line.styleClasses) { line.styleClasses = null; }\n if (updateFrontier === cm.doc.highlightFrontier)\n { cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier); }\n }\n return line.styles\n}\n\nfunction getContextBefore(cm, n, precise) {\n var doc = cm.doc, display = cm.display;\n if (!doc.mode.startState) { return new Context(doc, true, n) }\n var start = findStartLine(cm, n, precise);\n var saved = start > doc.first && getLine(doc, start - 1).stateAfter;\n var context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start);\n\n doc.iter(start, n, function (line) {\n processLine(cm, line.text, context);\n var pos = context.line;\n line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null;\n context.nextLine();\n });\n if (precise) { doc.modeFrontier = context.line; }\n return context\n}\n\n// Lightweight form of highlight -- proceed over this line and\n// update state, but don't save a style array. Used for lines that\n// aren't currently visible.\nfunction processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n}\n\nfunction callBlankLine(mode, state) {\n if (mode.blankLine) { return mode.blankLine(state) }\n if (!mode.innerMode) { return }\n var inner = innerMode(mode, state);\n if (inner.mode.blankLine) { return inner.mode.blankLine(inner.state) }\n}\n\nfunction readToken(mode, stream, state, inner) {\n for (var i = 0; i < 10; i++) {\n if (inner) { inner[0] = innerMode(mode, state).mode; }\n var style = mode.token(stream, state);\n if (stream.pos > stream.start) { return style }\n }\n throw new Error(\"Mode \" + mode.name + \" failed to advance stream.\")\n}\n\nvar Token = function(stream, type, state) {\n this.start = stream.start; this.end = stream.pos;\n this.string = stream.current();\n this.type = type || null;\n this.state = state;\n};\n\n// Utility for getTokenAt and getLineTokens\nfunction takeToken(cm, pos, precise, asArray) {\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n if (asArray) { tokens = []; }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, context.state);\n if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n }\n return asArray ? tokens : new Token(stream, style, context.state)\n}\n\nfunction extractLineClasses(type, output) {\n if (type) { for (;;) {\n var lineClass = type.match(/(?:^|\\s+)line-(background-)?(\\S+)/);\n if (!lineClass) { break }\n type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);\n var prop = lineClass[1] ? \"bgClass\" : \"textClass\";\n if (output[prop] == null)\n { output[prop] = lineClass[2]; }\n else if (!(new RegExp(\"(?:^|\\s)\" + lineClass[2] + \"(?:$|\\s)\")).test(output[prop]))\n { output[prop] += \" \" + lineClass[2]; }\n } }\n return type\n}\n\n// Run the given mode's parser over a line, calling f for each token.\nfunction runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize, context), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000);\n f(pos, curStyle);\n curStart = pos;\n }\n}\n\n// Finds the line to start with when starting a parse. Tries to\n// find a line with a stateAfter, so that it can start with a\n// valid state. If that fails, it returns the line with the\n// smallest indentation, which tends to need the least context to\n// parse correctly.\nfunction findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1), after = line.stateAfter;\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline\n}\n\nfunction retreatFrontier(doc, n) {\n doc.modeFrontier = Math.min(doc.modeFrontier, n);\n if (doc.highlightFrontier < n - 10) { return }\n var start = doc.first;\n for (var line = n - 1; line > start; line--) {\n var saved = getLine(doc, line).stateAfter;\n // change is on 3\n // state on line 1 looked ahead 2 -- so saw 3\n // test 1 + 2 < 3 should cover this\n if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) {\n start = line + 1;\n break\n }\n }\n doc.highlightFrontier = Math.min(doc.highlightFrontier, start);\n}\n\n// LINE DATA STRUCTURE\n\n// Line objects. These hold state related to a line, including\n// highlighting info (the styles array).\nvar Line = function(text, markedSpans, estimateHeight) {\n this.text = text;\n attachMarkedSpans(this, markedSpans);\n this.height = estimateHeight ? estimateHeight(this) : 1;\n};\n\nLine.prototype.lineNo = function () { return lineNo(this) };\neventMixin(Line);\n\n// Change the content (text, markers) of a line. Automatically\n// invalidates cached information and tries to re-estimate the\n// line's height.\nfunction updateLine(line, text, markedSpans, estimateHeight) {\n line.text = text;\n if (line.stateAfter) { line.stateAfter = null; }\n if (line.styles) { line.styles = null; }\n if (line.order != null) { line.order = null; }\n detachMarkedSpans(line);\n attachMarkedSpans(line, markedSpans);\n var estHeight = estimateHeight ? estimateHeight(line) : 1;\n if (estHeight != line.height) { updateLineHeight(line, estHeight); }\n}\n\n// Detach a line from the document tree and its markers.\nfunction cleanUpLine(line) {\n line.parent = null;\n detachMarkedSpans(line);\n}\n\n// Convert a style as returned by a mode (either null, or a string\n// containing one or more styles) to a CSS style. This is cached,\n// and also looks for line-wide styles.\nvar styleToClassCache = {};\nvar styleToClassCacheWithMode = {};\nfunction interpretTokenStyle(style, options) {\n if (!style || /^\\s*$/.test(style)) { return null }\n var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;\n return cache[style] ||\n (cache[style] = style.replace(/\\S+/g, \"cm-$&\"))\n}\n\n// Render the DOM representation of the text of a line. Also builds\n// up a 'line map', which points at the DOM nodes that represent\n// specific stretches of text, and is used by the measuring code.\n// The returned object contains the DOM node, this map, and\n// information about line-wide styles that were set by the mode.\nfunction buildLineContent(cm, lineView) {\n // The padding-right forces the element to have a 'border', which\n // is needed on Webkit to be able to get line-level bounding\n // rectangles for it (in measureChar).\n var content = eltP(\"span\", null, null, webkit ? \"padding-right: .1px\" : null);\n var builder = {pre: eltP(\"pre\", [content], \"CodeMirror-line\"), content: content,\n col: 0, pos: 0, cm: cm,\n trailingSpace: false,\n splitSpaces: (ie || webkit) && cm.getOption(\"lineWrapping\")};\n lineView.measure = {};\n\n // Iterate over the logical lines that make up this visual line.\n for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {\n var line = i ? lineView.rest[i - 1] : lineView.line, order = (void 0);\n builder.pos = 0;\n builder.addToken = buildToken;\n // Optionally wire in some hacks into the token-rendering\n // algorithm, to deal with browser quirks.\n if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction)))\n { builder.addToken = buildTokenBadBidi(builder.addToken, order); }\n builder.map = [];\n var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);\n insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));\n if (line.styleClasses) {\n if (line.styleClasses.bgClass)\n { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || \"\"); }\n if (line.styleClasses.textClass)\n { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || \"\"); }\n }\n\n // Ensure at least a single node is present, for measuring.\n if (builder.map.length == 0)\n { builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); }\n\n // Store the map and a cache object for the current logical line\n if (i == 0) {\n lineView.measure.map = builder.map;\n lineView.measure.cache = {};\n } else {\n (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map)\n ;(lineView.measure.caches || (lineView.measure.caches = [])).push({});\n }\n }\n\n // See issue #2901\n if (webkit) {\n var last = builder.content.lastChild;\n if (/\\bcm-tab\\b/.test(last.className) || (last.querySelector && last.querySelector(\".cm-tab\")))\n { builder.content.className = \"cm-tab-wrap-hack\"; }\n }\n\n signal(cm, \"renderLine\", cm, lineView.line, builder.pre);\n if (builder.pre.className)\n { builder.textClass = joinClasses(builder.pre.className, builder.textClass || \"\"); }\n\n return builder\n}\n\nfunction defaultSpecialCharPlaceholder(ch) {\n var token = elt(\"span\", \"\\u2022\", \"cm-invalidchar\");\n token.title = \"\\\\u\" + ch.charCodeAt(0).toString(16);\n token.setAttribute(\"aria-label\", token.title);\n return token\n}\n\n// Build up the DOM representation for a single token, and add it to\n// the line map. Takes care to render special characters separately.\nfunction buildToken(builder, text, style, startStyle, endStyle, title, css) {\n if (!text) { return }\n var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text;\n var special = builder.cm.state.specialChars, mustWrap = false;\n var content;\n if (!special.test(text)) {\n builder.col += text.length;\n content = document.createTextNode(displayText);\n builder.map.push(builder.pos, builder.pos + text.length, content);\n if (ie && ie_version < 9) { mustWrap = true; }\n builder.pos += text.length;\n } else {\n content = document.createDocumentFragment();\n var pos = 0;\n while (true) {\n special.lastIndex = pos;\n var m = special.exec(text);\n var skipped = m ? m.index - pos : text.length - pos;\n if (skipped) {\n var txt = document.createTextNode(displayText.slice(pos, pos + skipped));\n if (ie && ie_version < 9) { content.appendChild(elt(\"span\", [txt])); }\n else { content.appendChild(txt); }\n builder.map.push(builder.pos, builder.pos + skipped, txt);\n builder.col += skipped;\n builder.pos += skipped;\n }\n if (!m) { break }\n pos += skipped + 1;\n var txt$1 = (void 0);\n if (m[0] == \"\\t\") {\n var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;\n txt$1 = content.appendChild(elt(\"span\", spaceStr(tabWidth), \"cm-tab\"));\n txt$1.setAttribute(\"role\", \"presentation\");\n txt$1.setAttribute(\"cm-text\", \"\\t\");\n builder.col += tabWidth;\n } else if (m[0] == \"\\r\" || m[0] == \"\\n\") {\n txt$1 = content.appendChild(elt(\"span\", m[0] == \"\\r\" ? \"\\u240d\" : \"\\u2424\", \"cm-invalidchar\"));\n txt$1.setAttribute(\"cm-text\", m[0]);\n builder.col += 1;\n } else {\n txt$1 = builder.cm.options.specialCharPlaceholder(m[0]);\n txt$1.setAttribute(\"cm-text\", m[0]);\n if (ie && ie_version < 9) { content.appendChild(elt(\"span\", [txt$1])); }\n else { content.appendChild(txt$1); }\n builder.col += 1;\n }\n builder.map.push(builder.pos, builder.pos + 1, txt$1);\n builder.pos++;\n }\n }\n builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32;\n if (style || startStyle || endStyle || mustWrap || css) {\n var fullStyle = style || \"\";\n if (startStyle) { fullStyle += startStyle; }\n if (endStyle) { fullStyle += endStyle; }\n var token = elt(\"span\", [content], fullStyle, css);\n if (title) { token.title = title; }\n return builder.content.appendChild(token)\n }\n builder.content.appendChild(content);\n}\n\nfunction splitSpaces(text, trailingBefore) {\n if (text.length > 1 && !/ /.test(text)) { return text }\n var spaceBefore = trailingBefore, result = \"\";\n for (var i = 0; i < text.length; i++) {\n var ch = text.charAt(i);\n if (ch == \" \" && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32))\n { ch = \"\\u00a0\"; }\n result += ch;\n spaceBefore = ch == \" \";\n }\n return result\n}\n\n// Work around nonsense dimensions being reported for stretches of\n// right-to-left text.\nfunction buildTokenBadBidi(inner, order) {\n return function (builder, text, style, startStyle, endStyle, title, css) {\n style = style ? style + \" cm-force-border\" : \"cm-force-border\";\n var start = builder.pos, end = start + text.length;\n for (;;) {\n // Find the part that overlaps with the start of this text\n var part = (void 0);\n for (var i = 0; i < order.length; i++) {\n part = order[i];\n if (part.to > start && part.from <= start) { break }\n }\n if (part.to >= end) { return inner(builder, text, style, startStyle, endStyle, title, css) }\n inner(builder, text.slice(0, part.to - start), style, startStyle, null, title, css);\n startStyle = null;\n text = text.slice(part.to - start);\n start = part.to;\n }\n }\n}\n\nfunction buildCollapsedSpan(builder, size, marker, ignoreWidget) {\n var widget = !ignoreWidget && marker.widgetNode;\n if (widget) { builder.map.push(builder.pos, builder.pos + size, widget); }\n if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {\n if (!widget)\n { widget = builder.content.appendChild(document.createElement(\"span\")); }\n widget.setAttribute(\"cm-marker\", marker.id);\n }\n if (widget) {\n builder.cm.display.input.setUneditable(widget);\n builder.content.appendChild(widget);\n }\n builder.pos += size;\n builder.trailingSpace = false;\n}\n\n// Outputs a number of spans to make up a line, taking highlighting\n// and marked text into account.\nfunction insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n if (m.title && !title) { title = m.title; }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n}\n\n\n// These objects are used to represent the visible (currently drawn)\n// part of the document. A LineView may correspond to multiple\n// logical lines, if those are connected by collapsed ranges.\nfunction LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n}\n\n// Create a range of LineView objects for the given lines.\nfunction buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n}\n\nvar operationGroup = null;\n\nfunction pushOperation(op) {\n if (operationGroup) {\n operationGroup.ops.push(op);\n } else {\n op.ownsGroup = operationGroup = {\n ops: [op],\n delayedCallbacks: []\n };\n }\n}\n\nfunction fireCallbacksForOps(group) {\n // Calls delayed callbacks and cursorActivity handlers until no\n // new ones appear\n var callbacks = group.delayedCallbacks, i = 0;\n do {\n for (; i < callbacks.length; i++)\n { callbacks[i].call(null); }\n for (var j = 0; j < group.ops.length; j++) {\n var op = group.ops[j];\n if (op.cursorActivityHandlers)\n { while (op.cursorActivityCalled < op.cursorActivityHandlers.length)\n { op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); } }\n }\n } while (i < callbacks.length)\n}\n\nfunction finishOperation(op, endCb) {\n var group = op.ownsGroup;\n if (!group) { return }\n\n try { fireCallbacksForOps(group); }\n finally {\n operationGroup = null;\n endCb(group);\n }\n}\n\nvar orphanDelayedCallbacks = null;\n\n// Often, we want to signal events at a point where we are in the\n// middle of some work, but don't want the handler to start calling\n// other methods on the editor, which might be in an inconsistent\n// state or simply not expect any other events to happen.\n// signalLater looks whether there are any handlers, and schedules\n// them to be executed when the last operation ends, or, if no\n// operation is active, when a timeout fires.\nfunction signalLater(emitter, type /*, values...*/) {\n var arr = getHandlers(emitter, type);\n if (!arr.length) { return }\n var args = Array.prototype.slice.call(arguments, 2), list;\n if (operationGroup) {\n list = operationGroup.delayedCallbacks;\n } else if (orphanDelayedCallbacks) {\n list = orphanDelayedCallbacks;\n } else {\n list = orphanDelayedCallbacks = [];\n setTimeout(fireOrphanDelayed, 0);\n }\n var loop = function ( i ) {\n list.push(function () { return arr[i].apply(null, args); });\n };\n\n for (var i = 0; i < arr.length; ++i)\n loop( i );\n}\n\nfunction fireOrphanDelayed() {\n var delayed = orphanDelayedCallbacks;\n orphanDelayedCallbacks = null;\n for (var i = 0; i < delayed.length; ++i) { delayed[i](); }\n}\n\n// When an aspect of a line changes, a string is added to\n// lineView.changes. This updates the relevant part of the line's\n// DOM structure.\nfunction updateLineForChanges(cm, lineView, lineN, dims) {\n for (var j = 0; j < lineView.changes.length; j++) {\n var type = lineView.changes[j];\n if (type == \"text\") { updateLineText(cm, lineView); }\n else if (type == \"gutter\") { updateLineGutter(cm, lineView, lineN, dims); }\n else if (type == \"class\") { updateLineClasses(cm, lineView); }\n else if (type == \"widget\") { updateLineWidgets(cm, lineView, dims); }\n }\n lineView.changes = null;\n}\n\n// Lines with gutter elements, widgets or a background class need to\n// be wrapped, and have the extra elements added to the wrapper div\nfunction ensureLineWrapped(lineView) {\n if (lineView.node == lineView.text) {\n lineView.node = elt(\"div\", null, null, \"position: relative\");\n if (lineView.text.parentNode)\n { lineView.text.parentNode.replaceChild(lineView.node, lineView.text); }\n lineView.node.appendChild(lineView.text);\n if (ie && ie_version < 8) { lineView.node.style.zIndex = 2; }\n }\n return lineView.node\n}\n\nfunction updateLineBackground(cm, lineView) {\n var cls = lineView.bgClass ? lineView.bgClass + \" \" + (lineView.line.bgClass || \"\") : lineView.line.bgClass;\n if (cls) { cls += \" CodeMirror-linebackground\"; }\n if (lineView.background) {\n if (cls) { lineView.background.className = cls; }\n else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }\n } else if (cls) {\n var wrap = ensureLineWrapped(lineView);\n lineView.background = wrap.insertBefore(elt(\"div\", null, cls), wrap.firstChild);\n cm.display.input.setUneditable(lineView.background);\n }\n}\n\n// Wrapper around buildLineContent which will reuse the structure\n// in display.externalMeasured when possible.\nfunction getLineContent(cm, lineView) {\n var ext = cm.display.externalMeasured;\n if (ext && ext.line == lineView.line) {\n cm.display.externalMeasured = null;\n lineView.measure = ext.measure;\n return ext.built\n }\n return buildLineContent(cm, lineView)\n}\n\n// Redraw the line's text. Interacts with the background and text\n// classes because the mode may output tokens that influence these\n// classes.\nfunction updateLineText(cm, lineView) {\n var cls = lineView.text.className;\n var built = getLineContent(cm, lineView);\n if (lineView.text == lineView.node) { lineView.node = built.pre; }\n lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n lineView.text = built.pre;\n if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n lineView.bgClass = built.bgClass;\n lineView.textClass = built.textClass;\n updateLineClasses(cm, lineView);\n } else if (cls) {\n lineView.text.className = cls;\n }\n}\n\nfunction updateLineClasses(cm, lineView) {\n updateLineBackground(cm, lineView);\n if (lineView.line.wrapClass)\n { ensureLineWrapped(lineView).className = lineView.line.wrapClass; }\n else if (lineView.node != lineView.text)\n { lineView.node.className = \"\"; }\n var textClass = lineView.textClass ? lineView.textClass + \" \" + (lineView.line.textClass || \"\") : lineView.line.textClass;\n lineView.text.className = textClass || \"\";\n}\n\nfunction updateLineGutter(cm, lineView, lineN, dims) {\n if (lineView.gutter) {\n lineView.node.removeChild(lineView.gutter);\n lineView.gutter = null;\n }\n if (lineView.gutterBackground) {\n lineView.node.removeChild(lineView.gutterBackground);\n lineView.gutterBackground = null;\n }\n if (lineView.line.gutterClass) {\n var wrap = ensureLineWrapped(lineView);\n lineView.gutterBackground = elt(\"div\", null, \"CodeMirror-gutter-background \" + lineView.line.gutterClass,\n (\"left: \" + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + \"px; width: \" + (dims.gutterTotalWidth) + \"px\"));\n cm.display.input.setUneditable(lineView.gutterBackground);\n wrap.insertBefore(lineView.gutterBackground, lineView.text);\n }\n var markers = lineView.line.gutterMarkers;\n if (cm.options.lineNumbers || markers) {\n var wrap$1 = ensureLineWrapped(lineView);\n var gutterWrap = lineView.gutter = elt(\"div\", null, \"CodeMirror-gutter-wrapper\", (\"left: \" + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + \"px\"));\n cm.display.input.setUneditable(gutterWrap);\n wrap$1.insertBefore(gutterWrap, lineView.text);\n if (lineView.line.gutterClass)\n { gutterWrap.className += \" \" + lineView.line.gutterClass; }\n if (cm.options.lineNumbers && (!markers || !markers[\"CodeMirror-linenumbers\"]))\n { lineView.lineNumber = gutterWrap.appendChild(\n elt(\"div\", lineNumberFor(cm.options, lineN),\n \"CodeMirror-linenumber CodeMirror-gutter-elt\",\n (\"left: \" + (dims.gutterLeft[\"CodeMirror-linenumbers\"]) + \"px; width: \" + (cm.display.lineNumInnerWidth) + \"px\"))); }\n if (markers) { for (var k = 0; k < cm.options.gutters.length; ++k) {\n var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id];\n if (found)\n { gutterWrap.appendChild(elt(\"div\", [found], \"CodeMirror-gutter-elt\",\n (\"left: \" + (dims.gutterLeft[id]) + \"px; width: \" + (dims.gutterWidth[id]) + \"px\"))); }\n } }\n }\n}\n\nfunction updateLineWidgets(cm, lineView, dims) {\n if (lineView.alignable) { lineView.alignable = null; }\n for (var node = lineView.node.firstChild, next = (void 0); node; node = next) {\n next = node.nextSibling;\n if (node.className == \"CodeMirror-linewidget\")\n { lineView.node.removeChild(node); }\n }\n insertLineWidgets(cm, lineView, dims);\n}\n\n// Build a line's DOM representation from scratch\nfunction buildLineElement(cm, lineView, lineN, dims) {\n var built = getLineContent(cm, lineView);\n lineView.text = lineView.node = built.pre;\n if (built.bgClass) { lineView.bgClass = built.bgClass; }\n if (built.textClass) { lineView.textClass = built.textClass; }\n\n updateLineClasses(cm, lineView);\n updateLineGutter(cm, lineView, lineN, dims);\n insertLineWidgets(cm, lineView, dims);\n return lineView.node\n}\n\n// A lineView may contain multiple logical lines (when merged by\n// collapsed spans). The widgets for all of them need to be drawn.\nfunction insertLineWidgets(cm, lineView, dims) {\n insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);\n if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)\n { insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); } }\n}\n\nfunction insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {\n if (!line.widgets) { return }\n var wrap = ensureLineWrapped(lineView);\n for (var i = 0, ws = line.widgets; i < ws.length; ++i) {\n var widget = ws[i], node = elt(\"div\", [widget.node], \"CodeMirror-linewidget\");\n if (!widget.handleMouseEvents) { node.setAttribute(\"cm-ignore-events\", \"true\"); }\n positionLineWidget(widget, node, lineView, dims);\n cm.display.input.setUneditable(node);\n if (allowAbove && widget.above)\n { wrap.insertBefore(node, lineView.gutter || lineView.text); }\n else\n { wrap.appendChild(node); }\n signalLater(widget, \"redraw\");\n }\n}\n\nfunction positionLineWidget(widget, node, lineView, dims) {\n if (widget.noHScroll) {\n (lineView.alignable || (lineView.alignable = [])).push(node);\n var width = dims.wrapperWidth;\n node.style.left = dims.fixedPos + \"px\";\n if (!widget.coverGutter) {\n width -= dims.gutterTotalWidth;\n node.style.paddingLeft = dims.gutterTotalWidth + \"px\";\n }\n node.style.width = width + \"px\";\n }\n if (widget.coverGutter) {\n node.style.zIndex = 5;\n node.style.position = \"relative\";\n if (!widget.noHScroll) { node.style.marginLeft = -dims.gutterTotalWidth + \"px\"; }\n }\n}\n\nfunction widgetHeight(widget) {\n if (widget.height != null) { return widget.height }\n var cm = widget.doc.cm;\n if (!cm) { return 0 }\n if (!contains(document.body, widget.node)) {\n var parentStyle = \"position: relative;\";\n if (widget.coverGutter)\n { parentStyle += \"margin-left: -\" + cm.display.gutters.offsetWidth + \"px;\"; }\n if (widget.noHScroll)\n { parentStyle += \"width: \" + cm.display.wrapper.clientWidth + \"px;\"; }\n removeChildrenAndAdd(cm.display.measure, elt(\"div\", [widget.node], null, parentStyle));\n }\n return widget.height = widget.node.parentNode.offsetHeight\n}\n\n// Return true when the given mouse event happened in a widget\nfunction eventInWidget(display, e) {\n for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {\n if (!n || (n.nodeType == 1 && n.getAttribute(\"cm-ignore-events\") == \"true\") ||\n (n.parentNode == display.sizer && n != display.mover))\n { return true }\n }\n}\n\n// POSITION MEASUREMENT\n\nfunction paddingTop(display) {return display.lineSpace.offsetTop}\nfunction paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight}\nfunction paddingH(display) {\n if (display.cachedPaddingH) { return display.cachedPaddingH }\n var e = removeChildrenAndAdd(display.measure, elt(\"pre\", \"x\"));\n var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;\n var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};\n if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data; }\n return data\n}\n\nfunction scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth }\nfunction displayWidth(cm) {\n return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth\n}\nfunction displayHeight(cm) {\n return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight\n}\n\n// Ensure the lineView.wrapping.heights array is populated. This is\n// an array of bottom offsets for the lines that make up a drawn\n// line. When lineWrapping is on, there might be more than one\n// height.\nfunction ensureLineHeights(cm, lineView, rect) {\n var wrapping = cm.options.lineWrapping;\n var curWidth = wrapping && displayWidth(cm);\n if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {\n var heights = lineView.measure.heights = [];\n if (wrapping) {\n lineView.measure.width = curWidth;\n var rects = lineView.text.firstChild.getClientRects();\n for (var i = 0; i < rects.length - 1; i++) {\n var cur = rects[i], next = rects[i + 1];\n if (Math.abs(cur.bottom - next.bottom) > 2)\n { heights.push((cur.bottom + next.top) / 2 - rect.top); }\n }\n }\n heights.push(rect.bottom - rect.top);\n }\n}\n\n// Find a line map (mapping character offsets to text nodes) and a\n// measurement cache for the given line number. (A line view might\n// contain multiple lines when collapsed ranges are present.)\nfunction mapFromLineView(lineView, line, lineN) {\n if (lineView.line == line)\n { return {map: lineView.measure.map, cache: lineView.measure.cache} }\n for (var i = 0; i < lineView.rest.length; i++)\n { if (lineView.rest[i] == line)\n { return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]} } }\n for (var i$1 = 0; i$1 < lineView.rest.length; i$1++)\n { if (lineNo(lineView.rest[i$1]) > lineN)\n { return {map: lineView.measure.maps[i$1], cache: lineView.measure.caches[i$1], before: true} } }\n}\n\n// Render a line into the hidden node display.externalMeasured. Used\n// when measurement is needed for a line that's not in the viewport.\nfunction updateExternalMeasurement(cm, line) {\n line = visualLine(line);\n var lineN = lineNo(line);\n var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);\n view.lineN = lineN;\n var built = view.built = buildLineContent(cm, view);\n view.text = built.pre;\n removeChildrenAndAdd(cm.display.lineMeasure, built.pre);\n return view\n}\n\n// Get a {top, bottom, left, right} box (in line-local coordinates)\n// for a given character.\nfunction measureChar(cm, line, ch, bias) {\n return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias)\n}\n\n// Find a line view that corresponds to the given line number.\nfunction findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n}\n\n// Measurement can be split in two steps, the set-up work that\n// applies to the whole line, and the measurement of the actual\n// character. Functions like coordsChar, that need to do a lot of\n// measurements in a row, can thus ensure that the set-up work is\n// only done once.\nfunction prepareMeasureForLine(cm, line) {\n var lineN = lineNo(line);\n var view = findViewForLine(cm, lineN);\n if (view && !view.text) {\n view = null;\n } else if (view && view.changes) {\n updateLineForChanges(cm, view, lineN, getDimensions(cm));\n cm.curOp.forceUpdate = true;\n }\n if (!view)\n { view = updateExternalMeasurement(cm, line); }\n\n var info = mapFromLineView(view, line, lineN);\n return {\n line: line, view: view, rect: null,\n map: info.map, cache: info.cache, before: info.before,\n hasHeights: false\n }\n}\n\n// Given a prepared measurement object, measures the position of an\n// actual character (or fetches it from the cache).\nfunction measureCharPrepared(cm, prepared, ch, bias, varHeight) {\n if (prepared.before) { ch = -1; }\n var key = ch + (bias || \"\"), found;\n if (prepared.cache.hasOwnProperty(key)) {\n found = prepared.cache[key];\n } else {\n if (!prepared.rect)\n { prepared.rect = prepared.view.text.getBoundingClientRect(); }\n if (!prepared.hasHeights) {\n ensureLineHeights(cm, prepared.view, prepared.rect);\n prepared.hasHeights = true;\n }\n found = measureCharInner(cm, prepared, ch, bias);\n if (!found.bogus) { prepared.cache[key] = found; }\n }\n return {left: found.left, right: found.right,\n top: varHeight ? found.rtop : found.top,\n bottom: varHeight ? found.rbottom : found.bottom}\n}\n\nvar nullRect = {left: 0, right: 0, top: 0, bottom: 0};\n\nfunction nodeAndOffsetInLineMap(map$$1, ch, bias) {\n var node, start, end, collapse, mStart, mEnd;\n // First, search the line map for the text node corresponding to,\n // or closest to, the target character.\n for (var i = 0; i < map$$1.length; i += 3) {\n mStart = map$$1[i];\n mEnd = map$$1[i + 1];\n if (ch < mStart) {\n start = 0; end = 1;\n collapse = \"left\";\n } else if (ch < mEnd) {\n start = ch - mStart;\n end = start + 1;\n } else if (i == map$$1.length - 3 || ch == mEnd && map$$1[i + 3] > ch) {\n end = mEnd - mStart;\n start = end - 1;\n if (ch >= mEnd) { collapse = \"right\"; }\n }\n if (start != null) {\n node = map$$1[i + 2];\n if (mStart == mEnd && bias == (node.insertLeft ? \"left\" : \"right\"))\n { collapse = bias; }\n if (bias == \"left\" && start == 0)\n { while (i && map$$1[i - 2] == map$$1[i - 3] && map$$1[i - 1].insertLeft) {\n node = map$$1[(i -= 3) + 2];\n collapse = \"left\";\n } }\n if (bias == \"right\" && start == mEnd - mStart)\n { while (i < map$$1.length - 3 && map$$1[i + 3] == map$$1[i + 4] && !map$$1[i + 5].insertLeft) {\n node = map$$1[(i += 3) + 2];\n collapse = \"right\";\n } }\n break\n }\n }\n return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd}\n}\n\nfunction getUsefulRect(rects, bias) {\n var rect = nullRect;\n if (bias == \"left\") { for (var i = 0; i < rects.length; i++) {\n if ((rect = rects[i]).left != rect.right) { break }\n } } else { for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) {\n if ((rect = rects[i$1]).left != rect.right) { break }\n } }\n return rect\n}\n\nfunction measureCharInner(cm, prepared, ch, bias) {\n var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);\n var node = place.node, start = place.start, end = place.end, collapse = place.collapse;\n\n var rect;\n if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.\n for (var i$1 = 0; i$1 < 4; i$1++) { // Retry a maximum of 4 times when nonsense rectangles are returned\n while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) { --start; }\n while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) { ++end; }\n if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart)\n { rect = node.parentNode.getBoundingClientRect(); }\n else\n { rect = getUsefulRect(range(node, start, end).getClientRects(), bias); }\n if (rect.left || rect.right || start == 0) { break }\n end = start;\n start = start - 1;\n collapse = \"right\";\n }\n if (ie && ie_version < 11) { rect = maybeUpdateRectForZooming(cm.display.measure, rect); }\n } else { // If it is a widget, simply get the box for the whole widget.\n if (start > 0) { collapse = bias = \"right\"; }\n var rects;\n if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)\n { rect = rects[bias == \"right\" ? rects.length - 1 : 0]; }\n else\n { rect = node.getBoundingClientRect(); }\n }\n if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {\n var rSpan = node.parentNode.getClientRects()[0];\n if (rSpan)\n { rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; }\n else\n { rect = nullRect; }\n }\n\n var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;\n var mid = (rtop + rbot) / 2;\n var heights = prepared.view.measure.heights;\n var i = 0;\n for (; i < heights.length - 1; i++)\n { if (mid < heights[i]) { break } }\n var top = i ? heights[i - 1] : 0, bot = heights[i];\n var result = {left: (collapse == \"right\" ? rect.right : rect.left) - prepared.rect.left,\n right: (collapse == \"left\" ? rect.left : rect.right) - prepared.rect.left,\n top: top, bottom: bot};\n if (!rect.left && !rect.right) { result.bogus = true; }\n if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }\n\n return result\n}\n\n// Work around problem with bounding client rects on ranges being\n// returned incorrectly when zoomed on IE10 and below.\nfunction maybeUpdateRectForZooming(measure, rect) {\n if (!window.screen || screen.logicalXDPI == null ||\n screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))\n { return rect }\n var scaleX = screen.logicalXDPI / screen.deviceXDPI;\n var scaleY = screen.logicalYDPI / screen.deviceYDPI;\n return {left: rect.left * scaleX, right: rect.right * scaleX,\n top: rect.top * scaleY, bottom: rect.bottom * scaleY}\n}\n\nfunction clearLineMeasurementCacheFor(lineView) {\n if (lineView.measure) {\n lineView.measure.cache = {};\n lineView.measure.heights = null;\n if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)\n { lineView.measure.caches[i] = {}; } }\n }\n}\n\nfunction clearLineMeasurementCache(cm) {\n cm.display.externalMeasure = null;\n removeChildren(cm.display.lineMeasure);\n for (var i = 0; i < cm.display.view.length; i++)\n { clearLineMeasurementCacheFor(cm.display.view[i]); }\n}\n\nfunction clearCaches(cm) {\n clearLineMeasurementCache(cm);\n cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;\n if (!cm.options.lineWrapping) { cm.display.maxLineChanged = true; }\n cm.display.lineNumChars = null;\n}\n\nfunction pageScrollX() {\n // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206\n // which causes page_Offset and bounding client rects to use\n // different reference viewports and invalidate our calculations.\n if (chrome && android) { return -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft)) }\n return window.pageXOffset || (document.documentElement || document.body).scrollLeft\n}\nfunction pageScrollY() {\n if (chrome && android) { return -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop)) }\n return window.pageYOffset || (document.documentElement || document.body).scrollTop\n}\n\nfunction widgetTopHeight(lineObj) {\n var height = 0;\n if (lineObj.widgets) { for (var i = 0; i < lineObj.widgets.length; ++i) { if (lineObj.widgets[i].above)\n { height += widgetHeight(lineObj.widgets[i]); } } }\n return height\n}\n\n// Converts a {top, bottom, left, right} box from line-local\n// coordinates into another coordinate system. Context may be one of\n// \"line\", \"div\" (display.lineDiv), \"local\"./null (editor), \"window\",\n// or \"page\".\nfunction intoCoordSystem(cm, lineObj, rect, context, includeWidgets) {\n if (!includeWidgets) {\n var height = widgetTopHeight(lineObj);\n rect.top += height; rect.bottom += height;\n }\n if (context == \"line\") { return rect }\n if (!context) { context = \"local\"; }\n var yOff = heightAtLine(lineObj);\n if (context == \"local\") { yOff += paddingTop(cm.display); }\n else { yOff -= cm.display.viewOffset; }\n if (context == \"page\" || context == \"window\") {\n var lOff = cm.display.lineSpace.getBoundingClientRect();\n yOff += lOff.top + (context == \"window\" ? 0 : pageScrollY());\n var xOff = lOff.left + (context == \"window\" ? 0 : pageScrollX());\n rect.left += xOff; rect.right += xOff;\n }\n rect.top += yOff; rect.bottom += yOff;\n return rect\n}\n\n// Coverts a box from \"div\" coords to another coordinate system.\n// Context may be \"window\", \"page\", \"div\", or \"local\"./null.\nfunction fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n}\n\nfunction charCoords(cm, pos, context, lineObj, bias) {\n if (!lineObj) { lineObj = getLine(cm.doc, pos.line); }\n return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context)\n}\n\n// Returns a box for a given cursor position, which may have an\n// 'other' property containing the position of the secondary cursor\n// on a bidi boundary.\n// A cursor Pos(line, char, \"before\") is on the same visual line as `char - 1`\n// and after `char - 1` in writing order of `char - 1`\n// A cursor Pos(line, char, \"after\") is on the same visual line as `char`\n// and before `char` in writing order of `char`\n// Examples (upper-case letters are RTL, lower-case are LTR):\n// Pos(0, 1, ...)\n// before after\n// ab a|b a|b\n// aB a|B aB|\n// Ab |Ab A|b\n// AB B|A B|A\n// Every position after the last character on a line is considered to stick\n// to the last character on the line.\nfunction cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {\n lineObj = lineObj || getLine(cm.doc, pos.line);\n if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }\n function get(ch, right) {\n var m = measureCharPrepared(cm, preparedMeasure, ch, right ? \"right\" : \"left\", varHeight);\n if (right) { m.left = m.right; } else { m.right = m.left; }\n return intoCoordSystem(cm, lineObj, m, context)\n }\n var order = getOrder(lineObj, cm.doc.direction), ch = pos.ch, sticky = pos.sticky;\n if (ch >= lineObj.text.length) {\n ch = lineObj.text.length;\n sticky = \"before\";\n } else if (ch <= 0) {\n ch = 0;\n sticky = \"after\";\n }\n if (!order) { return get(sticky == \"before\" ? ch - 1 : ch, sticky == \"before\") }\n\n function getBidi(ch, partPos, invert) {\n var part = order[partPos], right = part.level == 1;\n return get(invert ? ch - 1 : ch, right != invert)\n }\n var partPos = getBidiPartAt(order, ch, sticky);\n var other = bidiOther;\n var val = getBidi(ch, partPos, sticky == \"before\");\n if (other != null) { val.other = getBidi(ch, other, sticky != \"before\"); }\n return val\n}\n\n// Used to cheaply estimate the coordinates for a position. Used for\n// intermediate scroll updates.\nfunction estimateCoords(cm, pos) {\n var left = 0;\n pos = clipPos(cm.doc, pos);\n if (!cm.options.lineWrapping) { left = charWidth(cm.display) * pos.ch; }\n var lineObj = getLine(cm.doc, pos.line);\n var top = heightAtLine(lineObj) + paddingTop(cm.display);\n return {left: left, right: left, top: top, bottom: top + lineObj.height}\n}\n\n// Positions returned by coordsChar contain some extra information.\n// xRel is the relative x position of the input coordinates compared\n// to the found position (so xRel > 0 means the coordinates are to\n// the right of the character position, for example). When outside\n// is true, that means the coordinates lie outside the line's\n// vertical range.\nfunction PosWithInfo(line, ch, sticky, outside, xRel) {\n var pos = Pos(line, ch, sticky);\n pos.xRel = xRel;\n if (outside) { pos.outside = true; }\n return pos\n}\n\n// Compute the character position closest to the given coordinates.\n// Input must be lineSpace-local (\"div\" coordinate system).\nfunction coordsChar(cm, x, y) {\n var doc = cm.doc;\n y += cm.display.viewOffset;\n if (y < 0) { return PosWithInfo(doc.first, 0, null, true, -1) }\n var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;\n if (lineN > last)\n { return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, true, 1) }\n if (x < 0) { x = 0; }\n\n var lineObj = getLine(doc, lineN);\n for (;;) {\n var found = coordsCharInner(cm, lineObj, lineN, x, y);\n var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 ? 1 : 0));\n if (!collapsed) { return found }\n var rangeEnd = collapsed.find(1);\n if (rangeEnd.line == lineN) { return rangeEnd }\n lineObj = getLine(doc, lineN = rangeEnd.line);\n }\n}\n\nfunction wrappedLineExtent(cm, lineObj, preparedMeasure, y) {\n y -= widgetTopHeight(lineObj);\n var end = lineObj.text.length;\n var begin = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y; }, end, 0);\n end = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch).top > y; }, begin, end);\n return {begin: begin, end: end}\n}\n\nfunction wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) {\n if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }\n var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), \"line\").top;\n return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop)\n}\n\n// Returns true if the given side of a box is after the given\n// coordinates, in top-to-bottom, left-to-right order.\nfunction boxIsAfter(box, x, y, left) {\n return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x\n}\n\nfunction coordsCharInner(cm, lineObj, lineNo$$1, x, y) {\n // Move y into line-local coordinate space\n y -= heightAtLine(lineObj);\n var preparedMeasure = prepareMeasureForLine(cm, lineObj);\n // When directly calling `measureCharPrepared`, we have to adjust\n // for the widgets at this line.\n var widgetHeight$$1 = widgetTopHeight(lineObj);\n var begin = 0, end = lineObj.text.length, ltr = true;\n\n var order = getOrder(lineObj, cm.doc.direction);\n // If the line isn't plain left-to-right text, first figure out\n // which bidi section the coordinates fall into.\n if (order) {\n var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart)\n (cm, lineObj, lineNo$$1, preparedMeasure, order, x, y);\n ltr = part.level != 1;\n // The awkward -1 offsets are needed because findFirst (called\n // on these below) will treat its first bound as inclusive,\n // second as exclusive, but we want to actually address the\n // characters in the part's range\n begin = ltr ? part.from : part.to - 1;\n end = ltr ? part.to : part.from - 1;\n }\n\n // A binary search to find the first character whose bounding box\n // starts after the coordinates. If we run across any whose box wrap\n // the coordinates, store that.\n var chAround = null, boxAround = null;\n var ch = findFirst(function (ch) {\n var box = measureCharPrepared(cm, preparedMeasure, ch);\n box.top += widgetHeight$$1; box.bottom += widgetHeight$$1;\n if (!boxIsAfter(box, x, y, false)) { return false }\n if (box.top <= y && box.left <= x) {\n chAround = ch;\n boxAround = box;\n }\n return true\n }, begin, end);\n\n var baseX, sticky, outside = false;\n // If a box around the coordinates was found, use that\n if (boxAround) {\n // Distinguish coordinates nearer to the left or right side of the box\n var atLeft = x - boxAround.left < boxAround.right - x, atStart = atLeft == ltr;\n ch = chAround + (atStart ? 0 : 1);\n sticky = atStart ? \"after\" : \"before\";\n baseX = atLeft ? boxAround.left : boxAround.right;\n } else {\n // (Adjust for extended bound, if necessary.)\n if (!ltr && (ch == end || ch == begin)) { ch++; }\n // To determine which side to associate with, get the box to the\n // left of the character and compare it's vertical position to the\n // coordinates\n sticky = ch == 0 ? \"after\" : ch == lineObj.text.length ? \"before\" :\n (measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight$$1 <= y) == ltr ?\n \"after\" : \"before\";\n // Now get accurate coordinates for this place, in order to get a\n // base X position\n var coords = cursorCoords(cm, Pos(lineNo$$1, ch, sticky), \"line\", lineObj, preparedMeasure);\n baseX = coords.left;\n outside = y < coords.top || y >= coords.bottom;\n }\n\n ch = skipExtendingChars(lineObj.text, ch, 1);\n return PosWithInfo(lineNo$$1, ch, sticky, outside, x - baseX)\n}\n\nfunction coordsBidiPart(cm, lineObj, lineNo$$1, preparedMeasure, order, x, y) {\n // Bidi parts are sorted left-to-right, and in a non-line-wrapping\n // situation, we can take this ordering to correspond to the visual\n // ordering. This finds the first part whose end is after the given\n // coordinates.\n var index = findFirst(function (i) {\n var part = order[i], ltr = part.level != 1;\n return boxIsAfter(cursorCoords(cm, Pos(lineNo$$1, ltr ? part.to : part.from, ltr ? \"before\" : \"after\"),\n \"line\", lineObj, preparedMeasure), x, y, true)\n }, 0, order.length - 1);\n var part = order[index];\n // If this isn't the first part, the part's start is also after\n // the coordinates, and the coordinates aren't on the same line as\n // that start, move one part back.\n if (index > 0) {\n var ltr = part.level != 1;\n var start = cursorCoords(cm, Pos(lineNo$$1, ltr ? part.from : part.to, ltr ? \"after\" : \"before\"),\n \"line\", lineObj, preparedMeasure);\n if (boxIsAfter(start, x, y, true) && start.top > y)\n { part = order[index - 1]; }\n }\n return part\n}\n\nfunction coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) {\n // In a wrapped line, rtl text on wrapping boundaries can do things\n // that don't correspond to the ordering in our `order` array at\n // all, so a binary search doesn't work, and we want to return a\n // part that only spans one line so that the binary search in\n // coordsCharInner is safe. As such, we first find the extent of the\n // wrapped line, and then do a flat search in which we discard any\n // spans that aren't on the line.\n var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y);\n var begin = ref.begin;\n var end = ref.end;\n if (/\\s/.test(lineObj.text.charAt(end - 1))) { end--; }\n var part = null, closestDist = null;\n for (var i = 0; i < order.length; i++) {\n var p = order[i];\n if (p.from >= end || p.to <= begin) { continue }\n var ltr = p.level != 1;\n var endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right;\n // Weigh against spans ending before this, so that they are only\n // picked if nothing ends after\n var dist = endX < x ? x - endX + 1e9 : endX - x;\n if (!part || closestDist > dist) {\n part = p;\n closestDist = dist;\n }\n }\n if (!part) { part = order[order.length - 1]; }\n // Clip the part to the wrapped line.\n if (part.from < begin) { part = {from: begin, to: part.to, level: part.level}; }\n if (part.to > end) { part = {from: part.from, to: end, level: part.level}; }\n return part\n}\n\nvar measureText;\n// Compute the default text height.\nfunction textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n}\n\n// Compute the default character width.\nfunction charWidth(display) {\n if (display.cachedCharWidth != null) { return display.cachedCharWidth }\n var anchor = elt(\"span\", \"xxxxxxxxxx\");\n var pre = elt(\"pre\", [anchor]);\n removeChildrenAndAdd(display.measure, pre);\n var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n if (width > 2) { display.cachedCharWidth = width; }\n return width || 10\n}\n\n// Do a bulk-read of the DOM positions and sizes needed to draw the\n// view, so that we don't interleave reading and writing to the DOM.\nfunction getDimensions(cm) {\n var d = cm.display, left = {}, width = {};\n var gutterLeft = d.gutters.clientLeft;\n for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {\n left[cm.options.gutters[i]] = n.offsetLeft + n.clientLeft + gutterLeft;\n width[cm.options.gutters[i]] = n.clientWidth;\n }\n return {fixedPos: compensateForHScroll(d),\n gutterTotalWidth: d.gutters.offsetWidth,\n gutterLeft: left,\n gutterWidth: width,\n wrapperWidth: d.wrapper.clientWidth}\n}\n\n// Computes display.scroller.scrollLeft + display.gutters.offsetWidth,\n// but using getBoundingClientRect to get a sub-pixel-accurate\n// result.\nfunction compensateForHScroll(display) {\n return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left\n}\n\n// Returns a function that estimates the height of a line, to use as\n// first approximation until the line becomes visible (and is thus\n// properly measurable).\nfunction estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n}\n\nfunction estimateLineHeights(cm) {\n var doc = cm.doc, est = estimateHeight(cm);\n doc.iter(function (line) {\n var estHeight = est(line);\n if (estHeight != line.height) { updateLineHeight(line, estHeight); }\n });\n}\n\n// Given a mouse event, find the corresponding position. If liberal\n// is false, it checks whether a gutter or scrollbar was clicked,\n// and returns null if it was. forRect is used by rectangular\n// selections, and tries to estimate a character position even for\n// coordinates beyond the right of the text.\nfunction posFromMouse(cm, e, liberal, forRect) {\n var display = cm.display;\n if (!liberal && e_target(e).getAttribute(\"cm-not-content\") == \"true\") { return null }\n\n var x, y, space = display.lineSpace.getBoundingClientRect();\n // Fails unpredictably on IE[67] when mouse is dragged around quickly.\n try { x = e.clientX - space.left; y = e.clientY - space.top; }\n catch (e) { return null }\n var coords = coordsChar(cm, x, y), line;\n if (forRect && coords.xRel == 1 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {\n var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;\n coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));\n }\n return coords\n}\n\n// Find the view element corresponding to a given line. Return null\n// when the line isn't visible.\nfunction findViewIndex(cm, n) {\n if (n >= cm.display.viewTo) { return null }\n n -= cm.display.viewFrom;\n if (n < 0) { return null }\n var view = cm.display.view;\n for (var i = 0; i < view.length; i++) {\n n -= view[i].size;\n if (n < 0) { return i }\n }\n}\n\nfunction updateSelection(cm) {\n cm.display.input.showSelection(cm.display.input.prepareSelection());\n}\n\nfunction prepareSelection(cm, primary) {\n if ( primary === void 0 ) primary = true;\n\n var doc = cm.doc, result = {};\n var curFragment = result.cursors = document.createDocumentFragment();\n var selFragment = result.selection = document.createDocumentFragment();\n\n for (var i = 0; i < doc.sel.ranges.length; i++) {\n if (!primary && i == doc.sel.primIndex) { continue }\n var range$$1 = doc.sel.ranges[i];\n if (range$$1.from().line >= cm.display.viewTo || range$$1.to().line < cm.display.viewFrom) { continue }\n var collapsed = range$$1.empty();\n if (collapsed || cm.options.showCursorWhenSelecting)\n { drawSelectionCursor(cm, range$$1.head, curFragment); }\n if (!collapsed)\n { drawSelectionRange(cm, range$$1, selFragment); }\n }\n return result\n}\n\n// Draws a cursor for the given range\nfunction drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n}\n\nfunction cmpCoords(a, b) { return a.top - b.top || a.left - b.left }\n\n// Draws the given range as a highlighted selection\nfunction drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n}\n\n// Cursor-blinking\nfunction restartBlink(cm) {\n if (!cm.state.focused) { return }\n var display = cm.display;\n clearInterval(display.blinker);\n var on = true;\n display.cursorDiv.style.visibility = \"\";\n if (cm.options.cursorBlinkRate > 0)\n { display.blinker = setInterval(function () { return display.cursorDiv.style.visibility = (on = !on) ? \"\" : \"hidden\"; },\n cm.options.cursorBlinkRate); }\n else if (cm.options.cursorBlinkRate < 0)\n { display.cursorDiv.style.visibility = \"hidden\"; }\n}\n\nfunction ensureFocus(cm) {\n if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); }\n}\n\nfunction delayBlurEvent(cm) {\n cm.state.delayingBlurEvent = true;\n setTimeout(function () { if (cm.state.delayingBlurEvent) {\n cm.state.delayingBlurEvent = false;\n onBlur(cm);\n } }, 100);\n}\n\nfunction onFocus(cm, e) {\n if (cm.state.delayingBlurEvent) { cm.state.delayingBlurEvent = false; }\n\n if (cm.options.readOnly == \"nocursor\") { return }\n if (!cm.state.focused) {\n signal(cm, \"focus\", cm, e);\n cm.state.focused = true;\n addClass(cm.display.wrapper, \"CodeMirror-focused\");\n // This test prevents this from firing when a context\n // menu is closed (since the input reset would kill the\n // select-all detection hack)\n if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {\n cm.display.input.reset();\n if (webkit) { setTimeout(function () { return cm.display.input.reset(true); }, 20); } // Issue #1730\n }\n cm.display.input.receivedFocus();\n }\n restartBlink(cm);\n}\nfunction onBlur(cm, e) {\n if (cm.state.delayingBlurEvent) { return }\n\n if (cm.state.focused) {\n signal(cm, \"blur\", cm, e);\n cm.state.focused = false;\n rmClass(cm.display.wrapper, \"CodeMirror-focused\");\n }\n clearInterval(cm.display.blinker);\n setTimeout(function () { if (!cm.state.focused) { cm.display.shift = false; } }, 150);\n}\n\n// Read the actual heights of the rendered lines, and update their\n// stored heights to match.\nfunction updateHeightsInViewport(cm) {\n var display = cm.display;\n var prevBottom = display.lineDiv.offsetTop;\n for (var i = 0; i < display.view.length; i++) {\n var cur = display.view[i], height = (void 0);\n if (cur.hidden) { continue }\n if (ie && ie_version < 8) {\n var bot = cur.node.offsetTop + cur.node.offsetHeight;\n height = bot - prevBottom;\n prevBottom = bot;\n } else {\n var box = cur.node.getBoundingClientRect();\n height = box.bottom - box.top;\n }\n var diff = cur.line.height - height;\n if (height < 2) { height = textHeight(display); }\n if (diff > .005 || diff < -.005) {\n updateLineHeight(cur.line, height);\n updateWidgetHeight(cur.line);\n if (cur.rest) { for (var j = 0; j < cur.rest.length; j++)\n { updateWidgetHeight(cur.rest[j]); } }\n }\n }\n}\n\n// Read and store the height of line widgets associated with the\n// given line.\nfunction updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n}\n\n// Compute the lines that are visible in a given viewport (defaults\n// the the current scroll position). viewport may contain top,\n// height, and ensure (see op.scrollToPos) properties.\nfunction visibleLines(display, doc, viewport) {\n var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;\n top = Math.floor(top - paddingTop(display));\n var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;\n\n var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);\n // Ensure is a {from: {line, ch}, to: {line, ch}} object, and\n // forces those lines into the viewport (if possible).\n if (viewport && viewport.ensure) {\n var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line;\n if (ensureFrom < from) {\n from = ensureFrom;\n to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);\n } else if (Math.min(ensureTo, doc.lastLine()) >= to) {\n from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);\n to = ensureTo;\n }\n }\n return {from: from, to: Math.max(to, from + 1)}\n}\n\n// Re-align line numbers and gutter marks to compensate for\n// horizontal scrolling.\nfunction alignHorizontally(cm) {\n var display = cm.display, view = display.view;\n if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return }\n var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;\n var gutterW = display.gutters.offsetWidth, left = comp + \"px\";\n for (var i = 0; i < view.length; i++) { if (!view[i].hidden) {\n if (cm.options.fixedGutter) {\n if (view[i].gutter)\n { view[i].gutter.style.left = left; }\n if (view[i].gutterBackground)\n { view[i].gutterBackground.style.left = left; }\n }\n var align = view[i].alignable;\n if (align) { for (var j = 0; j < align.length; j++)\n { align[j].style.left = left; } }\n } }\n if (cm.options.fixedGutter)\n { display.gutters.style.left = (comp + gutterW) + \"px\"; }\n}\n\n// Used to ensure that the line number gutter is still the right\n// size for the current document size. Returns true when an update\n// is needed.\nfunction maybeUpdateLineNumberWidth(cm) {\n if (!cm.options.lineNumbers) { return false }\n var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;\n if (last.length != display.lineNumChars) {\n var test = display.measure.appendChild(elt(\"div\", [elt(\"div\", last)],\n \"CodeMirror-linenumber CodeMirror-gutter-elt\"));\n var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;\n display.lineGutter.style.width = \"\";\n display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;\n display.lineNumWidth = display.lineNumInnerWidth + padding;\n display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;\n display.lineGutter.style.width = display.lineNumWidth + \"px\";\n updateGutterSpace(cm);\n return true\n }\n return false\n}\n\n// SCROLLING THINGS INTO VIEW\n\n// If an editor sits on the top or bottom of the window, partially\n// scrolled out of view, this ensures that the cursor is visible.\nfunction maybeScrollWindow(cm, rect) {\n if (signalDOMEvent(cm, \"scrollCursorIntoView\")) { return }\n\n var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;\n if (rect.top + box.top < 0) { doScroll = true; }\n else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) { doScroll = false; }\n if (doScroll != null && !phantom) {\n var scrollNode = elt(\"div\", \"\\u200b\", null, (\"position: absolute;\\n top: \" + (rect.top - display.viewOffset - paddingTop(cm.display)) + \"px;\\n height: \" + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + \"px;\\n left: \" + (rect.left) + \"px; width: \" + (Math.max(2, rect.right - rect.left)) + \"px;\"));\n cm.display.lineSpace.appendChild(scrollNode);\n scrollNode.scrollIntoView(doScroll);\n cm.display.lineSpace.removeChild(scrollNode);\n }\n}\n\n// Scroll a given position into view (immediately), verifying that\n// it actually became visible (as line heights are accurately\n// measured, the position of something may 'drift' during drawing).\nfunction scrollPosIntoView(cm, pos, end, margin) {\n if (margin == null) { margin = 0; }\n var rect;\n if (!cm.options.lineWrapping && pos == end) {\n // Set pos and end to the cursor positions around the character pos sticks to\n // If pos.sticky == \"before\", that is around pos.ch - 1, otherwise around pos.ch\n // If pos == Pos(_, 0, \"before\"), pos and end are unchanged\n pos = pos.ch ? Pos(pos.line, pos.sticky == \"before\" ? pos.ch - 1 : pos.ch, \"after\") : pos;\n end = pos.sticky == \"before\" ? Pos(pos.line, pos.ch + 1, \"before\") : pos;\n }\n for (var limit = 0; limit < 5; limit++) {\n var changed = false;\n var coords = cursorCoords(cm, pos);\n var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);\n rect = {left: Math.min(coords.left, endCoords.left),\n top: Math.min(coords.top, endCoords.top) - margin,\n right: Math.max(coords.left, endCoords.left),\n bottom: Math.max(coords.bottom, endCoords.bottom) + margin};\n var scrollPos = calculateScrollPos(cm, rect);\n var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;\n if (scrollPos.scrollTop != null) {\n updateScrollTop(cm, scrollPos.scrollTop);\n if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true; }\n }\n if (scrollPos.scrollLeft != null) {\n setScrollLeft(cm, scrollPos.scrollLeft);\n if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true; }\n }\n if (!changed) { break }\n }\n return rect\n}\n\n// Scroll a given set of coordinates into view (immediately).\nfunction scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n}\n\n// Calculate a new scroll position needed to scroll the given\n// rectangle into view. Returns an object with scrollTop and\n// scrollLeft properties. When these are undefined, the\n// vertical/horizontal position does not need to be adjusted.\nfunction calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n}\n\n// Store a relative adjustment to the scroll position in the current\n// operation (to be applied when the operation finishes).\nfunction addToScrollTop(cm, top) {\n if (top == null) { return }\n resolveScrollToPos(cm);\n cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;\n}\n\n// Make sure that at the end of the operation the current cursor is\n// shown.\nfunction ensureCursorVisible(cm) {\n resolveScrollToPos(cm);\n var cur = cm.getCursor();\n cm.curOp.scrollToPos = {from: cur, to: cur, margin: cm.options.cursorScrollMargin};\n}\n\nfunction scrollToCoords(cm, x, y) {\n if (x != null || y != null) { resolveScrollToPos(cm); }\n if (x != null) { cm.curOp.scrollLeft = x; }\n if (y != null) { cm.curOp.scrollTop = y; }\n}\n\nfunction scrollToRange(cm, range$$1) {\n resolveScrollToPos(cm);\n cm.curOp.scrollToPos = range$$1;\n}\n\n// When an operation has its scrollToPos property set, and another\n// scroll action is applied before the end of the operation, this\n// 'simulates' scrolling that position into view in a cheap way, so\n// that the effect of intermediate scroll commands is not ignored.\nfunction resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n}\n\nfunction scrollToCoordsRange(cm, from, to, margin) {\n var sPos = calculateScrollPos(cm, {\n left: Math.min(from.left, to.left),\n top: Math.min(from.top, to.top) - margin,\n right: Math.max(from.right, to.right),\n bottom: Math.max(from.bottom, to.bottom) + margin\n });\n scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop);\n}\n\n// Sync the scrollable area and scrollbars, ensure the viewport\n// covers the visible area.\nfunction updateScrollTop(cm, val) {\n if (Math.abs(cm.doc.scrollTop - val) < 2) { return }\n if (!gecko) { updateDisplaySimple(cm, {top: val}); }\n setScrollTop(cm, val, true);\n if (gecko) { updateDisplaySimple(cm); }\n startWorker(cm, 100);\n}\n\nfunction setScrollTop(cm, val, forceScroll) {\n val = Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val);\n if (cm.display.scroller.scrollTop == val && !forceScroll) { return }\n cm.doc.scrollTop = val;\n cm.display.scrollbars.setScrollTop(val);\n if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val; }\n}\n\n// Sync scroller and scrollbar, ensure the gutter elements are\n// aligned.\nfunction setScrollLeft(cm, val, isScroller, forceScroll) {\n val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth);\n if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) { return }\n cm.doc.scrollLeft = val;\n alignHorizontally(cm);\n if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val; }\n cm.display.scrollbars.setScrollLeft(val);\n}\n\n// SCROLLBARS\n\n// Prepare DOM reads needed to update the scrollbars. Done in one\n// shot to minimize update/measure roundtrips.\nfunction measureForScrollbars(cm) {\n var d = cm.display, gutterW = d.gutters.offsetWidth;\n var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n return {\n clientHeight: d.scroller.clientHeight,\n viewHeight: d.wrapper.clientHeight,\n scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n viewWidth: d.wrapper.clientWidth,\n barLeft: cm.options.fixedGutter ? gutterW : 0,\n docHeight: docH,\n scrollHeight: docH + scrollGap(cm) + d.barHeight,\n nativeBarWidth: d.nativeBarWidth,\n gutterWidth: gutterW\n }\n}\n\nvar NativeScrollbars = function(place, scroll, cm) {\n this.cm = cm;\n var vert = this.vert = elt(\"div\", [elt(\"div\", null, null, \"min-width: 1px\")], \"CodeMirror-vscrollbar\");\n var horiz = this.horiz = elt(\"div\", [elt(\"div\", null, null, \"height: 100%; min-height: 1px\")], \"CodeMirror-hscrollbar\");\n vert.tabIndex = horiz.tabIndex = -1;\n place(vert); place(horiz);\n\n on(vert, \"scroll\", function () {\n if (vert.clientHeight) { scroll(vert.scrollTop, \"vertical\"); }\n });\n on(horiz, \"scroll\", function () {\n if (horiz.clientWidth) { scroll(horiz.scrollLeft, \"horizontal\"); }\n });\n\n this.checkedZeroWidth = false;\n // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).\n if (ie && ie_version < 8) { this.horiz.style.minHeight = this.vert.style.minWidth = \"18px\"; }\n};\n\nNativeScrollbars.prototype.update = function (measure) {\n var needsH = measure.scrollWidth > measure.clientWidth + 1;\n var needsV = measure.scrollHeight > measure.clientHeight + 1;\n var sWidth = measure.nativeBarWidth;\n\n if (needsV) {\n this.vert.style.display = \"block\";\n this.vert.style.bottom = needsH ? sWidth + \"px\" : \"0\";\n var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);\n // A bug in IE8 can cause this value to be negative, so guard it.\n this.vert.firstChild.style.height =\n Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + \"px\";\n } else {\n this.vert.style.display = \"\";\n this.vert.firstChild.style.height = \"0\";\n }\n\n if (needsH) {\n this.horiz.style.display = \"block\";\n this.horiz.style.right = needsV ? sWidth + \"px\" : \"0\";\n this.horiz.style.left = measure.barLeft + \"px\";\n var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);\n this.horiz.firstChild.style.width =\n Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + \"px\";\n } else {\n this.horiz.style.display = \"\";\n this.horiz.firstChild.style.width = \"0\";\n }\n\n if (!this.checkedZeroWidth && measure.clientHeight > 0) {\n if (sWidth == 0) { this.zeroWidthHack(); }\n this.checkedZeroWidth = true;\n }\n\n return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}\n};\n\nNativeScrollbars.prototype.setScrollLeft = function (pos) {\n if (this.horiz.scrollLeft != pos) { this.horiz.scrollLeft = pos; }\n if (this.disableHoriz) { this.enableZeroWidthBar(this.horiz, this.disableHoriz, \"horiz\"); }\n};\n\nNativeScrollbars.prototype.setScrollTop = function (pos) {\n if (this.vert.scrollTop != pos) { this.vert.scrollTop = pos; }\n if (this.disableVert) { this.enableZeroWidthBar(this.vert, this.disableVert, \"vert\"); }\n};\n\nNativeScrollbars.prototype.zeroWidthHack = function () {\n var w = mac && !mac_geMountainLion ? \"12px\" : \"18px\";\n this.horiz.style.height = this.vert.style.width = w;\n this.horiz.style.pointerEvents = this.vert.style.pointerEvents = \"none\";\n this.disableHoriz = new Delayed;\n this.disableVert = new Delayed;\n};\n\nNativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay, type) {\n bar.style.pointerEvents = \"auto\";\n function maybeDisable() {\n // To find out whether the scrollbar is still visible, we\n // check whether the element under the pixel in the bottom\n // right corner of the scrollbar box is the scrollbar box\n // itself (when the bar is still visible) or its filler child\n // (when the bar is hidden). If it is still visible, we keep\n // it enabled, if it's hidden, we disable pointer events.\n var box = bar.getBoundingClientRect();\n var elt$$1 = type == \"vert\" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2)\n : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1);\n if (elt$$1 != bar) { bar.style.pointerEvents = \"none\"; }\n else { delay.set(1000, maybeDisable); }\n }\n delay.set(1000, maybeDisable);\n};\n\nNativeScrollbars.prototype.clear = function () {\n var parent = this.horiz.parentNode;\n parent.removeChild(this.horiz);\n parent.removeChild(this.vert);\n};\n\nvar NullScrollbars = function () {};\n\nNullScrollbars.prototype.update = function () { return {bottom: 0, right: 0} };\nNullScrollbars.prototype.setScrollLeft = function () {};\nNullScrollbars.prototype.setScrollTop = function () {};\nNullScrollbars.prototype.clear = function () {};\n\nfunction updateScrollbars(cm, measure) {\n if (!measure) { measure = measureForScrollbars(cm); }\n var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight;\n updateScrollbarsInner(cm, measure);\n for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {\n if (startWidth != cm.display.barWidth && cm.options.lineWrapping)\n { updateHeightsInViewport(cm); }\n updateScrollbarsInner(cm, measureForScrollbars(cm));\n startWidth = cm.display.barWidth; startHeight = cm.display.barHeight;\n }\n}\n\n// Re-synchronize the fake scrollbars with the actual size of the\n// content.\nfunction updateScrollbarsInner(cm, measure) {\n var d = cm.display;\n var sizes = d.scrollbars.update(measure);\n\n d.sizer.style.paddingRight = (d.barWidth = sizes.right) + \"px\";\n d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + \"px\";\n d.heightForcer.style.borderBottom = sizes.bottom + \"px solid transparent\";\n\n if (sizes.right && sizes.bottom) {\n d.scrollbarFiller.style.display = \"block\";\n d.scrollbarFiller.style.height = sizes.bottom + \"px\";\n d.scrollbarFiller.style.width = sizes.right + \"px\";\n } else { d.scrollbarFiller.style.display = \"\"; }\n if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {\n d.gutterFiller.style.display = \"block\";\n d.gutterFiller.style.height = sizes.bottom + \"px\";\n d.gutterFiller.style.width = measure.gutterWidth + \"px\";\n } else { d.gutterFiller.style.display = \"\"; }\n}\n\nvar scrollbarModel = {\"native\": NativeScrollbars, \"null\": NullScrollbars};\n\nfunction initScrollbars(cm) {\n if (cm.display.scrollbars) {\n cm.display.scrollbars.clear();\n if (cm.display.scrollbars.addClass)\n { rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); }\n }\n\n cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) {\n cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);\n // Prevent clicks in the scrollbars from killing focus\n on(node, \"mousedown\", function () {\n if (cm.state.focused) { setTimeout(function () { return cm.display.input.focus(); }, 0); }\n });\n node.setAttribute(\"cm-not-content\", \"true\");\n }, function (pos, axis) {\n if (axis == \"horizontal\") { setScrollLeft(cm, pos); }\n else { updateScrollTop(cm, pos); }\n }, cm);\n if (cm.display.scrollbars.addClass)\n { addClass(cm.display.wrapper, cm.display.scrollbars.addClass); }\n}\n\n// Operations are used to wrap a series of changes to the editor\n// state in such a way that each change won't have to update the\n// cursor and display (which would be awkward, slow, and\n// error-prone). Instead, display updates are batched and then all\n// combined and executed at once.\n\nvar nextOpId = 0;\n// Start a new operation.\nfunction startOperation(cm) {\n cm.curOp = {\n cm: cm,\n viewChanged: false, // Flag that indicates that lines might need to be redrawn\n startHeight: cm.doc.height, // Used to detect need to update scrollbar\n forceUpdate: false, // Used to force a redraw\n updateInput: null, // Whether to reset the input textarea\n typing: false, // Whether this reset should be careful to leave existing text (for compositing)\n changeObjs: null, // Accumulated changes, for firing change events\n cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on\n cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already\n selectionChanged: false, // Whether the selection needs to be redrawn\n updateMaxLine: false, // Set when the widest line needs to be determined anew\n scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet\n scrollToPos: null, // Used to scroll to a specific position\n focus: false,\n id: ++nextOpId // Unique ID\n };\n pushOperation(cm.curOp);\n}\n\n// Finish an operation, updating the display and signalling delayed events\nfunction endOperation(cm) {\n var op = cm.curOp;\n finishOperation(op, function (group) {\n for (var i = 0; i < group.ops.length; i++)\n { group.ops[i].cm.curOp = null; }\n endOperations(group);\n });\n}\n\n// The DOM updates done when an operation finishes are batched so\n// that the minimum number of relayouts are required.\nfunction endOperations(group) {\n var ops = group.ops;\n for (var i = 0; i < ops.length; i++) // Read DOM\n { endOperation_R1(ops[i]); }\n for (var i$1 = 0; i$1 < ops.length; i$1++) // Write DOM (maybe)\n { endOperation_W1(ops[i$1]); }\n for (var i$2 = 0; i$2 < ops.length; i$2++) // Read DOM\n { endOperation_R2(ops[i$2]); }\n for (var i$3 = 0; i$3 < ops.length; i$3++) // Write DOM (maybe)\n { endOperation_W2(ops[i$3]); }\n for (var i$4 = 0; i$4 < ops.length; i$4++) // Read DOM\n { endOperation_finish(ops[i$4]); }\n}\n\nfunction endOperation_R1(op) {\n var cm = op.cm, display = cm.display;\n maybeClipScrollbars(cm);\n if (op.updateMaxLine) { findMaxLine(cm); }\n\n op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||\n op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||\n op.scrollToPos.to.line >= display.viewTo) ||\n display.maxLineChanged && cm.options.lineWrapping;\n op.update = op.mustUpdate &&\n new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);\n}\n\nfunction endOperation_W1(op) {\n op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);\n}\n\nfunction endOperation_R2(op) {\n var cm = op.cm, display = cm.display;\n if (op.updatedDisplay) { updateHeightsInViewport(cm); }\n\n op.barMeasure = measureForScrollbars(cm);\n\n // If the max line changed since it was last measured, measure it,\n // and ensure the document's width matches it.\n // updateDisplay_W2 will use these properties to do the actual resizing\n if (display.maxLineChanged && !cm.options.lineWrapping) {\n op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;\n cm.display.sizerWidth = op.adjustWidthTo;\n op.barMeasure.scrollWidth =\n Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);\n op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));\n }\n\n if (op.updatedDisplay || op.selectionChanged)\n { op.preparedSelection = display.input.prepareSelection(); }\n}\n\nfunction endOperation_W2(op) {\n var cm = op.cm;\n\n if (op.adjustWidthTo != null) {\n cm.display.sizer.style.minWidth = op.adjustWidthTo + \"px\";\n if (op.maxScrollLeft < cm.doc.scrollLeft)\n { setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); }\n cm.display.maxLineChanged = false;\n }\n\n var takeFocus = op.focus && op.focus == activeElt();\n if (op.preparedSelection)\n { cm.display.input.showSelection(op.preparedSelection, takeFocus); }\n if (op.updatedDisplay || op.startHeight != cm.doc.height)\n { updateScrollbars(cm, op.barMeasure); }\n if (op.updatedDisplay)\n { setDocumentHeight(cm, op.barMeasure); }\n\n if (op.selectionChanged) { restartBlink(cm); }\n\n if (cm.state.focused && op.updateInput)\n { cm.display.input.reset(op.typing); }\n if (takeFocus) { ensureFocus(op.cm); }\n}\n\nfunction endOperation_finish(op) {\n var cm = op.cm, display = cm.display, doc = cm.doc;\n\n if (op.updatedDisplay) { postUpdateDisplay(cm, op.update); }\n\n // Abort mouse wheel delta measurement, when scrolling explicitly\n if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))\n { display.wheelStartX = display.wheelStartY = null; }\n\n // Propagate the scroll position to the actual DOM scroller\n if (op.scrollTop != null) { setScrollTop(cm, op.scrollTop, op.forceScroll); }\n\n if (op.scrollLeft != null) { setScrollLeft(cm, op.scrollLeft, true, true); }\n // If we need to scroll a specific position into view, do so.\n if (op.scrollToPos) {\n var rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from),\n clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);\n maybeScrollWindow(cm, rect);\n }\n\n // Fire events for markers that are hidden/unidden by editing or\n // undoing\n var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;\n if (hidden) { for (var i = 0; i < hidden.length; ++i)\n { if (!hidden[i].lines.length) { signal(hidden[i], \"hide\"); } } }\n if (unhidden) { for (var i$1 = 0; i$1 < unhidden.length; ++i$1)\n { if (unhidden[i$1].lines.length) { signal(unhidden[i$1], \"unhide\"); } } }\n\n if (display.wrapper.offsetHeight)\n { doc.scrollTop = cm.display.scroller.scrollTop; }\n\n // Fire change events, and delayed event handlers\n if (op.changeObjs)\n { signal(cm, \"changes\", cm, op.changeObjs); }\n if (op.update)\n { op.update.finish(); }\n}\n\n// Run the given function in an operation\nfunction runInOp(cm, f) {\n if (cm.curOp) { return f() }\n startOperation(cm);\n try { return f() }\n finally { endOperation(cm); }\n}\n// Wraps a function in an operation. Returns the wrapped function.\nfunction operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n}\n// Used to add methods to editor and doc instances, wrapping them in\n// operations.\nfunction methodOp(f) {\n return function() {\n if (this.curOp) { return f.apply(this, arguments) }\n startOperation(this);\n try { return f.apply(this, arguments) }\n finally { endOperation(this); }\n }\n}\nfunction docMethodOp(f) {\n return function() {\n var cm = this.cm;\n if (!cm || cm.curOp) { return f.apply(this, arguments) }\n startOperation(cm);\n try { return f.apply(this, arguments) }\n finally { endOperation(cm); }\n }\n}\n\n// Updates the display.view data structure for a given change to the\n// document. From and to are in pre-change coordinates. Lendiff is\n// the amount of lines added or subtracted by the change. This is\n// used for changes that span multiple lines, or change the way\n// lines are divided into visual lines. regLineChange (below)\n// registers single-line changes.\nfunction regChange(cm, from, to, lendiff) {\n if (from == null) { from = cm.doc.first; }\n if (to == null) { to = cm.doc.first + cm.doc.size; }\n if (!lendiff) { lendiff = 0; }\n\n var display = cm.display;\n if (lendiff && to < display.viewTo &&\n (display.updateLineNumbers == null || display.updateLineNumbers > from))\n { display.updateLineNumbers = from; }\n\n cm.curOp.viewChanged = true;\n\n if (from >= display.viewTo) { // Change after\n if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)\n { resetView(cm); }\n } else if (to <= display.viewFrom) { // Change before\n if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {\n resetView(cm);\n } else {\n display.viewFrom += lendiff;\n display.viewTo += lendiff;\n }\n } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap\n resetView(cm);\n } else if (from <= display.viewFrom) { // Top overlap\n var cut = viewCuttingPoint(cm, to, to + lendiff, 1);\n if (cut) {\n display.view = display.view.slice(cut.index);\n display.viewFrom = cut.lineN;\n display.viewTo += lendiff;\n } else {\n resetView(cm);\n }\n } else if (to >= display.viewTo) { // Bottom overlap\n var cut$1 = viewCuttingPoint(cm, from, from, -1);\n if (cut$1) {\n display.view = display.view.slice(0, cut$1.index);\n display.viewTo = cut$1.lineN;\n } else {\n resetView(cm);\n }\n } else { // Gap in the middle\n var cutTop = viewCuttingPoint(cm, from, from, -1);\n var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);\n if (cutTop && cutBot) {\n display.view = display.view.slice(0, cutTop.index)\n .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))\n .concat(display.view.slice(cutBot.index));\n display.viewTo += lendiff;\n } else {\n resetView(cm);\n }\n }\n\n var ext = display.externalMeasured;\n if (ext) {\n if (to < ext.lineN)\n { ext.lineN += lendiff; }\n else if (from < ext.lineN + ext.size)\n { display.externalMeasured = null; }\n }\n}\n\n// Register a change to a single line. Type must be one of \"text\",\n// \"gutter\", \"class\", \"widget\"\nfunction regLineChange(cm, line, type) {\n cm.curOp.viewChanged = true;\n var display = cm.display, ext = cm.display.externalMeasured;\n if (ext && line >= ext.lineN && line < ext.lineN + ext.size)\n { display.externalMeasured = null; }\n\n if (line < display.viewFrom || line >= display.viewTo) { return }\n var lineView = display.view[findViewIndex(cm, line)];\n if (lineView.node == null) { return }\n var arr = lineView.changes || (lineView.changes = []);\n if (indexOf(arr, type) == -1) { arr.push(type); }\n}\n\n// Clear the view.\nfunction resetView(cm) {\n cm.display.viewFrom = cm.display.viewTo = cm.doc.first;\n cm.display.view = [];\n cm.display.viewOffset = 0;\n}\n\nfunction viewCuttingPoint(cm, oldN, newN, dir) {\n var index = findViewIndex(cm, oldN), diff, view = cm.display.view;\n if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)\n { return {index: index, lineN: newN} }\n var n = cm.display.viewFrom;\n for (var i = 0; i < index; i++)\n { n += view[i].size; }\n if (n != oldN) {\n if (dir > 0) {\n if (index == view.length - 1) { return null }\n diff = (n + view[index].size) - oldN;\n index++;\n } else {\n diff = n - oldN;\n }\n oldN += diff; newN += diff;\n }\n while (visualLineNo(cm.doc, newN) != newN) {\n if (index == (dir < 0 ? 0 : view.length - 1)) { return null }\n newN += dir * view[index - (dir < 0 ? 1 : 0)].size;\n index += dir;\n }\n return {index: index, lineN: newN}\n}\n\n// Force the view to cover a given range, adding empty view element\n// or clipping off existing ones as needed.\nfunction adjustView(cm, from, to) {\n var display = cm.display, view = display.view;\n if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {\n display.view = buildViewArray(cm, from, to);\n display.viewFrom = from;\n } else {\n if (display.viewFrom > from)\n { display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); }\n else if (display.viewFrom < from)\n { display.view = display.view.slice(findViewIndex(cm, from)); }\n display.viewFrom = from;\n if (display.viewTo < to)\n { display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); }\n else if (display.viewTo > to)\n { display.view = display.view.slice(0, findViewIndex(cm, to)); }\n }\n display.viewTo = to;\n}\n\n// Count the number of lines in the view whose DOM representation is\n// out of date (or nonexistent).\nfunction countDirtyView(cm) {\n var view = cm.display.view, dirty = 0;\n for (var i = 0; i < view.length; i++) {\n var lineView = view[i];\n if (!lineView.hidden && (!lineView.node || lineView.changes)) { ++dirty; }\n }\n return dirty\n}\n\n// HIGHLIGHT WORKER\n\nfunction startWorker(cm, time) {\n if (cm.doc.highlightFrontier < cm.display.viewTo)\n { cm.state.highlight.set(time, bind(highlightWorker, cm)); }\n}\n\nfunction highlightWorker(cm) {\n var doc = cm.doc;\n if (doc.highlightFrontier >= cm.display.viewTo) { return }\n var end = +new Date + cm.options.workTime;\n var context = getContextBefore(cm, doc.highlightFrontier);\n var changedLines = [];\n\n doc.iter(context.line, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function (line) {\n if (context.line >= cm.display.viewFrom) { // Visible\n var oldStyles = line.styles;\n var resetState = line.text.length > cm.options.maxHighlightLength ? copyState(doc.mode, context.state) : null;\n var highlighted = highlightLine(cm, line, context, true);\n if (resetState) { context.state = resetState; }\n line.styles = highlighted.styles;\n var oldCls = line.styleClasses, newCls = highlighted.classes;\n if (newCls) { line.styleClasses = newCls; }\n else if (oldCls) { line.styleClasses = null; }\n var ischange = !oldStyles || oldStyles.length != line.styles.length ||\n oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);\n for (var i = 0; !ischange && i < oldStyles.length; ++i) { ischange = oldStyles[i] != line.styles[i]; }\n if (ischange) { changedLines.push(context.line); }\n line.stateAfter = context.save();\n context.nextLine();\n } else {\n if (line.text.length <= cm.options.maxHighlightLength)\n { processLine(cm, line.text, context); }\n line.stateAfter = context.line % 5 == 0 ? context.save() : null;\n context.nextLine();\n }\n if (+new Date > end) {\n startWorker(cm, cm.options.workDelay);\n return true\n }\n });\n doc.highlightFrontier = context.line;\n doc.modeFrontier = Math.max(doc.modeFrontier, context.line);\n if (changedLines.length) { runInOp(cm, function () {\n for (var i = 0; i < changedLines.length; i++)\n { regLineChange(cm, changedLines[i], \"text\"); }\n }); }\n}\n\n// DISPLAY DRAWING\n\nvar DisplayUpdate = function(cm, viewport, force) {\n var display = cm.display;\n\n this.viewport = viewport;\n // Store some values that we'll need later (but don't want to force a relayout for)\n this.visible = visibleLines(display, cm.doc, viewport);\n this.editorIsHidden = !display.wrapper.offsetWidth;\n this.wrapperHeight = display.wrapper.clientHeight;\n this.wrapperWidth = display.wrapper.clientWidth;\n this.oldDisplayWidth = displayWidth(cm);\n this.force = force;\n this.dims = getDimensions(cm);\n this.events = [];\n};\n\nDisplayUpdate.prototype.signal = function (emitter, type) {\n if (hasHandler(emitter, type))\n { this.events.push(arguments); }\n};\nDisplayUpdate.prototype.finish = function () {\n var this$1 = this;\n\n for (var i = 0; i < this.events.length; i++)\n { signal.apply(null, this$1.events[i]); }\n};\n\nfunction maybeClipScrollbars(cm) {\n var display = cm.display;\n if (!display.scrollbarsClipped && display.scroller.offsetWidth) {\n display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;\n display.heightForcer.style.height = scrollGap(cm) + \"px\";\n display.sizer.style.marginBottom = -display.nativeBarWidth + \"px\";\n display.sizer.style.borderRightWidth = scrollGap(cm) + \"px\";\n display.scrollbarsClipped = true;\n }\n}\n\nfunction selectionSnapshot(cm) {\n if (cm.hasFocus()) { return null }\n var active = activeElt();\n if (!active || !contains(cm.display.lineDiv, active)) { return null }\n var result = {activeElt: active};\n if (window.getSelection) {\n var sel = window.getSelection();\n if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) {\n result.anchorNode = sel.anchorNode;\n result.anchorOffset = sel.anchorOffset;\n result.focusNode = sel.focusNode;\n result.focusOffset = sel.focusOffset;\n }\n }\n return result\n}\n\nfunction restoreSelection(snapshot) {\n if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt()) { return }\n snapshot.activeElt.focus();\n if (snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) {\n var sel = window.getSelection(), range$$1 = document.createRange();\n range$$1.setEnd(snapshot.anchorNode, snapshot.anchorOffset);\n range$$1.collapse(false);\n sel.removeAllRanges();\n sel.addRange(range$$1);\n sel.extend(snapshot.focusNode, snapshot.focusOffset);\n }\n}\n\n// Does the actual updating of the line display. Bails out\n// (returning false) when there is nothing to be done and forced is\n// false.\nfunction updateDisplayIfNeeded(cm, update) {\n var display = cm.display, doc = cm.doc;\n\n if (update.editorIsHidden) {\n resetView(cm);\n return false\n }\n\n // Bail out if the visible area is already rendered and nothing changed.\n if (!update.force &&\n update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo &&\n (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&\n display.renderedView == display.view && countDirtyView(cm) == 0)\n { return false }\n\n if (maybeUpdateLineNumberWidth(cm)) {\n resetView(cm);\n update.dims = getDimensions(cm);\n }\n\n // Compute a suitable new viewport (from & to)\n var end = doc.first + doc.size;\n var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);\n var to = Math.min(end, update.visible.to + cm.options.viewportMargin);\n if (display.viewFrom < from && from - display.viewFrom < 20) { from = Math.max(doc.first, display.viewFrom); }\n if (display.viewTo > to && display.viewTo - to < 20) { to = Math.min(end, display.viewTo); }\n if (sawCollapsedSpans) {\n from = visualLineNo(cm.doc, from);\n to = visualLineEndNo(cm.doc, to);\n }\n\n var different = from != display.viewFrom || to != display.viewTo ||\n display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;\n adjustView(cm, from, to);\n\n display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));\n // Position the mover div to align with the current scroll position\n cm.display.mover.style.top = display.viewOffset + \"px\";\n\n var toUpdate = countDirtyView(cm);\n if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&\n (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))\n { return false }\n\n // For big changes, we hide the enclosing element during the\n // update, since that speeds up the operations on most browsers.\n var selSnapshot = selectionSnapshot(cm);\n if (toUpdate > 4) { display.lineDiv.style.display = \"none\"; }\n patchDisplay(cm, display.updateLineNumbers, update.dims);\n if (toUpdate > 4) { display.lineDiv.style.display = \"\"; }\n display.renderedView = display.view;\n // There might have been a widget with a focused element that got\n // hidden or updated, if so re-focus it.\n restoreSelection(selSnapshot);\n\n // Prevent selection and cursors from interfering with the scroll\n // width and height.\n removeChildren(display.cursorDiv);\n removeChildren(display.selectionDiv);\n display.gutters.style.height = display.sizer.style.minHeight = 0;\n\n if (different) {\n display.lastWrapHeight = update.wrapperHeight;\n display.lastWrapWidth = update.wrapperWidth;\n startWorker(cm, 400);\n }\n\n display.updateLineNumbers = null;\n\n return true\n}\n\nfunction postUpdateDisplay(cm, update) {\n var viewport = update.viewport;\n\n for (var first = true;; first = false) {\n if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {\n // Clip forced viewport to actual scrollable area.\n if (viewport && viewport.top != null)\n { viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; }\n // Updated line heights might result in the drawn area not\n // actually covering the viewport. Keep looping until it does.\n update.visible = visibleLines(cm.display, cm.doc, viewport);\n if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)\n { break }\n }\n if (!updateDisplayIfNeeded(cm, update)) { break }\n updateHeightsInViewport(cm);\n var barMeasure = measureForScrollbars(cm);\n updateSelection(cm);\n updateScrollbars(cm, barMeasure);\n setDocumentHeight(cm, barMeasure);\n update.force = false;\n }\n\n update.signal(cm, \"update\", cm);\n if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {\n update.signal(cm, \"viewportChange\", cm, cm.display.viewFrom, cm.display.viewTo);\n cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;\n }\n}\n\nfunction updateDisplaySimple(cm, viewport) {\n var update = new DisplayUpdate(cm, viewport);\n if (updateDisplayIfNeeded(cm, update)) {\n updateHeightsInViewport(cm);\n postUpdateDisplay(cm, update);\n var barMeasure = measureForScrollbars(cm);\n updateSelection(cm);\n updateScrollbars(cm, barMeasure);\n setDocumentHeight(cm, barMeasure);\n update.finish();\n }\n}\n\n// Sync the actual display DOM structure with display.view, removing\n// nodes for lines that are no longer in view, and creating the ones\n// that are not there yet, and updating the ones that are out of\n// date.\nfunction patchDisplay(cm, updateNumbersFrom, dims) {\n var display = cm.display, lineNumbers = cm.options.lineNumbers;\n var container = display.lineDiv, cur = container.firstChild;\n\n function rm(node) {\n var next = node.nextSibling;\n // Works around a throw-scroll bug in OS X Webkit\n if (webkit && mac && cm.display.currentWheelTarget == node)\n { node.style.display = \"none\"; }\n else\n { node.parentNode.removeChild(node); }\n return next\n }\n\n var view = display.view, lineN = display.viewFrom;\n // Loop over the elements in the view, syncing cur (the DOM nodes\n // in display.lineDiv) with the view as we go.\n for (var i = 0; i < view.length; i++) {\n var lineView = view[i];\n if (lineView.hidden) {\n } else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet\n var node = buildLineElement(cm, lineView, lineN, dims);\n container.insertBefore(node, cur);\n } else { // Already drawn\n while (cur != lineView.node) { cur = rm(cur); }\n var updateNumber = lineNumbers && updateNumbersFrom != null &&\n updateNumbersFrom <= lineN && lineView.lineNumber;\n if (lineView.changes) {\n if (indexOf(lineView.changes, \"gutter\") > -1) { updateNumber = false; }\n updateLineForChanges(cm, lineView, lineN, dims);\n }\n if (updateNumber) {\n removeChildren(lineView.lineNumber);\n lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));\n }\n cur = lineView.node.nextSibling;\n }\n lineN += lineView.size;\n }\n while (cur) { cur = rm(cur); }\n}\n\nfunction updateGutterSpace(cm) {\n var width = cm.display.gutters.offsetWidth;\n cm.display.sizer.style.marginLeft = width + \"px\";\n}\n\nfunction setDocumentHeight(cm, measure) {\n cm.display.sizer.style.minHeight = measure.docHeight + \"px\";\n cm.display.heightForcer.style.top = measure.docHeight + \"px\";\n cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + \"px\";\n}\n\n// Rebuild the gutter elements, ensure the margin to the left of the\n// code matches their width.\nfunction updateGutters(cm) {\n var gutters = cm.display.gutters, specs = cm.options.gutters;\n removeChildren(gutters);\n var i = 0;\n for (; i < specs.length; ++i) {\n var gutterClass = specs[i];\n var gElt = gutters.appendChild(elt(\"div\", null, \"CodeMirror-gutter \" + gutterClass));\n if (gutterClass == \"CodeMirror-linenumbers\") {\n cm.display.lineGutter = gElt;\n gElt.style.width = (cm.display.lineNumWidth || 1) + \"px\";\n }\n }\n gutters.style.display = i ? \"\" : \"none\";\n updateGutterSpace(cm);\n}\n\n// Make sure the gutters options contains the element\n// \"CodeMirror-linenumbers\" when the lineNumbers option is true.\nfunction setGuttersForLineNumbers(options) {\n var found = indexOf(options.gutters, \"CodeMirror-linenumbers\");\n if (found == -1 && options.lineNumbers) {\n options.gutters = options.gutters.concat([\"CodeMirror-linenumbers\"]);\n } else if (found > -1 && !options.lineNumbers) {\n options.gutters = options.gutters.slice(0);\n options.gutters.splice(found, 1);\n }\n}\n\n// Since the delta values reported on mouse wheel events are\n// unstandardized between browsers and even browser versions, and\n// generally horribly unpredictable, this code starts by measuring\n// the scroll effect that the first few mouse wheel events have,\n// and, from that, detects the way it can convert deltas to pixel\n// offsets afterwards.\n//\n// The reason we want to know the amount a wheel event will scroll\n// is that it gives us a chance to update the display before the\n// actual scrolling happens, reducing flickering.\n\nvar wheelSamples = 0;\nvar wheelPixelsPerUnit = null;\n// Fill in a browser-detected starting value on browsers where we\n// know one. These don't have to be accurate -- the result of them\n// being wrong would just be a slight flicker on the first wheel\n// scroll (if it is large enough).\nif (ie) { wheelPixelsPerUnit = -.53; }\nelse if (gecko) { wheelPixelsPerUnit = 15; }\nelse if (chrome) { wheelPixelsPerUnit = -.7; }\nelse if (safari) { wheelPixelsPerUnit = -1/3; }\n\nfunction wheelEventDelta(e) {\n var dx = e.wheelDeltaX, dy = e.wheelDeltaY;\n if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { dx = e.detail; }\n if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { dy = e.detail; }\n else if (dy == null) { dy = e.wheelDelta; }\n return {x: dx, y: dy}\n}\nfunction wheelEventPixels(e) {\n var delta = wheelEventDelta(e);\n delta.x *= wheelPixelsPerUnit;\n delta.y *= wheelPixelsPerUnit;\n return delta\n}\n\nfunction onScrollWheel(cm, e) {\n var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;\n\n var display = cm.display, scroll = display.scroller;\n // Quit if there's nothing to scroll here\n var canScrollX = scroll.scrollWidth > scroll.clientWidth;\n var canScrollY = scroll.scrollHeight > scroll.clientHeight;\n if (!(dx && canScrollX || dy && canScrollY)) { return }\n\n // Webkit browsers on OS X abort momentum scrolls when the target\n // of the scroll event is removed from the scrollable element.\n // This hack (see related code in patchDisplay) makes sure the\n // element is kept around.\n if (dy && mac && webkit) {\n outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {\n for (var i = 0; i < view.length; i++) {\n if (view[i].node == cur) {\n cm.display.currentWheelTarget = cur;\n break outer\n }\n }\n }\n }\n\n // On some browsers, horizontal scrolling will cause redraws to\n // happen before the gutter has been realigned, causing it to\n // wriggle around in a most unseemly way. When we have an\n // estimated pixels/delta value, we just handle horizontal\n // scrolling entirely here. It'll be slightly off from native, but\n // better than glitching out.\n if (dx && !gecko && !presto && wheelPixelsPerUnit != null) {\n if (dy && canScrollY)\n { updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * wheelPixelsPerUnit)); }\n setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * wheelPixelsPerUnit));\n // Only prevent default scrolling if vertical scrolling is\n // actually possible. Otherwise, it causes vertical scroll\n // jitter on OSX trackpads when deltaX is small and deltaY\n // is large (issue #3579)\n if (!dy || (dy && canScrollY))\n { e_preventDefault(e); }\n display.wheelStartX = null; // Abort measurement, if in progress\n return\n }\n\n // 'Project' the visible viewport to cover the area that is being\n // scrolled into view (if we know enough to estimate it).\n if (dy && wheelPixelsPerUnit != null) {\n var pixels = dy * wheelPixelsPerUnit;\n var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;\n if (pixels < 0) { top = Math.max(0, top + pixels - 50); }\n else { bot = Math.min(cm.doc.height, bot + pixels + 50); }\n updateDisplaySimple(cm, {top: top, bottom: bot});\n }\n\n if (wheelSamples < 20) {\n if (display.wheelStartX == null) {\n display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;\n display.wheelDX = dx; display.wheelDY = dy;\n setTimeout(function () {\n if (display.wheelStartX == null) { return }\n var movedX = scroll.scrollLeft - display.wheelStartX;\n var movedY = scroll.scrollTop - display.wheelStartY;\n var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||\n (movedX && display.wheelDX && movedX / display.wheelDX);\n display.wheelStartX = display.wheelStartY = null;\n if (!sample) { return }\n wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);\n ++wheelSamples;\n }, 200);\n } else {\n display.wheelDX += dx; display.wheelDY += dy;\n }\n }\n}\n\n// Selection objects are immutable. A new one is created every time\n// the selection changes. A selection is one or more non-overlapping\n// (and non-touching) ranges, sorted, and an integer that indicates\n// which one is the primary selection (the one that's scrolled into\n// view, that getCursor returns, etc).\nvar Selection = function(ranges, primIndex) {\n this.ranges = ranges;\n this.primIndex = primIndex;\n};\n\nSelection.prototype.primary = function () { return this.ranges[this.primIndex] };\n\nSelection.prototype.equals = function (other) {\n var this$1 = this;\n\n if (other == this) { return true }\n if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) { return false }\n for (var i = 0; i < this.ranges.length; i++) {\n var here = this$1.ranges[i], there = other.ranges[i];\n if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) { return false }\n }\n return true\n};\n\nSelection.prototype.deepCopy = function () {\n var this$1 = this;\n\n var out = [];\n for (var i = 0; i < this.ranges.length; i++)\n { out[i] = new Range(copyPos(this$1.ranges[i].anchor), copyPos(this$1.ranges[i].head)); }\n return new Selection(out, this.primIndex)\n};\n\nSelection.prototype.somethingSelected = function () {\n var this$1 = this;\n\n for (var i = 0; i < this.ranges.length; i++)\n { if (!this$1.ranges[i].empty()) { return true } }\n return false\n};\n\nSelection.prototype.contains = function (pos, end) {\n var this$1 = this;\n\n if (!end) { end = pos; }\n for (var i = 0; i < this.ranges.length; i++) {\n var range = this$1.ranges[i];\n if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)\n { return i }\n }\n return -1\n};\n\nvar Range = function(anchor, head) {\n this.anchor = anchor; this.head = head;\n};\n\nRange.prototype.from = function () { return minPos(this.anchor, this.head) };\nRange.prototype.to = function () { return maxPos(this.anchor, this.head) };\nRange.prototype.empty = function () { return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch };\n\n// Take an unsorted, potentially overlapping set of ranges, and\n// build a selection out of it. 'Consumes' ranges array (modifying\n// it).\nfunction normalizeSelection(ranges, primIndex) {\n var prim = ranges[primIndex];\n ranges.sort(function (a, b) { return cmp(a.from(), b.from()); });\n primIndex = indexOf(ranges, prim);\n for (var i = 1; i < ranges.length; i++) {\n var cur = ranges[i], prev = ranges[i - 1];\n if (cmp(prev.to(), cur.from()) >= 0) {\n var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to());\n var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;\n if (i <= primIndex) { --primIndex; }\n ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));\n }\n }\n return new Selection(ranges, primIndex)\n}\n\nfunction simpleSelection(anchor, head) {\n return new Selection([new Range(anchor, head || anchor)], 0)\n}\n\n// Compute the position of the end of a change (its 'to' property\n// refers to the pre-change end).\nfunction changeEnd(change) {\n if (!change.text) { return change.to }\n return Pos(change.from.line + change.text.length - 1,\n lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0))\n}\n\n// Adjust a position to refer to the post-change position of the\n// same text, or the end of the change if the change covers it.\nfunction adjustForChange(pos, change) {\n if (cmp(pos, change.from) < 0) { return pos }\n if (cmp(pos, change.to) <= 0) { return changeEnd(change) }\n\n var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;\n if (pos.line == change.to.line) { ch += changeEnd(change).ch - change.to.ch; }\n return Pos(line, ch)\n}\n\nfunction computeSelAfterChange(doc, change) {\n var out = [];\n for (var i = 0; i < doc.sel.ranges.length; i++) {\n var range = doc.sel.ranges[i];\n out.push(new Range(adjustForChange(range.anchor, change),\n adjustForChange(range.head, change)));\n }\n return normalizeSelection(out, doc.sel.primIndex)\n}\n\nfunction offsetPos(pos, old, nw) {\n if (pos.line == old.line)\n { return Pos(nw.line, pos.ch - old.ch + nw.ch) }\n else\n { return Pos(nw.line + (pos.line - old.line), pos.ch) }\n}\n\n// Used by replaceSelections to allow moving the selection to the\n// start or around the replaced test. Hint may be \"start\" or \"around\".\nfunction computeReplacedSel(doc, changes, hint) {\n var out = [];\n var oldPrev = Pos(doc.first, 0), newPrev = oldPrev;\n for (var i = 0; i < changes.length; i++) {\n var change = changes[i];\n var from = offsetPos(change.from, oldPrev, newPrev);\n var to = offsetPos(changeEnd(change), oldPrev, newPrev);\n oldPrev = change.to;\n newPrev = to;\n if (hint == \"around\") {\n var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0;\n out[i] = new Range(inv ? to : from, inv ? from : to);\n } else {\n out[i] = new Range(from, from);\n }\n }\n return new Selection(out, doc.sel.primIndex)\n}\n\n// Used to get the editor into a consistent state again when options change.\n\nfunction loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n}\n\nfunction resetModeState(cm) {\n cm.doc.iter(function (line) {\n if (line.stateAfter) { line.stateAfter = null; }\n if (line.styles) { line.styles = null; }\n });\n cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first;\n startWorker(cm, 100);\n cm.state.modeGen++;\n if (cm.curOp) { regChange(cm); }\n}\n\n// DOCUMENT DATA STRUCTURE\n\n// By default, updates that start and end at the beginning of a line\n// are treated specially, in order to make the association of line\n// widgets and marker elements with the text behave more intuitive.\nfunction isWholeLineUpdate(doc, change) {\n return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == \"\" &&\n (!doc.cm || doc.cm.options.wholeLineUpdateBefore)\n}\n\n// Perform a change on the document data structure.\nfunction updateDoc(doc, change, markedSpans, estimateHeight$$1) {\n function spansFor(n) {return markedSpans ? markedSpans[n] : null}\n function update(line, text, spans) {\n updateLine(line, text, spans, estimateHeight$$1);\n signalLater(line, \"change\", line, change);\n }\n function linesFor(start, end) {\n var result = [];\n for (var i = start; i < end; ++i)\n { result.push(new Line(text[i], spansFor(i), estimateHeight$$1)); }\n return result\n }\n\n var from = change.from, to = change.to, text = change.text;\n var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);\n var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;\n\n // Adjust the line structure\n if (change.full) {\n doc.insert(0, linesFor(0, text.length));\n doc.remove(text.length, doc.size - text.length);\n } else if (isWholeLineUpdate(doc, change)) {\n // This is a whole-line replace. Treated specially to make\n // sure line objects move the way they are supposed to.\n var added = linesFor(0, text.length - 1);\n update(lastLine, lastLine.text, lastSpans);\n if (nlines) { doc.remove(from.line, nlines); }\n if (added.length) { doc.insert(from.line, added); }\n } else if (firstLine == lastLine) {\n if (text.length == 1) {\n update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);\n } else {\n var added$1 = linesFor(1, text.length - 1);\n added$1.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight$$1));\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n doc.insert(from.line + 1, added$1);\n }\n } else if (text.length == 1) {\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));\n doc.remove(from.line + 1, nlines);\n } else {\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);\n var added$2 = linesFor(1, text.length - 1);\n if (nlines > 1) { doc.remove(from.line + 1, nlines - 1); }\n doc.insert(from.line + 1, added$2);\n }\n\n signalLater(doc, \"change\", doc, change);\n}\n\n// Call f for all linked documents.\nfunction linkedDocs(doc, f, sharedHistOnly) {\n function propagate(doc, skip, sharedHist) {\n if (doc.linked) { for (var i = 0; i < doc.linked.length; ++i) {\n var rel = doc.linked[i];\n if (rel.doc == skip) { continue }\n var shared = sharedHist && rel.sharedHist;\n if (sharedHistOnly && !shared) { continue }\n f(rel.doc, shared);\n propagate(rel.doc, doc, shared);\n } }\n }\n propagate(doc, null, true);\n}\n\n// Attach a document to an editor.\nfunction attachDoc(cm, doc) {\n if (doc.cm) { throw new Error(\"This document is already in use.\") }\n cm.doc = doc;\n doc.cm = cm;\n estimateLineHeights(cm);\n loadMode(cm);\n setDirectionClass(cm);\n if (!cm.options.lineWrapping) { findMaxLine(cm); }\n cm.options.mode = doc.modeOption;\n regChange(cm);\n}\n\nfunction setDirectionClass(cm) {\n (cm.doc.direction == \"rtl\" ? addClass : rmClass)(cm.display.lineDiv, \"CodeMirror-rtl\");\n}\n\nfunction directionChanged(cm) {\n runInOp(cm, function () {\n setDirectionClass(cm);\n regChange(cm);\n });\n}\n\nfunction History(startGen) {\n // Arrays of change events and selections. Doing something adds an\n // event to done and clears undo. Undoing moves events from done\n // to undone, redoing moves them in the other direction.\n this.done = []; this.undone = [];\n this.undoDepth = Infinity;\n // Used to track when changes can be merged into a single undo\n // event\n this.lastModTime = this.lastSelTime = 0;\n this.lastOp = this.lastSelOp = null;\n this.lastOrigin = this.lastSelOrigin = null;\n // Used by the isClean() method\n this.generation = this.maxGeneration = startGen || 1;\n}\n\n// Create a history change event from an updateDoc-style change\n// object.\nfunction historyChangeFromChange(doc, change) {\n var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};\n attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);\n linkedDocs(doc, function (doc) { return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); }, true);\n return histChange\n}\n\n// Pop all selection events off the end of a history array. Stop at\n// a change event.\nfunction clearSelectionEvents(array) {\n while (array.length) {\n var last = lst(array);\n if (last.ranges) { array.pop(); }\n else { break }\n }\n}\n\n// Find the top change event in the history. Pop off selection\n// events that are in the way.\nfunction lastChangeEvent(hist, force) {\n if (force) {\n clearSelectionEvents(hist.done);\n return lst(hist.done)\n } else if (hist.done.length && !lst(hist.done).ranges) {\n return lst(hist.done)\n } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {\n hist.done.pop();\n return lst(hist.done)\n }\n}\n\n// Register a change in the history. Merges changes that are within\n// a single operation, or are close together with an origin that\n// allows merging (starting with \"+\") into a single event.\nfunction addChangeToHistory(doc, change, selAfter, opId) {\n var hist = doc.history;\n hist.undone.length = 0;\n var time = +new Date, cur;\n var last;\n\n if ((hist.lastOp == opId ||\n hist.lastOrigin == change.origin && change.origin &&\n ((change.origin.charAt(0) == \"+\" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) ||\n change.origin.charAt(0) == \"*\")) &&\n (cur = lastChangeEvent(hist, hist.lastOp == opId))) {\n // Merge this change into the last event\n last = lst(cur.changes);\n if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {\n // Optimized case for simple insertion -- don't want to add\n // new changesets for every character typed\n last.to = changeEnd(change);\n } else {\n // Add new sub-event\n cur.changes.push(historyChangeFromChange(doc, change));\n }\n } else {\n // Can not be merged, start a new event.\n var before = lst(hist.done);\n if (!before || !before.ranges)\n { pushSelectionToHistory(doc.sel, hist.done); }\n cur = {changes: [historyChangeFromChange(doc, change)],\n generation: hist.generation};\n hist.done.push(cur);\n while (hist.done.length > hist.undoDepth) {\n hist.done.shift();\n if (!hist.done[0].ranges) { hist.done.shift(); }\n }\n }\n hist.done.push(selAfter);\n hist.generation = ++hist.maxGeneration;\n hist.lastModTime = hist.lastSelTime = time;\n hist.lastOp = hist.lastSelOp = opId;\n hist.lastOrigin = hist.lastSelOrigin = change.origin;\n\n if (!last) { signal(doc, \"historyAdded\"); }\n}\n\nfunction selectionEventCanBeMerged(doc, origin, prev, sel) {\n var ch = origin.charAt(0);\n return ch == \"*\" ||\n ch == \"+\" &&\n prev.ranges.length == sel.ranges.length &&\n prev.somethingSelected() == sel.somethingSelected() &&\n new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500)\n}\n\n// Called whenever the selection changes, sets the new selection as\n// the pending selection in the history, and pushes the old pending\n// selection into the 'done' array when it was significantly\n// different (in number of selected ranges, emptiness, or time).\nfunction addSelectionToHistory(doc, sel, opId, options) {\n var hist = doc.history, origin = options && options.origin;\n\n // A new event is started when the previous origin does not match\n // the current, or the origins don't allow matching. Origins\n // starting with * are always merged, those starting with + are\n // merged when similar and close together in time.\n if (opId == hist.lastSelOp ||\n (origin && hist.lastSelOrigin == origin &&\n (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||\n selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))\n { hist.done[hist.done.length - 1] = sel; }\n else\n { pushSelectionToHistory(sel, hist.done); }\n\n hist.lastSelTime = +new Date;\n hist.lastSelOrigin = origin;\n hist.lastSelOp = opId;\n if (options && options.clearRedo !== false)\n { clearSelectionEvents(hist.undone); }\n}\n\nfunction pushSelectionToHistory(sel, dest) {\n var top = lst(dest);\n if (!(top && top.ranges && top.equals(sel)))\n { dest.push(sel); }\n}\n\n// Used to store marked span information in the history.\nfunction attachLocalSpans(doc, change, from, to) {\n var existing = change[\"spans_\" + doc.id], n = 0;\n doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) {\n if (line.markedSpans)\n { (existing || (existing = change[\"spans_\" + doc.id] = {}))[n] = line.markedSpans; }\n ++n;\n });\n}\n\n// When un/re-doing restores text containing marked spans, those\n// that have been explicitly cleared should not be restored.\nfunction removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}\n\n// Retrieve and filter the old marked spans stored in a change event.\nfunction getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}\n\n// Used for un/re-doing changes from the history. Combines the\n// result of computing the existing spans with the set of spans that\n// existed in the history (so that deleting around a span and then\n// undoing brings back the span).\nfunction mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n if (!old) { return stretched }\n if (!stretched) { return old }\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i], stretchCur = stretched[i];\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n for (var k = 0; k < oldCur.length; ++k)\n { if (oldCur[k].marker == span.marker) { continue spans } }\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n return old\n}\n\n// Used both to provide a JSON-safe object in .getHistory, and, when\n// detaching a document, to split the history in two\nfunction copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n}\n\n// The 'scroll' parameter given to many of these indicated whether\n// the new cursor position should be scrolled into view after\n// modifying the selection.\n\n// If shift is held or the extend flag is set, extends a range to\n// include a given position (and optionally a second position).\n// Otherwise, simply returns the range between the given positions.\n// Used for cursor motion and such.\nfunction extendRange(range, head, other, extend) {\n if (extend) {\n var anchor = range.anchor;\n if (other) {\n var posBefore = cmp(head, anchor) < 0;\n if (posBefore != (cmp(other, anchor) < 0)) {\n anchor = head;\n head = other;\n } else if (posBefore != (cmp(head, other) < 0)) {\n head = other;\n }\n }\n return new Range(anchor, head)\n } else {\n return new Range(other || head, head)\n }\n}\n\n// Extend the primary selection range, discard the rest.\nfunction extendSelection(doc, head, other, options, extend) {\n if (extend == null) { extend = doc.cm && (doc.cm.display.shift || doc.extend); }\n setSelection(doc, new Selection([extendRange(doc.sel.primary(), head, other, extend)], 0), options);\n}\n\n// Extend all selections (pos is an array of selections with length\n// equal the number of selections)\nfunction extendSelections(doc, heads, options) {\n var out = [];\n var extend = doc.cm && (doc.cm.display.shift || doc.extend);\n for (var i = 0; i < doc.sel.ranges.length; i++)\n { out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend); }\n var newSel = normalizeSelection(out, doc.sel.primIndex);\n setSelection(doc, newSel, options);\n}\n\n// Updates a single range in the selection.\nfunction replaceOneSelection(doc, i, range, options) {\n var ranges = doc.sel.ranges.slice(0);\n ranges[i] = range;\n setSelection(doc, normalizeSelection(ranges, doc.sel.primIndex), options);\n}\n\n// Reset the selection to a single range.\nfunction setSimpleSelection(doc, anchor, head, options) {\n setSelection(doc, simpleSelection(anchor, head), options);\n}\n\n// Give beforeSelectionChange handlers a change to influence a\n// selection update.\nfunction filterSelectionChange(doc, sel, options) {\n var obj = {\n ranges: sel.ranges,\n update: function(ranges) {\n var this$1 = this;\n\n this.ranges = [];\n for (var i = 0; i < ranges.length; i++)\n { this$1.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),\n clipPos(doc, ranges[i].head)); }\n },\n origin: options && options.origin\n };\n signal(doc, \"beforeSelectionChange\", doc, obj);\n if (doc.cm) { signal(doc.cm, \"beforeSelectionChange\", doc.cm, obj); }\n if (obj.ranges != sel.ranges) { return normalizeSelection(obj.ranges, obj.ranges.length - 1) }\n else { return sel }\n}\n\nfunction setSelectionReplaceHistory(doc, sel, options) {\n var done = doc.history.done, last = lst(done);\n if (last && last.ranges) {\n done[done.length - 1] = sel;\n setSelectionNoUndo(doc, sel, options);\n } else {\n setSelection(doc, sel, options);\n }\n}\n\n// Set a new selection.\nfunction setSelection(doc, sel, options) {\n setSelectionNoUndo(doc, sel, options);\n addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);\n}\n\nfunction setSelectionNoUndo(doc, sel, options) {\n if (hasHandler(doc, \"beforeSelectionChange\") || doc.cm && hasHandler(doc.cm, \"beforeSelectionChange\"))\n { sel = filterSelectionChange(doc, sel, options); }\n\n var bias = options && options.bias ||\n (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);\n setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));\n\n if (!(options && options.scroll === false) && doc.cm)\n { ensureCursorVisible(doc.cm); }\n}\n\nfunction setSelectionInner(doc, sel) {\n if (sel.equals(doc.sel)) { return }\n\n doc.sel = sel;\n\n if (doc.cm) {\n doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged = true;\n signalCursorActivity(doc.cm);\n }\n signalLater(doc, \"cursorActivity\", doc);\n}\n\n// Verify that the selection does not partially select any atomic\n// marked ranges.\nfunction reCheckSelection(doc) {\n setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false));\n}\n\n// Return a selection that does not partially select any atomic\n// ranges.\nfunction skipAtomicInSelection(doc, sel, bias, mayClear) {\n var out;\n for (var i = 0; i < sel.ranges.length; i++) {\n var range = sel.ranges[i];\n var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i];\n var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear);\n var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear);\n if (out || newAnchor != range.anchor || newHead != range.head) {\n if (!out) { out = sel.ranges.slice(0, i); }\n out[i] = new Range(newAnchor, newHead);\n }\n }\n return out ? normalizeSelection(out, sel.primIndex) : sel\n}\n\nfunction skipAtomicInner(doc, pos, oldPos, dir, mayClear) {\n var line = getLine(doc, pos.line);\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var sp = line.markedSpans[i], m = sp.marker;\n if ((sp.from == null || (m.inclusiveLeft ? sp.from <= pos.ch : sp.from < pos.ch)) &&\n (sp.to == null || (m.inclusiveRight ? sp.to >= pos.ch : sp.to > pos.ch))) {\n if (mayClear) {\n signal(m, \"beforeCursorEnter\");\n if (m.explicitlyCleared) {\n if (!line.markedSpans) { break }\n else {--i; continue}\n }\n }\n if (!m.atomic) { continue }\n\n if (oldPos) {\n var near = m.find(dir < 0 ? 1 : -1), diff = (void 0);\n if (dir < 0 ? m.inclusiveRight : m.inclusiveLeft)\n { near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null); }\n if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))\n { return skipAtomicInner(doc, near, pos, dir, mayClear) }\n }\n\n var far = m.find(dir < 0 ? -1 : 1);\n if (dir < 0 ? m.inclusiveLeft : m.inclusiveRight)\n { far = movePos(doc, far, dir, far.line == pos.line ? line : null); }\n return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null\n }\n } }\n return pos\n}\n\n// Ensure a given position is not inside an atomic range.\nfunction skipAtomic(doc, pos, oldPos, bias, mayClear) {\n var dir = bias || 1;\n var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) ||\n (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) ||\n skipAtomicInner(doc, pos, oldPos, -dir, mayClear) ||\n (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true));\n if (!found) {\n doc.cantEdit = true;\n return Pos(doc.first, 0)\n }\n return found\n}\n\nfunction movePos(doc, pos, dir, line) {\n if (dir < 0 && pos.ch == 0) {\n if (pos.line > doc.first) { return clipPos(doc, Pos(pos.line - 1)) }\n else { return null }\n } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) {\n if (pos.line < doc.first + doc.size - 1) { return Pos(pos.line + 1, 0) }\n else { return null }\n } else {\n return new Pos(pos.line, pos.ch + dir)\n }\n}\n\nfunction selectAll(cm) {\n cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);\n}\n\n// UPDATING\n\n// Allow \"beforeChange\" event handlers to influence a change\nfunction filterChange(doc, change, update) {\n var obj = {\n canceled: false,\n from: change.from,\n to: change.to,\n text: change.text,\n origin: change.origin,\n cancel: function () { return obj.canceled = true; }\n };\n if (update) { obj.update = function (from, to, text, origin) {\n if (from) { obj.from = clipPos(doc, from); }\n if (to) { obj.to = clipPos(doc, to); }\n if (text) { obj.text = text; }\n if (origin !== undefined) { obj.origin = origin; }\n }; }\n signal(doc, \"beforeChange\", doc, obj);\n if (doc.cm) { signal(doc.cm, \"beforeChange\", doc.cm, obj); }\n\n if (obj.canceled) { return null }\n return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}\n}\n\n// Apply a change to a document, and add it to the document's\n// history, and propagating it to all linked documents.\nfunction makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n}\n\nfunction makeChangeInner(doc, change) {\n if (change.text.length == 1 && change.text[0] == \"\" && cmp(change.from, change.to) == 0) { return }\n var selAfter = computeSelAfterChange(doc, change);\n addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);\n\n makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));\n var rebased = [];\n\n linkedDocs(doc, function (doc, sharedHist) {\n if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n rebaseHist(doc.history, change);\n rebased.push(doc.history);\n }\n makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));\n });\n}\n\n// Revert a change stored in a document's history.\nfunction makeChangeFromHistory(doc, type, allowSelectionOnly) {\n var suppress = doc.cm && doc.cm.state.suppressEdits;\n if (suppress && !allowSelectionOnly) { return }\n\n var hist = doc.history, event, selAfter = doc.sel;\n var source = type == \"undo\" ? hist.done : hist.undone, dest = type == \"undo\" ? hist.undone : hist.done;\n\n // Verify that there is a useable event (so that ctrl-z won't\n // needlessly clear selection events)\n var i = 0;\n for (; i < source.length; i++) {\n event = source[i];\n if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges)\n { break }\n }\n if (i == source.length) { return }\n hist.lastOrigin = hist.lastSelOrigin = null;\n\n for (;;) {\n event = source.pop();\n if (event.ranges) {\n pushSelectionToHistory(event, dest);\n if (allowSelectionOnly && !event.equals(doc.sel)) {\n setSelection(doc, event, {clearRedo: false});\n return\n }\n selAfter = event;\n } else if (suppress) {\n source.push(event);\n return\n } else { break }\n }\n\n // Build up a reverse change object to add to the opposite history\n // stack (redo when undoing, and vice versa).\n var antiChanges = [];\n pushSelectionToHistory(selAfter, dest);\n dest.push({changes: antiChanges, generation: hist.generation});\n hist.generation = event.generation || ++hist.maxGeneration;\n\n var filter = hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\");\n\n var loop = function ( i ) {\n var change = event.changes[i];\n change.origin = type;\n if (filter && !filterChange(doc, change, false)) {\n source.length = 0;\n return {}\n }\n\n antiChanges.push(historyChangeFromChange(doc, change));\n\n var after = i ? computeSelAfterChange(doc, change) : lst(source);\n makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));\n if (!i && doc.cm) { doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); }\n var rebased = [];\n\n // Propagate to the linked documents\n linkedDocs(doc, function (doc, sharedHist) {\n if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n rebaseHist(doc.history, change);\n rebased.push(doc.history);\n }\n makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));\n });\n };\n\n for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) {\n var returned = loop( i$1 );\n\n if ( returned ) return returned.v;\n }\n}\n\n// Sub-views need their line numbers shifted when text is added\n// above or below them in the parent document.\nfunction shiftDoc(doc, distance) {\n if (distance == 0) { return }\n doc.first += distance;\n doc.sel = new Selection(map(doc.sel.ranges, function (range) { return new Range(\n Pos(range.anchor.line + distance, range.anchor.ch),\n Pos(range.head.line + distance, range.head.ch)\n ); }), doc.sel.primIndex);\n if (doc.cm) {\n regChange(doc.cm, doc.first, doc.first - distance, distance);\n for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++)\n { regLineChange(doc.cm, l, \"gutter\"); }\n }\n}\n\n// More lower-level change function, handling only a single document\n// (not linked ones).\nfunction makeChangeSingleDoc(doc, change, selAfter, spans) {\n if (doc.cm && !doc.cm.curOp)\n { return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) }\n\n if (change.to.line < doc.first) {\n shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));\n return\n }\n if (change.from.line > doc.lastLine()) { return }\n\n // Clip the change to the size of this doc\n if (change.from.line < doc.first) {\n var shift = change.text.length - 1 - (doc.first - change.from.line);\n shiftDoc(doc, shift);\n change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),\n text: [lst(change.text)], origin: change.origin};\n }\n var last = doc.lastLine();\n if (change.to.line > last) {\n change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),\n text: [change.text[0]], origin: change.origin};\n }\n\n change.removed = getBetween(doc, change.from, change.to);\n\n if (!selAfter) { selAfter = computeSelAfterChange(doc, change); }\n if (doc.cm) { makeChangeSingleDocInEditor(doc.cm, change, spans); }\n else { updateDoc(doc, change, spans); }\n setSelectionNoUndo(doc, selAfter, sel_dontScroll);\n}\n\n// Handle the interaction of a change to a document with the editor\n// that this document is part of.\nfunction makeChangeSingleDocInEditor(cm, change, spans) {\n var doc = cm.doc, display = cm.display, from = change.from, to = change.to;\n\n var recomputeMaxLength = false, checkWidthStart = from.line;\n if (!cm.options.lineWrapping) {\n checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));\n doc.iter(checkWidthStart, to.line + 1, function (line) {\n if (line == display.maxLine) {\n recomputeMaxLength = true;\n return true\n }\n });\n }\n\n if (doc.sel.contains(change.from, change.to) > -1)\n { signalCursorActivity(cm); }\n\n updateDoc(doc, change, spans, estimateHeight(cm));\n\n if (!cm.options.lineWrapping) {\n doc.iter(checkWidthStart, from.line + change.text.length, function (line) {\n var len = lineLength(line);\n if (len > display.maxLineLength) {\n display.maxLine = line;\n display.maxLineLength = len;\n display.maxLineChanged = true;\n recomputeMaxLength = false;\n }\n });\n if (recomputeMaxLength) { cm.curOp.updateMaxLine = true; }\n }\n\n retreatFrontier(doc, from.line);\n startWorker(cm, 400);\n\n var lendiff = change.text.length - (to.line - from.line) - 1;\n // Remember that these lines changed, for updating the display\n if (change.full)\n { regChange(cm); }\n else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change))\n { regLineChange(cm, from.line, \"text\"); }\n else\n { regChange(cm, from.line, to.line + 1, lendiff); }\n\n var changesHandler = hasHandler(cm, \"changes\"), changeHandler = hasHandler(cm, \"change\");\n if (changeHandler || changesHandler) {\n var obj = {\n from: from, to: to,\n text: change.text,\n removed: change.removed,\n origin: change.origin\n };\n if (changeHandler) { signalLater(cm, \"change\", cm, obj); }\n if (changesHandler) { (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); }\n }\n cm.display.selForContextMenu = null;\n}\n\nfunction replaceRange(doc, code, from, to, origin) {\n if (!to) { to = from; }\n if (cmp(to, from) < 0) { var assign;\n (assign = [to, from], from = assign[0], to = assign[1]); }\n if (typeof code == \"string\") { code = doc.splitLines(code); }\n makeChange(doc, {from: from, to: to, text: code, origin: origin});\n}\n\n// Rebasing/resetting history to deal with externally-sourced changes\n\nfunction rebaseHistSelSingle(pos, from, to, diff) {\n if (to < pos.line) {\n pos.line += diff;\n } else if (from < pos.line) {\n pos.line = from;\n pos.ch = 0;\n }\n}\n\n// Tries to rebase an array of history events given a change in the\n// document. If the change touches the same lines as the event, the\n// event, and everything 'behind' it, is discarded. If the change is\n// before the event, the event's positions are updated. Uses a\n// copy-on-write scheme for the positions, to avoid having to\n// reallocate them all on every rebase, but also avoid problems with\n// shared position objects being unsafely updated.\nfunction rebaseHistArray(array, from, to, diff) {\n for (var i = 0; i < array.length; ++i) {\n var sub = array[i], ok = true;\n if (sub.ranges) {\n if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; }\n for (var j = 0; j < sub.ranges.length; j++) {\n rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);\n rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);\n }\n continue\n }\n for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) {\n var cur = sub.changes[j$1];\n if (to < cur.from.line) {\n cur.from = Pos(cur.from.line + diff, cur.from.ch);\n cur.to = Pos(cur.to.line + diff, cur.to.ch);\n } else if (from <= cur.to.line) {\n ok = false;\n break\n }\n }\n if (!ok) {\n array.splice(0, i + 1);\n i = 0;\n }\n }\n}\n\nfunction rebaseHist(hist, change) {\n var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;\n rebaseHistArray(hist.done, from, to, diff);\n rebaseHistArray(hist.undone, from, to, diff);\n}\n\n// Utility for applying a change to a line by handle or number,\n// returning the number and optionally registering the line as\n// changed.\nfunction changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n}\n\n// The document is represented as a BTree consisting of leaves, with\n// chunk of lines in them, and branches, with up to ten leaves or\n// other branch nodes below them. The top node is always a branch\n// node, and is the document object itself (meaning it has\n// additional methods and properties).\n//\n// All nodes have parent links. The tree is used both to go from\n// line numbers to line objects, and to go from objects to numbers.\n// It also indexes by height, and is used to convert between height\n// and line object, and to find the total height of the document.\n//\n// See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html\n\nfunction LeafChunk(lines) {\n var this$1 = this;\n\n this.lines = lines;\n this.parent = null;\n var height = 0;\n for (var i = 0; i < lines.length; ++i) {\n lines[i].parent = this$1;\n height += lines[i].height;\n }\n this.height = height;\n}\n\nLeafChunk.prototype = {\n chunkSize: function() { return this.lines.length },\n\n // Remove the n lines at offset 'at'.\n removeInner: function(at, n) {\n var this$1 = this;\n\n for (var i = at, e = at + n; i < e; ++i) {\n var line = this$1.lines[i];\n this$1.height -= line.height;\n cleanUpLine(line);\n signalLater(line, \"delete\");\n }\n this.lines.splice(at, n);\n },\n\n // Helper used to collapse a small branch into a single leaf.\n collapse: function(lines) {\n lines.push.apply(lines, this.lines);\n },\n\n // Insert the given array of lines at offset 'at', count them as\n // having the given height.\n insertInner: function(at, lines, height) {\n var this$1 = this;\n\n this.height += height;\n this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));\n for (var i = 0; i < lines.length; ++i) { lines[i].parent = this$1; }\n },\n\n // Used to iterate over a part of the tree.\n iterN: function(at, n, op) {\n var this$1 = this;\n\n for (var e = at + n; at < e; ++at)\n { if (op(this$1.lines[at])) { return true } }\n }\n};\n\nfunction BranchChunk(children) {\n var this$1 = this;\n\n this.children = children;\n var size = 0, height = 0;\n for (var i = 0; i < children.length; ++i) {\n var ch = children[i];\n size += ch.chunkSize(); height += ch.height;\n ch.parent = this$1;\n }\n this.size = size;\n this.height = height;\n this.parent = null;\n}\n\nBranchChunk.prototype = {\n chunkSize: function() { return this.size },\n\n removeInner: function(at, n) {\n var this$1 = this;\n\n this.size -= n;\n for (var i = 0; i < this.children.length; ++i) {\n var child = this$1.children[i], sz = child.chunkSize();\n if (at < sz) {\n var rm = Math.min(n, sz - at), oldHeight = child.height;\n child.removeInner(at, rm);\n this$1.height -= oldHeight - child.height;\n if (sz == rm) { this$1.children.splice(i--, 1); child.parent = null; }\n if ((n -= rm) == 0) { break }\n at = 0;\n } else { at -= sz; }\n }\n // If the result is smaller than 25 lines, ensure that it is a\n // single leaf node.\n if (this.size - n < 25 &&\n (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {\n var lines = [];\n this.collapse(lines);\n this.children = [new LeafChunk(lines)];\n this.children[0].parent = this;\n }\n },\n\n collapse: function(lines) {\n var this$1 = this;\n\n for (var i = 0; i < this.children.length; ++i) { this$1.children[i].collapse(lines); }\n },\n\n insertInner: function(at, lines, height) {\n var this$1 = this;\n\n this.size += lines.length;\n this.height += height;\n for (var i = 0; i < this.children.length; ++i) {\n var child = this$1.children[i], sz = child.chunkSize();\n if (at <= sz) {\n child.insertInner(at, lines, height);\n if (child.lines && child.lines.length > 50) {\n // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced.\n // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest.\n var remaining = child.lines.length % 25 + 25;\n for (var pos = remaining; pos < child.lines.length;) {\n var leaf = new LeafChunk(child.lines.slice(pos, pos += 25));\n child.height -= leaf.height;\n this$1.children.splice(++i, 0, leaf);\n leaf.parent = this$1;\n }\n child.lines = child.lines.slice(0, remaining);\n this$1.maybeSpill();\n }\n break\n }\n at -= sz;\n }\n },\n\n // When a node has grown, check whether it should be split.\n maybeSpill: function() {\n if (this.children.length <= 10) { return }\n var me = this;\n do {\n var spilled = me.children.splice(me.children.length - 5, 5);\n var sibling = new BranchChunk(spilled);\n if (!me.parent) { // Become the parent node\n var copy = new BranchChunk(me.children);\n copy.parent = me;\n me.children = [copy, sibling];\n me = copy;\n } else {\n me.size -= sibling.size;\n me.height -= sibling.height;\n var myIndex = indexOf(me.parent.children, me);\n me.parent.children.splice(myIndex + 1, 0, sibling);\n }\n sibling.parent = me.parent;\n } while (me.children.length > 10)\n me.parent.maybeSpill();\n },\n\n iterN: function(at, n, op) {\n var this$1 = this;\n\n for (var i = 0; i < this.children.length; ++i) {\n var child = this$1.children[i], sz = child.chunkSize();\n if (at < sz) {\n var used = Math.min(n, sz - at);\n if (child.iterN(at, used, op)) { return true }\n if ((n -= used) == 0) { break }\n at = 0;\n } else { at -= sz; }\n }\n }\n};\n\n// Line widgets are block elements displayed above or below a line.\n\nvar LineWidget = function(doc, node, options) {\n var this$1 = this;\n\n if (options) { for (var opt in options) { if (options.hasOwnProperty(opt))\n { this$1[opt] = options[opt]; } } }\n this.doc = doc;\n this.node = node;\n};\n\nLineWidget.prototype.clear = function () {\n var this$1 = this;\n\n var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);\n if (no == null || !ws) { return }\n for (var i = 0; i < ws.length; ++i) { if (ws[i] == this$1) { ws.splice(i--, 1); } }\n if (!ws.length) { line.widgets = null; }\n var height = widgetHeight(this);\n updateLineHeight(line, Math.max(0, line.height - height));\n if (cm) {\n runInOp(cm, function () {\n adjustScrollWhenAboveVisible(cm, line, -height);\n regLineChange(cm, no, \"widget\");\n });\n signalLater(cm, \"lineWidgetCleared\", cm, this, no);\n }\n};\n\nLineWidget.prototype.changed = function () {\n var this$1 = this;\n\n var oldH = this.height, cm = this.doc.cm, line = this.line;\n this.height = null;\n var diff = widgetHeight(this) - oldH;\n if (!diff) { return }\n updateLineHeight(line, line.height + diff);\n if (cm) {\n runInOp(cm, function () {\n cm.curOp.forceUpdate = true;\n adjustScrollWhenAboveVisible(cm, line, diff);\n signalLater(cm, \"lineWidgetChanged\", cm, this$1, lineNo(line));\n });\n }\n};\neventMixin(LineWidget);\n\nfunction adjustScrollWhenAboveVisible(cm, line, diff) {\n if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop))\n { addToScrollTop(cm, diff); }\n}\n\nfunction addLineWidget(doc, handle, node, options) {\n var widget = new LineWidget(doc, node, options);\n var cm = doc.cm;\n if (cm && widget.noHScroll) { cm.display.alignWidgets = true; }\n changeLine(doc, handle, \"widget\", function (line) {\n var widgets = line.widgets || (line.widgets = []);\n if (widget.insertAt == null) { widgets.push(widget); }\n else { widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget); }\n widget.line = line;\n if (cm && !lineIsHidden(doc, line)) {\n var aboveVisible = heightAtLine(line) < doc.scrollTop;\n updateLineHeight(line, line.height + widgetHeight(widget));\n if (aboveVisible) { addToScrollTop(cm, widget.height); }\n cm.curOp.forceUpdate = true;\n }\n return true\n });\n if (cm) { signalLater(cm, \"lineWidgetAdded\", cm, widget, typeof handle == \"number\" ? handle : lineNo(handle)); }\n return widget\n}\n\n// TEXTMARKERS\n\n// Created with markText and setBookmark methods. A TextMarker is a\n// handle that can be used to clear or find a marked position in the\n// document. Line objects hold arrays (markedSpans) containing\n// {from, to, marker} object pointing to such marker objects, and\n// indicating that such a marker is present on that line. Multiple\n// lines may point to the same marker when it spans across lines.\n// The spans will have null for their from/to properties when the\n// marker continues beyond the start/end of the line. Markers have\n// links back to the lines they currently touch.\n\n// Collapsed markers have unique ids, in order to be able to order\n// them, which is needed for uniquely determining an outer marker\n// when they overlap (they may nest, but not partially overlap).\nvar nextMarkerId = 0;\n\nvar TextMarker = function(doc, type) {\n this.lines = [];\n this.type = type;\n this.doc = doc;\n this.id = ++nextMarkerId;\n};\n\n// Clear the marker.\nTextMarker.prototype.clear = function () {\n var this$1 = this;\n\n if (this.explicitlyCleared) { return }\n var cm = this.doc.cm, withOp = cm && !cm.curOp;\n if (withOp) { startOperation(cm); }\n if (hasHandler(this, \"clear\")) {\n var found = this.find();\n if (found) { signalLater(this, \"clear\", found.from, found.to); }\n }\n var min = null, max = null;\n for (var i = 0; i < this.lines.length; ++i) {\n var line = this$1.lines[i];\n var span = getMarkedSpanFor(line.markedSpans, this$1);\n if (cm && !this$1.collapsed) { regLineChange(cm, lineNo(line), \"text\"); }\n else if (cm) {\n if (span.to != null) { max = lineNo(line); }\n if (span.from != null) { min = lineNo(line); }\n }\n line.markedSpans = removeMarkedSpan(line.markedSpans, span);\n if (span.from == null && this$1.collapsed && !lineIsHidden(this$1.doc, line) && cm)\n { updateLineHeight(line, textHeight(cm.display)); }\n }\n if (cm && this.collapsed && !cm.options.lineWrapping) { for (var i$1 = 0; i$1 < this.lines.length; ++i$1) {\n var visual = visualLine(this$1.lines[i$1]), len = lineLength(visual);\n if (len > cm.display.maxLineLength) {\n cm.display.maxLine = visual;\n cm.display.maxLineLength = len;\n cm.display.maxLineChanged = true;\n }\n } }\n\n if (min != null && cm && this.collapsed) { regChange(cm, min, max + 1); }\n this.lines.length = 0;\n this.explicitlyCleared = true;\n if (this.atomic && this.doc.cantEdit) {\n this.doc.cantEdit = false;\n if (cm) { reCheckSelection(cm.doc); }\n }\n if (cm) { signalLater(cm, \"markerCleared\", cm, this, min, max); }\n if (withOp) { endOperation(cm); }\n if (this.parent) { this.parent.clear(); }\n};\n\n// Find the position of the marker in the document. Returns a {from,\n// to} object by default. Side can be passed to get a specific side\n// -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the\n// Pos objects returned contain a line object, rather than a line\n// number (used to prevent looking up the same line twice).\nTextMarker.prototype.find = function (side, lineObj) {\n var this$1 = this;\n\n if (side == null && this.type == \"bookmark\") { side = 1; }\n var from, to;\n for (var i = 0; i < this.lines.length; ++i) {\n var line = this$1.lines[i];\n var span = getMarkedSpanFor(line.markedSpans, this$1);\n if (span.from != null) {\n from = Pos(lineObj ? line : lineNo(line), span.from);\n if (side == -1) { return from }\n }\n if (span.to != null) {\n to = Pos(lineObj ? line : lineNo(line), span.to);\n if (side == 1) { return to }\n }\n }\n return from && {from: from, to: to}\n};\n\n// Signals that the marker's widget changed, and surrounding layout\n// should be recomputed.\nTextMarker.prototype.changed = function () {\n var this$1 = this;\n\n var pos = this.find(-1, true), widget = this, cm = this.doc.cm;\n if (!pos || !cm) { return }\n runInOp(cm, function () {\n var line = pos.line, lineN = lineNo(pos.line);\n var view = findViewForLine(cm, lineN);\n if (view) {\n clearLineMeasurementCacheFor(view);\n cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;\n }\n cm.curOp.updateMaxLine = true;\n if (!lineIsHidden(widget.doc, line) && widget.height != null) {\n var oldHeight = widget.height;\n widget.height = null;\n var dHeight = widgetHeight(widget) - oldHeight;\n if (dHeight)\n { updateLineHeight(line, line.height + dHeight); }\n }\n signalLater(cm, \"markerChanged\", cm, this$1);\n });\n};\n\nTextMarker.prototype.attachLine = function (line) {\n if (!this.lines.length && this.doc.cm) {\n var op = this.doc.cm.curOp;\n if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)\n { (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); }\n }\n this.lines.push(line);\n};\n\nTextMarker.prototype.detachLine = function (line) {\n this.lines.splice(indexOf(this.lines, line), 1);\n if (!this.lines.length && this.doc.cm) {\n var op = this.doc.cm.curOp;(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);\n }\n};\neventMixin(TextMarker);\n\n// Create a marker, wire it up to the right lines, and\nfunction markText(doc, from, to, options, type) {\n // Shared markers (across linked documents) are handled separately\n // (markTextShared will call out to this again, once per\n // document).\n if (options && options.shared) { return markTextShared(doc, from, to, options, type) }\n // Ensure we are in an operation.\n if (doc.cm && !doc.cm.curOp) { return operation(doc.cm, markText)(doc, from, to, options, type) }\n\n var marker = new TextMarker(doc, type), diff = cmp(from, to);\n if (options) { copyObj(options, marker, false); }\n // Don't connect empty markers unless clearWhenEmpty is false\n if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false)\n { return marker }\n if (marker.replacedWith) {\n // Showing up as a widget implies collapsed (widget replaces text)\n marker.collapsed = true;\n marker.widgetNode = eltP(\"span\", [marker.replacedWith], \"CodeMirror-widget\");\n if (!options.handleMouseEvents) { marker.widgetNode.setAttribute(\"cm-ignore-events\", \"true\"); }\n if (options.insertLeft) { marker.widgetNode.insertLeft = true; }\n }\n if (marker.collapsed) {\n if (conflictingCollapsedRange(doc, from.line, from, to, marker) ||\n from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker))\n { throw new Error(\"Inserting collapsed marker partially overlapping an existing one\") }\n seeCollapsedSpans();\n }\n\n if (marker.addToHistory)\n { addChangeToHistory(doc, {from: from, to: to, origin: \"markText\"}, doc.sel, NaN); }\n\n var curLine = from.line, cm = doc.cm, updateMaxLine;\n doc.iter(curLine, to.line + 1, function (line) {\n if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine)\n { updateMaxLine = true; }\n if (marker.collapsed && curLine != from.line) { updateLineHeight(line, 0); }\n addMarkedSpan(line, new MarkedSpan(marker,\n curLine == from.line ? from.ch : null,\n curLine == to.line ? to.ch : null));\n ++curLine;\n });\n // lineIsHidden depends on the presence of the spans, so needs a second pass\n if (marker.collapsed) { doc.iter(from.line, to.line + 1, function (line) {\n if (lineIsHidden(doc, line)) { updateLineHeight(line, 0); }\n }); }\n\n if (marker.clearOnEnter) { on(marker, \"beforeCursorEnter\", function () { return marker.clear(); }); }\n\n if (marker.readOnly) {\n seeReadOnlySpans();\n if (doc.history.done.length || doc.history.undone.length)\n { doc.clearHistory(); }\n }\n if (marker.collapsed) {\n marker.id = ++nextMarkerId;\n marker.atomic = true;\n }\n if (cm) {\n // Sync editor state\n if (updateMaxLine) { cm.curOp.updateMaxLine = true; }\n if (marker.collapsed)\n { regChange(cm, from.line, to.line + 1); }\n else if (marker.className || marker.title || marker.startStyle || marker.endStyle || marker.css)\n { for (var i = from.line; i <= to.line; i++) { regLineChange(cm, i, \"text\"); } }\n if (marker.atomic) { reCheckSelection(cm.doc); }\n signalLater(cm, \"markerAdded\", cm, marker);\n }\n return marker\n}\n\n// SHARED TEXTMARKERS\n\n// A shared marker spans multiple linked documents. It is\n// implemented as a meta-marker-object controlling multiple normal\n// markers.\nvar SharedTextMarker = function(markers, primary) {\n var this$1 = this;\n\n this.markers = markers;\n this.primary = primary;\n for (var i = 0; i < markers.length; ++i)\n { markers[i].parent = this$1; }\n};\n\nSharedTextMarker.prototype.clear = function () {\n var this$1 = this;\n\n if (this.explicitlyCleared) { return }\n this.explicitlyCleared = true;\n for (var i = 0; i < this.markers.length; ++i)\n { this$1.markers[i].clear(); }\n signalLater(this, \"clear\");\n};\n\nSharedTextMarker.prototype.find = function (side, lineObj) {\n return this.primary.find(side, lineObj)\n};\neventMixin(SharedTextMarker);\n\nfunction markTextShared(doc, from, to, options, type) {\n options = copyObj(options);\n options.shared = false;\n var markers = [markText(doc, from, to, options, type)], primary = markers[0];\n var widget = options.widgetNode;\n linkedDocs(doc, function (doc) {\n if (widget) { options.widgetNode = widget.cloneNode(true); }\n markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));\n for (var i = 0; i < doc.linked.length; ++i)\n { if (doc.linked[i].isParent) { return } }\n primary = lst(markers);\n });\n return new SharedTextMarker(markers, primary)\n}\n\nfunction findSharedMarkers(doc) {\n return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), function (m) { return m.parent; })\n}\n\nfunction copySharedMarkers(doc, markers) {\n for (var i = 0; i < markers.length; i++) {\n var marker = markers[i], pos = marker.find();\n var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to);\n if (cmp(mFrom, mTo)) {\n var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type);\n marker.markers.push(subMark);\n subMark.parent = marker;\n }\n }\n}\n\nfunction detachSharedMarkers(markers) {\n var loop = function ( i ) {\n var marker = markers[i], linked = [marker.primary.doc];\n linkedDocs(marker.primary.doc, function (d) { return linked.push(d); });\n for (var j = 0; j < marker.markers.length; j++) {\n var subMarker = marker.markers[j];\n if (indexOf(linked, subMarker.doc) == -1) {\n subMarker.parent = null;\n marker.markers.splice(j--, 1);\n }\n }\n };\n\n for (var i = 0; i < markers.length; i++) loop( i );\n}\n\nvar nextDocId = 0;\nvar Doc = function(text, mode, firstLine, lineSep, direction) {\n if (!(this instanceof Doc)) { return new Doc(text, mode, firstLine, lineSep, direction) }\n if (firstLine == null) { firstLine = 0; }\n\n BranchChunk.call(this, [new LeafChunk([new Line(\"\", null)])]);\n this.first = firstLine;\n this.scrollTop = this.scrollLeft = 0;\n this.cantEdit = false;\n this.cleanGeneration = 1;\n this.modeFrontier = this.highlightFrontier = firstLine;\n var start = Pos(firstLine, 0);\n this.sel = simpleSelection(start);\n this.history = new History(null);\n this.id = ++nextDocId;\n this.modeOption = mode;\n this.lineSep = lineSep;\n this.direction = (direction == \"rtl\") ? \"rtl\" : \"ltr\";\n this.extend = false;\n\n if (typeof text == \"string\") { text = this.splitLines(text); }\n updateDoc(this, {from: start, to: start, text: text});\n setSelection(this, simpleSelection(start), sel_dontScroll);\n};\n\nDoc.prototype = createObj(BranchChunk.prototype, {\n constructor: Doc,\n // Iterate over the document. Supports two forms -- with only one\n // argument, it calls that for each line in the document. With\n // three, it iterates over the range given by the first two (with\n // the second being non-inclusive).\n iter: function(from, to, op) {\n if (op) { this.iterN(from - this.first, to - from, op); }\n else { this.iterN(this.first, this.first + this.size, from); }\n },\n\n // Non-public interface for adding and removing lines.\n insert: function(at, lines) {\n var height = 0;\n for (var i = 0; i < lines.length; ++i) { height += lines[i].height; }\n this.insertInner(at - this.first, lines, height);\n },\n remove: function(at, n) { this.removeInner(at - this.first, n); },\n\n // From here, the methods are part of the public interface. Most\n // are also available from CodeMirror (editor) instances.\n\n getValue: function(lineSep) {\n var lines = getLines(this, this.first, this.first + this.size);\n if (lineSep === false) { return lines }\n return lines.join(lineSep || this.lineSeparator())\n },\n setValue: docMethodOp(function(code) {\n var top = Pos(this.first, 0), last = this.first + this.size - 1;\n makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),\n text: this.splitLines(code), origin: \"setValue\", full: true}, true);\n if (this.cm) { scrollToCoords(this.cm, 0, 0); }\n setSelection(this, simpleSelection(top), sel_dontScroll);\n }),\n replaceRange: function(code, from, to, origin) {\n from = clipPos(this, from);\n to = to ? clipPos(this, to) : from;\n replaceRange(this, code, from, to, origin);\n },\n getRange: function(from, to, lineSep) {\n var lines = getBetween(this, clipPos(this, from), clipPos(this, to));\n if (lineSep === false) { return lines }\n return lines.join(lineSep || this.lineSeparator())\n },\n\n getLine: function(line) {var l = this.getLineHandle(line); return l && l.text},\n\n getLineHandle: function(line) {if (isLine(this, line)) { return getLine(this, line) }},\n getLineNumber: function(line) {return lineNo(line)},\n\n getLineHandleVisualStart: function(line) {\n if (typeof line == \"number\") { line = getLine(this, line); }\n return visualLine(line)\n },\n\n lineCount: function() {return this.size},\n firstLine: function() {return this.first},\n lastLine: function() {return this.first + this.size - 1},\n\n clipPos: function(pos) {return clipPos(this, pos)},\n\n getCursor: function(start) {\n var range$$1 = this.sel.primary(), pos;\n if (start == null || start == \"head\") { pos = range$$1.head; }\n else if (start == \"anchor\") { pos = range$$1.anchor; }\n else if (start == \"end\" || start == \"to\" || start === false) { pos = range$$1.to(); }\n else { pos = range$$1.from(); }\n return pos\n },\n listSelections: function() { return this.sel.ranges },\n somethingSelected: function() {return this.sel.somethingSelected()},\n\n setCursor: docMethodOp(function(line, ch, options) {\n setSimpleSelection(this, clipPos(this, typeof line == \"number\" ? Pos(line, ch || 0) : line), null, options);\n }),\n setSelection: docMethodOp(function(anchor, head, options) {\n setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options);\n }),\n extendSelection: docMethodOp(function(head, other, options) {\n extendSelection(this, clipPos(this, head), other && clipPos(this, other), options);\n }),\n extendSelections: docMethodOp(function(heads, options) {\n extendSelections(this, clipPosArray(this, heads), options);\n }),\n extendSelectionsBy: docMethodOp(function(f, options) {\n var heads = map(this.sel.ranges, f);\n extendSelections(this, clipPosArray(this, heads), options);\n }),\n setSelections: docMethodOp(function(ranges, primary, options) {\n var this$1 = this;\n\n if (!ranges.length) { return }\n var out = [];\n for (var i = 0; i < ranges.length; i++)\n { out[i] = new Range(clipPos(this$1, ranges[i].anchor),\n clipPos(this$1, ranges[i].head)); }\n if (primary == null) { primary = Math.min(ranges.length - 1, this.sel.primIndex); }\n setSelection(this, normalizeSelection(out, primary), options);\n }),\n addSelection: docMethodOp(function(anchor, head, options) {\n var ranges = this.sel.ranges.slice(0);\n ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));\n setSelection(this, normalizeSelection(ranges, ranges.length - 1), options);\n }),\n\n getSelection: function(lineSep) {\n var this$1 = this;\n\n var ranges = this.sel.ranges, lines;\n for (var i = 0; i < ranges.length; i++) {\n var sel = getBetween(this$1, ranges[i].from(), ranges[i].to());\n lines = lines ? lines.concat(sel) : sel;\n }\n if (lineSep === false) { return lines }\n else { return lines.join(lineSep || this.lineSeparator()) }\n },\n getSelections: function(lineSep) {\n var this$1 = this;\n\n var parts = [], ranges = this.sel.ranges;\n for (var i = 0; i < ranges.length; i++) {\n var sel = getBetween(this$1, ranges[i].from(), ranges[i].to());\n if (lineSep !== false) { sel = sel.join(lineSep || this$1.lineSeparator()); }\n parts[i] = sel;\n }\n return parts\n },\n replaceSelection: function(code, collapse, origin) {\n var dup = [];\n for (var i = 0; i < this.sel.ranges.length; i++)\n { dup[i] = code; }\n this.replaceSelections(dup, collapse, origin || \"+input\");\n },\n replaceSelections: docMethodOp(function(code, collapse, origin) {\n var this$1 = this;\n\n var changes = [], sel = this.sel;\n for (var i = 0; i < sel.ranges.length; i++) {\n var range$$1 = sel.ranges[i];\n changes[i] = {from: range$$1.from(), to: range$$1.to(), text: this$1.splitLines(code[i]), origin: origin};\n }\n var newSel = collapse && collapse != \"end\" && computeReplacedSel(this, changes, collapse);\n for (var i$1 = changes.length - 1; i$1 >= 0; i$1--)\n { makeChange(this$1, changes[i$1]); }\n if (newSel) { setSelectionReplaceHistory(this, newSel); }\n else if (this.cm) { ensureCursorVisible(this.cm); }\n }),\n undo: docMethodOp(function() {makeChangeFromHistory(this, \"undo\");}),\n redo: docMethodOp(function() {makeChangeFromHistory(this, \"redo\");}),\n undoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"undo\", true);}),\n redoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"redo\", true);}),\n\n setExtending: function(val) {this.extend = val;},\n getExtending: function() {return this.extend},\n\n historySize: function() {\n var hist = this.history, done = 0, undone = 0;\n for (var i = 0; i < hist.done.length; i++) { if (!hist.done[i].ranges) { ++done; } }\n for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { if (!hist.undone[i$1].ranges) { ++undone; } }\n return {undo: done, redo: undone}\n },\n clearHistory: function() {this.history = new History(this.history.maxGeneration);},\n\n markClean: function() {\n this.cleanGeneration = this.changeGeneration(true);\n },\n changeGeneration: function(forceSplit) {\n if (forceSplit)\n { this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; }\n return this.history.generation\n },\n isClean: function (gen) {\n return this.history.generation == (gen || this.cleanGeneration)\n },\n\n getHistory: function() {\n return {done: copyHistoryArray(this.history.done),\n undone: copyHistoryArray(this.history.undone)}\n },\n setHistory: function(histData) {\n var hist = this.history = new History(this.history.maxGeneration);\n hist.done = copyHistoryArray(histData.done.slice(0), null, true);\n hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);\n },\n\n setGutterMarker: docMethodOp(function(line, gutterID, value) {\n return changeLine(this, line, \"gutter\", function (line) {\n var markers = line.gutterMarkers || (line.gutterMarkers = {});\n markers[gutterID] = value;\n if (!value && isEmpty(markers)) { line.gutterMarkers = null; }\n return true\n })\n }),\n\n clearGutter: docMethodOp(function(gutterID) {\n var this$1 = this;\n\n this.iter(function (line) {\n if (line.gutterMarkers && line.gutterMarkers[gutterID]) {\n changeLine(this$1, line, \"gutter\", function () {\n line.gutterMarkers[gutterID] = null;\n if (isEmpty(line.gutterMarkers)) { line.gutterMarkers = null; }\n return true\n });\n }\n });\n }),\n\n lineInfo: function(line) {\n var n;\n if (typeof line == \"number\") {\n if (!isLine(this, line)) { return null }\n n = line;\n line = getLine(this, line);\n if (!line) { return null }\n } else {\n n = lineNo(line);\n if (n == null) { return null }\n }\n return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,\n textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,\n widgets: line.widgets}\n },\n\n addLineClass: docMethodOp(function(handle, where, cls) {\n return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function (line) {\n var prop = where == \"text\" ? \"textClass\"\n : where == \"background\" ? \"bgClass\"\n : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n if (!line[prop]) { line[prop] = cls; }\n else if (classTest(cls).test(line[prop])) { return false }\n else { line[prop] += \" \" + cls; }\n return true\n })\n }),\n removeLineClass: docMethodOp(function(handle, where, cls) {\n return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function (line) {\n var prop = where == \"text\" ? \"textClass\"\n : where == \"background\" ? \"bgClass\"\n : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n var cur = line[prop];\n if (!cur) { return false }\n else if (cls == null) { line[prop] = null; }\n else {\n var found = cur.match(classTest(cls));\n if (!found) { return false }\n var end = found.index + found[0].length;\n line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? \"\" : \" \") + cur.slice(end) || null;\n }\n return true\n })\n }),\n\n addLineWidget: docMethodOp(function(handle, node, options) {\n return addLineWidget(this, handle, node, options)\n }),\n removeLineWidget: function(widget) { widget.clear(); },\n\n markText: function(from, to, options) {\n return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || \"range\")\n },\n setBookmark: function(pos, options) {\n var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),\n insertLeft: options && options.insertLeft,\n clearWhenEmpty: false, shared: options && options.shared,\n handleMouseEvents: options && options.handleMouseEvents};\n pos = clipPos(this, pos);\n return markText(this, pos, pos, realOpts, \"bookmark\")\n },\n findMarksAt: function(pos) {\n pos = clipPos(this, pos);\n var markers = [], spans = getLine(this, pos.line).markedSpans;\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if ((span.from == null || span.from <= pos.ch) &&\n (span.to == null || span.to >= pos.ch))\n { markers.push(span.marker.parent || span.marker); }\n } }\n return markers\n },\n findMarks: function(from, to, filter) {\n from = clipPos(this, from); to = clipPos(this, to);\n var found = [], lineNo$$1 = from.line;\n this.iter(from.line, to.line + 1, function (line) {\n var spans = line.markedSpans;\n if (spans) { for (var i = 0; i < spans.length; i++) {\n var span = spans[i];\n if (!(span.to != null && lineNo$$1 == from.line && from.ch >= span.to ||\n span.from == null && lineNo$$1 != from.line ||\n span.from != null && lineNo$$1 == to.line && span.from >= to.ch) &&\n (!filter || filter(span.marker)))\n { found.push(span.marker.parent || span.marker); }\n } }\n ++lineNo$$1;\n });\n return found\n },\n getAllMarks: function() {\n var markers = [];\n this.iter(function (line) {\n var sps = line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i)\n { if (sps[i].from != null) { markers.push(sps[i].marker); } } }\n });\n return markers\n },\n\n posFromIndex: function(off) {\n var ch, lineNo$$1 = this.first, sepSize = this.lineSeparator().length;\n this.iter(function (line) {\n var sz = line.text.length + sepSize;\n if (sz > off) { ch = off; return true }\n off -= sz;\n ++lineNo$$1;\n });\n return clipPos(this, Pos(lineNo$$1, ch))\n },\n indexFromPos: function (coords) {\n coords = clipPos(this, coords);\n var index = coords.ch;\n if (coords.line < this.first || coords.ch < 0) { return 0 }\n var sepSize = this.lineSeparator().length;\n this.iter(this.first, coords.line, function (line) { // iter aborts when callback returns a truthy value\n index += line.text.length + sepSize;\n });\n return index\n },\n\n copy: function(copyHistory) {\n var doc = new Doc(getLines(this, this.first, this.first + this.size),\n this.modeOption, this.first, this.lineSep, this.direction);\n doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;\n doc.sel = this.sel;\n doc.extend = false;\n if (copyHistory) {\n doc.history.undoDepth = this.history.undoDepth;\n doc.setHistory(this.getHistory());\n }\n return doc\n },\n\n linkedDoc: function(options) {\n if (!options) { options = {}; }\n var from = this.first, to = this.first + this.size;\n if (options.from != null && options.from > from) { from = options.from; }\n if (options.to != null && options.to < to) { to = options.to; }\n var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep, this.direction);\n if (options.sharedHist) { copy.history = this.history\n ; }(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});\n copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];\n copySharedMarkers(copy, findSharedMarkers(this));\n return copy\n },\n unlinkDoc: function(other) {\n var this$1 = this;\n\n if (other instanceof CodeMirror$1) { other = other.doc; }\n if (this.linked) { for (var i = 0; i < this.linked.length; ++i) {\n var link = this$1.linked[i];\n if (link.doc != other) { continue }\n this$1.linked.splice(i, 1);\n other.unlinkDoc(this$1);\n detachSharedMarkers(findSharedMarkers(this$1));\n break\n } }\n // If the histories were shared, split them again\n if (other.history == this.history) {\n var splitIds = [other.id];\n linkedDocs(other, function (doc) { return splitIds.push(doc.id); }, true);\n other.history = new History(null);\n other.history.done = copyHistoryArray(this.history.done, splitIds);\n other.history.undone = copyHistoryArray(this.history.undone, splitIds);\n }\n },\n iterLinkedDocs: function(f) {linkedDocs(this, f);},\n\n getMode: function() {return this.mode},\n getEditor: function() {return this.cm},\n\n splitLines: function(str) {\n if (this.lineSep) { return str.split(this.lineSep) }\n return splitLinesAuto(str)\n },\n lineSeparator: function() { return this.lineSep || \"\\n\" },\n\n setDirection: docMethodOp(function (dir) {\n if (dir != \"rtl\") { dir = \"ltr\"; }\n if (dir == this.direction) { return }\n this.direction = dir;\n this.iter(function (line) { return line.order = null; });\n if (this.cm) { directionChanged(this.cm); }\n })\n});\n\n// Public alias.\nDoc.prototype.eachLine = Doc.prototype.iter;\n\n// Kludge to work around strange IE behavior where it'll sometimes\n// re-fire a series of drag-related events right after the drop (#1551)\nvar lastDrop = 0;\n\nfunction onDrop(e) {\n var cm = this;\n clearDragCursor(cm);\n if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))\n { return }\n e_preventDefault(e);\n if (ie) { lastDrop = +new Date; }\n var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;\n if (!pos || cm.isReadOnly()) { return }\n // Might be a file drop, in which case we simply extract the text\n // and insert it.\n if (files && files.length && window.FileReader && window.File) {\n var n = files.length, text = Array(n), read = 0;\n var loadFile = function (file, i) {\n if (cm.options.allowDropFileTypes &&\n indexOf(cm.options.allowDropFileTypes, file.type) == -1)\n { return }\n\n var reader = new FileReader;\n reader.onload = operation(cm, function () {\n var content = reader.result;\n if (/[\\x00-\\x08\\x0e-\\x1f]{2}/.test(content)) { content = \"\"; }\n text[i] = content;\n if (++read == n) {\n pos = clipPos(cm.doc, pos);\n var change = {from: pos, to: pos,\n text: cm.doc.splitLines(text.join(cm.doc.lineSeparator())),\n origin: \"paste\"};\n makeChange(cm.doc, change);\n setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change)));\n }\n });\n reader.readAsText(file);\n };\n for (var i = 0; i < n; ++i) { loadFile(files[i], i); }\n } else { // Normal drop\n // Don't do a replace if the drop happened inside of the selected text.\n if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {\n cm.state.draggingText(e);\n // Ensure the editor is re-focused\n setTimeout(function () { return cm.display.input.focus(); }, 20);\n return\n }\n try {\n var text$1 = e.dataTransfer.getData(\"Text\");\n if (text$1) {\n var selected;\n if (cm.state.draggingText && !cm.state.draggingText.copy)\n { selected = cm.listSelections(); }\n setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));\n if (selected) { for (var i$1 = 0; i$1 < selected.length; ++i$1)\n { replaceRange(cm.doc, \"\", selected[i$1].anchor, selected[i$1].head, \"drag\"); } }\n cm.replaceSelection(text$1, \"around\", \"paste\");\n cm.display.input.focus();\n }\n }\n catch(e){}\n }\n}\n\nfunction onDragStart(cm, e) {\n if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return }\n if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { return }\n\n e.dataTransfer.setData(\"Text\", cm.getSelection());\n e.dataTransfer.effectAllowed = \"copyMove\";\n\n // Use dummy image instead of default browsers image.\n // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.\n if (e.dataTransfer.setDragImage && !safari) {\n var img = elt(\"img\", null, null, \"position: fixed; left: 0; top: 0;\");\n img.src = \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\";\n if (presto) {\n img.width = img.height = 1;\n cm.display.wrapper.appendChild(img);\n // Force a relayout, or Opera won't use our image for some obscure reason\n img._top = img.offsetTop;\n }\n e.dataTransfer.setDragImage(img, 0, 0);\n if (presto) { img.parentNode.removeChild(img); }\n }\n}\n\nfunction onDragOver(cm, e) {\n var pos = posFromMouse(cm, e);\n if (!pos) { return }\n var frag = document.createDocumentFragment();\n drawSelectionCursor(cm, pos, frag);\n if (!cm.display.dragCursor) {\n cm.display.dragCursor = elt(\"div\", null, \"CodeMirror-cursors CodeMirror-dragcursors\");\n cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv);\n }\n removeChildrenAndAdd(cm.display.dragCursor, frag);\n}\n\nfunction clearDragCursor(cm) {\n if (cm.display.dragCursor) {\n cm.display.lineSpace.removeChild(cm.display.dragCursor);\n cm.display.dragCursor = null;\n }\n}\n\n// These must be handled carefully, because naively registering a\n// handler for each editor will cause the editors to never be\n// garbage collected.\n\nfunction forEachCodeMirror(f) {\n if (!document.getElementsByClassName) { return }\n var byClass = document.getElementsByClassName(\"CodeMirror\");\n for (var i = 0; i < byClass.length; i++) {\n var cm = byClass[i].CodeMirror;\n if (cm) { f(cm); }\n }\n}\n\nvar globalsRegistered = false;\nfunction ensureGlobalHandlers() {\n if (globalsRegistered) { return }\n registerGlobalHandlers();\n globalsRegistered = true;\n}\nfunction registerGlobalHandlers() {\n // When the window resizes, we need to refresh active editors.\n var resizeTimer;\n on(window, \"resize\", function () {\n if (resizeTimer == null) { resizeTimer = setTimeout(function () {\n resizeTimer = null;\n forEachCodeMirror(onResize);\n }, 100); }\n });\n // When the window loses focus, we want to show the editor as blurred\n on(window, \"blur\", function () { return forEachCodeMirror(onBlur); });\n}\n// Called when the window resizes\nfunction onResize(cm) {\n var d = cm.display;\n // Might be a text scaling operation, clear size caches.\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n d.scrollbarsClipped = false;\n cm.setSize();\n}\n\nvar keyNames = {\n 3: \"Pause\", 8: \"Backspace\", 9: \"Tab\", 13: \"Enter\", 16: \"Shift\", 17: \"Ctrl\", 18: \"Alt\",\n 19: \"Pause\", 20: \"CapsLock\", 27: \"Esc\", 32: \"Space\", 33: \"PageUp\", 34: \"PageDown\", 35: \"End\",\n 36: \"Home\", 37: \"Left\", 38: \"Up\", 39: \"Right\", 40: \"Down\", 44: \"PrintScrn\", 45: \"Insert\",\n 46: \"Delete\", 59: \";\", 61: \"=\", 91: \"Mod\", 92: \"Mod\", 93: \"Mod\",\n 106: \"*\", 107: \"=\", 109: \"-\", 110: \".\", 111: \"/\", 127: \"Delete\", 145: \"ScrollLock\",\n 173: \"-\", 186: \";\", 187: \"=\", 188: \",\", 189: \"-\", 190: \".\", 191: \"/\", 192: \"`\", 219: \"[\", 220: \"\\\\\",\n 221: \"]\", 222: \"'\", 63232: \"Up\", 63233: \"Down\", 63234: \"Left\", 63235: \"Right\", 63272: \"Delete\",\n 63273: \"Home\", 63275: \"End\", 63276: \"PageUp\", 63277: \"PageDown\", 63302: \"Insert\"\n};\n\n// Number keys\nfor (var i = 0; i < 10; i++) { keyNames[i + 48] = keyNames[i + 96] = String(i); }\n// Alphabetic keys\nfor (var i$1 = 65; i$1 <= 90; i$1++) { keyNames[i$1] = String.fromCharCode(i$1); }\n// Function keys\nfor (var i$2 = 1; i$2 <= 12; i$2++) { keyNames[i$2 + 111] = keyNames[i$2 + 63235] = \"F\" + i$2; }\n\nvar keyMap = {};\n\nkeyMap.basic = {\n \"Left\": \"goCharLeft\", \"Right\": \"goCharRight\", \"Up\": \"goLineUp\", \"Down\": \"goLineDown\",\n \"End\": \"goLineEnd\", \"Home\": \"goLineStartSmart\", \"PageUp\": \"goPageUp\", \"PageDown\": \"goPageDown\",\n \"Delete\": \"delCharAfter\", \"Backspace\": \"delCharBefore\", \"Shift-Backspace\": \"delCharBefore\",\n \"Tab\": \"defaultTab\", \"Shift-Tab\": \"indentAuto\",\n \"Enter\": \"newlineAndIndent\", \"Insert\": \"toggleOverwrite\",\n \"Esc\": \"singleSelection\"\n};\n// Note that the save and find-related commands aren't defined by\n// default. User code or addons can define them. Unknown commands\n// are simply ignored.\nkeyMap.pcDefault = {\n \"Ctrl-A\": \"selectAll\", \"Ctrl-D\": \"deleteLine\", \"Ctrl-Z\": \"undo\", \"Shift-Ctrl-Z\": \"redo\", \"Ctrl-Y\": \"redo\",\n \"Ctrl-Home\": \"goDocStart\", \"Ctrl-End\": \"goDocEnd\", \"Ctrl-Up\": \"goLineUp\", \"Ctrl-Down\": \"goLineDown\",\n \"Ctrl-Left\": \"goGroupLeft\", \"Ctrl-Right\": \"goGroupRight\", \"Alt-Left\": \"goLineStart\", \"Alt-Right\": \"goLineEnd\",\n \"Ctrl-Backspace\": \"delGroupBefore\", \"Ctrl-Delete\": \"delGroupAfter\", \"Ctrl-S\": \"save\", \"Ctrl-F\": \"find\",\n \"Ctrl-G\": \"findNext\", \"Shift-Ctrl-G\": \"findPrev\", \"Shift-Ctrl-F\": \"replace\", \"Shift-Ctrl-R\": \"replaceAll\",\n \"Ctrl-[\": \"indentLess\", \"Ctrl-]\": \"indentMore\",\n \"Ctrl-U\": \"undoSelection\", \"Shift-Ctrl-U\": \"redoSelection\", \"Alt-U\": \"redoSelection\",\n fallthrough: \"basic\"\n};\n// Very basic readline/emacs-style bindings, which are standard on Mac.\nkeyMap.emacsy = {\n \"Ctrl-F\": \"goCharRight\", \"Ctrl-B\": \"goCharLeft\", \"Ctrl-P\": \"goLineUp\", \"Ctrl-N\": \"goLineDown\",\n \"Alt-F\": \"goWordRight\", \"Alt-B\": \"goWordLeft\", \"Ctrl-A\": \"goLineStart\", \"Ctrl-E\": \"goLineEnd\",\n \"Ctrl-V\": \"goPageDown\", \"Shift-Ctrl-V\": \"goPageUp\", \"Ctrl-D\": \"delCharAfter\", \"Ctrl-H\": \"delCharBefore\",\n \"Alt-D\": \"delWordAfter\", \"Alt-Backspace\": \"delWordBefore\", \"Ctrl-K\": \"killLine\", \"Ctrl-T\": \"transposeChars\",\n \"Ctrl-O\": \"openLine\"\n};\nkeyMap.macDefault = {\n \"Cmd-A\": \"selectAll\", \"Cmd-D\": \"deleteLine\", \"Cmd-Z\": \"undo\", \"Shift-Cmd-Z\": \"redo\", \"Cmd-Y\": \"redo\",\n \"Cmd-Home\": \"goDocStart\", \"Cmd-Up\": \"goDocStart\", \"Cmd-End\": \"goDocEnd\", \"Cmd-Down\": \"goDocEnd\", \"Alt-Left\": \"goGroupLeft\",\n \"Alt-Right\": \"goGroupRight\", \"Cmd-Left\": \"goLineLeft\", \"Cmd-Right\": \"goLineRight\", \"Alt-Backspace\": \"delGroupBefore\",\n \"Ctrl-Alt-Backspace\": \"delGroupAfter\", \"Alt-Delete\": \"delGroupAfter\", \"Cmd-S\": \"save\", \"Cmd-F\": \"find\",\n \"Cmd-G\": \"findNext\", \"Shift-Cmd-G\": \"findPrev\", \"Cmd-Alt-F\": \"replace\", \"Shift-Cmd-Alt-F\": \"replaceAll\",\n \"Cmd-[\": \"indentLess\", \"Cmd-]\": \"indentMore\", \"Cmd-Backspace\": \"delWrappedLineLeft\", \"Cmd-Delete\": \"delWrappedLineRight\",\n \"Cmd-U\": \"undoSelection\", \"Shift-Cmd-U\": \"redoSelection\", \"Ctrl-Up\": \"goDocStart\", \"Ctrl-Down\": \"goDocEnd\",\n fallthrough: [\"basic\", \"emacsy\"]\n};\nkeyMap[\"default\"] = mac ? keyMap.macDefault : keyMap.pcDefault;\n\n// KEYMAP DISPATCH\n\nfunction normalizeKeyName(name) {\n var parts = name.split(/-(?!$)/);\n name = parts[parts.length - 1];\n var alt, ctrl, shift, cmd;\n for (var i = 0; i < parts.length - 1; i++) {\n var mod = parts[i];\n if (/^(cmd|meta|m)$/i.test(mod)) { cmd = true; }\n else if (/^a(lt)?$/i.test(mod)) { alt = true; }\n else if (/^(c|ctrl|control)$/i.test(mod)) { ctrl = true; }\n else if (/^s(hift)?$/i.test(mod)) { shift = true; }\n else { throw new Error(\"Unrecognized modifier name: \" + mod) }\n }\n if (alt) { name = \"Alt-\" + name; }\n if (ctrl) { name = \"Ctrl-\" + name; }\n if (cmd) { name = \"Cmd-\" + name; }\n if (shift) { name = \"Shift-\" + name; }\n return name\n}\n\n// This is a kludge to keep keymaps mostly working as raw objects\n// (backwards compatibility) while at the same time support features\n// like normalization and multi-stroke key bindings. It compiles a\n// new normalized keymap, and then updates the old object to reflect\n// this.\nfunction normalizeKeyMap(keymap) {\n var copy = {};\n for (var keyname in keymap) { if (keymap.hasOwnProperty(keyname)) {\n var value = keymap[keyname];\n if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { continue }\n if (value == \"...\") { delete keymap[keyname]; continue }\n\n var keys = map(keyname.split(\" \"), normalizeKeyName);\n for (var i = 0; i < keys.length; i++) {\n var val = (void 0), name = (void 0);\n if (i == keys.length - 1) {\n name = keys.join(\" \");\n val = value;\n } else {\n name = keys.slice(0, i + 1).join(\" \");\n val = \"...\";\n }\n var prev = copy[name];\n if (!prev) { copy[name] = val; }\n else if (prev != val) { throw new Error(\"Inconsistent bindings for \" + name) }\n }\n delete keymap[keyname];\n } }\n for (var prop in copy) { keymap[prop] = copy[prop]; }\n return keymap\n}\n\nfunction lookupKey(key, map$$1, handle, context) {\n map$$1 = getKeyMap(map$$1);\n var found = map$$1.call ? map$$1.call(key, context) : map$$1[key];\n if (found === false) { return \"nothing\" }\n if (found === \"...\") { return \"multi\" }\n if (found != null && handle(found)) { return \"handled\" }\n\n if (map$$1.fallthrough) {\n if (Object.prototype.toString.call(map$$1.fallthrough) != \"[object Array]\")\n { return lookupKey(key, map$$1.fallthrough, handle, context) }\n for (var i = 0; i < map$$1.fallthrough.length; i++) {\n var result = lookupKey(key, map$$1.fallthrough[i], handle, context);\n if (result) { return result }\n }\n }\n}\n\n// Modifier key presses don't count as 'real' key presses for the\n// purpose of keymap fallthrough.\nfunction isModifierKey(value) {\n var name = typeof value == \"string\" ? value : keyNames[value.keyCode];\n return name == \"Ctrl\" || name == \"Alt\" || name == \"Shift\" || name == \"Mod\"\n}\n\nfunction addModifierNames(name, event, noShift) {\n var base = name;\n if (event.altKey && base != \"Alt\") { name = \"Alt-\" + name; }\n if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != \"Ctrl\") { name = \"Ctrl-\" + name; }\n if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != \"Cmd\") { name = \"Cmd-\" + name; }\n if (!noShift && event.shiftKey && base != \"Shift\") { name = \"Shift-\" + name; }\n return name\n}\n\n// Look up the name of a key as indicated by an event object.\nfunction keyName(event, noShift) {\n if (presto && event.keyCode == 34 && event[\"char\"]) { return false }\n var name = keyNames[event.keyCode];\n if (name == null || event.altGraphKey) { return false }\n // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause,\n // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+)\n if (event.keyCode == 3 && event.code) { name = event.code; }\n return addModifierNames(name, event, noShift)\n}\n\nfunction getKeyMap(val) {\n return typeof val == \"string\" ? keyMap[val] : val\n}\n\n// Helper for deleting text near the selection(s), used to implement\n// backspace, delete, and similar functionality.\nfunction deleteNearSelection(cm, compute) {\n var ranges = cm.doc.sel.ranges, kill = [];\n // Build up a set of ranges to kill first, merging overlapping\n // ranges.\n for (var i = 0; i < ranges.length; i++) {\n var toKill = compute(ranges[i]);\n while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {\n var replaced = kill.pop();\n if (cmp(replaced.from, toKill.from) < 0) {\n toKill.from = replaced.from;\n break\n }\n }\n kill.push(toKill);\n }\n // Next, remove those actual ranges.\n runInOp(cm, function () {\n for (var i = kill.length - 1; i >= 0; i--)\n { replaceRange(cm.doc, \"\", kill[i].from, kill[i].to, \"+delete\"); }\n ensureCursorVisible(cm);\n });\n}\n\nfunction moveCharLogically(line, ch, dir) {\n var target = skipExtendingChars(line.text, ch + dir, dir);\n return target < 0 || target > line.text.length ? null : target\n}\n\nfunction moveLogically(line, start, dir) {\n var ch = moveCharLogically(line, start.ch, dir);\n return ch == null ? null : new Pos(start.line, ch, dir < 0 ? \"after\" : \"before\")\n}\n\nfunction endOfLine(visually, cm, lineObj, lineNo, dir) {\n if (visually) {\n var order = getOrder(lineObj, cm.doc.direction);\n if (order) {\n var part = dir < 0 ? lst(order) : order[0];\n var moveInStorageOrder = (dir < 0) == (part.level == 1);\n var sticky = moveInStorageOrder ? \"after\" : \"before\";\n var ch;\n // With a wrapped rtl chunk (possibly spanning multiple bidi parts),\n // it could be that the last bidi part is not on the last visual line,\n // since visual lines contain content order-consecutive chunks.\n // Thus, in rtl, we are looking for the first (content-order) character\n // in the rtl chunk that is on the last line (that is, the same line\n // as the last (content-order) character).\n if (part.level > 0 || cm.doc.direction == \"rtl\") {\n var prep = prepareMeasureForLine(cm, lineObj);\n ch = dir < 0 ? lineObj.text.length - 1 : 0;\n var targetTop = measureCharPrepared(cm, prep, ch).top;\n ch = findFirst(function (ch) { return measureCharPrepared(cm, prep, ch).top == targetTop; }, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch);\n if (sticky == \"before\") { ch = moveCharLogically(lineObj, ch, 1); }\n } else { ch = dir < 0 ? part.to : part.from; }\n return new Pos(lineNo, ch, sticky)\n }\n }\n return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? \"before\" : \"after\")\n}\n\nfunction moveVisually(cm, line, start, dir) {\n var bidi = getOrder(line, cm.doc.direction);\n if (!bidi) { return moveLogically(line, start, dir) }\n if (start.ch >= line.text.length) {\n start.ch = line.text.length;\n start.sticky = \"before\";\n } else if (start.ch <= 0) {\n start.ch = 0;\n start.sticky = \"after\";\n }\n var partPos = getBidiPartAt(bidi, start.ch, start.sticky), part = bidi[partPos];\n if (cm.doc.direction == \"ltr\" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) {\n // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines,\n // nothing interesting happens.\n return moveLogically(line, start, dir)\n }\n\n var mv = function (pos, dir) { return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir); };\n var prep;\n var getWrappedLineExtent = function (ch) {\n if (!cm.options.lineWrapping) { return {begin: 0, end: line.text.length} }\n prep = prep || prepareMeasureForLine(cm, line);\n return wrappedLineExtentChar(cm, line, prep, ch)\n };\n var wrappedLineExtent = getWrappedLineExtent(start.sticky == \"before\" ? mv(start, -1) : start.ch);\n\n if (cm.doc.direction == \"rtl\" || part.level == 1) {\n var moveInStorageOrder = (part.level == 1) == (dir < 0);\n var ch = mv(start, moveInStorageOrder ? 1 : -1);\n if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) {\n // Case 2: We move within an rtl part or in an rtl editor on the same visual line\n var sticky = moveInStorageOrder ? \"before\" : \"after\";\n return new Pos(start.line, ch, sticky)\n }\n }\n\n // Case 3: Could not move within this bidi part in this visual line, so leave\n // the current bidi part\n\n var searchInVisualLine = function (partPos, dir, wrappedLineExtent) {\n var getRes = function (ch, moveInStorageOrder) { return moveInStorageOrder\n ? new Pos(start.line, mv(ch, 1), \"before\")\n : new Pos(start.line, ch, \"after\"); };\n\n for (; partPos >= 0 && partPos < bidi.length; partPos += dir) {\n var part = bidi[partPos];\n var moveInStorageOrder = (dir > 0) == (part.level != 1);\n var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1);\n if (part.from <= ch && ch < part.to) { return getRes(ch, moveInStorageOrder) }\n ch = moveInStorageOrder ? part.from : mv(part.to, -1);\n if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) { return getRes(ch, moveInStorageOrder) }\n }\n };\n\n // Case 3a: Look for other bidi parts on the same visual line\n var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent);\n if (res) { return res }\n\n // Case 3b: Look for other bidi parts on the next visual line\n var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1);\n if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) {\n res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh));\n if (res) { return res }\n }\n\n // Case 4: Nowhere to move\n return null\n}\n\n// Commands are parameter-less actions that can be performed on an\n// editor, mostly used for keybindings.\nvar commands = {\n selectAll: selectAll,\n singleSelection: function (cm) { return cm.setSelection(cm.getCursor(\"anchor\"), cm.getCursor(\"head\"), sel_dontScroll); },\n killLine: function (cm) { return deleteNearSelection(cm, function (range) {\n if (range.empty()) {\n var len = getLine(cm.doc, range.head.line).text.length;\n if (range.head.ch == len && range.head.line < cm.lastLine())\n { return {from: range.head, to: Pos(range.head.line + 1, 0)} }\n else\n { return {from: range.head, to: Pos(range.head.line, len)} }\n } else {\n return {from: range.from(), to: range.to()}\n }\n }); },\n deleteLine: function (cm) { return deleteNearSelection(cm, function (range) { return ({\n from: Pos(range.from().line, 0),\n to: clipPos(cm.doc, Pos(range.to().line + 1, 0))\n }); }); },\n delLineLeft: function (cm) { return deleteNearSelection(cm, function (range) { return ({\n from: Pos(range.from().line, 0), to: range.from()\n }); }); },\n delWrappedLineLeft: function (cm) { return deleteNearSelection(cm, function (range) {\n var top = cm.charCoords(range.head, \"div\").top + 5;\n var leftPos = cm.coordsChar({left: 0, top: top}, \"div\");\n return {from: leftPos, to: range.from()}\n }); },\n delWrappedLineRight: function (cm) { return deleteNearSelection(cm, function (range) {\n var top = cm.charCoords(range.head, \"div\").top + 5;\n var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\");\n return {from: range.from(), to: rightPos }\n }); },\n undo: function (cm) { return cm.undo(); },\n redo: function (cm) { return cm.redo(); },\n undoSelection: function (cm) { return cm.undoSelection(); },\n redoSelection: function (cm) { return cm.redoSelection(); },\n goDocStart: function (cm) { return cm.extendSelection(Pos(cm.firstLine(), 0)); },\n goDocEnd: function (cm) { return cm.extendSelection(Pos(cm.lastLine())); },\n goLineStart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStart(cm, range.head.line); },\n {origin: \"+move\", bias: 1}\n ); },\n goLineStartSmart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStartSmart(cm, range.head); },\n {origin: \"+move\", bias: 1}\n ); },\n goLineEnd: function (cm) { return cm.extendSelectionsBy(function (range) { return lineEnd(cm, range.head.line); },\n {origin: \"+move\", bias: -1}\n ); },\n goLineRight: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, \"div\").top + 5;\n return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\")\n }, sel_move); },\n goLineLeft: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, \"div\").top + 5;\n return cm.coordsChar({left: 0, top: top}, \"div\")\n }, sel_move); },\n goLineLeftSmart: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, \"div\").top + 5;\n var pos = cm.coordsChar({left: 0, top: top}, \"div\");\n if (pos.ch < cm.getLine(pos.line).search(/\\S/)) { return lineStartSmart(cm, range.head) }\n return pos\n }, sel_move); },\n goLineUp: function (cm) { return cm.moveV(-1, \"line\"); },\n goLineDown: function (cm) { return cm.moveV(1, \"line\"); },\n goPageUp: function (cm) { return cm.moveV(-1, \"page\"); },\n goPageDown: function (cm) { return cm.moveV(1, \"page\"); },\n goCharLeft: function (cm) { return cm.moveH(-1, \"char\"); },\n goCharRight: function (cm) { return cm.moveH(1, \"char\"); },\n goColumnLeft: function (cm) { return cm.moveH(-1, \"column\"); },\n goColumnRight: function (cm) { return cm.moveH(1, \"column\"); },\n goWordLeft: function (cm) { return cm.moveH(-1, \"word\"); },\n goGroupRight: function (cm) { return cm.moveH(1, \"group\"); },\n goGroupLeft: function (cm) { return cm.moveH(-1, \"group\"); },\n goWordRight: function (cm) { return cm.moveH(1, \"word\"); },\n delCharBefore: function (cm) { return cm.deleteH(-1, \"char\"); },\n delCharAfter: function (cm) { return cm.deleteH(1, \"char\"); },\n delWordBefore: function (cm) { return cm.deleteH(-1, \"word\"); },\n delWordAfter: function (cm) { return cm.deleteH(1, \"word\"); },\n delGroupBefore: function (cm) { return cm.deleteH(-1, \"group\"); },\n delGroupAfter: function (cm) { return cm.deleteH(1, \"group\"); },\n indentAuto: function (cm) { return cm.indentSelection(\"smart\"); },\n indentMore: function (cm) { return cm.indentSelection(\"add\"); },\n indentLess: function (cm) { return cm.indentSelection(\"subtract\"); },\n insertTab: function (cm) { return cm.replaceSelection(\"\\t\"); },\n insertSoftTab: function (cm) {\n var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize;\n for (var i = 0; i < ranges.length; i++) {\n var pos = ranges[i].from();\n var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);\n spaces.push(spaceStr(tabSize - col % tabSize));\n }\n cm.replaceSelections(spaces);\n },\n defaultTab: function (cm) {\n if (cm.somethingSelected()) { cm.indentSelection(\"add\"); }\n else { cm.execCommand(\"insertTab\"); }\n },\n // Swap the two chars left and right of each selection's head.\n // Move cursor behind the two swapped characters afterwards.\n //\n // Doesn't consider line feeds a character.\n // Doesn't scan more than one line above to find a character.\n // Doesn't do anything on an empty line.\n // Doesn't do anything with non-empty selections.\n transposeChars: function (cm) { return runInOp(cm, function () {\n var ranges = cm.listSelections(), newSel = [];\n for (var i = 0; i < ranges.length; i++) {\n if (!ranges[i].empty()) { continue }\n var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;\n if (line) {\n if (cur.ch == line.length) { cur = new Pos(cur.line, cur.ch - 1); }\n if (cur.ch > 0) {\n cur = new Pos(cur.line, cur.ch + 1);\n cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),\n Pos(cur.line, cur.ch - 2), cur, \"+transpose\");\n } else if (cur.line > cm.doc.first) {\n var prev = getLine(cm.doc, cur.line - 1).text;\n if (prev) {\n cur = new Pos(cur.line, 1);\n cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() +\n prev.charAt(prev.length - 1),\n Pos(cur.line - 1, prev.length - 1), cur, \"+transpose\");\n }\n }\n }\n newSel.push(new Range(cur, cur));\n }\n cm.setSelections(newSel);\n }); },\n newlineAndIndent: function (cm) { return runInOp(cm, function () {\n var sels = cm.listSelections();\n for (var i = sels.length - 1; i >= 0; i--)\n { cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, \"+input\"); }\n sels = cm.listSelections();\n for (var i$1 = 0; i$1 < sels.length; i$1++)\n { cm.indentLine(sels[i$1].from().line, null, true); }\n ensureCursorVisible(cm);\n }); },\n openLine: function (cm) { return cm.replaceSelection(\"\\n\", \"start\"); },\n toggleOverwrite: function (cm) { return cm.toggleOverwrite(); }\n};\n\n\nfunction lineStart(cm, lineN) {\n var line = getLine(cm.doc, lineN);\n var visual = visualLine(line);\n if (visual != line) { lineN = lineNo(visual); }\n return endOfLine(true, cm, visual, lineN, 1)\n}\nfunction lineEnd(cm, lineN) {\n var line = getLine(cm.doc, lineN);\n var visual = visualLineEnd(line);\n if (visual != line) { lineN = lineNo(visual); }\n return endOfLine(true, cm, line, lineN, -1)\n}\nfunction lineStartSmart(cm, pos) {\n var start = lineStart(cm, pos.line);\n var line = getLine(cm.doc, start.line);\n var order = getOrder(line, cm.doc.direction);\n if (!order || order[0].level == 0) {\n var firstNonWS = Math.max(0, line.text.search(/\\S/));\n var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;\n return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky)\n }\n return start\n}\n\n// Run a handler that was bound to a key.\nfunction doHandleBinding(cm, bound, dropShift) {\n if (typeof bound == \"string\") {\n bound = commands[bound];\n if (!bound) { return false }\n }\n // Ensure previous input has been read, so that the handler sees a\n // consistent view of the document\n cm.display.input.ensurePolled();\n var prevShift = cm.display.shift, done = false;\n try {\n if (cm.isReadOnly()) { cm.state.suppressEdits = true; }\n if (dropShift) { cm.display.shift = false; }\n done = bound(cm) != Pass;\n } finally {\n cm.display.shift = prevShift;\n cm.state.suppressEdits = false;\n }\n return done\n}\n\nfunction lookupKeyForEditor(cm, name, handle) {\n for (var i = 0; i < cm.state.keyMaps.length; i++) {\n var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);\n if (result) { return result }\n }\n return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))\n || lookupKey(name, cm.options.keyMap, handle, cm)\n}\n\n// Note that, despite the name, this function is also used to check\n// for bound mouse clicks.\n\nvar stopSeq = new Delayed;\n\nfunction dispatchKey(cm, name, e, handle) {\n var seq = cm.state.keySeq;\n if (seq) {\n if (isModifierKey(name)) { return \"handled\" }\n if (/\\'$/.test(name))\n { cm.state.keySeq = null; }\n else\n { stopSeq.set(50, function () {\n if (cm.state.keySeq == seq) {\n cm.state.keySeq = null;\n cm.display.input.reset();\n }\n }); }\n if (dispatchKeyInner(cm, seq + \" \" + name, e, handle)) { return true }\n }\n return dispatchKeyInner(cm, name, e, handle)\n}\n\nfunction dispatchKeyInner(cm, name, e, handle) {\n var result = lookupKeyForEditor(cm, name, handle);\n\n if (result == \"multi\")\n { cm.state.keySeq = name; }\n if (result == \"handled\")\n { signalLater(cm, \"keyHandled\", cm, name, e); }\n\n if (result == \"handled\" || result == \"multi\") {\n e_preventDefault(e);\n restartBlink(cm);\n }\n\n return !!result\n}\n\n// Handle a key from the keydown event.\nfunction handleKeyBinding(cm, e) {\n var name = keyName(e, true);\n if (!name) { return false }\n\n if (e.shiftKey && !cm.state.keySeq) {\n // First try to resolve full name (including 'Shift-'). Failing\n // that, see if there is a cursor-motion command (starting with\n // 'go') bound to the keyname without 'Shift-'.\n return dispatchKey(cm, \"Shift-\" + name, e, function (b) { return doHandleBinding(cm, b, true); })\n || dispatchKey(cm, name, e, function (b) {\n if (typeof b == \"string\" ? /^go[A-Z]/.test(b) : b.motion)\n { return doHandleBinding(cm, b) }\n })\n } else {\n return dispatchKey(cm, name, e, function (b) { return doHandleBinding(cm, b); })\n }\n}\n\n// Handle a key from the keypress event\nfunction handleCharBinding(cm, e, ch) {\n return dispatchKey(cm, \"'\" + ch + \"'\", e, function (b) { return doHandleBinding(cm, b, true); })\n}\n\nvar lastStoppedKey = null;\nfunction onKeyDown(e) {\n var cm = this;\n cm.curOp.focus = activeElt();\n if (signalDOMEvent(cm, e)) { return }\n // IE does strange things with escape.\n if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false; }\n var code = e.keyCode;\n cm.display.shift = code == 16 || e.shiftKey;\n var handled = handleKeyBinding(cm, e);\n if (presto) {\n lastStoppedKey = handled ? code : null;\n // Opera has no cut event... we try to at least catch the key combo\n if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))\n { cm.replaceSelection(\"\", null, \"cut\"); }\n }\n\n // Turn mouse into crosshair when Alt is held on Mac.\n if (code == 18 && !/\\bCodeMirror-crosshair\\b/.test(cm.display.lineDiv.className))\n { showCrossHair(cm); }\n}\n\nfunction showCrossHair(cm) {\n var lineDiv = cm.display.lineDiv;\n addClass(lineDiv, \"CodeMirror-crosshair\");\n\n function up(e) {\n if (e.keyCode == 18 || !e.altKey) {\n rmClass(lineDiv, \"CodeMirror-crosshair\");\n off(document, \"keyup\", up);\n off(document, \"mouseover\", up);\n }\n }\n on(document, \"keyup\", up);\n on(document, \"mouseover\", up);\n}\n\nfunction onKeyUp(e) {\n if (e.keyCode == 16) { this.doc.sel.shift = false; }\n signalDOMEvent(this, e);\n}\n\nfunction onKeyPress(e) {\n var cm = this;\n if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return }\n var keyCode = e.keyCode, charCode = e.charCode;\n if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return}\n if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) { return }\n var ch = String.fromCharCode(charCode == null ? keyCode : charCode);\n // Some browsers fire keypress events for backspace\n if (ch == \"\\x08\") { return }\n if (handleCharBinding(cm, e, ch)) { return }\n cm.display.input.onKeyPress(e);\n}\n\nvar DOUBLECLICK_DELAY = 400;\n\nvar PastClick = function(time, pos, button) {\n this.time = time;\n this.pos = pos;\n this.button = button;\n};\n\nPastClick.prototype.compare = function (time, pos, button) {\n return this.time + DOUBLECLICK_DELAY > time &&\n cmp(pos, this.pos) == 0 && button == this.button\n};\n\nvar lastClick;\nvar lastDoubleClick;\nfunction clickRepeat(pos, button) {\n var now = +new Date;\n if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) {\n lastClick = lastDoubleClick = null;\n return \"triple\"\n } else if (lastClick && lastClick.compare(now, pos, button)) {\n lastDoubleClick = new PastClick(now, pos, button);\n lastClick = null;\n return \"double\"\n } else {\n lastClick = new PastClick(now, pos, button);\n lastDoubleClick = null;\n return \"single\"\n }\n}\n\n// A mouse down can be a single click, double click, triple click,\n// start of selection drag, start of text drag, new cursor\n// (ctrl-click), rectangle drag (alt-drag), or xwin\n// middle-click-paste. Or it might be a click on something we should\n// not interfere with, such as a scrollbar or widget.\nfunction onMouseDown(e) {\n var cm = this, display = cm.display;\n if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return }\n display.input.ensurePolled();\n display.shift = e.shiftKey;\n\n if (eventInWidget(display, e)) {\n if (!webkit) {\n // Briefly turn off draggability, to allow widgets to do\n // normal dragging things.\n display.scroller.draggable = false;\n setTimeout(function () { return display.scroller.draggable = true; }, 100);\n }\n return\n }\n if (clickInGutter(cm, e)) { return }\n var pos = posFromMouse(cm, e), button = e_button(e), repeat = pos ? clickRepeat(pos, button) : \"single\";\n window.focus();\n\n // #3261: make sure, that we're not starting a second selection\n if (button == 1 && cm.state.selectingText)\n { cm.state.selectingText(e); }\n\n if (pos && handleMappedButton(cm, button, pos, repeat, e)) { return }\n\n if (button == 1) {\n if (pos) { leftButtonDown(cm, pos, repeat, e); }\n else if (e_target(e) == display.scroller) { e_preventDefault(e); }\n } else if (button == 2) {\n if (pos) { extendSelection(cm.doc, pos); }\n setTimeout(function () { return display.input.focus(); }, 20);\n } else if (button == 3) {\n if (captureRightClick) { onContextMenu(cm, e); }\n else { delayBlurEvent(cm); }\n }\n}\n\nfunction handleMappedButton(cm, button, pos, repeat, event) {\n var name = \"Click\";\n if (repeat == \"double\") { name = \"Double\" + name; }\n else if (repeat == \"triple\") { name = \"Triple\" + name; }\n name = (button == 1 ? \"Left\" : button == 2 ? \"Middle\" : \"Right\") + name;\n\n return dispatchKey(cm, addModifierNames(name, event), event, function (bound) {\n if (typeof bound == \"string\") { bound = commands[bound]; }\n if (!bound) { return false }\n var done = false;\n try {\n if (cm.isReadOnly()) { cm.state.suppressEdits = true; }\n done = bound(cm, pos) != Pass;\n } finally {\n cm.state.suppressEdits = false;\n }\n return done\n })\n}\n\nfunction configureMouse(cm, repeat, event) {\n var option = cm.getOption(\"configureMouse\");\n var value = option ? option(cm, repeat, event) : {};\n if (value.unit == null) {\n var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey;\n value.unit = rect ? \"rectangle\" : repeat == \"single\" ? \"char\" : repeat == \"double\" ? \"word\" : \"line\";\n }\n if (value.extend == null || cm.doc.extend) { value.extend = cm.doc.extend || event.shiftKey; }\n if (value.addNew == null) { value.addNew = mac ? event.metaKey : event.ctrlKey; }\n if (value.moveOnDrag == null) { value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey); }\n return value\n}\n\nfunction leftButtonDown(cm, pos, repeat, event) {\n if (ie) { setTimeout(bind(ensureFocus, cm), 0); }\n else { cm.curOp.focus = activeElt(); }\n\n var behavior = configureMouse(cm, repeat, event);\n\n var sel = cm.doc.sel, contained;\n if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&\n repeat == \"single\" && (contained = sel.contains(pos)) > -1 &&\n (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) &&\n (cmp(contained.to(), pos) > 0 || pos.xRel < 0))\n { leftButtonStartDrag(cm, event, pos, behavior); }\n else\n { leftButtonSelect(cm, event, pos, behavior); }\n}\n\n// Start a text drag. When it ends, see if any dragging actually\n// happen, and treat as a click if it didn't.\nfunction leftButtonStartDrag(cm, event, pos, behavior) {\n var display = cm.display, moved = false;\n var dragEnd = operation(cm, function (e) {\n if (webkit) { display.scroller.draggable = false; }\n cm.state.draggingText = false;\n off(display.wrapper.ownerDocument, \"mouseup\", dragEnd);\n off(display.wrapper.ownerDocument, \"mousemove\", mouseMove);\n off(display.scroller, \"dragstart\", dragStart);\n off(display.scroller, \"drop\", dragEnd);\n if (!moved) {\n e_preventDefault(e);\n if (!behavior.addNew)\n { extendSelection(cm.doc, pos, null, null, behavior.extend); }\n // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)\n if (webkit || ie && ie_version == 9)\n { setTimeout(function () {display.wrapper.ownerDocument.body.focus(); display.input.focus();}, 20); }\n else\n { display.input.focus(); }\n }\n });\n var mouseMove = function(e2) {\n moved = moved || Math.abs(event.clientX - e2.clientX) + Math.abs(event.clientY - e2.clientY) >= 10;\n };\n var dragStart = function () { return moved = true; };\n // Let the drag handler handle this.\n if (webkit) { display.scroller.draggable = true; }\n cm.state.draggingText = dragEnd;\n dragEnd.copy = !behavior.moveOnDrag;\n // IE's approach to draggable\n if (display.scroller.dragDrop) { display.scroller.dragDrop(); }\n on(display.wrapper.ownerDocument, \"mouseup\", dragEnd);\n on(display.wrapper.ownerDocument, \"mousemove\", mouseMove);\n on(display.scroller, \"dragstart\", dragStart);\n on(display.scroller, \"drop\", dragEnd);\n\n delayBlurEvent(cm);\n setTimeout(function () { return display.input.focus(); }, 20);\n}\n\nfunction rangeForUnit(cm, pos, unit) {\n if (unit == \"char\") { return new Range(pos, pos) }\n if (unit == \"word\") { return cm.findWordAt(pos) }\n if (unit == \"line\") { return new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) }\n var result = unit(cm, pos);\n return new Range(result.from, result.to)\n}\n\n// Normal selection, as opposed to text dragging.\nfunction leftButtonSelect(cm, event, start, behavior) {\n var display = cm.display, doc = cm.doc;\n e_preventDefault(event);\n\n var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;\n if (behavior.addNew && !behavior.extend) {\n ourIndex = doc.sel.contains(start);\n if (ourIndex > -1)\n { ourRange = ranges[ourIndex]; }\n else\n { ourRange = new Range(start, start); }\n } else {\n ourRange = doc.sel.primary();\n ourIndex = doc.sel.primIndex;\n }\n\n if (behavior.unit == \"rectangle\") {\n if (!behavior.addNew) { ourRange = new Range(start, start); }\n start = posFromMouse(cm, event, true, true);\n ourIndex = -1;\n } else {\n var range$$1 = rangeForUnit(cm, start, behavior.unit);\n if (behavior.extend)\n { ourRange = extendRange(ourRange, range$$1.anchor, range$$1.head, behavior.extend); }\n else\n { ourRange = range$$1; }\n }\n\n if (!behavior.addNew) {\n ourIndex = 0;\n setSelection(doc, new Selection([ourRange], 0), sel_mouse);\n startSel = doc.sel;\n } else if (ourIndex == -1) {\n ourIndex = ranges.length;\n setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex),\n {scroll: false, origin: \"*mouse\"});\n } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == \"char\" && !behavior.extend) {\n setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),\n {scroll: false, origin: \"*mouse\"});\n startSel = doc.sel;\n } else {\n replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);\n }\n\n var lastPos = start;\n function extendTo(pos) {\n if (cmp(lastPos, pos) == 0) { return }\n lastPos = pos;\n\n if (behavior.unit == \"rectangle\") {\n var ranges = [], tabSize = cm.options.tabSize;\n var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);\n var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);\n var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);\n for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n line <= end; line++) {\n var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);\n if (left == right)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }\n else if (text.length > leftPos)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }\n }\n if (!ranges.length) { ranges.push(new Range(start, start)); }\n setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n {origin: \"*mouse\", scroll: false});\n cm.scrollIntoView(pos);\n } else {\n var oldRange = ourRange;\n var range$$1 = rangeForUnit(cm, pos, behavior.unit);\n var anchor = oldRange.anchor, head;\n if (cmp(range$$1.anchor, anchor) > 0) {\n head = range$$1.head;\n anchor = minPos(oldRange.from(), range$$1.anchor);\n } else {\n head = range$$1.anchor;\n anchor = maxPos(oldRange.to(), range$$1.head);\n }\n var ranges$1 = startSel.ranges.slice(0);\n ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head));\n setSelection(doc, normalizeSelection(ranges$1, ourIndex), sel_mouse);\n }\n }\n\n var editorSize = display.wrapper.getBoundingClientRect();\n // Used to ensure timeout re-tries don't fire when another extend\n // happened in the meantime (clearTimeout isn't reliable -- at\n // least on Chrome, the timeouts still happen even when cleared,\n // if the clear happens after their scheduled firing time).\n var counter = 0;\n\n function extend(e) {\n var curCount = ++counter;\n var cur = posFromMouse(cm, e, true, behavior.unit == \"rectangle\");\n if (!cur) { return }\n if (cmp(cur, lastPos) != 0) {\n cm.curOp.focus = activeElt();\n extendTo(cur);\n var visible = visibleLines(display, doc);\n if (cur.line >= visible.to || cur.line < visible.from)\n { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }\n } else {\n var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;\n if (outside) { setTimeout(operation(cm, function () {\n if (counter != curCount) { return }\n display.scroller.scrollTop += outside;\n extend(e);\n }), 50); }\n }\n }\n\n function done(e) {\n cm.state.selectingText = false;\n counter = Infinity;\n e_preventDefault(e);\n display.input.focus();\n off(display.wrapper.ownerDocument, \"mousemove\", move);\n off(display.wrapper.ownerDocument, \"mouseup\", up);\n doc.history.lastSelOrigin = null;\n }\n\n var move = operation(cm, function (e) {\n if (e.buttons === 0 || !e_button(e)) { done(e); }\n else { extend(e); }\n });\n var up = operation(cm, done);\n cm.state.selectingText = up;\n on(display.wrapper.ownerDocument, \"mousemove\", move);\n on(display.wrapper.ownerDocument, \"mouseup\", up);\n}\n\n// Used when mouse-selecting to adjust the anchor to the proper side\n// of a bidi jump depending on the visual position of the head.\nfunction bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n}\n\n\n// Determines whether an event happened in the gutter, and fires the\n// handlers for the corresponding event.\nfunction gutterEvent(cm, e, type, prevent) {\n var mX, mY;\n if (e.touches) {\n mX = e.touches[0].clientX;\n mY = e.touches[0].clientY;\n } else {\n try { mX = e.clientX; mY = e.clientY; }\n catch(e) { return false }\n }\n if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false }\n if (prevent) { e_preventDefault(e); }\n\n var display = cm.display;\n var lineBox = display.lineDiv.getBoundingClientRect();\n\n if (mY > lineBox.bottom || !hasHandler(cm, type)) { return e_defaultPrevented(e) }\n mY -= lineBox.top - display.viewOffset;\n\n for (var i = 0; i < cm.options.gutters.length; ++i) {\n var g = display.gutters.childNodes[i];\n if (g && g.getBoundingClientRect().right >= mX) {\n var line = lineAtHeight(cm.doc, mY);\n var gutter = cm.options.gutters[i];\n signal(cm, type, cm, line, gutter, e);\n return e_defaultPrevented(e)\n }\n }\n}\n\nfunction clickInGutter(cm, e) {\n return gutterEvent(cm, e, \"gutterClick\", true)\n}\n\n// CONTEXT MENU HANDLING\n\n// To make the context menu work, we need to briefly unhide the\n// textarea (making it as unobtrusive as possible) to let the\n// right-click take effect on it.\nfunction onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n cm.display.input.onContextMenu(e);\n}\n\nfunction contextMenuInGutter(cm, e) {\n if (!hasHandler(cm, \"gutterContextMenu\")) { return false }\n return gutterEvent(cm, e, \"gutterContextMenu\", false)\n}\n\nfunction themeChanged(cm) {\n cm.display.wrapper.className = cm.display.wrapper.className.replace(/\\s*cm-s-\\S+/g, \"\") +\n cm.options.theme.replace(/(^|\\s)\\s*/g, \" cm-s-\");\n clearCaches(cm);\n}\n\nvar Init = {toString: function(){return \"CodeMirror.Init\"}};\n\nvar defaults = {};\nvar optionHandlers = {};\n\nfunction defineOptions(CodeMirror) {\n var optionHandlers = CodeMirror.optionHandlers;\n\n function option(name, deflt, handle, notOnInit) {\n CodeMirror.defaults[name] = deflt;\n if (handle) { optionHandlers[name] =\n notOnInit ? function (cm, val, old) {if (old != Init) { handle(cm, val, old); }} : handle; }\n }\n\n CodeMirror.defineOption = option;\n\n // Passed to option handlers when there is no old value.\n CodeMirror.Init = Init;\n\n // These two are, on init, called from the constructor because they\n // have to be initialized before the editor can start at all.\n option(\"value\", \"\", function (cm, val) { return cm.setValue(val); }, true);\n option(\"mode\", null, function (cm, val) {\n cm.doc.modeOption = val;\n loadMode(cm);\n }, true);\n\n option(\"indentUnit\", 2, loadMode, true);\n option(\"indentWithTabs\", false);\n option(\"smartIndent\", true);\n option(\"tabSize\", 4, function (cm) {\n resetModeState(cm);\n clearCaches(cm);\n regChange(cm);\n }, true);\n\n option(\"lineSeparator\", null, function (cm, val) {\n cm.doc.lineSep = val;\n if (!val) { return }\n var newBreaks = [], lineNo = cm.doc.first;\n cm.doc.iter(function (line) {\n for (var pos = 0;;) {\n var found = line.text.indexOf(val, pos);\n if (found == -1) { break }\n pos = found + val.length;\n newBreaks.push(Pos(lineNo, found));\n }\n lineNo++;\n });\n for (var i = newBreaks.length - 1; i >= 0; i--)\n { replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); }\n });\n option(\"specialChars\", /[\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u061c\\u200b-\\u200f\\u2028\\u2029\\ufeff]/g, function (cm, val, old) {\n cm.state.specialChars = new RegExp(val.source + (val.test(\"\\t\") ? \"\" : \"|\\t\"), \"g\");\n if (old != Init) { cm.refresh(); }\n });\n option(\"specialCharPlaceholder\", defaultSpecialCharPlaceholder, function (cm) { return cm.refresh(); }, true);\n option(\"electricChars\", true);\n option(\"inputStyle\", mobile ? \"contenteditable\" : \"textarea\", function () {\n throw new Error(\"inputStyle can not (yet) be changed in a running editor\") // FIXME\n }, true);\n option(\"spellcheck\", false, function (cm, val) { return cm.getInputField().spellcheck = val; }, true);\n option(\"rtlMoveVisually\", !windows);\n option(\"wholeLineUpdateBefore\", true);\n\n option(\"theme\", \"default\", function (cm) {\n themeChanged(cm);\n guttersChanged(cm);\n }, true);\n option(\"keyMap\", \"default\", function (cm, val, old) {\n var next = getKeyMap(val);\n var prev = old != Init && getKeyMap(old);\n if (prev && prev.detach) { prev.detach(cm, next); }\n if (next.attach) { next.attach(cm, prev || null); }\n });\n option(\"extraKeys\", null);\n option(\"configureMouse\", null);\n\n option(\"lineWrapping\", false, wrappingChanged, true);\n option(\"gutters\", [], function (cm) {\n setGuttersForLineNumbers(cm.options);\n guttersChanged(cm);\n }, true);\n option(\"fixedGutter\", true, function (cm, val) {\n cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + \"px\" : \"0\";\n cm.refresh();\n }, true);\n option(\"coverGutterNextToScrollbar\", false, function (cm) { return updateScrollbars(cm); }, true);\n option(\"scrollbarStyle\", \"native\", function (cm) {\n initScrollbars(cm);\n updateScrollbars(cm);\n cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);\n cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);\n }, true);\n option(\"lineNumbers\", false, function (cm) {\n setGuttersForLineNumbers(cm.options);\n guttersChanged(cm);\n }, true);\n option(\"firstLineNumber\", 1, guttersChanged, true);\n option(\"lineNumberFormatter\", function (integer) { return integer; }, guttersChanged, true);\n option(\"showCursorWhenSelecting\", false, updateSelection, true);\n\n option(\"resetSelectionOnContextMenu\", true);\n option(\"lineWiseCopyCut\", true);\n option(\"pasteLinesPerSelection\", true);\n\n option(\"readOnly\", false, function (cm, val) {\n if (val == \"nocursor\") {\n onBlur(cm);\n cm.display.input.blur();\n }\n cm.display.input.readOnlyChanged(val);\n });\n option(\"disableInput\", false, function (cm, val) {if (!val) { cm.display.input.reset(); }}, true);\n option(\"dragDrop\", true, dragDropChanged);\n option(\"allowDropFileTypes\", null);\n\n option(\"cursorBlinkRate\", 530);\n option(\"cursorScrollMargin\", 0);\n option(\"cursorHeight\", 1, updateSelection, true);\n option(\"singleCursorHeightPerLine\", true, updateSelection, true);\n option(\"workTime\", 100);\n option(\"workDelay\", 100);\n option(\"flattenSpans\", true, resetModeState, true);\n option(\"addModeClass\", false, resetModeState, true);\n option(\"pollInterval\", 100);\n option(\"undoDepth\", 200, function (cm, val) { return cm.doc.history.undoDepth = val; });\n option(\"historyEventDelay\", 1250);\n option(\"viewportMargin\", 10, function (cm) { return cm.refresh(); }, true);\n option(\"maxHighlightLength\", 10000, resetModeState, true);\n option(\"moveInputWithCursor\", true, function (cm, val) {\n if (!val) { cm.display.input.resetPosition(); }\n });\n\n option(\"tabindex\", null, function (cm, val) { return cm.display.input.getField().tabIndex = val || \"\"; });\n option(\"autofocus\", null);\n option(\"direction\", \"ltr\", function (cm, val) { return cm.doc.setDirection(val); }, true);\n}\n\nfunction guttersChanged(cm) {\n updateGutters(cm);\n regChange(cm);\n alignHorizontally(cm);\n}\n\nfunction dragDropChanged(cm, value, old) {\n var wasOn = old && old != Init;\n if (!value != !wasOn) {\n var funcs = cm.display.dragFunctions;\n var toggle = value ? on : off;\n toggle(cm.display.scroller, \"dragstart\", funcs.start);\n toggle(cm.display.scroller, \"dragenter\", funcs.enter);\n toggle(cm.display.scroller, \"dragover\", funcs.over);\n toggle(cm.display.scroller, \"dragleave\", funcs.leave);\n toggle(cm.display.scroller, \"drop\", funcs.drop);\n }\n}\n\nfunction wrappingChanged(cm) {\n if (cm.options.lineWrapping) {\n addClass(cm.display.wrapper, \"CodeMirror-wrap\");\n cm.display.sizer.style.minWidth = \"\";\n cm.display.sizerWidth = null;\n } else {\n rmClass(cm.display.wrapper, \"CodeMirror-wrap\");\n findMaxLine(cm);\n }\n estimateLineHeights(cm);\n regChange(cm);\n clearCaches(cm);\n setTimeout(function () { return updateScrollbars(cm); }, 100);\n}\n\n// A CodeMirror instance represents an editor. This is the object\n// that user code is usually dealing with.\n\nfunction CodeMirror$1(place, options) {\n var this$1 = this;\n\n if (!(this instanceof CodeMirror$1)) { return new CodeMirror$1(place, options) }\n\n this.options = options = options ? copyObj(options) : {};\n // Determine effective options based on given values and defaults.\n copyObj(defaults, options, false);\n setGuttersForLineNumbers(options);\n\n var doc = options.value;\n if (typeof doc == \"string\") { doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction); }\n this.doc = doc;\n\n var input = new CodeMirror$1.inputStyles[options.inputStyle](this);\n var display = this.display = new Display(place, doc, input);\n display.wrapper.CodeMirror = this;\n updateGutters(this);\n themeChanged(this);\n if (options.lineWrapping)\n { this.display.wrapper.className += \" CodeMirror-wrap\"; }\n initScrollbars(this);\n\n this.state = {\n keyMaps: [], // stores maps added by addKeyMap\n overlays: [], // highlighting overlays, as added by addOverlay\n modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info\n overwrite: false,\n delayingBlurEvent: false,\n focused: false,\n suppressEdits: false, // used to disable editing during key handlers when in readOnly mode\n pasteIncoming: false, cutIncoming: false, // help recognize paste/cut edits in input.poll\n selectingText: false,\n draggingText: false,\n highlight: new Delayed(), // stores highlight worker timeout\n keySeq: null, // Unfinished key sequence\n specialChars: null\n };\n\n if (options.autofocus && !mobile) { display.input.focus(); }\n\n // Override magic textarea content restore that IE sometimes does\n // on our hidden textarea on reload\n if (ie && ie_version < 11) { setTimeout(function () { return this$1.display.input.reset(true); }, 20); }\n\n registerEventHandlers(this);\n ensureGlobalHandlers();\n\n startOperation(this);\n this.curOp.forceUpdate = true;\n attachDoc(this, doc);\n\n if ((options.autofocus && !mobile) || this.hasFocus())\n { setTimeout(bind(onFocus, this), 20); }\n else\n { onBlur(this); }\n\n for (var opt in optionHandlers) { if (optionHandlers.hasOwnProperty(opt))\n { optionHandlers[opt](this$1, options[opt], Init); } }\n maybeUpdateLineNumberWidth(this);\n if (options.finishInit) { options.finishInit(this); }\n for (var i = 0; i < initHooks.length; ++i) { initHooks[i](this$1); }\n endOperation(this);\n // Suppress optimizelegibility in Webkit, since it breaks text\n // measuring on line wrapping boundaries.\n if (webkit && options.lineWrapping &&\n getComputedStyle(display.lineDiv).textRendering == \"optimizelegibility\")\n { display.lineDiv.style.textRendering = \"auto\"; }\n}\n\n// The default configuration options.\nCodeMirror$1.defaults = defaults;\n// Functions to run when options are changed.\nCodeMirror$1.optionHandlers = optionHandlers;\n\n// Attach the necessary event handlers when initializing the editor\nfunction registerEventHandlers(cm) {\n var d = cm.display;\n on(d.scroller, \"mousedown\", operation(cm, onMouseDown));\n // Older IE's will not fire a second mousedown for a double click\n if (ie && ie_version < 11)\n { on(d.scroller, \"dblclick\", operation(cm, function (e) {\n if (signalDOMEvent(cm, e)) { return }\n var pos = posFromMouse(cm, e);\n if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) { return }\n e_preventDefault(e);\n var word = cm.findWordAt(pos);\n extendSelection(cm.doc, word.anchor, word.head);\n })); }\n else\n { on(d.scroller, \"dblclick\", function (e) { return signalDOMEvent(cm, e) || e_preventDefault(e); }); }\n // Some browsers fire contextmenu *after* opening the menu, at\n // which point we can't mess with it anymore. Context menu is\n // handled in onMouseDown for these browsers.\n if (!captureRightClick) { on(d.scroller, \"contextmenu\", function (e) { return onContextMenu(cm, e); }); }\n\n // Used to suppress mouse event handling when a touch happens\n var touchFinished, prevTouch = {end: 0};\n function finishTouch() {\n if (d.activeTouch) {\n touchFinished = setTimeout(function () { return d.activeTouch = null; }, 1000);\n prevTouch = d.activeTouch;\n prevTouch.end = +new Date;\n }\n }\n function isMouseLikeTouchEvent(e) {\n if (e.touches.length != 1) { return false }\n var touch = e.touches[0];\n return touch.radiusX <= 1 && touch.radiusY <= 1\n }\n function farAway(touch, other) {\n if (other.left == null) { return true }\n var dx = other.left - touch.left, dy = other.top - touch.top;\n return dx * dx + dy * dy > 20 * 20\n }\n on(d.scroller, \"touchstart\", function (e) {\n if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e) && !clickInGutter(cm, e)) {\n d.input.ensurePolled();\n clearTimeout(touchFinished);\n var now = +new Date;\n d.activeTouch = {start: now, moved: false,\n prev: now - prevTouch.end <= 300 ? prevTouch : null};\n if (e.touches.length == 1) {\n d.activeTouch.left = e.touches[0].pageX;\n d.activeTouch.top = e.touches[0].pageY;\n }\n }\n });\n on(d.scroller, \"touchmove\", function () {\n if (d.activeTouch) { d.activeTouch.moved = true; }\n });\n on(d.scroller, \"touchend\", function (e) {\n var touch = d.activeTouch;\n if (touch && !eventInWidget(d, e) && touch.left != null &&\n !touch.moved && new Date - touch.start < 300) {\n var pos = cm.coordsChar(d.activeTouch, \"page\"), range;\n if (!touch.prev || farAway(touch, touch.prev)) // Single tap\n { range = new Range(pos, pos); }\n else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap\n { range = cm.findWordAt(pos); }\n else // Triple tap\n { range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); }\n cm.setSelection(range.anchor, range.head);\n cm.focus();\n e_preventDefault(e);\n }\n finishTouch();\n });\n on(d.scroller, \"touchcancel\", finishTouch);\n\n // Sync scrolling between fake scrollbars and real scrollable\n // area, ensure viewport is updated when scrolling.\n on(d.scroller, \"scroll\", function () {\n if (d.scroller.clientHeight) {\n updateScrollTop(cm, d.scroller.scrollTop);\n setScrollLeft(cm, d.scroller.scrollLeft, true);\n signal(cm, \"scroll\", cm);\n }\n });\n\n // Listen to wheel events in order to try and update the viewport on time.\n on(d.scroller, \"mousewheel\", function (e) { return onScrollWheel(cm, e); });\n on(d.scroller, \"DOMMouseScroll\", function (e) { return onScrollWheel(cm, e); });\n\n // Prevent wrapper from ever scrolling\n on(d.wrapper, \"scroll\", function () { return d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });\n\n d.dragFunctions = {\n enter: function (e) {if (!signalDOMEvent(cm, e)) { e_stop(e); }},\n over: function (e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }},\n start: function (e) { return onDragStart(cm, e); },\n drop: operation(cm, onDrop),\n leave: function (e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }}\n };\n\n var inp = d.input.getField();\n on(inp, \"keyup\", function (e) { return onKeyUp.call(cm, e); });\n on(inp, \"keydown\", operation(cm, onKeyDown));\n on(inp, \"keypress\", operation(cm, onKeyPress));\n on(inp, \"focus\", function (e) { return onFocus(cm, e); });\n on(inp, \"blur\", function (e) { return onBlur(cm, e); });\n}\n\nvar initHooks = [];\nCodeMirror$1.defineInitHook = function (f) { return initHooks.push(f); };\n\n// Indent the given line. The how parameter can be \"smart\",\n// \"add\"/null, \"subtract\", or \"prev\". When aggressive is false\n// (typically set to true for forced single-line indents), empty\n// lines are not indented, and places where the mode returns Pass\n// are left alone.\nfunction indentLine(cm, n, how, aggressive) {\n var doc = cm.doc, state;\n if (how == null) { how = \"add\"; }\n if (how == \"smart\") {\n // Fall back to \"prev\" when the mode doesn't have an indentation\n // method.\n if (!doc.mode.indent) { how = \"prev\"; }\n else { state = getContextBefore(cm, n).state; }\n }\n\n var tabSize = cm.options.tabSize;\n var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);\n if (line.stateAfter) { line.stateAfter = null; }\n var curSpaceString = line.text.match(/^\\s*/)[0], indentation;\n if (!aggressive && !/\\S/.test(line.text)) {\n indentation = 0;\n how = \"not\";\n } else if (how == \"smart\") {\n indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);\n if (indentation == Pass || indentation > 150) {\n if (!aggressive) { return }\n how = \"prev\";\n }\n }\n if (how == \"prev\") {\n if (n > doc.first) { indentation = countColumn(getLine(doc, n-1).text, null, tabSize); }\n else { indentation = 0; }\n } else if (how == \"add\") {\n indentation = curSpace + cm.options.indentUnit;\n } else if (how == \"subtract\") {\n indentation = curSpace - cm.options.indentUnit;\n } else if (typeof how == \"number\") {\n indentation = curSpace + how;\n }\n indentation = Math.max(0, indentation);\n\n var indentString = \"\", pos = 0;\n if (cm.options.indentWithTabs)\n { for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += \"\\t\";} }\n if (pos < indentation) { indentString += spaceStr(indentation - pos); }\n\n if (indentString != curSpaceString) {\n replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), \"+input\");\n line.stateAfter = null;\n return true\n } else {\n // Ensure that, if the cursor was in the whitespace at the start\n // of the line, it is moved to the end of that space.\n for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) {\n var range = doc.sel.ranges[i$1];\n if (range.head.line == n && range.head.ch < curSpaceString.length) {\n var pos$1 = Pos(n, curSpaceString.length);\n replaceOneSelection(doc, i$1, new Range(pos$1, pos$1));\n break\n }\n }\n }\n}\n\n// This will be set to a {lineWise: bool, text: [string]} object, so\n// that, when pasting, we know what kind of selections the copied\n// text was made out of.\nvar lastCopied = null;\n\nfunction setLastCopied(newLastCopied) {\n lastCopied = newLastCopied;\n}\n\nfunction applyTextInput(cm, inserted, deleted, sel, origin) {\n var doc = cm.doc;\n cm.display.shift = false;\n if (!sel) { sel = doc.sel; }\n\n var paste = cm.state.pasteIncoming || origin == \"paste\";\n var textLines = splitLinesAuto(inserted), multiPaste = null;\n // When pasting N lines into N selections, insert one line per selection\n if (paste && sel.ranges.length > 1) {\n if (lastCopied && lastCopied.text.join(\"\\n\") == inserted) {\n if (sel.ranges.length % lastCopied.text.length == 0) {\n multiPaste = [];\n for (var i = 0; i < lastCopied.text.length; i++)\n { multiPaste.push(doc.splitLines(lastCopied.text[i])); }\n }\n } else if (textLines.length == sel.ranges.length && cm.options.pasteLinesPerSelection) {\n multiPaste = map(textLines, function (l) { return [l]; });\n }\n }\n\n var updateInput;\n // Normal behavior is to insert the new text into every selection\n for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) {\n var range$$1 = sel.ranges[i$1];\n var from = range$$1.from(), to = range$$1.to();\n if (range$$1.empty()) {\n if (deleted && deleted > 0) // Handle deletion\n { from = Pos(from.line, from.ch - deleted); }\n else if (cm.state.overwrite && !paste) // Handle overwrite\n { to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); }\n else if (lastCopied && lastCopied.lineWise && lastCopied.text.join(\"\\n\") == inserted)\n { from = to = Pos(from.line, 0); }\n }\n updateInput = cm.curOp.updateInput;\n var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,\n origin: origin || (paste ? \"paste\" : cm.state.cutIncoming ? \"cut\" : \"+input\")};\n makeChange(cm.doc, changeEvent);\n signalLater(cm, \"inputRead\", cm, changeEvent);\n }\n if (inserted && !paste)\n { triggerElectric(cm, inserted); }\n\n ensureCursorVisible(cm);\n cm.curOp.updateInput = updateInput;\n cm.curOp.typing = true;\n cm.state.pasteIncoming = cm.state.cutIncoming = false;\n}\n\nfunction handlePaste(e, cm) {\n var pasted = e.clipboardData && e.clipboardData.getData(\"Text\");\n if (pasted) {\n e.preventDefault();\n if (!cm.isReadOnly() && !cm.options.disableInput)\n { runInOp(cm, function () { return applyTextInput(cm, pasted, 0, null, \"paste\"); }); }\n return true\n }\n}\n\nfunction triggerElectric(cm, inserted) {\n // When an 'electric' character is inserted, immediately trigger a reindent\n if (!cm.options.electricChars || !cm.options.smartIndent) { return }\n var sel = cm.doc.sel;\n\n for (var i = sel.ranges.length - 1; i >= 0; i--) {\n var range$$1 = sel.ranges[i];\n if (range$$1.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range$$1.head.line)) { continue }\n var mode = cm.getModeAt(range$$1.head);\n var indented = false;\n if (mode.electricChars) {\n for (var j = 0; j < mode.electricChars.length; j++)\n { if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {\n indented = indentLine(cm, range$$1.head.line, \"smart\");\n break\n } }\n } else if (mode.electricInput) {\n if (mode.electricInput.test(getLine(cm.doc, range$$1.head.line).text.slice(0, range$$1.head.ch)))\n { indented = indentLine(cm, range$$1.head.line, \"smart\"); }\n }\n if (indented) { signalLater(cm, \"electricInput\", cm, range$$1.head.line); }\n }\n}\n\nfunction copyableRanges(cm) {\n var text = [], ranges = [];\n for (var i = 0; i < cm.doc.sel.ranges.length; i++) {\n var line = cm.doc.sel.ranges[i].head.line;\n var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};\n ranges.push(lineRange);\n text.push(cm.getRange(lineRange.anchor, lineRange.head));\n }\n return {text: text, ranges: ranges}\n}\n\nfunction disableBrowserMagic(field, spellcheck) {\n field.setAttribute(\"autocorrect\", \"off\");\n field.setAttribute(\"autocapitalize\", \"off\");\n field.setAttribute(\"spellcheck\", !!spellcheck);\n}\n\nfunction hiddenTextarea() {\n var te = elt(\"textarea\", null, null, \"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none\");\n var div = elt(\"div\", [te], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n // The textarea is kept positioned near the cursor to prevent the\n // fact that it'll be scrolled into view on input from scrolling\n // our fake cursor out of view. On webkit, when wrap=off, paste is\n // very slow. So make the area wide instead.\n if (webkit) { te.style.width = \"1000px\"; }\n else { te.setAttribute(\"wrap\", \"off\"); }\n // If border: 0; -- iOS fails to open keyboard (issue #1287)\n if (ios) { te.style.border = \"1px solid black\"; }\n disableBrowserMagic(te);\n return div\n}\n\n// The publicly visible API. Note that methodOp(f) means\n// 'wrap f in an operation, performed on its `this` parameter'.\n\n// This is not the complete set of editor methods. Most of the\n// methods defined on the Doc type are also injected into\n// CodeMirror.prototype, for backwards compatibility and\n// convenience.\n\nvar addEditorMethods = function(CodeMirror) {\n var optionHandlers = CodeMirror.optionHandlers;\n\n var helpers = CodeMirror.helpers = {};\n\n CodeMirror.prototype = {\n constructor: CodeMirror,\n focus: function(){window.focus(); this.display.input.focus();},\n\n setOption: function(option, value) {\n var options = this.options, old = options[option];\n if (options[option] == value && option != \"mode\") { return }\n options[option] = value;\n if (optionHandlers.hasOwnProperty(option))\n { operation(this, optionHandlers[option])(this, value, old); }\n signal(this, \"optionChange\", this, option);\n },\n\n getOption: function(option) {return this.options[option]},\n getDoc: function() {return this.doc},\n\n addKeyMap: function(map$$1, bottom) {\n this.state.keyMaps[bottom ? \"push\" : \"unshift\"](getKeyMap(map$$1));\n },\n removeKeyMap: function(map$$1) {\n var maps = this.state.keyMaps;\n for (var i = 0; i < maps.length; ++i)\n { if (maps[i] == map$$1 || maps[i].name == map$$1) {\n maps.splice(i, 1);\n return true\n } }\n },\n\n addOverlay: methodOp(function(spec, options) {\n var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);\n if (mode.startState) { throw new Error(\"Overlays may not be stateful.\") }\n insertSorted(this.state.overlays,\n {mode: mode, modeSpec: spec, opaque: options && options.opaque,\n priority: (options && options.priority) || 0},\n function (overlay) { return overlay.priority; });\n this.state.modeGen++;\n regChange(this);\n }),\n removeOverlay: methodOp(function(spec) {\n var this$1 = this;\n\n var overlays = this.state.overlays;\n for (var i = 0; i < overlays.length; ++i) {\n var cur = overlays[i].modeSpec;\n if (cur == spec || typeof spec == \"string\" && cur.name == spec) {\n overlays.splice(i, 1);\n this$1.state.modeGen++;\n regChange(this$1);\n return\n }\n }\n }),\n\n indentLine: methodOp(function(n, dir, aggressive) {\n if (typeof dir != \"string\" && typeof dir != \"number\") {\n if (dir == null) { dir = this.options.smartIndent ? \"smart\" : \"prev\"; }\n else { dir = dir ? \"add\" : \"subtract\"; }\n }\n if (isLine(this.doc, n)) { indentLine(this, n, dir, aggressive); }\n }),\n indentSelection: methodOp(function(how) {\n var this$1 = this;\n\n var ranges = this.doc.sel.ranges, end = -1;\n for (var i = 0; i < ranges.length; i++) {\n var range$$1 = ranges[i];\n if (!range$$1.empty()) {\n var from = range$$1.from(), to = range$$1.to();\n var start = Math.max(end, from.line);\n end = Math.min(this$1.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;\n for (var j = start; j < end; ++j)\n { indentLine(this$1, j, how); }\n var newRanges = this$1.doc.sel.ranges;\n if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0)\n { replaceOneSelection(this$1.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); }\n } else if (range$$1.head.line > end) {\n indentLine(this$1, range$$1.head.line, how, true);\n end = range$$1.head.line;\n if (i == this$1.doc.sel.primIndex) { ensureCursorVisible(this$1); }\n }\n }\n }),\n\n // Fetch the parser token for a given character. Useful for hacks\n // that want to inspect the mode state (say, for completion).\n getTokenAt: function(pos, precise) {\n return takeToken(this, pos, precise)\n },\n\n getLineTokens: function(line, precise) {\n return takeToken(this, Pos(line), precise, true)\n },\n\n getTokenTypeAt: function(pos) {\n pos = clipPos(this.doc, pos);\n var styles = getLineStyles(this, getLine(this.doc, pos.line));\n var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;\n var type;\n if (ch == 0) { type = styles[2]; }\n else { for (;;) {\n var mid = (before + after) >> 1;\n if ((mid ? styles[mid * 2 - 1] : 0) >= ch) { after = mid; }\n else if (styles[mid * 2 + 1] < ch) { before = mid + 1; }\n else { type = styles[mid * 2 + 2]; break }\n } }\n var cut = type ? type.indexOf(\"overlay \") : -1;\n return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1)\n },\n\n getModeAt: function(pos) {\n var mode = this.doc.mode;\n if (!mode.innerMode) { return mode }\n return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode\n },\n\n getHelper: function(pos, type) {\n return this.getHelpers(pos, type)[0]\n },\n\n getHelpers: function(pos, type) {\n var this$1 = this;\n\n var found = [];\n if (!helpers.hasOwnProperty(type)) { return found }\n var help = helpers[type], mode = this.getModeAt(pos);\n if (typeof mode[type] == \"string\") {\n if (help[mode[type]]) { found.push(help[mode[type]]); }\n } else if (mode[type]) {\n for (var i = 0; i < mode[type].length; i++) {\n var val = help[mode[type][i]];\n if (val) { found.push(val); }\n }\n } else if (mode.helperType && help[mode.helperType]) {\n found.push(help[mode.helperType]);\n } else if (help[mode.name]) {\n found.push(help[mode.name]);\n }\n for (var i$1 = 0; i$1 < help._global.length; i$1++) {\n var cur = help._global[i$1];\n if (cur.pred(mode, this$1) && indexOf(found, cur.val) == -1)\n { found.push(cur.val); }\n }\n return found\n },\n\n getStateAfter: function(line, precise) {\n var doc = this.doc;\n line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);\n return getContextBefore(this, line + 1, precise).state\n },\n\n cursorCoords: function(start, mode) {\n var pos, range$$1 = this.doc.sel.primary();\n if (start == null) { pos = range$$1.head; }\n else if (typeof start == \"object\") { pos = clipPos(this.doc, start); }\n else { pos = start ? range$$1.from() : range$$1.to(); }\n return cursorCoords(this, pos, mode || \"page\")\n },\n\n charCoords: function(pos, mode) {\n return charCoords(this, clipPos(this.doc, pos), mode || \"page\")\n },\n\n coordsChar: function(coords, mode) {\n coords = fromCoordSystem(this, coords, mode || \"page\");\n return coordsChar(this, coords.left, coords.top)\n },\n\n lineAtHeight: function(height, mode) {\n height = fromCoordSystem(this, {top: height, left: 0}, mode || \"page\").top;\n return lineAtHeight(this.doc, height + this.display.viewOffset)\n },\n heightAtLine: function(line, mode, includeWidgets) {\n var end = false, lineObj;\n if (typeof line == \"number\") {\n var last = this.doc.first + this.doc.size - 1;\n if (line < this.doc.first) { line = this.doc.first; }\n else if (line > last) { line = last; end = true; }\n lineObj = getLine(this.doc, line);\n } else {\n lineObj = line;\n }\n return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || \"page\", includeWidgets || end).top +\n (end ? this.doc.height - heightAtLine(lineObj) : 0)\n },\n\n defaultTextHeight: function() { return textHeight(this.display) },\n defaultCharWidth: function() { return charWidth(this.display) },\n\n getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo}},\n\n addWidget: function(pos, node, scroll, vert, horiz) {\n var display = this.display;\n pos = cursorCoords(this, clipPos(this.doc, pos));\n var top = pos.bottom, left = pos.left;\n node.style.position = \"absolute\";\n node.setAttribute(\"cm-ignore-events\", \"true\");\n this.display.input.setUneditable(node);\n display.sizer.appendChild(node);\n if (vert == \"over\") {\n top = pos.top;\n } else if (vert == \"above\" || vert == \"near\") {\n var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),\n hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);\n // Default to positioning above (if specified and possible); otherwise default to positioning below\n if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)\n { top = pos.top - node.offsetHeight; }\n else if (pos.bottom + node.offsetHeight <= vspace)\n { top = pos.bottom; }\n if (left + node.offsetWidth > hspace)\n { left = hspace - node.offsetWidth; }\n }\n node.style.top = top + \"px\";\n node.style.left = node.style.right = \"\";\n if (horiz == \"right\") {\n left = display.sizer.clientWidth - node.offsetWidth;\n node.style.right = \"0px\";\n } else {\n if (horiz == \"left\") { left = 0; }\n else if (horiz == \"middle\") { left = (display.sizer.clientWidth - node.offsetWidth) / 2; }\n node.style.left = left + \"px\";\n }\n if (scroll)\n { scrollIntoView(this, {left: left, top: top, right: left + node.offsetWidth, bottom: top + node.offsetHeight}); }\n },\n\n triggerOnKeyDown: methodOp(onKeyDown),\n triggerOnKeyPress: methodOp(onKeyPress),\n triggerOnKeyUp: onKeyUp,\n triggerOnMouseDown: methodOp(onMouseDown),\n\n execCommand: function(cmd) {\n if (commands.hasOwnProperty(cmd))\n { return commands[cmd].call(null, this) }\n },\n\n triggerElectric: methodOp(function(text) { triggerElectric(this, text); }),\n\n findPosH: function(from, amount, unit, visually) {\n var this$1 = this;\n\n var dir = 1;\n if (amount < 0) { dir = -1; amount = -amount; }\n var cur = clipPos(this.doc, from);\n for (var i = 0; i < amount; ++i) {\n cur = findPosH(this$1.doc, cur, dir, unit, visually);\n if (cur.hitSide) { break }\n }\n return cur\n },\n\n moveH: methodOp(function(dir, unit) {\n var this$1 = this;\n\n this.extendSelectionsBy(function (range$$1) {\n if (this$1.display.shift || this$1.doc.extend || range$$1.empty())\n { return findPosH(this$1.doc, range$$1.head, dir, unit, this$1.options.rtlMoveVisually) }\n else\n { return dir < 0 ? range$$1.from() : range$$1.to() }\n }, sel_move);\n }),\n\n deleteH: methodOp(function(dir, unit) {\n var sel = this.doc.sel, doc = this.doc;\n if (sel.somethingSelected())\n { doc.replaceSelection(\"\", null, \"+delete\"); }\n else\n { deleteNearSelection(this, function (range$$1) {\n var other = findPosH(doc, range$$1.head, dir, unit, false);\n return dir < 0 ? {from: other, to: range$$1.head} : {from: range$$1.head, to: other}\n }); }\n }),\n\n findPosV: function(from, amount, unit, goalColumn) {\n var this$1 = this;\n\n var dir = 1, x = goalColumn;\n if (amount < 0) { dir = -1; amount = -amount; }\n var cur = clipPos(this.doc, from);\n for (var i = 0; i < amount; ++i) {\n var coords = cursorCoords(this$1, cur, \"div\");\n if (x == null) { x = coords.left; }\n else { coords.left = x; }\n cur = findPosV(this$1, coords, dir, unit);\n if (cur.hitSide) { break }\n }\n return cur\n },\n\n moveV: methodOp(function(dir, unit) {\n var this$1 = this;\n\n var doc = this.doc, goals = [];\n var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected();\n doc.extendSelectionsBy(function (range$$1) {\n if (collapse)\n { return dir < 0 ? range$$1.from() : range$$1.to() }\n var headPos = cursorCoords(this$1, range$$1.head, \"div\");\n if (range$$1.goalColumn != null) { headPos.left = range$$1.goalColumn; }\n goals.push(headPos.left);\n var pos = findPosV(this$1, headPos, dir, unit);\n if (unit == \"page\" && range$$1 == doc.sel.primary())\n { addToScrollTop(this$1, charCoords(this$1, pos, \"div\").top - headPos.top); }\n return pos\n }, sel_move);\n if (goals.length) { for (var i = 0; i < doc.sel.ranges.length; i++)\n { doc.sel.ranges[i].goalColumn = goals[i]; } }\n }),\n\n // Find the word at the given position (as returned by coordsChar).\n findWordAt: function(pos) {\n var doc = this.doc, line = getLine(doc, pos.line).text;\n var start = pos.ch, end = pos.ch;\n if (line) {\n var helper = this.getHelper(pos, \"wordChars\");\n if ((pos.sticky == \"before\" || end == line.length) && start) { --start; } else { ++end; }\n var startChar = line.charAt(start);\n var check = isWordChar(startChar, helper)\n ? function (ch) { return isWordChar(ch, helper); }\n : /\\s/.test(startChar) ? function (ch) { return /\\s/.test(ch); }\n : function (ch) { return (!/\\s/.test(ch) && !isWordChar(ch)); };\n while (start > 0 && check(line.charAt(start - 1))) { --start; }\n while (end < line.length && check(line.charAt(end))) { ++end; }\n }\n return new Range(Pos(pos.line, start), Pos(pos.line, end))\n },\n\n toggleOverwrite: function(value) {\n if (value != null && value == this.state.overwrite) { return }\n if (this.state.overwrite = !this.state.overwrite)\n { addClass(this.display.cursorDiv, \"CodeMirror-overwrite\"); }\n else\n { rmClass(this.display.cursorDiv, \"CodeMirror-overwrite\"); }\n\n signal(this, \"overwriteToggle\", this, this.state.overwrite);\n },\n hasFocus: function() { return this.display.input.getField() == activeElt() },\n isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) },\n\n scrollTo: methodOp(function (x, y) { scrollToCoords(this, x, y); }),\n getScrollInfo: function() {\n var scroller = this.display.scroller;\n return {left: scroller.scrollLeft, top: scroller.scrollTop,\n height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,\n width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,\n clientHeight: displayHeight(this), clientWidth: displayWidth(this)}\n },\n\n scrollIntoView: methodOp(function(range$$1, margin) {\n if (range$$1 == null) {\n range$$1 = {from: this.doc.sel.primary().head, to: null};\n if (margin == null) { margin = this.options.cursorScrollMargin; }\n } else if (typeof range$$1 == \"number\") {\n range$$1 = {from: Pos(range$$1, 0), to: null};\n } else if (range$$1.from == null) {\n range$$1 = {from: range$$1, to: null};\n }\n if (!range$$1.to) { range$$1.to = range$$1.from; }\n range$$1.margin = margin || 0;\n\n if (range$$1.from.line != null) {\n scrollToRange(this, range$$1);\n } else {\n scrollToCoordsRange(this, range$$1.from, range$$1.to, range$$1.margin);\n }\n }),\n\n setSize: methodOp(function(width, height) {\n var this$1 = this;\n\n var interpret = function (val) { return typeof val == \"number\" || /^\\d+$/.test(String(val)) ? val + \"px\" : val; };\n if (width != null) { this.display.wrapper.style.width = interpret(width); }\n if (height != null) { this.display.wrapper.style.height = interpret(height); }\n if (this.options.lineWrapping) { clearLineMeasurementCache(this); }\n var lineNo$$1 = this.display.viewFrom;\n this.doc.iter(lineNo$$1, this.display.viewTo, function (line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++)\n { if (line.widgets[i].noHScroll) { regLineChange(this$1, lineNo$$1, \"widget\"); break } } }\n ++lineNo$$1;\n });\n this.curOp.forceUpdate = true;\n signal(this, \"refresh\", this);\n }),\n\n operation: function(f){return runInOp(this, f)},\n startOperation: function(){return startOperation(this)},\n endOperation: function(){return endOperation(this)},\n\n refresh: methodOp(function() {\n var oldHeight = this.display.cachedTextHeight;\n regChange(this);\n this.curOp.forceUpdate = true;\n clearCaches(this);\n scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop);\n updateGutterSpace(this);\n if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5)\n { estimateLineHeights(this); }\n signal(this, \"refresh\", this);\n }),\n\n swapDoc: methodOp(function(doc) {\n var old = this.doc;\n old.cm = null;\n attachDoc(this, doc);\n clearCaches(this);\n this.display.input.reset();\n scrollToCoords(this, doc.scrollLeft, doc.scrollTop);\n this.curOp.forceScroll = true;\n signalLater(this, \"swapDoc\", this, old);\n return old\n }),\n\n getInputField: function(){return this.display.input.getField()},\n getWrapperElement: function(){return this.display.wrapper},\n getScrollerElement: function(){return this.display.scroller},\n getGutterElement: function(){return this.display.gutters}\n };\n eventMixin(CodeMirror);\n\n CodeMirror.registerHelper = function(type, name, value) {\n if (!helpers.hasOwnProperty(type)) { helpers[type] = CodeMirror[type] = {_global: []}; }\n helpers[type][name] = value;\n };\n CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {\n CodeMirror.registerHelper(type, name, value);\n helpers[type]._global.push({pred: predicate, val: value});\n };\n};\n\n// Used for horizontal relative motion. Dir is -1 or 1 (left or\n// right), unit can be \"char\", \"column\" (like char, but doesn't\n// cross line boundaries), \"word\" (across next word), or \"group\" (to\n// the start of next group of word or non-word-non-whitespace\n// chars). The visually param controls whether, in right-to-left\n// text, direction 1 means to move towards the next index in the\n// string, or towards the character to the right of the current\n// position. The resulting position will have a hitSide=true\n// property if it reached the end of the document.\nfunction findPosH(doc, pos, dir, unit, visually) {\n var oldPos = pos;\n var origDir = dir;\n var lineObj = getLine(doc, pos.line);\n function findNextLine() {\n var l = pos.line + dir;\n if (l < doc.first || l >= doc.first + doc.size) { return false }\n pos = new Pos(l, pos.ch, pos.sticky);\n return lineObj = getLine(doc, l)\n }\n function moveOnce(boundToLine) {\n var next;\n if (visually) {\n next = moveVisually(doc.cm, lineObj, pos, dir);\n } else {\n next = moveLogically(lineObj, pos, dir);\n }\n if (next == null) {\n if (!boundToLine && findNextLine())\n { pos = endOfLine(visually, doc.cm, lineObj, pos.line, dir); }\n else\n { return false }\n } else {\n pos = next;\n }\n return true\n }\n\n if (unit == \"char\") {\n moveOnce();\n } else if (unit == \"column\") {\n moveOnce(true);\n } else if (unit == \"word\" || unit == \"group\") {\n var sawType = null, group = unit == \"group\";\n var helper = doc.cm && doc.cm.getHelper(pos, \"wordChars\");\n for (var first = true;; first = false) {\n if (dir < 0 && !moveOnce(!first)) { break }\n var cur = lineObj.text.charAt(pos.ch) || \"\\n\";\n var type = isWordChar(cur, helper) ? \"w\"\n : group && cur == \"\\n\" ? \"n\"\n : !group || /\\s/.test(cur) ? null\n : \"p\";\n if (group && !first && !type) { type = \"s\"; }\n if (sawType && sawType != type) {\n if (dir < 0) {dir = 1; moveOnce(); pos.sticky = \"after\";}\n break\n }\n\n if (type) { sawType = type; }\n if (dir > 0 && !moveOnce(!first)) { break }\n }\n }\n var result = skipAtomic(doc, pos, oldPos, origDir, true);\n if (equalCursorPos(oldPos, result)) { result.hitSide = true; }\n return result\n}\n\n// For relative vertical movement. Dir may be -1 or 1. Unit can be\n// \"page\" or \"line\". The resulting position will have a hitSide=true\n// property if it reached the end of the document.\nfunction findPosV(cm, pos, dir, unit) {\n var doc = cm.doc, x = pos.left, y;\n if (unit == \"page\") {\n var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);\n var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);\n y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount;\n\n } else if (unit == \"line\") {\n y = dir > 0 ? pos.bottom + 3 : pos.top - 3;\n }\n var target;\n for (;;) {\n target = coordsChar(cm, x, y);\n if (!target.outside) { break }\n if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break }\n y += dir * 5;\n }\n return target\n}\n\n// CONTENTEDITABLE INPUT STYLE\n\nvar ContentEditableInput = function(cm) {\n this.cm = cm;\n this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;\n this.polling = new Delayed();\n this.composing = null;\n this.gracePeriod = false;\n this.readDOMTimeout = null;\n};\n\nContentEditableInput.prototype.init = function (display) {\n var this$1 = this;\n\n var input = this, cm = input.cm;\n var div = input.div = display.lineDiv;\n disableBrowserMagic(div, cm.options.spellcheck);\n\n on(div, \"paste\", function (e) {\n if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }\n // IE doesn't fire input events, so we schedule a read for the pasted content in this way\n if (ie_version <= 11) { setTimeout(operation(cm, function () { return this$1.updateFromDOM(); }), 20); }\n });\n\n on(div, \"compositionstart\", function (e) {\n this$1.composing = {data: e.data, done: false};\n });\n on(div, \"compositionupdate\", function (e) {\n if (!this$1.composing) { this$1.composing = {data: e.data, done: false}; }\n });\n on(div, \"compositionend\", function (e) {\n if (this$1.composing) {\n if (e.data != this$1.composing.data) { this$1.readFromDOMSoon(); }\n this$1.composing.done = true;\n }\n });\n\n on(div, \"touchstart\", function () { return input.forceCompositionEnd(); });\n\n on(div, \"input\", function () {\n if (!this$1.composing) { this$1.readFromDOMSoon(); }\n });\n\n function onCopyCut(e) {\n if (signalDOMEvent(cm, e)) { return }\n if (cm.somethingSelected()) {\n setLastCopied({lineWise: false, text: cm.getSelections()});\n if (e.type == \"cut\") { cm.replaceSelection(\"\", null, \"cut\"); }\n } else if (!cm.options.lineWiseCopyCut) {\n return\n } else {\n var ranges = copyableRanges(cm);\n setLastCopied({lineWise: true, text: ranges.text});\n if (e.type == \"cut\") {\n cm.operation(function () {\n cm.setSelections(ranges.ranges, 0, sel_dontScroll);\n cm.replaceSelection(\"\", null, \"cut\");\n });\n }\n }\n if (e.clipboardData) {\n e.clipboardData.clearData();\n var content = lastCopied.text.join(\"\\n\");\n // iOS exposes the clipboard API, but seems to discard content inserted into it\n e.clipboardData.setData(\"Text\", content);\n if (e.clipboardData.getData(\"Text\") == content) {\n e.preventDefault();\n return\n }\n }\n // Old-fashioned briefly-focus-a-textarea hack\n var kludge = hiddenTextarea(), te = kludge.firstChild;\n cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);\n te.value = lastCopied.text.join(\"\\n\");\n var hadFocus = document.activeElement;\n selectInput(te);\n setTimeout(function () {\n cm.display.lineSpace.removeChild(kludge);\n hadFocus.focus();\n if (hadFocus == div) { input.showPrimarySelection(); }\n }, 50);\n }\n on(div, \"copy\", onCopyCut);\n on(div, \"cut\", onCopyCut);\n};\n\nContentEditableInput.prototype.prepareSelection = function () {\n var result = prepareSelection(this.cm, false);\n result.focus = this.cm.state.focused;\n return result\n};\n\nContentEditableInput.prototype.showSelection = function (info, takeFocus) {\n if (!info || !this.cm.display.view.length) { return }\n if (info.focus || takeFocus) { this.showPrimarySelection(); }\n this.showMultipleSelections(info);\n};\n\nContentEditableInput.prototype.getSelection = function () {\n return this.cm.display.wrapper.ownerDocument.getSelection()\n};\n\nContentEditableInput.prototype.showPrimarySelection = function () {\n var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();\n var from = prim.from(), to = prim.to();\n\n if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {\n sel.removeAllRanges();\n return\n }\n\n var curAnchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n var curFocus = domToPos(cm, sel.focusNode, sel.focusOffset);\n if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&\n cmp(minPos(curAnchor, curFocus), from) == 0 &&\n cmp(maxPos(curAnchor, curFocus), to) == 0)\n { return }\n\n var view = cm.display.view;\n var start = (from.line >= cm.display.viewFrom && posToDOM(cm, from)) ||\n {node: view[0].measure.map[2], offset: 0};\n var end = to.line < cm.display.viewTo && posToDOM(cm, to);\n if (!end) {\n var measure = view[view.length - 1].measure;\n var map$$1 = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;\n end = {node: map$$1[map$$1.length - 1], offset: map$$1[map$$1.length - 2] - map$$1[map$$1.length - 3]};\n }\n\n if (!start || !end) {\n sel.removeAllRanges();\n return\n }\n\n var old = sel.rangeCount && sel.getRangeAt(0), rng;\n try { rng = range(start.node, start.offset, end.offset, end.node); }\n catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible\n if (rng) {\n if (!gecko && cm.state.focused) {\n sel.collapse(start.node, start.offset);\n if (!rng.collapsed) {\n sel.removeAllRanges();\n sel.addRange(rng);\n }\n } else {\n sel.removeAllRanges();\n sel.addRange(rng);\n }\n if (old && sel.anchorNode == null) { sel.addRange(old); }\n else if (gecko) { this.startGracePeriod(); }\n }\n this.rememberSelection();\n};\n\nContentEditableInput.prototype.startGracePeriod = function () {\n var this$1 = this;\n\n clearTimeout(this.gracePeriod);\n this.gracePeriod = setTimeout(function () {\n this$1.gracePeriod = false;\n if (this$1.selectionChanged())\n { this$1.cm.operation(function () { return this$1.cm.curOp.selectionChanged = true; }); }\n }, 20);\n};\n\nContentEditableInput.prototype.showMultipleSelections = function (info) {\n removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);\n removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);\n};\n\nContentEditableInput.prototype.rememberSelection = function () {\n var sel = this.getSelection();\n this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;\n this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;\n};\n\nContentEditableInput.prototype.selectionInEditor = function () {\n var sel = this.getSelection();\n if (!sel.rangeCount) { return false }\n var node = sel.getRangeAt(0).commonAncestorContainer;\n return contains(this.div, node)\n};\n\nContentEditableInput.prototype.focus = function () {\n if (this.cm.options.readOnly != \"nocursor\") {\n if (!this.selectionInEditor())\n { this.showSelection(this.prepareSelection(), true); }\n this.div.focus();\n }\n};\nContentEditableInput.prototype.blur = function () { this.div.blur(); };\nContentEditableInput.prototype.getField = function () { return this.div };\n\nContentEditableInput.prototype.supportsTouch = function () { return true };\n\nContentEditableInput.prototype.receivedFocus = function () {\n var input = this;\n if (this.selectionInEditor())\n { this.pollSelection(); }\n else\n { runInOp(this.cm, function () { return input.cm.curOp.selectionChanged = true; }); }\n\n function poll() {\n if (input.cm.state.focused) {\n input.pollSelection();\n input.polling.set(input.cm.options.pollInterval, poll);\n }\n }\n this.polling.set(this.cm.options.pollInterval, poll);\n};\n\nContentEditableInput.prototype.selectionChanged = function () {\n var sel = this.getSelection();\n return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||\n sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset\n};\n\nContentEditableInput.prototype.pollSelection = function () {\n if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return }\n var sel = this.getSelection(), cm = this.cm;\n // On Android Chrome (version 56, at least), backspacing into an\n // uneditable block element will put the cursor in that element,\n // and then, because it's not editable, hide the virtual keyboard.\n // Because Android doesn't allow us to actually detect backspace\n // presses in a sane way, this code checks for when that happens\n // and simulates a backspace press in this case.\n if (android && chrome && this.cm.options.gutters.length && isInGutter(sel.anchorNode)) {\n this.cm.triggerOnKeyDown({type: \"keydown\", keyCode: 8, preventDefault: Math.abs});\n this.blur();\n this.focus();\n return\n }\n if (this.composing) { return }\n this.rememberSelection();\n var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n var head = domToPos(cm, sel.focusNode, sel.focusOffset);\n if (anchor && head) { runInOp(cm, function () {\n setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);\n if (anchor.bad || head.bad) { cm.curOp.selectionChanged = true; }\n }); }\n};\n\nContentEditableInput.prototype.pollContent = function () {\n if (this.readDOMTimeout != null) {\n clearTimeout(this.readDOMTimeout);\n this.readDOMTimeout = null;\n }\n\n var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary();\n var from = sel.from(), to = sel.to();\n if (from.ch == 0 && from.line > cm.firstLine())\n { from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length); }\n if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine())\n { to = Pos(to.line + 1, 0); }\n if (from.line < display.viewFrom || to.line > display.viewTo - 1) { return false }\n\n var fromIndex, fromLine, fromNode;\n if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {\n fromLine = lineNo(display.view[0].line);\n fromNode = display.view[0].node;\n } else {\n fromLine = lineNo(display.view[fromIndex].line);\n fromNode = display.view[fromIndex - 1].node.nextSibling;\n }\n var toIndex = findViewIndex(cm, to.line);\n var toLine, toNode;\n if (toIndex == display.view.length - 1) {\n toLine = display.viewTo - 1;\n toNode = display.lineDiv.lastChild;\n } else {\n toLine = lineNo(display.view[toIndex + 1].line) - 1;\n toNode = display.view[toIndex + 1].node.previousSibling;\n }\n\n if (!fromNode) { return false }\n var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));\n var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));\n while (newText.length > 1 && oldText.length > 1) {\n if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; }\n else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; }\n else { break }\n }\n\n var cutFront = 0, cutEnd = 0;\n var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length);\n while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront))\n { ++cutFront; }\n var newBot = lst(newText), oldBot = lst(oldText);\n var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0),\n oldBot.length - (oldText.length == 1 ? cutFront : 0));\n while (cutEnd < maxCutEnd &&\n newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))\n { ++cutEnd; }\n // Try to move start of change to start of selection if ambiguous\n if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) {\n while (cutFront && cutFront > from.ch &&\n newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) {\n cutFront--;\n cutEnd++;\n }\n }\n\n newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\\u200b+/, \"\");\n newText[0] = newText[0].slice(cutFront).replace(/\\u200b+$/, \"\");\n\n var chFrom = Pos(fromLine, cutFront);\n var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);\n if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {\n replaceRange(cm.doc, newText, chFrom, chTo, \"+input\");\n return true\n }\n};\n\nContentEditableInput.prototype.ensurePolled = function () {\n this.forceCompositionEnd();\n};\nContentEditableInput.prototype.reset = function () {\n this.forceCompositionEnd();\n};\nContentEditableInput.prototype.forceCompositionEnd = function () {\n if (!this.composing) { return }\n clearTimeout(this.readDOMTimeout);\n this.composing = null;\n this.updateFromDOM();\n this.div.blur();\n this.div.focus();\n};\nContentEditableInput.prototype.readFromDOMSoon = function () {\n var this$1 = this;\n\n if (this.readDOMTimeout != null) { return }\n this.readDOMTimeout = setTimeout(function () {\n this$1.readDOMTimeout = null;\n if (this$1.composing) {\n if (this$1.composing.done) { this$1.composing = null; }\n else { return }\n }\n this$1.updateFromDOM();\n }, 80);\n};\n\nContentEditableInput.prototype.updateFromDOM = function () {\n var this$1 = this;\n\n if (this.cm.isReadOnly() || !this.pollContent())\n { runInOp(this.cm, function () { return regChange(this$1.cm); }); }\n};\n\nContentEditableInput.prototype.setUneditable = function (node) {\n node.contentEditable = \"false\";\n};\n\nContentEditableInput.prototype.onKeyPress = function (e) {\n if (e.charCode == 0 || this.composing) { return }\n e.preventDefault();\n if (!this.cm.isReadOnly())\n { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); }\n};\n\nContentEditableInput.prototype.readOnlyChanged = function (val) {\n this.div.contentEditable = String(val != \"nocursor\");\n};\n\nContentEditableInput.prototype.onContextMenu = function () {};\nContentEditableInput.prototype.resetPosition = function () {};\n\nContentEditableInput.prototype.needsContentAttribute = true;\n\nfunction posToDOM(cm, pos) {\n var view = findViewForLine(cm, pos.line);\n if (!view || view.hidden) { return null }\n var line = getLine(cm.doc, pos.line);\n var info = mapFromLineView(view, line, pos.line);\n\n var order = getOrder(line, cm.doc.direction), side = \"left\";\n if (order) {\n var partPos = getBidiPartAt(order, pos.ch);\n side = partPos % 2 ? \"right\" : \"left\";\n }\n var result = nodeAndOffsetInLineMap(info.map, pos.ch, side);\n result.offset = result.collapse == \"right\" ? result.end : result.start;\n return result\n}\n\nfunction isInGutter(node) {\n for (var scan = node; scan; scan = scan.parentNode)\n { if (/CodeMirror-gutter-wrapper/.test(scan.className)) { return true } }\n return false\n}\n\nfunction badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }\n\nfunction domTextBetween(cm, from, to, fromLine, toLine) {\n var text = \"\", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false;\n function recognizeMarker(id) { return function (marker) { return marker.id == id; } }\n function close() {\n if (closing) {\n text += lineSep;\n if (extraLinebreak) { text += lineSep; }\n closing = extraLinebreak = false;\n }\n }\n function addText(str) {\n if (str) {\n close();\n text += str;\n }\n }\n function walk(node) {\n if (node.nodeType == 1) {\n var cmText = node.getAttribute(\"cm-text\");\n if (cmText) {\n addText(cmText);\n return\n }\n var markerID = node.getAttribute(\"cm-marker\"), range$$1;\n if (markerID) {\n var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));\n if (found.length && (range$$1 = found[0].find(0)))\n { addText(getBetween(cm.doc, range$$1.from, range$$1.to).join(lineSep)); }\n return\n }\n if (node.getAttribute(\"contenteditable\") == \"false\") { return }\n var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName);\n if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return }\n\n if (isBlock) { close(); }\n for (var i = 0; i < node.childNodes.length; i++)\n { walk(node.childNodes[i]); }\n\n if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; }\n if (isBlock) { closing = true; }\n } else if (node.nodeType == 3) {\n addText(node.nodeValue.replace(/\\u200b/g, \"\").replace(/\\u00a0/g, \" \"));\n }\n }\n for (;;) {\n walk(from);\n if (from == to) { break }\n from = from.nextSibling;\n extraLinebreak = false;\n }\n return text\n}\n\nfunction domToPos(cm, node, offset) {\n var lineNode;\n if (node == cm.display.lineDiv) {\n lineNode = cm.display.lineDiv.childNodes[offset];\n if (!lineNode) { return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true) }\n node = null; offset = 0;\n } else {\n for (lineNode = node;; lineNode = lineNode.parentNode) {\n if (!lineNode || lineNode == cm.display.lineDiv) { return null }\n if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) { break }\n }\n }\n for (var i = 0; i < cm.display.view.length; i++) {\n var lineView = cm.display.view[i];\n if (lineView.node == lineNode)\n { return locateNodeInLineView(lineView, node, offset) }\n }\n}\n\nfunction locateNodeInLineView(lineView, node, offset) {\n var wrapper = lineView.text.firstChild, bad = false;\n if (!node || !contains(wrapper, node)) { return badPos(Pos(lineNo(lineView.line), 0), true) }\n if (node == wrapper) {\n bad = true;\n node = wrapper.childNodes[offset];\n offset = 0;\n if (!node) {\n var line = lineView.rest ? lst(lineView.rest) : lineView.line;\n return badPos(Pos(lineNo(line), line.text.length), bad)\n }\n }\n\n var textNode = node.nodeType == 3 ? node : null, topNode = node;\n if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {\n textNode = node.firstChild;\n if (offset) { offset = textNode.nodeValue.length; }\n }\n while (topNode.parentNode != wrapper) { topNode = topNode.parentNode; }\n var measure = lineView.measure, maps = measure.maps;\n\n function find(textNode, topNode, offset) {\n for (var i = -1; i < (maps ? maps.length : 0); i++) {\n var map$$1 = i < 0 ? measure.map : maps[i];\n for (var j = 0; j < map$$1.length; j += 3) {\n var curNode = map$$1[j + 2];\n if (curNode == textNode || curNode == topNode) {\n var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);\n var ch = map$$1[j] + offset;\n if (offset < 0 || curNode != textNode) { ch = map$$1[j + (offset ? 1 : 0)]; }\n return Pos(line, ch)\n }\n }\n }\n }\n var found = find(textNode, topNode, offset);\n if (found) { return badPos(found, bad) }\n\n // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems\n for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {\n found = find(after, after.firstChild, 0);\n if (found)\n { return badPos(Pos(found.line, found.ch - dist), bad) }\n else\n { dist += after.textContent.length; }\n }\n for (var before = topNode.previousSibling, dist$1 = offset; before; before = before.previousSibling) {\n found = find(before, before.firstChild, -1);\n if (found)\n { return badPos(Pos(found.line, found.ch + dist$1), bad) }\n else\n { dist$1 += before.textContent.length; }\n }\n}\n\n// TEXTAREA INPUT STYLE\n\nvar TextareaInput = function(cm) {\n this.cm = cm;\n // See input.poll and input.reset\n this.prevInput = \"\";\n\n // Flag that indicates whether we expect input to appear real soon\n // now (after some event like 'keypress' or 'input') and are\n // polling intensively.\n this.pollingFast = false;\n // Self-resetting timeout for the poller\n this.polling = new Delayed();\n // Used to work around IE issue with selection being forgotten when focus moves away from textarea\n this.hasSelection = false;\n this.composing = null;\n};\n\nTextareaInput.prototype.init = function (display) {\n var this$1 = this;\n\n var input = this, cm = this.cm;\n this.createField(display);\n var te = this.textarea;\n\n display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild);\n\n // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)\n if (ios) { te.style.width = \"0px\"; }\n\n on(te, \"input\", function () {\n if (ie && ie_version >= 9 && this$1.hasSelection) { this$1.hasSelection = null; }\n input.poll();\n });\n\n on(te, \"paste\", function (e) {\n if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }\n\n cm.state.pasteIncoming = true;\n input.fastPoll();\n });\n\n function prepareCopyCut(e) {\n if (signalDOMEvent(cm, e)) { return }\n if (cm.somethingSelected()) {\n setLastCopied({lineWise: false, text: cm.getSelections()});\n } else if (!cm.options.lineWiseCopyCut) {\n return\n } else {\n var ranges = copyableRanges(cm);\n setLastCopied({lineWise: true, text: ranges.text});\n if (e.type == \"cut\") {\n cm.setSelections(ranges.ranges, null, sel_dontScroll);\n } else {\n input.prevInput = \"\";\n te.value = ranges.text.join(\"\\n\");\n selectInput(te);\n }\n }\n if (e.type == \"cut\") { cm.state.cutIncoming = true; }\n }\n on(te, \"cut\", prepareCopyCut);\n on(te, \"copy\", prepareCopyCut);\n\n on(display.scroller, \"paste\", function (e) {\n if (eventInWidget(display, e) || signalDOMEvent(cm, e)) { return }\n cm.state.pasteIncoming = true;\n input.focus();\n });\n\n // Prevent normal selection in the editor (we handle our own)\n on(display.lineSpace, \"selectstart\", function (e) {\n if (!eventInWidget(display, e)) { e_preventDefault(e); }\n });\n\n on(te, \"compositionstart\", function () {\n var start = cm.getCursor(\"from\");\n if (input.composing) { input.composing.range.clear(); }\n input.composing = {\n start: start,\n range: cm.markText(start, cm.getCursor(\"to\"), {className: \"CodeMirror-composing\"})\n };\n });\n on(te, \"compositionend\", function () {\n if (input.composing) {\n input.poll();\n input.composing.range.clear();\n input.composing = null;\n }\n });\n};\n\nTextareaInput.prototype.createField = function (_display) {\n // Wraps and hides input textarea\n this.wrapper = hiddenTextarea();\n // The semihidden textarea that is focused when the editor is\n // focused, and receives input.\n this.textarea = this.wrapper.firstChild;\n};\n\nTextareaInput.prototype.prepareSelection = function () {\n // Redraw the selection and/or cursor\n var cm = this.cm, display = cm.display, doc = cm.doc;\n var result = prepareSelection(cm);\n\n // Move the hidden textarea near the cursor to prevent scrolling artifacts\n if (cm.options.moveInputWithCursor) {\n var headPos = cursorCoords(cm, doc.sel.primary().head, \"div\");\n var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();\n result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,\n headPos.top + lineOff.top - wrapOff.top));\n result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,\n headPos.left + lineOff.left - wrapOff.left));\n }\n\n return result\n};\n\nTextareaInput.prototype.showSelection = function (drawn) {\n var cm = this.cm, display = cm.display;\n removeChildrenAndAdd(display.cursorDiv, drawn.cursors);\n removeChildrenAndAdd(display.selectionDiv, drawn.selection);\n if (drawn.teTop != null) {\n this.wrapper.style.top = drawn.teTop + \"px\";\n this.wrapper.style.left = drawn.teLeft + \"px\";\n }\n};\n\n// Reset the input to correspond to the selection (or to be empty,\n// when not typing and nothing is selected)\nTextareaInput.prototype.reset = function (typing) {\n if (this.contextMenuPending || this.composing) { return }\n var cm = this.cm;\n if (cm.somethingSelected()) {\n this.prevInput = \"\";\n var content = cm.getSelection();\n this.textarea.value = content;\n if (cm.state.focused) { selectInput(this.textarea); }\n if (ie && ie_version >= 9) { this.hasSelection = content; }\n } else if (!typing) {\n this.prevInput = this.textarea.value = \"\";\n if (ie && ie_version >= 9) { this.hasSelection = null; }\n }\n};\n\nTextareaInput.prototype.getField = function () { return this.textarea };\n\nTextareaInput.prototype.supportsTouch = function () { return false };\n\nTextareaInput.prototype.focus = function () {\n if (this.cm.options.readOnly != \"nocursor\" && (!mobile || activeElt() != this.textarea)) {\n try { this.textarea.focus(); }\n catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM\n }\n};\n\nTextareaInput.prototype.blur = function () { this.textarea.blur(); };\n\nTextareaInput.prototype.resetPosition = function () {\n this.wrapper.style.top = this.wrapper.style.left = 0;\n};\n\nTextareaInput.prototype.receivedFocus = function () { this.slowPoll(); };\n\n// Poll for input changes, using the normal rate of polling. This\n// runs as long as the editor is focused.\nTextareaInput.prototype.slowPoll = function () {\n var this$1 = this;\n\n if (this.pollingFast) { return }\n this.polling.set(this.cm.options.pollInterval, function () {\n this$1.poll();\n if (this$1.cm.state.focused) { this$1.slowPoll(); }\n });\n};\n\n// When an event has just come in that is likely to add or change\n// something in the input textarea, we poll faster, to ensure that\n// the change appears on the screen quickly.\nTextareaInput.prototype.fastPoll = function () {\n var missed = false, input = this;\n input.pollingFast = true;\n function p() {\n var changed = input.poll();\n if (!changed && !missed) {missed = true; input.polling.set(60, p);}\n else {input.pollingFast = false; input.slowPoll();}\n }\n input.polling.set(20, p);\n};\n\n// Read input from the textarea, and update the document to match.\n// When something is selected, it is present in the textarea, and\n// selected (unless it is huge, in which case a placeholder is\n// used). When nothing is selected, the cursor sits after previously\n// seen text (can be empty), which is stored in prevInput (we must\n// not reset the textarea when typing, because that breaks IME).\nTextareaInput.prototype.poll = function () {\n var this$1 = this;\n\n var cm = this.cm, input = this.textarea, prevInput = this.prevInput;\n // Since this is called a *lot*, try to bail out as cheaply as\n // possible when it is clear that nothing happened. hasSelection\n // will be the case when there is a lot of text in the textarea,\n // in which case reading its value would be expensive.\n if (this.contextMenuPending || !cm.state.focused ||\n (hasSelection(input) && !prevInput && !this.composing) ||\n cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)\n { return false }\n\n var text = input.value;\n // If nothing changed, bail.\n if (text == prevInput && !cm.somethingSelected()) { return false }\n // Work around nonsensical selection resetting in IE9/10, and\n // inexplicable appearance of private area unicode characters on\n // some key combos in Mac (#2689).\n if (ie && ie_version >= 9 && this.hasSelection === text ||\n mac && /[\\uf700-\\uf7ff]/.test(text)) {\n cm.display.input.reset();\n return false\n }\n\n if (cm.doc.sel == cm.display.selForContextMenu) {\n var first = text.charCodeAt(0);\n if (first == 0x200b && !prevInput) { prevInput = \"\\u200b\"; }\n if (first == 0x21da) { this.reset(); return this.cm.execCommand(\"undo\") }\n }\n // Find the part of the input that is actually new\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) { ++same; }\n\n runInOp(cm, function () {\n applyTextInput(cm, text.slice(same), prevInput.length - same,\n null, this$1.composing ? \"*compose\" : null);\n\n // Don't leave long text in the textarea, since it makes further polling slow\n if (text.length > 1000 || text.indexOf(\"\\n\") > -1) { input.value = this$1.prevInput = \"\"; }\n else { this$1.prevInput = text; }\n\n if (this$1.composing) {\n this$1.composing.range.clear();\n this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor(\"to\"),\n {className: \"CodeMirror-composing\"});\n }\n });\n return true\n};\n\nTextareaInput.prototype.ensurePolled = function () {\n if (this.pollingFast && this.poll()) { this.pollingFast = false; }\n};\n\nTextareaInput.prototype.onKeyPress = function () {\n if (ie && ie_version >= 9) { this.hasSelection = null; }\n this.fastPoll();\n};\n\nTextareaInput.prototype.onContextMenu = function (e) {\n var input = this, cm = input.cm, display = cm.display, te = input.textarea;\n var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;\n if (!pos || presto) { return } // Opera is difficult.\n\n // Reset the current text selection only if the click is done outside of the selection\n // and 'resetSelectionOnContextMenu' option is true.\n var reset = cm.options.resetSelectionOnContextMenu;\n if (reset && cm.doc.sel.contains(pos) == -1)\n { operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); }\n\n var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText;\n input.wrapper.style.cssText = \"position: absolute\";\n var wrapperBox = input.wrapper.getBoundingClientRect();\n te.style.cssText = \"position: absolute; width: 30px; height: 30px;\\n top: \" + (e.clientY - wrapperBox.top - 5) + \"px; left: \" + (e.clientX - wrapperBox.left - 5) + \"px;\\n z-index: 1000; background: \" + (ie ? \"rgba(255, 255, 255, .05)\" : \"transparent\") + \";\\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);\";\n var oldScrollY;\n if (webkit) { oldScrollY = window.scrollY; } // Work around Chrome issue (#2712)\n display.input.focus();\n if (webkit) { window.scrollTo(null, oldScrollY); }\n display.input.reset();\n // Adds \"Select all\" to context menu in FF\n if (!cm.somethingSelected()) { te.value = input.prevInput = \" \"; }\n input.contextMenuPending = true;\n display.selForContextMenu = cm.doc.sel;\n clearTimeout(display.detectingSelectAll);\n\n // Select-all will be greyed out if there's nothing to select, so\n // this adds a zero-width space so that we can later check whether\n // it got selected.\n function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = \"\\u200b\" + (selected ? te.value : \"\");\n te.value = \"\\u21da\"; // Used to catch context-menu undo\n te.value = extval;\n input.prevInput = selected ? \"\" : \"\\u200b\";\n te.selectionStart = 1; te.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }\n function rehide() {\n input.contextMenuPending = false;\n input.wrapper.style.cssText = oldWrapperCSS;\n te.style.cssText = oldCSS;\n if (ie && ie_version < 9) { display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); }\n\n // Try to detect the user choosing select-all\n if (te.selectionStart != null) {\n if (!ie || (ie && ie_version < 9)) { prepareSelectAllHack(); }\n var i = 0, poll = function () {\n if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&\n te.selectionEnd > 0 && input.prevInput == \"\\u200b\") {\n operation(cm, selectAll)(cm);\n } else if (i++ < 10) {\n display.detectingSelectAll = setTimeout(poll, 500);\n } else {\n display.selForContextMenu = null;\n display.input.reset();\n }\n };\n display.detectingSelectAll = setTimeout(poll, 200);\n }\n }\n\n if (ie && ie_version >= 9) { prepareSelectAllHack(); }\n if (captureRightClick) {\n e_stop(e);\n var mouseup = function () {\n off(window, \"mouseup\", mouseup);\n setTimeout(rehide, 20);\n };\n on(window, \"mouseup\", mouseup);\n } else {\n setTimeout(rehide, 50);\n }\n};\n\nTextareaInput.prototype.readOnlyChanged = function (val) {\n if (!val) { this.reset(); }\n this.textarea.disabled = val == \"nocursor\";\n};\n\nTextareaInput.prototype.setUneditable = function () {};\n\nTextareaInput.prototype.needsContentAttribute = false;\n\nfunction fromTextArea(textarea, options) {\n options = options ? copyObj(options) : {};\n options.value = textarea.value;\n if (!options.tabindex && textarea.tabIndex)\n { options.tabindex = textarea.tabIndex; }\n if (!options.placeholder && textarea.placeholder)\n { options.placeholder = textarea.placeholder; }\n // Set autofocus to true if this textarea is focused, or if it has\n // autofocus and no other element is focused.\n if (options.autofocus == null) {\n var hasFocus = activeElt();\n options.autofocus = hasFocus == textarea ||\n textarea.getAttribute(\"autofocus\") != null && hasFocus == document.body;\n }\n\n function save() {textarea.value = cm.getValue();}\n\n var realSubmit;\n if (textarea.form) {\n on(textarea.form, \"submit\", save);\n // Deplorable hack to make the submit method do the right thing.\n if (!options.leaveSubmitMethodAlone) {\n var form = textarea.form;\n realSubmit = form.submit;\n try {\n var wrappedSubmit = form.submit = function () {\n save();\n form.submit = realSubmit;\n form.submit();\n form.submit = wrappedSubmit;\n };\n } catch(e) {}\n }\n }\n\n options.finishInit = function (cm) {\n cm.save = save;\n cm.getTextArea = function () { return textarea; };\n cm.toTextArea = function () {\n cm.toTextArea = isNaN; // Prevent this from being ran twice\n save();\n textarea.parentNode.removeChild(cm.getWrapperElement());\n textarea.style.display = \"\";\n if (textarea.form) {\n off(textarea.form, \"submit\", save);\n if (typeof textarea.form.submit == \"function\")\n { textarea.form.submit = realSubmit; }\n }\n };\n };\n\n textarea.style.display = \"none\";\n var cm = CodeMirror$1(function (node) { return textarea.parentNode.insertBefore(node, textarea.nextSibling); },\n options);\n return cm\n}\n\nfunction addLegacyProps(CodeMirror) {\n CodeMirror.off = off;\n CodeMirror.on = on;\n CodeMirror.wheelEventPixels = wheelEventPixels;\n CodeMirror.Doc = Doc;\n CodeMirror.splitLines = splitLinesAuto;\n CodeMirror.countColumn = countColumn;\n CodeMirror.findColumn = findColumn;\n CodeMirror.isWordChar = isWordCharBasic;\n CodeMirror.Pass = Pass;\n CodeMirror.signal = signal;\n CodeMirror.Line = Line;\n CodeMirror.changeEnd = changeEnd;\n CodeMirror.scrollbarModel = scrollbarModel;\n CodeMirror.Pos = Pos;\n CodeMirror.cmpPos = cmp;\n CodeMirror.modes = modes;\n CodeMirror.mimeModes = mimeModes;\n CodeMirror.resolveMode = resolveMode;\n CodeMirror.getMode = getMode;\n CodeMirror.modeExtensions = modeExtensions;\n CodeMirror.extendMode = extendMode;\n CodeMirror.copyState = copyState;\n CodeMirror.startState = startState;\n CodeMirror.innerMode = innerMode;\n CodeMirror.commands = commands;\n CodeMirror.keyMap = keyMap;\n CodeMirror.keyName = keyName;\n CodeMirror.isModifierKey = isModifierKey;\n CodeMirror.lookupKey = lookupKey;\n CodeMirror.normalizeKeyMap = normalizeKeyMap;\n CodeMirror.StringStream = StringStream;\n CodeMirror.SharedTextMarker = SharedTextMarker;\n CodeMirror.TextMarker = TextMarker;\n CodeMirror.LineWidget = LineWidget;\n CodeMirror.e_preventDefault = e_preventDefault;\n CodeMirror.e_stopPropagation = e_stopPropagation;\n CodeMirror.e_stop = e_stop;\n CodeMirror.addClass = addClass;\n CodeMirror.contains = contains;\n CodeMirror.rmClass = rmClass;\n CodeMirror.keyNames = keyNames;\n}\n\n// EDITOR CONSTRUCTOR\n\ndefineOptions(CodeMirror$1);\n\naddEditorMethods(CodeMirror$1);\n\n// Set up methods on CodeMirror's prototype to redirect to the editor's document.\nvar dontDelegate = \"iter insert remove copy getEditor constructor\".split(\" \");\nfor (var prop in Doc.prototype) { if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)\n { CodeMirror$1.prototype[prop] = (function(method) {\n return function() {return method.apply(this.doc, arguments)}\n })(Doc.prototype[prop]); } }\n\neventMixin(Doc);\n\n// INPUT HANDLING\n\nCodeMirror$1.inputStyles = {\"textarea\": TextareaInput, \"contenteditable\": ContentEditableInput};\n\n// MODE DEFINITION AND QUERYING\n\n// Extra arguments are stored as the mode's dependencies, which is\n// used by (legacy) mechanisms like loadmode.js to automatically\n// load a mode. (Preferred mechanism is the require/define calls.)\nCodeMirror$1.defineMode = function(name/*, mode, …*/) {\n if (!CodeMirror$1.defaults.mode && name != \"null\") { CodeMirror$1.defaults.mode = name; }\n defineMode.apply(this, arguments);\n};\n\nCodeMirror$1.defineMIME = defineMIME;\n\n// Minimal default mode.\nCodeMirror$1.defineMode(\"null\", function () { return ({token: function (stream) { return stream.skipToEnd(); }}); });\nCodeMirror$1.defineMIME(\"text/plain\", \"null\");\n\n// EXTENSIONS\n\nCodeMirror$1.defineExtension = function (name, func) {\n CodeMirror$1.prototype[name] = func;\n};\nCodeMirror$1.defineDocExtension = function (name, func) {\n Doc.prototype[name] = func;\n};\n\nCodeMirror$1.fromTextArea = fromTextArea;\n\naddLegacyProps(CodeMirror$1);\n\nCodeMirror$1.version = \"5.39.0\";\n\nreturn CodeMirror$1;\n\n})));\n","import _ from 'underscore';\nimport Backbone from 'backbone';\nconst SelectPosition = require('./SelectPosition');\nconst $ = Backbone.$;\n\nmodule.exports = _.extend({}, SelectPosition, {\n init(opt) {\n _.bindAll(this, 'startDraw', 'draw', 'endDraw', 'rollback');\n this.config = opt || {};\n this.hType = this.config.newFixedH ? 'height' : 'min-height';\n this.allowDraw = 1;\n },\n\n /**\n * Start with enabling to select position and listening to start drawning\n * @private\n * */\n enable(...args) {\n SelectPosition.enable.apply(this, args);\n this.$wr.css('cursor', 'crosshair');\n if (this.allowDraw) this.$wr.on('mousedown', this.startDraw);\n this.ghost = this.canvas.getGhostEl();\n },\n\n /**\n * Start drawing component\n * @param {Object} e Event\n * @private\n * */\n startDraw(e) {\n e.preventDefault();\n this.stopSelectPosition();\n this.ghost.style.display = 'block';\n this.frameOff = this.getOffsetDim();\n this.startPos = {\n top: e.pageY + this.frameOff.top,\n left: e.pageX + this.frameOff.left\n };\n this.isDragged = false;\n this.tempComponent = { style: {} };\n this.beforeDraw(this.tempComponent);\n this.updateSize(this.startPos.top, this.startPos.left, 0, 0);\n this.toggleEvents(1);\n },\n\n /**\n * Enable/Disable events\n * @param {Boolean} enable\n */\n toggleEvents(enable) {\n var method = enable ? 'on' : 'off';\n this.$wr[method]('mousemove', this.draw);\n this.$wr[method]('mouseup', this.endDraw);\n this.$canvas[method]('mousemove', this.draw);\n $(document)[method]('mouseup', this.endDraw);\n $(document)[method]('keypress', this.rollback);\n },\n\n /**\n * While drawing the component\n * @param {Object} e Event\n * @private\n * */\n draw(e) {\n this.isDragged = true;\n this.updateComponentSize(e);\n },\n\n /**\n * End drawing component\n * @param {Object} e Event\n * @private\n * */\n endDraw(e) {\n this.toggleEvents();\n var model = {};\n // Only if the mouse was moved\n if (this.isDragged) {\n this.updateComponentSize(e);\n this.setRequirements(this.tempComponent);\n var lp = this.sorter.lastPos;\n model = this.create(\n this.sorter.target,\n this.tempComponent,\n lp.index,\n lp.method\n );\n this.sorter.prevTarget = null;\n }\n this.ghost.style.display = 'none';\n this.startSelectPosition();\n this.afterDraw(model);\n },\n\n /**\n * Create new component inside the target\n * @param {Object} target Tha target collection\n * @param {Object} component New component to create\n * @param {number} index Index inside the collection, 0 if no children inside\n * @param {string} method Before or after of the children\n * @param {Object} opts Options\n */\n create(target, component, index, method, opts) {\n index = method === 'after' ? index + 1 : index;\n var opt = opts || {};\n var $trg = $(target);\n var trgModel = $trg.data('model');\n var trgCollection = $trg.data('collection');\n var droppable = trgModel ? trgModel.get('droppable') : 1;\n opt.at = index;\n if (trgCollection && droppable) return trgCollection.add(component, opt);\n else console.warn('Invalid target position');\n },\n\n /**\n * Check and set basic requirements for the component\n * @param {Object} component New component to be created\n * @return {Object} Component updated\n * @private\n * */\n setRequirements(component) {\n var c = this.config;\n var compStl = component.style;\n // Check min width\n if (compStl.width.replace(/\\D/g, '') < c.minComponentW)\n compStl.width = c.minComponentW + 'px';\n // Check min height\n if (compStl[this.hType].replace(/\\D/g, '') < c.minComponentH)\n compStl[this.hType] = c.minComponentH + 'px';\n // Set overflow in case of fixed height\n if (c.newFixedH) compStl.overflow = 'auto';\n if (!this.absoluteMode) {\n delete compStl.left;\n delete compStl.top;\n } else compStl.position = 'absolute';\n var lp = this.sorter.lastPos;\n\n if (this.nearFloat(lp.index, lp.method, this.sorter.lastDims))\n compStl.float = 'left';\n\n if (\n this.config.firstCentered &&\n this.getCanvasWrapper() == this.sorter.target\n ) {\n compStl.margin = '0 auto';\n }\n\n return component;\n },\n\n /**\n * Update new component size while drawing\n * @param {Object} e Event\n * @private\n * */\n updateComponentSize(e) {\n var y = e.pageY + this.frameOff.top;\n var x = e.pageX + this.frameOff.left;\n var start = this.startPos;\n var top = start.top;\n var left = start.left;\n var height = y - top;\n var width = x - left;\n if (x < left) {\n left = x;\n width = start.left - x;\n }\n if (y < top) {\n top = y;\n height = start.top - y;\n }\n this.updateSize(top, left, width, height);\n },\n\n /**\n * Update size\n * @private\n */\n updateSize(top, left, width, height) {\n var u = 'px';\n var ghStl = this.ghost.style;\n var compStl = this.tempComponent.style;\n ghStl.top = compStl.top = top + u;\n ghStl.left = compStl.left = left + u;\n ghStl.width = compStl.width = width + u;\n ghStl[this.hType] = compStl[this.hType] = height + u;\n },\n\n /**\n * Used to bring the previous situation before event started\n * @param {Object} e Event\n * @param {Boolean} forse Indicates if rollback in anycase\n * @private\n * */\n rollback(e, force) {\n var key = e.which || e.keyCode;\n if (key == this.config.ESCAPE_KEY || force) {\n this.isDragged = false;\n this.endDraw();\n }\n return;\n },\n\n /**\n * This event is triggered at the beginning of a draw operation\n * @param {Object} component Object component before creation\n * @private\n * */\n beforeDraw(component) {\n component.editable = false; //set this component editable\n },\n\n /**\n * This event is triggered at the end of a draw operation\n * @param {Object} model Component model created\n * @private\n * */\n afterDraw(model) {},\n\n run(editor, sender, opts) {\n this.editor = editor;\n this.sender = sender;\n this.$wr = this.$wrapper;\n this.enable();\n },\n\n stop() {\n this.stopSelectPosition();\n this.$wrapper.css('cursor', '');\n this.$wrapper.unbind();\n }\n});\n","import { bindAll, isElement, isUndefined } from 'underscore';\nimport { on, off, getUnitFromValue } from 'utils/mixins';\n\nconst ToolbarView = require('dom_components/view/ToolbarView');\nconst Toolbar = require('dom_components/model/Toolbar');\nconst key = require('keymaster');\nconst $ = require('backbone').$;\nlet showOffsets;\n\nmodule.exports = {\n init(o) {\n bindAll(this, 'onHover', 'onOut', 'onClick', 'onFrameScroll');\n },\n\n enable() {\n this.frameOff = this.canvasOff = this.adjScroll = null;\n var config = this.config.em.get('Config');\n this.startSelectComponent();\n var em = this.config.em;\n showOffsets = 1;\n\n em.on('component:update', this.updateAttached, this);\n em.on('change:canvasOffset', this.updateAttached, this);\n },\n\n /**\n * Start select component event\n * @private\n * */\n startSelectComponent() {\n this.toggleSelectComponent(1);\n },\n\n /**\n * Stop select component event\n * @private\n * */\n stopSelectComponent() {\n this.toggleSelectComponent();\n },\n\n /**\n * Toggle select component event\n * @private\n * */\n toggleSelectComponent(enable) {\n const em = this.em;\n const method = enable ? 'on' : 'off';\n const methods = { on, off };\n const body = this.getCanvasBody();\n const win = this.getContentWindow();\n methods[method](body, 'mouseover', this.onHover);\n methods[method](body, 'mouseout', this.onOut);\n methods[method](body, 'click', this.onClick);\n methods[method](win, 'scroll resize', this.onFrameScroll);\n em[method]('component:toggled', this.onSelect, this);\n em[method]('change:componentHovered', this.onHovered, this);\n },\n\n /**\n * Hover command\n * @param {Object} e\n * @private\n */\n onHover(e) {\n e.stopPropagation();\n let trg = e.target;\n let model = $(trg).data('model');\n\n // Adjust tools scroll top\n if (!this.adjScroll) {\n this.adjScroll = 1;\n this.updateAttached();\n }\n\n if (model && !model.get('hoverable')) {\n let parent = model && model.parent();\n while (parent && !parent.get('hoverable')) parent = parent.parent();\n model = parent;\n }\n\n this.em.setHovered(model, { forceChange: 1 });\n },\n\n onHovered(em, component) {\n const trg = component && component.getEl();\n if (trg) {\n const pos = this.getElementPos(trg);\n this.updateBadge(trg, pos);\n this.updateHighlighter(trg, pos);\n this.showElementOffset(trg, pos);\n }\n },\n\n /**\n * Out command\n * @param {Object} e\n * @private\n */\n onOut(e) {\n e.stopPropagation();\n this.hideBadge();\n this.hideHighlighter();\n this.hideElementOffset();\n },\n\n /**\n * Show element offset viewer\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n showElementOffset(el, pos) {\n var $el = $(el);\n var model = $el.data('model');\n\n if ((model && model.get('status') == 'selected') || !showOffsets) {\n return;\n }\n\n this.editor.runCommand('show-offset', {\n el,\n elPos: pos\n });\n },\n\n /**\n * Hide element offset viewer\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n hideElementOffset(el, pos) {\n this.editor.stopCommand('show-offset');\n },\n\n /**\n * Show fixed element offset viewer\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n showFixedElementOffset(el, pos) {\n this.editor.runCommand('show-offset', {\n el,\n elPos: pos,\n state: 'Fixed'\n });\n },\n\n /**\n * Hide fixed element offset viewer\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n hideFixedElementOffset(el, pos) {\n if (this.editor) this.editor.stopCommand('show-offset', { state: 'Fixed' });\n },\n\n /**\n * Hide Highlighter element\n */\n hideHighlighter() {\n this.canvas.getHighlighter().style.display = 'none';\n },\n\n /**\n * On element click\n * @param {Event} e\n * @private\n */\n onClick(e) {\n e.stopPropagation();\n const $el = $(e.target);\n const editor = this.editor;\n let model = $el.data('model');\n\n if (!model) {\n let parent = $el.parent();\n while (!model && parent) {\n model = parent.data('model');\n parent = parent.parent();\n }\n }\n\n if (model) {\n if (model.get('selectable')) {\n this.select(model, e);\n } else {\n let parent = model.parent();\n while (parent && !parent.get('selectable')) parent = parent.parent();\n this.select(parent, e);\n }\n }\n },\n\n /**\n * Select component\n * @param {Component} model\n * @param {Event} event\n */\n select(model, event = {}) {\n if (!model) return;\n const ctrlKey = event.ctrlKey || event.metaKey;\n const shiftKey = event.shiftKey;\n const { editor } = this;\n const multiple = editor.getConfig('multipleSelection');\n const em = this.em;\n\n if (ctrlKey && multiple) {\n editor.selectToggle(model);\n } else if (shiftKey && multiple) {\n em.clearSelection(editor.Canvas.getWindow());\n const coll = model.collection;\n const index = coll.indexOf(model);\n const selAll = editor.getSelectedAll();\n let min, max;\n\n // Fin min and max siblings\n editor.getSelectedAll().forEach(sel => {\n const selColl = sel.collection;\n const selIndex = selColl.indexOf(sel);\n if (selColl === coll) {\n if (selIndex < index) {\n // First model BEFORE the selected one\n min = isUndefined(min) ? selIndex : Math.max(min, selIndex);\n } else if (selIndex > index) {\n // First model AFTER the selected one\n max = isUndefined(max) ? selIndex : Math.min(max, selIndex);\n }\n }\n });\n\n if (!isUndefined(min)) {\n while (min !== index) {\n editor.selectAdd(coll.at(min));\n min++;\n }\n }\n\n if (!isUndefined(max)) {\n while (max !== index) {\n editor.selectAdd(coll.at(max));\n max--;\n }\n }\n\n editor.selectAdd(model);\n } else {\n editor.select(model);\n }\n\n this.initResize(model);\n },\n\n /**\n * Update badge for the component\n * @param {Object} Component\n * @param {Object} pos Position object\n * @private\n * */\n updateBadge(el, pos) {\n var $el = $(el);\n var canvas = this.canvas;\n var config = canvas.getConfig();\n var customeLabel = config.customBadgeLabel;\n this.cacheEl = el;\n var model = $el.data('model');\n if (!model || !model.get('badgable')) return;\n var badge = this.getBadge();\n var badgeLabel = model.getIcon() + model.getName();\n badgeLabel = customeLabel ? customeLabel(model) : badgeLabel;\n badge.innerHTML = badgeLabel;\n var bStyle = badge.style;\n var u = 'px';\n bStyle.display = 'block';\n var canvasPos = canvas.getCanvasView().getPosition();\n if (canvasPos) {\n var badgeH = badge ? badge.offsetHeight : 0;\n var badgeW = badge ? badge.offsetWidth : 0;\n var top =\n pos.top - badgeH < canvasPos.top ? canvasPos.top : pos.top - badgeH;\n var left = pos.left + badgeW < canvasPos.left ? canvasPos.left : pos.left;\n bStyle.top = top + u;\n bStyle.left = left + u;\n }\n },\n\n /**\n * Update highlighter element\n * @param {HTMLElement} el\n * @param {Object} pos Position object\n * @private\n */\n updateHighlighter(el, pos) {\n var $el = $(el);\n var model = $el.data('model');\n\n if (\n !model ||\n !model.get('hoverable') ||\n model.get('status') == 'selected'\n ) {\n return;\n }\n\n var hlEl = this.canvas.getHighlighter();\n var hlStyle = hlEl.style;\n var unit = 'px';\n hlStyle.left = pos.left + unit;\n hlStyle.top = pos.top + unit;\n hlStyle.height = pos.height + unit;\n hlStyle.width = pos.width + unit;\n hlStyle.display = 'block';\n },\n\n /**\n * Say what to do after the component was selected\n * @param {Object} e\n * @param {Object} el\n * @private\n * */\n onSelect() {\n // Get the selected model directly from the Editor as the event might\n // be triggered manually without the model\n const model = this.em.getSelected();\n this.updateToolbar(model);\n\n if (model) {\n const el = model.view.el;\n this.showFixedElementOffset(el);\n this.hideElementOffset();\n this.hideHighlighter();\n this.initResize(el);\n } else {\n this.editor.stopCommand('resize');\n }\n },\n\n /**\n * Init resizer on the element if possible\n * @param {HTMLElement|Component} elem\n * @private\n */\n initResize(elem) {\n const em = this.em;\n const editor = em ? em.get('Editor') : '';\n const config = em ? em.get('Config') : '';\n const pfx = config.stylePrefix || '';\n const attrName = `data-${pfx}handler`;\n const resizeClass = `${pfx}resizing`;\n const model = !isElement(elem) ? elem : em.getSelected();\n const resizable = model.get('resizable');\n const el = isElement(elem) ? elem : model.getEl();\n let options = {};\n let modelToStyle;\n\n var toggleBodyClass = (method, e, opts) => {\n const docs = opts.docs;\n docs &&\n docs.forEach(doc => {\n const body = doc.body;\n const cls = body.className || '';\n body.className = (method == 'add'\n ? `${cls} ${resizeClass}`\n : cls.replace(resizeClass, '')\n ).trim();\n });\n };\n\n if (editor && resizable) {\n options = {\n // Here the resizer is updated with the current element height and width\n onStart(e, opts = {}) {\n const { el, config, resizer } = opts;\n const { keyHeight, keyWidth, currentUnit } = config;\n toggleBodyClass('add', e, opts);\n modelToStyle = em.get('StyleManager').getModelToStyle(model);\n const computedStyle = getComputedStyle(el);\n const modelStyle = modelToStyle.getStyle();\n const currentWidth = modelStyle[keyWidth] || computedStyle[keyWidth];\n const currentHeight =\n modelStyle[keyHeight] || computedStyle[keyHeight];\n resizer.startDim.w = parseFloat(currentWidth);\n resizer.startDim.h = parseFloat(currentHeight);\n showOffsets = 0;\n\n if (currentUnit) {\n config.unitHeight = getUnitFromValue(currentHeight);\n config.unitWidth = getUnitFromValue(currentWidth);\n }\n },\n\n // Update all positioned elements (eg. component toolbar)\n onMove() {\n editor.trigger('change:canvasOffset');\n },\n\n onEnd(e, opts) {\n toggleBodyClass('remove', e, opts);\n editor.trigger('change:canvasOffset');\n showOffsets = 1;\n },\n\n updateTarget(el, rect, options = {}) {\n if (!modelToStyle) {\n return;\n }\n\n const { store, selectedHandler, config } = options;\n const { keyHeight, keyWidth } = config;\n const onlyHeight = ['tc', 'bc'].indexOf(selectedHandler) >= 0;\n const onlyWidth = ['cl', 'cr'].indexOf(selectedHandler) >= 0;\n const style = modelToStyle.getStyle();\n\n if (!onlyHeight) {\n style[keyWidth] = rect.w + config.unitWidth;\n }\n\n if (!onlyWidth) {\n style[keyHeight] = rect.h + config.unitHeight;\n }\n\n modelToStyle.setStyle(style, { avoidStore: 1 });\n const updateEvent = `update:component:style`;\n em &&\n em.trigger(\n `${updateEvent}:${keyHeight} ${updateEvent}:${keyWidth}`\n );\n\n if (store) {\n modelToStyle.trigger('change:style', modelToStyle, style, {});\n }\n }\n };\n\n if (typeof resizable == 'object') {\n options = { ...options, ...resizable };\n }\n editor.runCommand('resize', { el, options });\n\n // On undo/redo the resizer rect is not updating, need somehow to call\n // this.updateRect on undo/redo action\n } else {\n editor.stopCommand('resize');\n }\n },\n\n /**\n * Update toolbar if the component has one\n * @param {Object} mod\n */\n updateToolbar(mod) {\n var em = this.config.em;\n var model = mod == em ? em.getSelected() : mod;\n var toolbarEl = this.canvas.getToolbarEl();\n var toolbarStyle = toolbarEl.style;\n\n if (!model) {\n // By putting `toolbarStyle.display = 'none'` will cause kind\n // of freezed effect with component selection (probably by iframe\n // switching)\n toolbarStyle.opacity = 0;\n return;\n }\n\n var toolbar = model.get('toolbar');\n var ppfx = this.ppfx;\n var showToolbar = em.get('Config').showToolbar;\n\n if (showToolbar && toolbar && toolbar.length) {\n toolbarStyle.opacity = '';\n toolbarStyle.display = '';\n if (!this.toolbar) {\n toolbarEl.innerHTML = '';\n this.toolbar = new Toolbar(toolbar);\n var toolbarView = new ToolbarView({\n collection: this.toolbar,\n editor: this.editor\n });\n toolbarEl.appendChild(toolbarView.render().el);\n }\n\n this.toolbar.reset(toolbar);\n const view = model.view;\n toolbarStyle.top = '-100px';\n toolbarStyle.left = 0;\n setTimeout(() => view && this.updateToolbarPos(view.el), 0);\n } else {\n toolbarStyle.display = 'none';\n }\n },\n\n /**\n * Update toolbar positions\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n updateToolbarPos(el, elPos) {\n var unit = 'px';\n var toolbarEl = this.canvas.getToolbarEl();\n var toolbarStyle = toolbarEl.style;\n toolbarStyle.opacity = 0;\n var pos = this.canvas.getTargetToElementDim(toolbarEl, el, {\n elPos,\n event: 'toolbarPosUpdate'\n });\n if (pos) {\n var leftPos = pos.left + pos.elementWidth - pos.targetWidth;\n toolbarStyle.top = pos.top + unit;\n toolbarStyle.left = (leftPos < 0 ? 0 : leftPos) + unit;\n toolbarStyle.opacity = '';\n }\n },\n\n /**\n * Return canvas dimensions and positions\n * @return {Object}\n */\n getCanvasPosition() {\n return this.canvas.getCanvasView().getPosition();\n },\n\n /**\n * Removes all highlighting effects on components\n * @private\n * */\n clean() {\n if (this.selEl) this.selEl.removeClass(this.hoverClass);\n },\n\n /**\n * Returns badge element\n * @return {HTMLElement}\n * @private\n */\n getBadge() {\n return this.canvas.getBadgeEl();\n },\n\n /**\n * On frame scroll callback\n * @private\n */\n onFrameScroll(e) {\n var el = this.cacheEl;\n if (el) {\n var elPos = this.getElementPos(el);\n this.updateBadge(el, elPos);\n var model = this.em.getSelected();\n\n if (model) {\n this.updateToolbarPos(model.view.el);\n }\n }\n },\n\n /**\n * Update attached elements, eg. component toolbar\n */\n updateAttached(updated) {\n const model = this.em.getSelected();\n\n if (model) {\n var view = model.view;\n this.updateToolbarPos(view.el);\n this.showFixedElementOffset(view.el);\n }\n },\n\n /**\n * Returns element's data info\n * @param {HTMLElement} el\n * @return {Object}\n * @private\n */\n getElementPos(el, badge) {\n return this.canvas.getCanvasView().getElementPos(el);\n },\n\n /**\n * Hide badge\n * @private\n * */\n hideBadge() {\n this.getBadge().style.display = 'none';\n },\n\n /**\n * Clean previous model from different states\n * @param {Component} model\n * @private\n */\n cleanPrevious(model) {\n model &&\n model.set({\n status: '',\n state: ''\n });\n },\n\n /**\n * Returns content window\n * @private\n */\n getContentWindow() {\n return this.frameEl.contentWindow;\n },\n\n run(editor) {\n this.editor = editor && editor.get('Editor');\n this.enable();\n this.onSelect();\n },\n\n stop(editor, sender, opts = {}) {\n const em = this.em;\n this.stopSelectComponent();\n !opts.preserveSelected && em.setSelected(null);\n this.clean();\n this.hideBadge();\n this.hideFixedElementOffset();\n this.canvas.getToolbarEl().style.display = 'none';\n\n em.off('component:update', this.updateAttached, this);\n em.off('change:canvasOffset', this.updateAttached, this);\n }\n};\n","import { isUndefined, clone } from 'underscore';\n\nconst Backbone = require('backbone');\nconst $ = Backbone.$;\n\nmodule.exports = Backbone.View.extend({\n events: {\n change: 'onChange'\n },\n\n attributes() {\n return this.model.get('attributes');\n },\n\n initialize(o) {\n const model = this.model;\n const name = model.get('name');\n const target = model.target;\n this.config = o.config || {};\n this.pfx = this.config.stylePrefix || '';\n this.ppfx = this.config.pStylePrefix || '';\n this.target = target;\n this.className = this.pfx + 'trait';\n this.labelClass = this.ppfx + 'label';\n this.fieldClass =\n this.ppfx + 'field ' + this.ppfx + 'field-' + model.get('type');\n this.inputhClass = this.ppfx + 'input-holder';\n model.off('change:value', this.onValueChange);\n this.listenTo(model, 'change:value', this.onValueChange);\n model.view = this;\n this.tmpl =\n '
';\n },\n\n /**\n * Fires when the input is changed\n * @private\n */\n onChange() {\n this.model.set('value', this.getInputEl().value);\n },\n\n getValueForTarget() {\n return this.model.get('value');\n },\n\n setInputValue(value) {\n this.getInputEl().value = value;\n },\n\n /**\n * On change callback\n * @private\n */\n onValueChange(model, value, opts = {}) {\n const mod = this.model;\n const trg = this.target;\n const name = mod.get('name');\n\n if (opts.fromTarget) {\n this.setInputValue(mod.get('value'));\n } else {\n const value = this.getValueForTarget();\n mod.setTargetValue(value, opts);\n }\n },\n\n /**\n * Render label\n * @private\n */\n renderLabel() {\n const label = this.getLabel();\n this.$el.html(\n `
${label}
`\n );\n },\n\n /**\n * Returns label for the input\n * @return {string}\n * @private\n */\n getLabel() {\n var model = this.model;\n var label = model.get('label') || model.get('name');\n return label.charAt(0).toUpperCase() + label.slice(1).replace(/-/g, ' ');\n },\n\n /**\n * Returns input element\n * @return {HTMLElement}\n * @private\n */\n getInputEl() {\n if (!this.$input) {\n const md = this.model;\n const plh = md.get('placeholder') || md.get('default') || '';\n const type = md.get('type') || 'text';\n const min = md.get('min');\n const max = md.get('max');\n const value = this.getModelValue();\n const input = $(``);\n\n if (value) {\n md.set({ value }, { silent: true });\n input.prop('value', value);\n }\n\n if (min) {\n input.prop('min', min);\n }\n\n if (max) {\n input.prop('max', max);\n }\n\n this.$input = input;\n }\n return this.$input.get(0);\n },\n\n getModelValue() {\n let value;\n const model = this.model;\n const target = this.target;\n const name = model.get('name');\n\n if (model.get('changeProp')) {\n value = target.get(name);\n } else {\n const attrs = target.get('attributes');\n value = model.get('value') || attrs[name];\n }\n\n return !isUndefined(value) ? value : '';\n },\n\n /**\n * Renders input\n * @private\n * */\n renderField() {\n if (!this.$input) {\n this.$el.append(this.tmpl);\n const el = this.getInputEl();\n // I use prepand expecially for checkbox traits\n const inputWrap = this.el.querySelector(`.${this.inputhClass}`);\n inputWrap.insertBefore(el, inputWrap.childNodes[0]);\n }\n },\n\n render() {\n this.renderLabel();\n this.renderField();\n this.el.className = this.className;\n return this;\n }\n});\n","var Backbone = require('backbone');\n\nconst TYPE_CLASS = 1;\nconst TYPE_ID = 2;\n\nconst Selector = Backbone.Model.extend(\n {\n idAttribute: 'name',\n\n defaults: {\n name: '',\n\n label: '',\n\n // Type of the selector\n type: TYPE_CLASS,\n\n // If not active it's not selectable by the style manager (uncheckboxed)\n active: true,\n\n // Can't be seen by the style manager, therefore even by the user\n // Will be rendered only in export code\n private: false,\n\n // If true, can't be removed from the attacched element\n protected: false\n },\n\n initialize() {\n const name = this.get('name');\n const label = this.get('label');\n\n if (!name) {\n this.set('name', label);\n } else if (!label) {\n this.set('label', name);\n }\n\n this.set('name', Selector.escapeName(this.get('name')));\n },\n\n /**\n * Get full selector name\n * @return {string}\n */\n getFullName() {\n let init = '';\n\n switch (this.get('type')) {\n case TYPE_CLASS:\n init = '.';\n break;\n case TYPE_ID:\n init = '#';\n break;\n }\n\n return init + this.get('name');\n }\n },\n {\n // All type selectors: https://developer.mozilla.org/it/docs/Web/CSS/CSS_Selectors\n // Here I define only what I need\n TYPE_CLASS,\n\n TYPE_ID,\n\n /**\n * Escape string\n * @param {string} name\n * @return {string}\n * @private\n */\n escapeName(name) {\n return `${name}`.trim().replace(/([^a-z0-9\\w-]+)/gi, '-');\n }\n }\n);\n\nmodule.exports = Selector;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","import _ from 'underscore';\nimport Backbone from 'backbone';\nvar CreateComponent = require('./CreateComponent');\n\nmodule.exports = _.extend({}, CreateComponent, {\n init(...args) {\n CreateComponent.init.apply(this, args);\n _.bindAll(this, 'insertComponent');\n this.allowDraw = 0;\n },\n\n /**\n * Run method\n * @private\n * */\n run(em, sender, options) {\n this.em = em;\n this.sender = sender;\n this.opt = options || {};\n this.$wr = this.$wrapper;\n this.enable();\n },\n\n enable(...args) {\n CreateComponent.enable.apply(this, args);\n this.$wr.on('click', this.insertComponent);\n },\n\n /**\n * Start insert event\n * @private\n * */\n insertComponent() {\n this.$wr.off('click', this.insertComponent);\n this.stopSelectPosition();\n var object = this.buildContent();\n this.beforeInsert(object);\n var index = this.sorter.lastPos.index;\n // By default, collections do not trigger add event, so silent is used\n var model = this.create(this.sorter.target, object, index, null, {\n silent: false\n });\n\n if (this.opt.terminateAfterInsert && this.sender)\n this.sender.set('active', false);\n else this.enable();\n\n if (!model) return;\n\n this.afterInsert(model, this);\n },\n\n /**\n * Trigger before insert\n * @param {Object} obj\n * @private\n * */\n beforeInsert(obj) {},\n\n /**\n * Trigger after insert\n * @param {Object} model Model created after insert\n * @private\n * */\n afterInsert(model) {},\n\n /**\n * Create different object, based on content, to insert inside canvas\n *\n * @return {Object}\n * @private\n * */\n buildContent() {\n return this.opt.content || {};\n }\n});\n","import Backbone from 'backbone';\nconst $ = Backbone.$;\n\nmodule.exports = {\n /**\n * Start select position event\n * @param {HTMLElement} trg\n * @private\n * */\n startSelectPosition(trg, doc) {\n this.isPointed = false;\n var utils = this.editorModel.get('Utils');\n if (utils && !this.sorter)\n this.sorter = new utils.Sorter({\n container: this.getCanvasBody(),\n placer: this.canvas.getPlacerEl(),\n containerSel: '*',\n itemSel: '*',\n pfx: this.ppfx,\n direction: 'a',\n document: doc,\n wmargin: 1,\n nested: 1,\n em: this.editorModel,\n canvasRelative: 1\n });\n trg && this.sorter.startSort(trg);\n },\n\n /**\n * Get frame position\n * @return {Object}\n * @private\n */\n getOffsetDim() {\n var frameOff = this.offset(this.canvas.getFrameEl());\n var canvasOff = this.offset(this.canvas.getElement());\n var top = frameOff.top - canvasOff.top;\n var left = frameOff.left - canvasOff.left;\n return { top, left };\n },\n\n /**\n * Stop select position event\n * @private\n * */\n stopSelectPosition() {\n this.posTargetCollection = null;\n this.posIndex =\n this.posMethod == 'after' && this.cDim.length !== 0\n ? this.posIndex + 1\n : this.posIndex; //Normalize\n if (this.sorter) {\n this.sorter.moved = 0;\n this.sorter.endMove();\n }\n if (this.cDim) {\n this.posIsLastEl =\n this.cDim.length !== 0 &&\n this.posMethod == 'after' &&\n this.posIndex == this.cDim.length;\n this.posTargetEl =\n this.cDim.length === 0\n ? $(this.outsideElem)\n : !this.posIsLastEl && this.cDim[this.posIndex]\n ? $(this.cDim[this.posIndex][5]).parent()\n : $(this.outsideElem);\n this.posTargetModel = this.posTargetEl.data('model');\n this.posTargetCollection = this.posTargetEl.data('model-comp');\n }\n },\n\n /**\n * Enabel select position\n * @private\n */\n enable() {\n this.startSelectPosition();\n },\n\n /**\n * Check if the pointer is near to the float component\n * @param {number} index\n * @param {string} method\n * @param {Array} dims\n * @return {Boolean}\n * @private\n * */\n nearFloat(index, method, dims) {\n var i = index || 0;\n var m = method || 'before';\n var len = dims.length;\n var isLast = len !== 0 && m == 'after' && i == len;\n if (\n len !== 0 &&\n ((!isLast && !dims[i][4]) ||\n (dims[i - 1] && !dims[i - 1][4]) ||\n (isLast && !dims[i - 1][4]))\n )\n return 1;\n return 0;\n },\n\n run() {\n this.enable();\n },\n\n stop() {\n this.stopSelectPosition();\n this.$wrapper.css('cursor', '');\n this.$wrapper.unbind();\n }\n};\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentView');\n\nmodule.exports = ComponentView.extend({\n tagName: 'img',\n\n events: {\n dblclick: 'openModal',\n click: 'initResize'\n },\n\n initialize(o) {\n const model = this.model;\n ComponentView.prototype.initialize.apply(this, arguments);\n this.listenTo(model, 'change:src', this.updateSrc);\n this.listenTo(model, 'dblclick active', this.openModal);\n this.classEmpty = `${this.ppfx}plh-image`;\n const config = this.config;\n config.modal && (this.modal = config.modal);\n config.am && (this.am = config.am);\n this.fetchFile();\n },\n\n /**\n * Fetch file if exists\n */\n fetchFile() {\n const model = this.model;\n const file = model.get('file');\n\n if (file) {\n const fu = this.em.get('AssetManager').FileUploader();\n fu.uploadFile(\n {\n dataTransfer: { files: [file] }\n },\n res => {\n const obj = res && res.data && res.data[0];\n const src = obj && obj.src;\n src && model.set({ src });\n }\n );\n model.set('file', '');\n }\n },\n\n /**\n * Update src attribute\n * @private\n * */\n updateSrc() {\n const { model, classEmpty, $el } = this;\n const src = model.get('src');\n model.addAttributes({ src });\n $el[src ? 'removeClass' : 'addClass'](classEmpty);\n },\n\n /**\n * Open dialog for image changing\n * @param {Object} e Event\n * @private\n * */\n openModal(e) {\n var em = this.opts.config.em;\n var editor = em ? em.get('Editor') : '';\n\n if (editor && this.model.get('editable')) {\n editor.runCommand('open-assets', {\n target: this.model,\n types: ['image'],\n accept: 'image/*',\n onSelect() {\n editor.Modal.close();\n editor.AssetManager.setTarget(null);\n }\n });\n }\n },\n\n render() {\n this.updateAttributes();\n this.updateClasses();\n\n var actCls = this.$el.attr('class') || '';\n if (!this.model.get('src'))\n this.$el.attr('class', (actCls + ' ' + this.classEmpty).trim());\n\n // Avoid strange behaviours while try to drag\n this.$el.attr('onmousedown', 'return false');\n return this;\n }\n});\n","import Backbone from 'backbone';\nconst InputNumber = require('domain_abstract/ui/InputNumber');\nconst PropertyView = require('./PropertyView');\nconst $ = Backbone.$;\nlet timeout;\n\nmodule.exports = PropertyView.extend({\n templateInput() {\n return '';\n },\n\n init() {\n const model = this.model;\n this.listenTo(model, 'change:unit', this.modelValueChanged);\n this.listenTo(model, 'el:change', this.elementUpdated);\n },\n\n setValue(value) {\n const parsed = this.model.parseValue(value);\n value = `${parsed.value}${parsed.unit}`;\n this.inputInst.setValue(value, { silent: 1 });\n },\n\n onRender() {\n const ppfx = this.ppfx;\n\n if (!this.input) {\n const input = this.model.input;\n input.ppfx = ppfx;\n input.render();\n const fields = this.el.querySelector(`.${ppfx}fields`);\n fields.appendChild(input.el);\n this.$input = input.inputEl;\n this.unit = input.unitEl;\n this.$unit = $(this.unit);\n this.input = this.$input.get(0);\n this.inputInst = input;\n }\n }\n});\n","import Backbone from 'backbone';\nconst PropertyView = require('./PropertyView');\nconst PropertyIntegerView = require('./PropertyIntegerView');\nconst PropertyRadioView = require('./PropertyRadioView');\nconst PropertySelectView = require('./PropertySelectView');\nconst PropertyColorView = require('./PropertyColorView');\nconst PropertyFileView = require('./PropertyFileView');\nconst PropertyCompositeView = require('./PropertyCompositeView');\nconst PropertyStackView = require('./PropertyStackView');\n\nmodule.exports = Backbone.View.extend({\n initialize(o) {\n this.config = o.config || {};\n this.pfx = this.config.stylePrefix || '';\n this.target = o.target || {};\n this.propTarget = o.propTarget || {};\n this.onChange = o.onChange;\n this.onInputRender = o.onInputRender || {};\n this.customValue = o.customValue || {};\n this.properties = [];\n const coll = this.collection;\n this.listenTo(coll, 'add', this.addTo);\n this.listenTo(coll, 'reset', this.render);\n },\n\n addTo(model) {\n this.add(model);\n },\n\n add(model, frag) {\n var view = new model.typeView({\n model,\n name: model.get('name'),\n id: this.pfx + model.get('property'),\n target: this.target,\n propTarget: this.propTarget,\n onChange: this.onChange,\n onInputRender: this.onInputRender,\n config: this.config\n });\n\n if (model.get('type') != 'composite') {\n view.customValue = this.customValue;\n }\n\n view.render();\n const el = view.el;\n this.properties.push(view);\n\n if (frag) {\n frag.appendChild(el);\n } else {\n this.el.appendChild(el);\n }\n },\n\n render() {\n this.properties = [];\n const fragment = document.createDocumentFragment();\n this.collection.each(model => this.add(model, fragment));\n this.$el.append(fragment);\n this.$el.attr('class', `${this.pfx}properties`);\n return this;\n }\n});\n","import { isUndefined, isString } from 'underscore';\n\nmodule.exports = require('backbone').Model.extend({\n defaults: {\n name: '',\n property: '',\n type: '',\n defaults: '',\n info: '',\n value: '',\n icon: '',\n functionName: '',\n status: '',\n visible: true,\n fixedValues: ['initial', 'inherit'],\n\n // If true to the value will be added '!important'\n important: 0,\n\n // If true, will be hidden by default and will show up only for targets\n // which require this property (via `stylable-require`)\n // Use case:\n // you can add all SVG CSS properties with toRequire as true\n // and then require them on SVG Components\n toRequire: 0\n },\n\n initialize(opt) {\n var o = opt || {};\n var name = this.get('name');\n var prop = this.get('property');\n\n if (!name) {\n this.set(\n 'name',\n prop.charAt(0).toUpperCase() + prop.slice(1).replace(/-/g, ' ')\n );\n }\n\n const init = this.init && this.init.bind(this);\n init && init();\n },\n\n /**\n * Clear the value\n * @return {this}\n */\n clearValue(opts = {}) {\n this.set({ value: undefined }, opts);\n return this;\n },\n\n /**\n * Update value\n * @param {any} value\n * @param {Boolen} [complete=true] Indicates if it's a final state\n * @param {Object} [opts={}] Options\n */\n setValue(value, complete = 1, opts = {}) {\n const parsed = this.parseValue(value);\n this.set(parsed, { ...opts, avoidStore: 1 });\n\n // It's important to set an empty value, otherwise the\n // UndoManager won't see the change\n if (complete) {\n this.set('value', '', opts);\n this.set(parsed, opts);\n }\n },\n\n /**\n * Like `setValue` but, in addition, prevents the update of the input element\n * as the changes should come from the input itself.\n * This method is useful with the definition of custom properties\n * @param {any} value\n * @param {Boolen} [complete=true] Indicates if it's a final state\n * @param {Object} [opts={}] Options\n */\n setValueFromInput(value, complete, opts = {}) {\n this.setValue(value, complete, { ...opts, fromInput: 1 });\n },\n\n /**\n * Parse a raw value, generally fetched from the target, for this property\n * @param {string} value Raw value string\n * @return {Object}\n * @example\n * // example with an Input type\n * prop.parseValue('translateX(10deg)');\n * // -> { value: 10, unit: 'deg', functionName: 'translateX' }\n *\n */\n parseValue(value) {\n const result = { value };\n const imp = '!important';\n\n if (isString(value) && value.indexOf(imp) !== -1) {\n result.value = value.replace(imp, '').trim();\n result.important = 1;\n }\n\n if (!this.get('functionName')) {\n return result;\n }\n\n const args = [];\n let valueStr = `${result.value}`;\n let start = valueStr.indexOf('(') + 1;\n let end = valueStr.lastIndexOf(')');\n args.push(start);\n\n // Will try even if the last closing parentheses is not found\n if (end >= 0) {\n args.push(end);\n }\n\n result.value = String.prototype.substring.apply(valueStr, args);\n return result;\n },\n\n /**\n * Get the default value\n * @return {string}\n * @private\n */\n getDefaultValue() {\n return this.get('defaults');\n },\n\n /**\n * Get a complete value of the property.\n * This probably will replace the getValue when all\n * properties models will be splitted\n * @param {string} val Custom value to replace the one on the model\n * @return {string}\n * @private\n */\n getFullValue(val) {\n const fn = this.get('functionName');\n let value = isUndefined(val) ? this.get('value') : val;\n\n if (fn && !isUndefined(value)) {\n value = `${fn}(${value})`;\n }\n\n if (this.get('important')) {\n value = `${value} !important`;\n }\n\n return value || '';\n }\n});\n","import TypeableCollection from 'domain_abstract/model/TypeableCollection';\nconst Property = require('./Property');\n\nmodule.exports = require('backbone')\n .Collection.extend(TypeableCollection)\n .extend({\n types: [\n {\n id: 'stack',\n model: require('./PropertyStack'),\n view: require('./../view/PropertyStackView'),\n isType(value) {\n if (value && value.type == 'stack') {\n return value;\n }\n }\n },\n {\n id: 'composite',\n model: require('./PropertyComposite'),\n view: require('./../view/PropertyCompositeView'),\n isType(value) {\n if (value && value.type == 'composite') {\n return value;\n }\n }\n },\n {\n id: 'file',\n model: Property,\n view: require('./../view/PropertyFileView'),\n isType(value) {\n if (value && value.type == 'file') {\n return value;\n }\n }\n },\n {\n id: 'color',\n model: Property,\n view: require('./../view/PropertyColorView'),\n isType(value) {\n if (value && value.type == 'color') {\n return value;\n }\n }\n },\n {\n id: 'select',\n model: require('./PropertyRadio'),\n view: require('./../view/PropertySelectView'),\n isType(value) {\n if (value && value.type == 'select') {\n return value;\n }\n }\n },\n {\n id: 'radio',\n model: require('./PropertyRadio'),\n view: require('./../view/PropertyRadioView'),\n isType(value) {\n if (value && value.type == 'radio') {\n return value;\n }\n }\n },\n {\n id: 'slider',\n model: require('./PropertySlider'),\n view: require('./../view/PropertySliderView'),\n isType(value) {\n if (value && value.type == 'slider') {\n return value;\n }\n }\n },\n {\n id: 'integer',\n model: require('./PropertyInteger'),\n view: require('./../view/PropertyIntegerView'),\n isType(value) {\n if (value && value.type == 'integer') {\n return value;\n }\n }\n },\n {\n id: 'base',\n model: Property,\n view: require('./../view/PropertyView'),\n isType(value) {\n value.type = 'base';\n return value;\n }\n }\n ],\n\n deepClone() {\n const collection = this.clone();\n collection.reset(\n collection.map(model => {\n const cloned = model.clone();\n cloned.typeView = model.typeView;\n return cloned;\n })\n );\n return collection;\n },\n\n /**\n * Parse a value and return an array splitted by properties\n * @param {string} value\n * @return {Array}\n * @return\n */\n parseValue(value) {\n const properties = [];\n const values = value.split(' ');\n values.forEach((value, i) => {\n const property = this.at(i);\n if (!property) return;\n properties.push({ ...property.attributes, ...{ value } });\n });\n return properties;\n },\n\n getFullValue() {\n let result = '';\n this.each(model => (result += `${model.getFullValue()} `));\n return result.trim();\n }\n });\n","import { filter } from 'underscore';\nconst Selector = require('./Selector');\n\nmodule.exports = require('backbone').Collection.extend({\n model: Selector,\n\n getStyleable() {\n return filter(\n this.models,\n item => item.get('active') && !item.get('private')\n );\n },\n\n getValid() {\n return filter(this.models, item => !item.get('private'));\n },\n\n getFullString(collection) {\n const result = [];\n const coll = collection || this;\n coll.forEach(selector => result.push(selector.getFullName()));\n return result.join('').trim();\n }\n});\n","\"use strict\";\n\n/*! cash-dom 1.3.7, https://github.com/kenwheeler/cash @license MIT */\n;(function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(factory);\n } else if (typeof exports !== \"undefined\") {\n module.exports = factory();\n } else {\n root.cash = root.$ = factory();\n }\n})(this, function () {\n var doc = document, win = window, ArrayProto = Array.prototype, slice = ArrayProto.slice, filter = ArrayProto.filter, push = ArrayProto.push;\n\n var noop = function () {}, isFunction = function (item) {\n // @see https://crbug.com/568448\n return typeof item === typeof noop && item.call;\n }, isString = function (item) {\n return typeof item === typeof \"\";\n };\n\n var idMatch = /^#[\\w-]*$/, classMatch = /^\\.[\\w-]*$/, htmlMatch = /<.+>/, singlet = /^\\w+$/;\n\n function find(selector, context) {\n context = context || doc;\n var elems = (classMatch.test(selector) ? context.getElementsByClassName(selector.slice(1)) : singlet.test(selector) ? context.getElementsByTagName(selector) : context.querySelectorAll(selector));\n return elems;\n }\n\n var frag;\n function parseHTML(str) {\n if (!frag) {\n frag = doc.implementation.createHTMLDocument(null);\n var base = frag.createElement(\"base\");\n base.href = doc.location.href;\n frag.head.appendChild(base);\n }\n\n frag.body.innerHTML = str;\n\n return frag.body.childNodes;\n }\n\n function onReady(fn) {\n if (doc.readyState !== \"loading\") {\n setTimeout(fn);\n } else {\n doc.addEventListener(\"DOMContentLoaded\", fn);\n }\n }\n\n function Init(selector, context) {\n if (!selector) {\n return this;\n }\n\n // If already a cash collection, don't do any further processing\n if (selector.cash && selector !== win) {\n return selector;\n }\n\n var elems = selector, i = 0, length;\n\n if (isString(selector)) {\n elems = (idMatch.test(selector) ?\n // If an ID use the faster getElementById check\n doc.getElementById(selector.slice(1)) : htmlMatch.test(selector) ?\n // If HTML, parse it into real elements\n parseHTML(selector) :\n // else use `find`\n find(selector, context));\n\n // If function, use as shortcut for DOM ready\n } else if (isFunction(selector)) {\n onReady(selector);return this;\n }\n\n if (!elems) {\n return this;\n }\n\n // If a single DOM element is passed in or received via ID, return the single element\n if (elems.nodeType || elems === win) {\n this[0] = elems;\n this.length = 1;\n } else {\n // Treat like an array and loop through each item.\n length = this.length = elems.length;\n for (; i < length; i++) {\n this[i] = elems[i];\n }\n }\n\n return this;\n }\n\n function cash(selector, context) {\n return new Init(selector, context);\n }\n\n var fn = cash.fn = cash.prototype = Init.prototype = { // jshint ignore:line\n cash: true,\n length: 0,\n push: push,\n splice: ArrayProto.splice,\n map: ArrayProto.map,\n init: Init\n };\n\n Object.defineProperty(fn, \"constructor\", { value: cash });\n\n cash.parseHTML = parseHTML;\n cash.noop = noop;\n cash.isFunction = isFunction;\n cash.isString = isString;\n\n cash.extend = fn.extend = function (target) {\n target = target || {};\n\n var args = slice.call(arguments), length = args.length, i = 1;\n\n if (args.length === 1) {\n target = this;\n i = 0;\n }\n\n for (; i < length; i++) {\n if (!args[i]) {\n continue;\n }\n for (var key in args[i]) {\n if (args[i].hasOwnProperty(key)) {\n target[key] = args[i][key];\n }\n }\n }\n\n return target;\n };\n\n function each(collection, callback) {\n var l = collection.length, i = 0;\n\n for (; i < l; i++) {\n if (callback.call(collection[i], collection[i], i, collection) === false) {\n break;\n }\n }\n }\n\n function matches(el, selector) {\n var m = el && (el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector || el.oMatchesSelector);\n return !!m && m.call(el, selector);\n }\n\n function getCompareFunction(selector) {\n return (\n /* Use browser's `matches` function if string */\n isString(selector) ? matches :\n /* Match a cash element */\n selector.cash ? function (el) {\n return selector.is(el);\n } :\n /* Direct comparison */\n function (el, selector) {\n return el === selector;\n });\n }\n\n function unique(collection) {\n return cash(slice.call(collection).filter(function (item, index, self) {\n return self.indexOf(item) === index;\n }));\n }\n\n cash.extend({\n merge: function (first, second) {\n var len = +second.length, i = first.length, j = 0;\n\n for (; j < len; i++, j++) {\n first[i] = second[j];\n }\n\n first.length = i;\n return first;\n },\n\n each: each,\n matches: matches,\n unique: unique,\n isArray: Array.isArray,\n isNumeric: function (n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n });\n\n var uid = cash.uid = \"_cash\" + Date.now();\n\n function getDataCache(node) {\n return (node[uid] = node[uid] || {});\n }\n\n function setData(node, key, value) {\n return (getDataCache(node)[key] = value);\n }\n\n function getData(node, key) {\n var c = getDataCache(node);\n if (c[key] === undefined) {\n c[key] = node.dataset ? node.dataset[key] : cash(node).attr(\"data-\" + key);\n }\n return c[key];\n }\n\n function removeData(node, key) {\n var c = getDataCache(node);\n if (c) {\n delete c[key];\n } else if (node.dataset) {\n delete node.dataset[key];\n } else {\n cash(node).removeAttr(\"data-\" + name);\n }\n }\n\n fn.extend({\n data: function (name, value) {\n if (isString(name)) {\n return (value === undefined ? getData(this[0], name) : this.each(function (v) {\n return setData(v, name, value);\n }));\n }\n\n for (var key in name) {\n this.data(key, name[key]);\n }\n\n return this;\n },\n\n removeData: function (key) {\n return this.each(function (v) {\n return removeData(v, key);\n });\n }\n\n });\n\n var notWhiteMatch = /\\S+/g;\n\n function getClasses(c) {\n return isString(c) && c.match(notWhiteMatch);\n }\n\n function hasClass(v, c) {\n return (v.classList ? v.classList.contains(c) : new RegExp(\"(^| )\" + c + \"( |$)\", \"gi\").test(v.className));\n }\n\n function addClass(v, c) {\n if (v.classList) {\n v.classList.add(c);\n } else if (!hasClass(v, c)) {\n v.className += \" \" + c;\n }\n }\n\n function removeClass(v, c) {\n if (v.classList) {\n v.classList.remove(c);\n } else {\n v.className = v.className.replace(c, \"\");\n }\n }\n\n fn.extend({\n addClass: function (c) {\n var classes = getClasses(c);\n\n return (classes ? this.each(function (v) {\n each(classes, function (c) {\n addClass(v, c);\n });\n }) : this);\n },\n\n attr: function (name, value) {\n if (!name) {\n return undefined;\n }\n\n if (isString(name)) {\n if (value === undefined) {\n return this[0] ? this[0].getAttribute ? this[0].getAttribute(name) : this[0][name] : undefined;\n }\n\n return this.each(function (v) {\n if (v.setAttribute) {\n v.setAttribute(name, value);\n } else {\n v[name] = value;\n }\n });\n }\n\n for (var key in name) {\n this.attr(key, name[key]);\n }\n\n return this;\n },\n\n hasClass: function (c) {\n var check = false, classes = getClasses(c);\n if (classes && classes.length) {\n this.each(function (v) {\n check = hasClass(v, classes[0]);\n return !check;\n });\n }\n return check;\n },\n\n prop: function (name, value) {\n if (isString(name)) {\n return (value === undefined ? this[0][name] : this.each(function (v) {\n v[name] = value;\n }));\n }\n\n for (var key in name) {\n this.prop(key, name[key]);\n }\n\n return this;\n },\n\n removeAttr: function (name) {\n return this.each(function (v) {\n if (v.removeAttribute) {\n v.removeAttribute(name);\n } else {\n delete v[name];\n }\n });\n },\n\n removeClass: function (c) {\n if (!arguments.length) {\n return this.attr(\"class\", \"\");\n }\n var classes = getClasses(c);\n return (classes ? this.each(function (v) {\n each(classes, function (c) {\n removeClass(v, c);\n });\n }) : this);\n },\n\n removeProp: function (name) {\n return this.each(function (v) {\n delete v[name];\n });\n },\n\n toggleClass: function (c, state) {\n if (state !== undefined) {\n return this[state ? \"addClass\" : \"removeClass\"](c);\n }\n var classes = getClasses(c);\n return (classes ? this.each(function (v) {\n each(classes, function (c) {\n if (hasClass(v, c)) {\n removeClass(v, c);\n } else {\n addClass(v, c);\n }\n });\n }) : this);\n } });\n\n fn.extend({\n add: function (selector, context) {\n return unique(cash.merge(this, cash(selector, context)));\n },\n\n each: function (callback) {\n each(this, callback);\n return this;\n },\n\n eq: function (index) {\n return cash(this.get(index));\n },\n\n filter: function (selector) {\n if (!selector) {\n return this;\n }\n\n var comparator = (isFunction(selector) ? selector : getCompareFunction(selector));\n\n return cash(filter.call(this, function (e) {\n return comparator(e, selector);\n }));\n },\n\n first: function () {\n return this.eq(0);\n },\n\n get: function (index) {\n if (index === undefined) {\n return slice.call(this);\n }\n return (index < 0 ? this[index + this.length] : this[index]);\n },\n\n index: function (elem) {\n var child = elem ? cash(elem)[0] : this[0], collection = elem ? this : cash(child).parent().children();\n return slice.call(collection).indexOf(child);\n },\n\n last: function () {\n return this.eq(-1);\n }\n\n });\n\n var camelCase = (function () {\n var camelRegex = /(?:^\\w|[A-Z]|\\b\\w)/g, whiteSpace = /[\\s-_]+/g;\n return function (str) {\n return str.replace(camelRegex, function (letter, index) {\n return letter[index === 0 ? \"toLowerCase\" : \"toUpperCase\"]();\n }).replace(whiteSpace, \"\");\n };\n }());\n\n var getPrefixedProp = (function () {\n var cache = {}, doc = document, div = doc.createElement(\"div\"), style = div.style;\n\n return function (prop) {\n prop = camelCase(prop);\n if (cache[prop]) {\n return cache[prop];\n }\n\n var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1), prefixes = [\"webkit\", \"moz\", \"ms\", \"o\"], props = (prop + \" \" + (prefixes).join(ucProp + \" \") + ucProp).split(\" \");\n\n each(props, function (p) {\n if (p in style) {\n cache[p] = prop = cache[prop] = p;\n return false;\n }\n });\n\n return cache[prop];\n };\n }());\n\n cash.prefixedProp = getPrefixedProp;\n cash.camelCase = camelCase;\n\n fn.extend({\n css: function (prop, value) {\n if (isString(prop)) {\n prop = getPrefixedProp(prop);\n return (arguments.length > 1 ? this.each(function (v) {\n return v.style[prop] = value;\n }) : win.getComputedStyle(this[0])[prop]);\n }\n\n for (var key in prop) {\n this.css(key, prop[key]);\n }\n\n return this;\n }\n\n });\n\n function compute(el, prop) {\n return parseInt(win.getComputedStyle(el[0], null)[prop], 10) || 0;\n }\n\n each([\"Width\", \"Height\"], function (v) {\n var lower = v.toLowerCase();\n\n fn[lower] = function () {\n return this[0].getBoundingClientRect()[lower];\n };\n\n fn[\"inner\" + v] = function () {\n return this[0][\"client\" + v];\n };\n\n fn[\"outer\" + v] = function (margins) {\n return this[0][\"offset\" + v] + (margins ? compute(this, \"margin\" + (v === \"Width\" ? \"Left\" : \"Top\")) + compute(this, \"margin\" + (v === \"Width\" ? \"Right\" : \"Bottom\")) : 0);\n };\n });\n\n function registerEvent(node, eventName, callback) {\n var eventCache = getData(node, \"_cashEvents\") || setData(node, \"_cashEvents\", {});\n eventCache[eventName] = eventCache[eventName] || [];\n eventCache[eventName].push(callback);\n node.addEventListener(eventName, callback);\n }\n\n function removeEvent(node, eventName, callback) {\n var events = getData(node, \"_cashEvents\"), eventCache = (events && events[eventName]), index;\n\n if (!eventCache) {\n return;\n }\n\n if (callback) {\n node.removeEventListener(eventName, callback);\n index = eventCache.indexOf(callback);\n if (index >= 0) {\n eventCache.splice(index, 1);\n }\n } else {\n each(eventCache, function (event) {\n node.removeEventListener(eventName, event);\n });\n eventCache = [];\n }\n }\n\n fn.extend({\n off: function (eventName, callback) {\n return this.each(function (v) {\n return removeEvent(v, eventName, callback);\n });\n },\n\n on: function (eventName, delegate, callback, runOnce) {\n // jshint ignore:line\n\n var originalCallback;\n\n if (!isString(eventName)) {\n for (var key in eventName) {\n this.on(key, delegate, eventName[key]);\n }\n return this;\n }\n\n if (isFunction(delegate)) {\n callback = delegate;\n delegate = null;\n }\n\n if (eventName === \"ready\") {\n onReady(callback);\n return this;\n }\n\n if (delegate) {\n originalCallback = callback;\n callback = function (e) {\n var t = e.target;\n\n while (!matches(t, delegate)) {\n if (t === this) {\n return (t = false);\n }\n t = t.parentNode;\n }\n\n if (t) {\n originalCallback.call(t, e);\n }\n };\n }\n\n return this.each(function (v) {\n var finalCallback = callback;\n if (runOnce) {\n finalCallback = function () {\n callback.apply(this, arguments);\n removeEvent(v, eventName, finalCallback);\n };\n }\n registerEvent(v, eventName, finalCallback);\n });\n },\n\n one: function (eventName, delegate, callback) {\n return this.on(eventName, delegate, callback, true);\n },\n\n ready: onReady,\n\n trigger: function (eventName, data) {\n var evt = doc.createEvent(\"HTMLEvents\");\n evt.data = data;\n evt.initEvent(eventName, true, false);\n return this.each(function (v) {\n return v.dispatchEvent(evt);\n });\n }\n\n });\n\n function encode(name, value) {\n return \"&\" + encodeURIComponent(name) + \"=\" + encodeURIComponent(value).replace(/%20/g, \"+\");\n }\n\n function getSelectMultiple_(el) {\n var values = [];\n each(el.options, function (o) {\n if (o.selected) {\n values.push(o.value);\n }\n });\n return values.length ? values : null;\n }\n\n function getSelectSingle_(el) {\n var selectedIndex = el.selectedIndex;\n return selectedIndex >= 0 ? el.options[selectedIndex].value : null;\n }\n\n function getValue(el) {\n var type = el.type;\n if (!type) {\n return null;\n }\n switch (type.toLowerCase()) {\n case \"select-one\":\n return getSelectSingle_(el);\n case \"select-multiple\":\n return getSelectMultiple_(el);\n case \"radio\":\n return (el.checked) ? el.value : null;\n case \"checkbox\":\n return (el.checked) ? el.value : null;\n default:\n return el.value ? el.value : null;\n }\n }\n\n fn.extend({\n serialize: function () {\n var query = \"\";\n\n each(this[0].elements || this, function (el) {\n if (el.disabled || el.tagName === \"FIELDSET\") {\n return;\n }\n var name = el.name;\n switch (el.type.toLowerCase()) {\n case \"file\":\n case \"reset\":\n case \"submit\":\n case \"button\":\n break;\n case \"select-multiple\":\n var values = getValue(el);\n if (values !== null) {\n each(values, function (value) {\n query += encode(name, value);\n });\n }\n break;\n default:\n var value = getValue(el);\n if (value !== null) {\n query += encode(name, value);\n }\n }\n });\n\n return query.substr(1);\n },\n\n val: function (value) {\n if (value === undefined) {\n return getValue(this[0]);\n } else {\n return this.each(function (v) {\n return v.value = value;\n });\n }\n }\n\n });\n\n function insertElement(el, child, prepend) {\n if (prepend) {\n var first = el.childNodes[0];\n el.insertBefore(child, first);\n } else {\n el.appendChild(child);\n }\n }\n\n function insertContent(parent, child, prepend) {\n var str = isString(child);\n\n if (!str && child.length) {\n each(child, function (v) {\n return insertContent(parent, v, prepend);\n });\n return;\n }\n\n each(parent, str ? function (v) {\n return v.insertAdjacentHTML(prepend ? \"afterbegin\" : \"beforeend\", child);\n } : function (v, i) {\n return insertElement(v, (i === 0 ? child : child.cloneNode(true)), prepend);\n });\n }\n\n fn.extend({\n after: function (selector) {\n cash(selector).insertAfter(this);\n return this;\n },\n\n append: function (content) {\n insertContent(this, content);\n return this;\n },\n\n appendTo: function (parent) {\n insertContent(cash(parent), this);\n return this;\n },\n\n before: function (selector) {\n cash(selector).insertBefore(this);\n return this;\n },\n\n clone: function () {\n return cash(this.map(function (v) {\n return v.cloneNode(true);\n }));\n },\n\n empty: function () {\n this.html(\"\");\n return this;\n },\n\n html: function (content) {\n if (content === undefined) {\n return this[0].innerHTML;\n }\n var source = (content.nodeType ? content[0].outerHTML : content);\n return this.each(function (v) {\n return v.innerHTML = source;\n });\n },\n\n insertAfter: function (selector) {\n var _this = this;\n\n\n cash(selector).each(function (el, i) {\n var parent = el.parentNode, sibling = el.nextSibling;\n _this.each(function (v) {\n parent.insertBefore((i === 0 ? v : v.cloneNode(true)), sibling);\n });\n });\n\n return this;\n },\n\n insertBefore: function (selector) {\n var _this2 = this;\n cash(selector).each(function (el, i) {\n var parent = el.parentNode;\n _this2.each(function (v) {\n parent.insertBefore((i === 0 ? v : v.cloneNode(true)), el);\n });\n });\n return this;\n },\n\n prepend: function (content) {\n insertContent(this, content, true);\n return this;\n },\n\n prependTo: function (parent) {\n insertContent(cash(parent), this, true);\n return this;\n },\n\n remove: function () {\n return this.each(function (v) {\n return v.parentNode.removeChild(v);\n });\n },\n\n text: function (content) {\n if (content === undefined) {\n return this[0].textContent;\n }\n return this.each(function (v) {\n return v.textContent = content;\n });\n }\n\n });\n\n var docEl = doc.documentElement;\n\n fn.extend({\n position: function () {\n var el = this[0];\n return {\n left: el.offsetLeft,\n top: el.offsetTop\n };\n },\n\n offset: function () {\n var rect = this[0].getBoundingClientRect();\n return {\n top: rect.top + win.pageYOffset - docEl.clientTop,\n left: rect.left + win.pageXOffset - docEl.clientLeft\n };\n },\n\n offsetParent: function () {\n return cash(this[0].offsetParent);\n }\n\n });\n\n fn.extend({\n children: function (selector) {\n var elems = [];\n this.each(function (el) {\n push.apply(elems, el.children);\n });\n elems = unique(elems);\n\n return (!selector ? elems : elems.filter(function (v) {\n return matches(v, selector);\n }));\n },\n\n closest: function (selector) {\n if (!selector || this.length < 1) {\n return cash();\n }\n if (this.is(selector)) {\n return this.filter(selector);\n }\n return this.parent().closest(selector);\n },\n\n is: function (selector) {\n if (!selector) {\n return false;\n }\n\n var match = false, comparator = getCompareFunction(selector);\n\n this.each(function (el) {\n match = comparator(el, selector);\n return !match;\n });\n\n return match;\n },\n\n find: function (selector) {\n if (!selector || selector.nodeType) {\n return cash(selector && this.has(selector).length ? selector : null);\n }\n\n var elems = [];\n this.each(function (el) {\n push.apply(elems, find(selector, el));\n });\n\n return unique(elems);\n },\n\n has: function (selector) {\n var comparator = (isString(selector) ? function (el) {\n return find(selector, el).length !== 0;\n } : function (el) {\n return el.contains(selector);\n });\n\n return this.filter(comparator);\n },\n\n next: function () {\n return cash(this[0].nextElementSibling);\n },\n\n not: function (selector) {\n if (!selector) {\n return this;\n }\n\n var comparator = getCompareFunction(selector);\n\n return this.filter(function (el) {\n return !comparator(el, selector);\n });\n },\n\n parent: function () {\n var result = [];\n\n this.each(function (item) {\n if (item && item.parentNode) {\n result.push(item.parentNode);\n }\n });\n\n return unique(result);\n },\n\n parents: function (selector) {\n var last, result = [];\n\n this.each(function (item) {\n last = item;\n\n while (last && last.parentNode && last !== doc.body.parentNode) {\n last = last.parentNode;\n\n if (!selector || (selector && matches(last, selector))) {\n result.push(last);\n }\n }\n });\n\n return unique(result);\n },\n\n prev: function () {\n return cash(this[0].previousElementSibling);\n },\n\n siblings: function () {\n var collection = this.parent().children(), el = this[0];\n\n return collection.filter(function (i) {\n return i !== el;\n });\n }\n\n });\n\n\n return cash;\n});","module.exports = {\n run(editor, sender, opts) {\n var el = (opts && opts.el) || '';\n var canvas = editor.Canvas;\n var dragger = this.dragger;\n var options = opts.options || {};\n var canvasView = canvas.getCanvasView();\n options.prefix = editor.getConfig().stylePrefix;\n options.mousePosFetcher = canvas.getMouseRelativePos;\n options.posFetcher = canvasView.getElementPos.bind(canvasView);\n\n // Create the resizer for the canvas if not yet created\n if (!dragger) {\n dragger = editor.Utils.Dragger.init(options);\n this.dragger = dragger;\n }\n\n dragger.setOptions(options);\n dragger.focus(el);\n\n if (options.event) {\n dragger.start(options.event);\n }\n\n return dragger;\n },\n\n stop() {\n if (this.canvasResizer) this.canvasResizer.blur();\n }\n};\n","module.exports = {\n run(editor, sender, opts) {\n var opt = opts || {};\n var el = opt.el || '';\n var canvas = editor.Canvas;\n var canvasResizer = this.canvasResizer;\n var options = opt.options || {};\n var canvasView = canvas.getCanvasView();\n options.ratioDefault = 1;\n options.appendTo = canvas.getResizerEl();\n options.prefix = editor.getConfig().stylePrefix;\n options.posFetcher = canvasView.getElementPos.bind(canvasView);\n options.mousePosFetcher = canvas.getMouseRelativePos;\n\n // Create the resizer for the canvas if not yet created\n if (!canvasResizer || opt.forceNew) {\n this.canvasResizer = editor.Utils.Resizer.init(options);\n canvasResizer = this.canvasResizer;\n }\n\n canvasResizer.setOptions(options);\n canvasResizer.blur();\n canvasResizer.focus(el);\n return canvasResizer;\n },\n\n stop() {\n const resizer = this.canvasResizer;\n resizer && resizer.blur();\n }\n};\n","import _ from 'underscore';\n\nmodule.exports = {\n getPanels(editor) {\n if (!this.panels) this.panels = editor.Panels.getPanelsEl();\n return this.panels;\n },\n\n tglPointers(editor, v) {\n var elP = editor.Canvas.getBody().querySelectorAll(\n '.' + this.ppfx + 'no-pointer'\n );\n _.each(elP, item => {\n item.style.pointerEvents = v ? '' : 'all';\n });\n },\n\n run(editor, sender) {\n if (sender && sender.set) sender.set('active', false);\n editor.stopCommand('sw-visibility');\n editor.getModel().stopDefault();\n var that = this;\n var panels = this.getPanels(editor);\n var canvas = editor.Canvas.getElement();\n var editorEl = editor.getEl();\n var pfx = editor.Config.stylePrefix;\n if (!this.helper) {\n this.helper = document.createElement('span');\n this.helper.className = pfx + 'off-prv fa fa-eye-slash';\n editorEl.appendChild(this.helper);\n this.helper.onclick = () => {\n editor.stopCommand('preview');\n };\n }\n this.helper.style.display = 'inline-block';\n this.tglPointers(editor);\n\n /*\n editor.Canvas.getBody().querySelectorAll('.' + pfx + 'no-pointer').forEach(function(){\n this.style.pointerEvents = 'all';\n });*/\n\n panels.style.display = 'none';\n var canvasS = canvas.style;\n canvasS.width = '100%';\n canvasS.height = '100%';\n canvasS.top = '0';\n canvasS.left = '0';\n canvasS.padding = '0';\n canvasS.margin = '0';\n editor.trigger('change:canvasOffset');\n },\n\n stop(editor, sender) {\n var panels = this.getPanels(editor);\n editor.runCommand('sw-visibility');\n editor.getModel().runDefault();\n panels.style.display = 'block';\n var canvas = editor.Canvas.getElement();\n canvas.setAttribute('style', '');\n if (this.helper) {\n this.helper.style.display = 'none';\n }\n editor.trigger('change:canvasOffset');\n this.tglPointers(editor, 1);\n }\n};\n","module.exports = {\n /**\n * Check if fullscreen mode is enabled\n * @return {Boolean}\n */\n isEnabled() {\n var d = document;\n if (\n d.fullscreenElement ||\n d.webkitFullscreenElement ||\n d.mozFullScreenElement\n )\n return 1;\n else return 0;\n },\n\n /**\n * Enable fullscreen mode and return browser prefix\n * @param {HTMLElement} el\n * @return {string}\n */\n enable(el) {\n var pfx = '';\n if (el.requestFullscreen) el.requestFullscreen();\n else if (el.webkitRequestFullscreen) {\n pfx = 'webkit';\n el.webkitRequestFullscreen();\n } else if (el.mozRequestFullScreen) {\n pfx = 'moz';\n el.mozRequestFullScreen();\n } else if (el.msRequestFullscreen) el.msRequestFullscreen();\n else console.warn('Fullscreen not supported');\n return pfx;\n },\n\n /**\n * Disable fullscreen mode\n */\n disable() {\n var d = document;\n if (d.exitFullscreen) d.exitFullscreen();\n else if (d.webkitExitFullscreen) d.webkitExitFullscreen();\n else if (d.mozCancelFullScreen) d.mozCancelFullScreen();\n else if (d.msExitFullscreen) d.msExitFullscreen();\n },\n\n /**\n * Triggered when the state of the fullscreen is changed. Inside detects if\n * it's enabled\n * @param {strinf} pfx Browser prefix\n * @param {Event} e\n */\n fsChanged(pfx, e) {\n var d = document;\n var ev = (pfx || '') + 'fullscreenchange';\n if (!this.isEnabled()) {\n this.stop(null, this.sender);\n document.removeEventListener(ev, this.fsChanged);\n }\n },\n\n run(editor, sender) {\n this.sender = sender;\n var pfx = this.enable(editor.getContainer());\n this.fsChanged = this.fsChanged.bind(this, pfx);\n document.addEventListener(pfx + 'fullscreenchange', this.fsChanged);\n if (editor) editor.trigger('change:canvasOffset');\n },\n\n stop(editor, sender) {\n if (sender && sender.set) sender.set('active', false);\n this.disable();\n if (editor) editor.trigger('change:canvasOffset');\n }\n};\n","module.exports = {\n run(editor) {\n const sel = editor.getSelected();\n let comp = sel && sel.parent();\n\n // Recurse through the parent() chain until a selectable parent is found\n while (comp && !comp.get('selectable')) {\n comp = comp.parent();\n }\n\n comp && editor.select(comp);\n }\n};\n","import Backbone from 'backbone';\nconst $ = Backbone.$;\n\nmodule.exports = {\n getOffsetMethod(state) {\n var method = state || '';\n return 'get' + method + 'OffsetViewerEl';\n },\n\n run(editor, sender, opts) {\n var opt = opts || {};\n var state = opt.state || '';\n var config = editor.getConfig();\n\n if (\n !config.showOffsets ||\n (!config.showOffsetsSelected && state == 'Fixed')\n ) {\n return;\n }\n\n var canvas = editor.Canvas;\n var el = opt.el || '';\n var pos = opt.elPos || canvas.getElementPos(el);\n var style = window.getComputedStyle(el);\n var ppfx = this.ppfx;\n var stateVar = state + 'State';\n var method = this.getOffsetMethod(state);\n var offsetViewer = canvas[method]();\n offsetViewer.style.display = 'block';\n\n var marginT = this['marginT' + state];\n var marginB = this['marginB' + state];\n var marginL = this['marginL' + state];\n var marginR = this['marginR' + state];\n var padT = this['padT' + state];\n var padB = this['padB' + state];\n var padL = this['padL' + state];\n var padR = this['padR' + state];\n\n if (!this[stateVar]) {\n var stateLow = state.toLowerCase();\n var marginName = stateLow + 'margin-v';\n var paddingName = stateLow + 'padding-v';\n var marginV = $(`
`).get(0);\n var paddingV = $(`
`).get(0);\n var marginEls = ppfx + marginName + '-el';\n var paddingEls = ppfx + paddingName + '-el';\n const fullMargName = `${marginEls} ${ppfx + marginName}`;\n const fullPadName = `${paddingEls} ${ppfx + paddingName}`;\n marginT = $(`
`).get(0);\n marginB = $(`
`).get(0);\n marginL = $(`
`).get(0);\n marginR = $(`
`).get(0);\n padT = $(`
`).get(0);\n padB = $(`
`).get(0);\n padL = $(`
`).get(0);\n padR = $(`
`).get(0);\n this['marginT' + state] = marginT;\n this['marginB' + state] = marginB;\n this['marginL' + state] = marginL;\n this['marginR' + state] = marginR;\n this['padT' + state] = padT;\n this['padB' + state] = padB;\n this['padL' + state] = padL;\n this['padR' + state] = padR;\n marginV.appendChild(marginT);\n marginV.appendChild(marginB);\n marginV.appendChild(marginL);\n marginV.appendChild(marginR);\n paddingV.appendChild(padT);\n paddingV.appendChild(padB);\n paddingV.appendChild(padL);\n paddingV.appendChild(padR);\n offsetViewer.appendChild(marginV);\n offsetViewer.appendChild(paddingV);\n this[stateVar] = '1';\n }\n\n var unit = 'px';\n var marginLeftSt = style.marginLeft.replace(unit, '');\n var marginTopSt = parseInt(style.marginTop.replace(unit, ''));\n var marginBottomSt = parseInt(style.marginBottom.replace(unit, ''));\n var mtStyle = marginT.style;\n var mbStyle = marginB.style;\n var mlStyle = marginL.style;\n var mrStyle = marginR.style;\n var ptStyle = padT.style;\n var pbStyle = padB.style;\n var plStyle = padL.style;\n var prStyle = padR.style;\n var posLeft = parseInt(pos.left);\n\n // Margin style\n mtStyle.height = style.marginTop;\n mtStyle.width = style.width;\n mtStyle.top = pos.top - style.marginTop.replace(unit, '') + unit;\n mtStyle.left = posLeft + unit;\n\n mbStyle.height = style.marginBottom;\n mbStyle.width = style.width;\n mbStyle.top = pos.top + pos.height + unit;\n mbStyle.left = posLeft + unit;\n\n var marginSideH = pos.height + marginTopSt + marginBottomSt + unit;\n var marginSideT = pos.top - marginTopSt + unit;\n mlStyle.height = marginSideH;\n mlStyle.width = style.marginLeft;\n mlStyle.top = marginSideT;\n mlStyle.left = posLeft - marginLeftSt + unit;\n\n mrStyle.height = marginSideH;\n mrStyle.width = style.marginRight;\n mrStyle.top = marginSideT;\n mrStyle.left = posLeft + pos.width + unit;\n\n // Padding style\n var padTop = parseInt(style.paddingTop.replace(unit, ''));\n ptStyle.height = style.paddingTop;\n ptStyle.width = style.width;\n ptStyle.top = pos.top + unit;\n ptStyle.left = posLeft + unit;\n\n var padBot = parseInt(style.paddingBottom.replace(unit, ''));\n pbStyle.height = style.paddingBottom;\n pbStyle.width = style.width;\n pbStyle.top = pos.top + pos.height - padBot + unit;\n pbStyle.left = posLeft + unit;\n\n var padSideH = pos.height - padBot - padTop + unit;\n var padSideT = pos.top + padTop + unit;\n plStyle.height = padSideH;\n plStyle.width = style.paddingLeft;\n plStyle.top = padSideT;\n plStyle.left = pos.left + unit;\n\n var padRight = parseInt(style.paddingRight.replace(unit, ''));\n prStyle.height = padSideH;\n prStyle.width = style.paddingRight;\n prStyle.top = padSideT;\n prStyle.left = pos.left + pos.width - padRight + unit;\n },\n\n stop(editor, sender, opts) {\n var opt = opts || {};\n var state = opt.state || '';\n var method = this.getOffsetMethod(state);\n var canvas = editor.Canvas;\n var offsetViewer = canvas[method]();\n offsetViewer.style.display = 'none';\n }\n};\n","module.exports = {\n run(editor, sender, opts = {}) {\n const modal = editor.Modal;\n const am = editor.AssetManager;\n const config = am.getConfig();\n const amContainer = am.getContainer();\n const title = opts.modalTitle || config.modalTitle || '';\n const types = opts.types;\n const accept = opts.accept;\n\n am.setTarget(opts.target);\n am.onClick(opts.onClick);\n am.onDblClick(opts.onDblClick);\n am.onSelect(opts.onSelect);\n\n if (!this.rendered || types) {\n let assets = am.getAll();\n\n if (types) {\n assets = assets.filter(a => types.indexOf(a.get('type')) !== -1);\n }\n\n am.render(assets);\n this.rendered = 1;\n }\n\n if (accept) {\n const uploadEl = amContainer.querySelector(\n `input#${config.stylePrefix}uploadFile`\n );\n uploadEl && uploadEl.setAttribute('accept', accept);\n }\n\n modal.setTitle(title);\n modal.setContent(amContainer);\n modal.open();\n }\n};\n","module.exports = {\n run(editor, sender) {\n const bm = editor.BlockManager;\n const pn = editor.Panels;\n\n if (!this.blocks) {\n bm.render();\n const id = 'views-container';\n const blocks = document.createElement('div');\n const panels = pn.getPanel(id) || pn.addPanel({ id });\n blocks.appendChild(bm.getContainer());\n panels.set('appendContent', blocks).trigger('change:appendContent');\n this.blocks = blocks;\n }\n\n this.blocks.style.display = 'block';\n },\n\n stop() {\n const blocks = this.blocks;\n blocks && (blocks.style.display = 'none');\n }\n};\n","const $ = require('backbone').$;\n\nmodule.exports = {\n run(editor, sender) {\n this.sender = sender;\n\n var config = editor.Config;\n var pfx = config.stylePrefix;\n var tm = editor.TraitManager;\n var panelC;\n\n if (!this.$cn) {\n var tmView = tm.getTraitsViewer();\n var confTm = tm.getConfig();\n this.$cn = $('
');\n this.$cn2 = $('
');\n this.$cn.append(this.$cn2);\n this.$header = $('
').append(\n `
${confTm.textNoElement}
`\n );\n this.$cn.append(this.$header);\n this.$cn2.append(\n `
${confTm.labelContainer}
`\n );\n this.$cn2.append(tmView.render().el);\n var panels = editor.Panels;\n\n if (!panels.getPanel('views-container'))\n panelC = panels.addPanel({ id: 'views-container' });\n else panelC = panels.getPanel('views-container');\n\n panelC\n .set('appendContent', this.$cn.get(0))\n .trigger('change:appendContent');\n\n this.target = editor.getModel();\n this.listenTo(this.target, 'component:toggled', this.toggleTm);\n }\n\n this.toggleTm();\n },\n\n /**\n * Toggle Trait Manager visibility\n * @private\n */\n toggleTm() {\n const sender = this.sender;\n if (sender && sender.get && !sender.get('active')) return;\n\n if (this.target.getSelectedAll().length === 1) {\n this.$cn2.show();\n this.$header.hide();\n } else {\n this.$cn2.hide();\n this.$header.show();\n }\n },\n\n stop() {\n this.$cn2 && this.$cn2.hide();\n this.$header && this.$header.hide();\n }\n};\n","import Backbone from 'backbone';\nconst StyleManager = require('style_manager');\nconst $ = Backbone.$;\n\nmodule.exports = {\n run(em, sender) {\n this.sender = sender;\n if (!this.$cn) {\n var config = em.getConfig(),\n panels = em.Panels;\n // Main container\n this.$cn = $('
');\n // Secondary container\n this.$cn2 = $('
');\n this.$cn.append(this.$cn2);\n\n // Device Manager\n var dvm = em.DeviceManager;\n if (dvm && config.showDevices) {\n var devicePanel = panels.addPanel({ id: 'devices-c' });\n devicePanel\n .set('appendContent', dvm.render())\n .trigger('change:appendContent');\n }\n\n // Class Manager container\n var clm = em.SelectorManager;\n if (clm) this.$cn2.append(clm.render([]));\n\n this.$cn2.append(em.StyleManager.render());\n var smConfig = em.StyleManager.getConfig();\n const pfx = smConfig.stylePrefix;\n // Create header\n this.$header = $(\n `
${smConfig.textNoElement}
`\n );\n this.$cn.append(this.$header);\n\n // Create panel if not exists\n if (!panels.getPanel('views-container'))\n this.panel = panels.addPanel({ id: 'views-container' });\n else this.panel = panels.getPanel('views-container');\n\n // Add all containers to the panel\n this.panel.set('appendContent', this.$cn).trigger('change:appendContent');\n\n this.target = em.editor;\n this.listenTo(this.target, 'component:toggled', this.toggleSm);\n }\n this.toggleSm();\n },\n\n /**\n * Toggle Style Manager visibility\n * @private\n */\n toggleSm() {\n const { target, sender } = this;\n if (sender && sender.get && !sender.get('active')) return;\n\n if (target.getSelectedAll().length === 1) {\n this.$cn2.show();\n this.$header.hide();\n } else {\n this.$cn2.hide();\n this.$header.show();\n }\n },\n\n stop() {\n // Hide secondary container if exists\n if (this.$cn2) this.$cn2.hide();\n\n // Hide header container if exists\n if (this.$header) this.$header.hide();\n }\n};\n","import Backbone from 'backbone';\nconst Layers = require('navigator');\nconst $ = Backbone.$;\n\nmodule.exports = {\n run(editor) {\n const lm = editor.LayerManager;\n const pn = editor.Panels;\n\n if (!this.layers) {\n const id = 'views-container';\n const layers = document.createElement('div');\n const panels = pn.getPanel(id) || pn.addPanel({ id });\n layers.appendChild(lm.render());\n panels.set('appendContent', layers).trigger('change:appendContent');\n this.layers = layers;\n }\n\n this.layers.style.display = 'block';\n },\n\n stop() {\n const layers = this.layers;\n layers && (layers.style.display = 'none');\n }\n};\n","module.exports = {\n run(ed) {\n ed.Canvas.getBody().className = this.ppfx + 'dashed';\n },\n\n stop(ed) {\n ed.Canvas.getBody().className = '';\n }\n};\n","import _ from 'underscore';\nimport Backbone from 'backbone';\nvar CreateComponent = require('./CreateComponent');\n\nmodule.exports = _.extend({}, CreateComponent, {\n /**\n * This event is triggered at the beginning of a draw operation\n * @param {Object} component Object component before creation\n * @private\n * */\n beforeDraw(component) {\n component.type = 'text';\n if (!component.style) component.style = {};\n component.style.padding = '10px';\n },\n\n /**\n * This event is triggered at the end of a draw operation\n * @param {Object} model Component model created\n * @private\n * */\n afterDraw(model) {\n if (!model || !model.set) return;\n model.trigger('focus');\n if (this.sender) this.sender.set('active', false);\n }\n});\n","import _ from 'underscore';\nimport Backbone from 'backbone';\nimport { on, off } from 'utils/mixins';\n\nconst SelectComponent = require('./SelectComponent');\nconst SelectPosition = require('./SelectPosition');\nconst $ = Backbone.$;\n\nmodule.exports = _.extend({}, SelectPosition, SelectComponent, {\n init(o) {\n SelectComponent.init.apply(this, arguments);\n _.bindAll(this, 'initSorter', 'rollback', 'onEndMove');\n this.opt = o;\n this.hoverClass = this.ppfx + 'highlighter-warning';\n this.badgeClass = this.ppfx + 'badge-warning';\n this.noSelClass = this.ppfx + 'no-select';\n },\n\n enable(...args) {\n SelectComponent.enable.apply(this, args);\n this.getBadgeEl().addClass(this.badgeClass);\n this.getHighlighterEl().addClass(this.hoverClass);\n var wp = this.$wrapper;\n wp.css('cursor', 'move');\n wp.on('mousedown', this.initSorter);\n\n // Avoid strange moving behavior\n wp.addClass(this.noSelClass);\n },\n\n /**\n * Overwrite for doing nothing\n * @private\n */\n toggleClipboard() {},\n\n /**\n * Delegate sorting\n * @param {Event} e\n * @private\n * */\n initSorter(e) {\n var el = $(e.target).data('model');\n var drag = el.get('draggable');\n if (!drag) return;\n\n // Avoid badge showing on move\n this.cacheEl = null;\n this.startSelectPosition(e.target, this.frameEl.contentDocument);\n this.sorter.draggable = drag;\n this.sorter.onEndMove = this.onEndMove.bind(this);\n this.stopSelectComponent();\n this.$wrapper.off('mousedown', this.initSorter);\n on(this.getContentWindow(), 'keydown', this.rollback);\n },\n\n /**\n * Init sorter from model\n * @param {Object} model\n * @private\n */\n initSorterFromModel(model) {\n var drag = model.get('draggable');\n if (!drag) return;\n // Avoid badge showing on move\n this.cacheEl = null;\n var el = model.view.el;\n this.startSelectPosition(el, this.frameEl.contentDocument);\n this.sorter.draggable = drag;\n this.sorter.onEndMove = this.onEndMoveFromModel.bind(this);\n\n /*\n this.sorter.setDragHelper(el);\n var dragHelper = this.sorter.dragHelper;\n dragHelper.className = this.ppfx + 'drag-helper';\n dragHelper.innerHTML = '';\n dragHelper.backgroundColor = 'white';\n */\n\n this.stopSelectComponent();\n on(this.getContentWindow(), 'keydown', this.rollback);\n },\n\n /**\n * Init sorter from models\n * @param {Object} model\n * @private\n */\n initSorterFromModels(models) {\n // TODO: if one only check for `draggable`\n // Avoid badge showing on move\n this.cacheEl = null;\n const lastModel = models[models.length - 1];\n const doc = this.frameEl.contentDocument;\n this.startSelectPosition(lastModel.view.el, doc);\n this.sorter.draggable = lastModel.get('draggable');\n this.sorter.toMove = models;\n this.sorter.onEndMove = this.onEndMoveFromModel.bind(this);\n this.stopSelectComponent();\n on(this.getContentWindow(), 'keydown', this.rollback);\n },\n\n onEndMoveFromModel() {\n off(this.getContentWindow(), 'keydown', this.rollback);\n },\n\n /**\n * Callback after sorting\n * @private\n */\n onEndMove() {\n this.enable();\n off(this.getContentWindow(), 'keydown', this.rollback);\n },\n\n /**\n * Say what to do after the component was selected (selectComponent)\n * @param {Event} e\n * @param {Object} Selected element\n * @private\n * */\n onSelect(e, el) {},\n\n /**\n * Used to bring the previous situation before start moving the component\n * @param {Event} e\n * @param {Boolean} Indicates if rollback in anycase\n * @private\n * */\n rollback(e, force) {\n var key = e.which || e.keyCode;\n if (key == this.opt.ESCAPE_KEY || force) {\n this.sorter.moved = false;\n this.sorter.endMove();\n }\n return;\n },\n\n /**\n * Returns badge element\n * @return {HTMLElement}\n * @private\n */\n getBadgeEl() {\n if (!this.$badge) this.$badge = $(this.getBadge());\n return this.$badge;\n },\n\n /**\n * Returns highlighter element\n * @return {HTMLElement}\n * @private\n */\n getHighlighterEl() {\n if (!this.$hl) this.$hl = $(this.canvas.getHighlighter());\n return this.$hl;\n },\n\n stop(...args) {\n SelectComponent.stop.apply(this, args);\n this.getBadgeEl().removeClass(this.badgeClass);\n this.getHighlighterEl().removeClass(this.hoverClass);\n var wp = this.$wrapper;\n wp.css('cursor', '')\n .unbind()\n .removeClass(this.noSelClass);\n }\n});\n","import _ from 'underscore';\nimport Backbone from 'backbone';\nvar InsertCustom = require('./InsertCustom');\n\nmodule.exports = _.extend({}, InsertCustom, {\n /**\n * Trigger before insert\n * @param {Object} object\n * @private\n *\n * */\n beforeInsert(object) {\n object.type = 'image';\n object.style = {};\n object.attributes = {};\n object.attributes.onmousedown = 'return false';\n if (\n this.config.firstCentered &&\n this.getCanvasWrapper() == this.sorter.target\n ) {\n object.style.margin = '0 auto';\n }\n },\n\n /**\n * Trigger after insert\n * @param {Object} model Model created after insert\n * @private\n * */\n afterInsert(model) {\n model.trigger('dblclick');\n if (this.sender) this.sender.set('active', false);\n }\n});\n","import _ from 'underscore';\nimport Backbone from 'backbone';\nconst SelectComponent = require('./SelectComponent');\nconst $ = Backbone.$;\n\nmodule.exports = _.extend({}, SelectComponent, {\n init(o) {\n _.bindAll(this, 'startDelete', 'stopDelete', 'onDelete');\n this.hoverClass = this.pfx + 'hover-delete';\n this.badgeClass = this.pfx + 'badge-red';\n },\n\n enable() {\n var that = this;\n this.$el\n .find('*')\n .mouseover(this.startDelete)\n .mouseout(this.stopDelete)\n .click(this.onDelete);\n },\n\n /**\n * Start command\n * @param {Object} e\n * @private\n */\n startDelete(e) {\n e.stopPropagation();\n var $this = $(e.target);\n\n // Show badge if possible\n if ($this.data('model').get('removable')) {\n $this.addClass(this.hoverClass);\n this.attachBadge($this.get(0));\n }\n },\n\n /**\n * Stop command\n * @param {Object} e\n * @private\n */\n stopDelete(e) {\n e.stopPropagation();\n var $this = $(e.target);\n $this.removeClass(this.hoverClass);\n\n // Hide badge if possible\n if (this.badge) this.badge.css({ left: -1000, top: -1000 });\n },\n\n /**\n * Delete command\n * @param {Object} e\n * @private\n */\n onDelete(e) {\n e.stopPropagation();\n var $this = $(e.target);\n\n // Do nothing in case can't remove\n if (!$this.data('model').get('removable')) return;\n\n $this.data('model').destroy();\n this.removeBadge();\n this.clean();\n },\n\n /**\n * Updates badge label\n * @param {Object} model\n * @private\n * */\n updateBadgeLabel(model) {\n this.badge.html('Remove ' + model.getName());\n }\n});\n","import Backbone from 'backbone';\nconst $ = Backbone.$;\n\nmodule.exports = {\n run(editor, sender, opts = {}) {\n sender && sender.set && sender.set('active', 0);\n const config = editor.getConfig();\n const modal = editor.Modal;\n const pfx = config.stylePrefix;\n this.cm = editor.CodeManager || null;\n\n if (!this.$editors) {\n const oHtmlEd = this.buildEditor('htmlmixed', 'hopscotch', 'HTML');\n const oCsslEd = this.buildEditor('css', 'hopscotch', 'CSS');\n this.htmlEditor = oHtmlEd.el;\n this.cssEditor = oCsslEd.el;\n const $editors = $(`
`);\n $editors.append(oHtmlEd.$el).append(oCsslEd.$el);\n this.$editors = $editors;\n }\n\n modal.setTitle(config.textViewCode);\n modal.setContent(this.$editors);\n modal.open();\n this.htmlEditor.setContent(editor.getHtml());\n this.cssEditor.setContent(editor.getCss());\n },\n\n stop(editor) {\n const modal = editor.Modal;\n modal && modal.close();\n },\n\n buildEditor(codeName, theme, label) {\n const input = document.createElement('textarea');\n !this.codeMirror && (this.codeMirror = this.cm.getViewer('CodeMirror'));\n\n const el = this.codeMirror.clone().set({\n label,\n codeName,\n theme,\n input\n });\n\n const $el = new this.cm.EditorView({\n model: el,\n config: this.cm.getConfig()\n }).render().$el;\n\n el.init(input);\n\n return { el, $el };\n }\n};\n","import Backbone from 'backbone';\nconst $ = Backbone.$;\n\nmodule.exports = Backbone.View.extend({\n /**\n * Initialize method that can't be removed\n * @param {Object} o Options\n * @private\n * */\n initialize(o) {\n this.config = o || {};\n this.editorModel = this.em = this.config.em || {};\n this.pfx = this.config.stylePrefix;\n this.ppfx = this.config.pStylePrefix;\n this.hoverClass = this.pfx + 'hover';\n this.badgeClass = this.pfx + 'badge';\n this.plhClass = this.pfx + 'placeholder';\n this.freezClass = this.ppfx + 'freezed';\n\n this.canvas = this.em.get && this.em.get('Canvas');\n\n if (this.em.get) this.setElement(this.getCanvas());\n\n if (this.canvas) {\n this.$canvas = this.$el;\n this.$wrapper = $(this.getCanvasWrapper());\n this.frameEl = this.canvas.getFrameEl();\n this.canvasTool = this.getCanvasTools();\n this.bodyEl = this.getCanvasBody();\n }\n\n this.init(this.config);\n },\n\n /**\n * On frame scroll callback\n * @param {[type]} e [description]\n * @return {[type]} [description]\n */\n onFrameScroll(e) {},\n\n /**\n * Returns canval element\n * @return {HTMLElement}\n */\n getCanvas() {\n return this.canvas.getElement();\n },\n\n /**\n * Get canvas body element\n * @return {HTMLElement}\n */\n getCanvasBody() {\n return this.canvas.getBody();\n },\n\n /**\n * Get canvas wrapper element\n * @return {HTMLElement}\n */\n getCanvasWrapper() {\n return this.canvas.getWrapperEl();\n },\n\n /**\n * Get canvas wrapper element\n * @return {HTMLElement}\n */\n getCanvasTools() {\n return this.canvas.getToolsEl();\n },\n\n /**\n * Get the offset of the element\n * @param {HTMLElement} el\n * @return {Object}\n */\n offset(el) {\n var rect = el.getBoundingClientRect();\n return {\n top: rect.top + el.ownerDocument.body.scrollTop,\n left: rect.left + el.ownerDocument.body.scrollLeft\n };\n },\n\n /**\n * Callback triggered after initialize\n * @param {Object} o Options\n * @private\n * */\n init(o) {},\n\n /**\n * Method that run command\n * @param {Object} editor Editor instance\n * @param {Object} [options={}] Options\n * @private\n * */\n callRun(editor, options = {}) {\n const id = this.id;\n editor.trigger(`run:${id}:before`, options);\n\n if (options && options.abort) {\n editor.trigger(`abort:${id}`, options);\n return;\n }\n\n const sender = options.sender || editor;\n const result = this.run(editor, sender, options);\n editor.trigger(`run:${id}`, result, options);\n return result;\n },\n\n /**\n * Method that run command\n * @param {Object} editor Editor instance\n * @param {Object} [options={}] Options\n * @private\n * */\n callStop(editor, options = {}) {\n const id = this.id;\n const sender = options.sender || editor;\n editor.trigger(`stop:${id}:before`, options);\n const result = this.stop(editor, sender, options);\n editor.trigger(`stop:${id}`, result, options);\n return result;\n },\n\n /**\n * Method that run command\n * @param {Object} em Editor model\n * @param {Object} sender Button sender\n * @private\n * */\n run(em, sender) {},\n\n /**\n * Method that stop command\n * @param {Object} em Editor model\n * @param {Object} sender Button sender\n * @private\n * */\n stop(em, sender) {}\n});\n","const Component = require('./Component');\n\nmodule.exports = Component.extend({\n defaults: {\n ...Component.prototype.defaults,\n type: 'text',\n droppable: false,\n editable: true\n }\n});\n","var Component = require('./Component');\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n type: 'image',\n tagName: 'img',\n src: '',\n void: 1,\n droppable: 0,\n editable: 1,\n highlightable: 0,\n resizable: 1,\n traits: ['alt'],\n\n // File to load asynchronously once the model is rendered\n file: ''\n },\n\n initialize(o, opt) {\n Component.prototype.initialize.apply(this, arguments);\n var attr = this.get('attributes');\n if (attr.src) this.set('src', attr.src);\n },\n\n initToolbar(...args) {\n Component.prototype.initToolbar.apply(this, args);\n const em = this.em;\n\n if (em) {\n var cmd = em.get('Commands');\n var cmdName = 'image-editor';\n\n // Add Image Editor button only if the default command exists\n if (cmd.has(cmdName)) {\n let hasButtonBool = false;\n var tb = this.get('toolbar');\n\n for (let i = 0; i < tb.length; i++) {\n if (tb[i].command === 'image-editor') {\n hasButtonBool = true;\n break;\n }\n }\n\n if (!hasButtonBool) {\n tb.push({\n attributes: { class: 'fa fa-pencil' },\n command: cmdName\n });\n this.set('toolbar', tb);\n }\n }\n }\n },\n\n /**\n * Returns object of attributes for HTML\n * @return {Object}\n * @private\n */\n getAttrToHTML(...args) {\n var attr = Component.prototype.getAttrToHTML.apply(this, args);\n delete attr.onmousedown;\n var src = this.get('src');\n if (src) attr.src = src;\n return attr;\n },\n\n /**\n * Parse uri\n * @param {string} uri\n * @return {object}\n * @private\n */\n parseUri(uri) {\n var el = document.createElement('a');\n el.href = uri;\n var query = {};\n var qrs = el.search.substring(1).split('&');\n for (var i = 0; i < qrs.length; i++) {\n var pair = qrs[i].split('=');\n var name = decodeURIComponent(pair[0]);\n if (name) query[name] = decodeURIComponent(pair[1]);\n }\n return {\n hostname: el.hostname,\n pathname: el.pathname,\n protocol: el.protocol,\n search: el.search,\n hash: el.hash,\n port: el.port,\n query\n };\n }\n },\n {\n /**\n * Detect if the passed element is a valid component.\n * In case the element is valid an object abstracted\n * from the element will be returned\n * @param {HTMLElement}\n * @return {Object}\n * @private\n */\n isComponent(el) {\n var result = '';\n if (el.tagName == 'IMG') {\n result = { type: 'image' };\n }\n return result;\n }\n }\n);\n","const Component = require('./Component');\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n type: 'tbody',\n tagName: 'tbody',\n draggable: ['table'],\n droppable: ['tr'],\n columns: 1,\n rows: 1\n },\n\n initialize(o, opt) {\n Component.prototype.initialize.apply(this, arguments);\n const components = this.get('components');\n let columns = this.get('columns');\n let rows = this.get('rows');\n\n // Init components if empty\n if (!components.length) {\n const rowsToAdd = [];\n\n while (rows--) {\n const columnsToAdd = [];\n let clm = columns;\n\n while (clm--) {\n columnsToAdd.push({\n type: 'cell',\n classes: ['cell']\n });\n }\n\n rowsToAdd.push({\n type: 'row',\n classes: ['row'],\n components: columnsToAdd\n });\n }\n\n components.add(rowsToAdd);\n }\n }\n },\n {\n isComponent(el) {\n let result = '';\n\n if (el.tagName == 'TBODY') {\n result = { type: 'tbody' };\n }\n\n return result;\n }\n }\n);\n","import { bindAll, isUndefined } from 'underscore';\nimport { on, off } from 'utils/mixins';\nconst Input = require('./Input');\nconst Backbone = require('backbone');\nconst $ = Backbone.$;\n\nmodule.exports = Input.extend({\n events: {\n 'change input': 'handleChange',\n 'change select': 'handleUnitChange',\n 'click [data-arrow-up]': 'upArrowClick',\n 'click [data-arrow-down]': 'downArrowClick',\n 'mousedown [data-arrows]': 'downIncrement'\n },\n\n template() {\n const ppfx = this.ppfx;\n return `\n \n \n
\n
\n
\n
\n `;\n },\n\n inputClass() {\n const ppfx = this.ppfx;\n return this.opts.contClass || `${ppfx}field ${ppfx}field-integer`;\n },\n\n initialize(opts = {}) {\n Input.prototype.initialize.apply(this, arguments);\n bindAll(this, 'moveIncrement', 'upIncrement');\n this.doc = document;\n this.listenTo(this.model, 'change:unit', this.handleModelChange);\n },\n\n /**\n * Set value to the model\n * @param {string} value\n * @param {Object} opts\n */\n setValue(value, opts) {\n var opt = opts || {};\n var valid = this.validateInputValue(value, { deepCheck: 1 });\n var validObj = { value: valid.value };\n\n // If found some unit value\n if (valid.unit || valid.force) {\n validObj.unit = valid.unit;\n }\n\n this.model.set(validObj, opt);\n\n // Generally I get silent when I need to reflect data to view without\n // reupdating the target\n if (opt.silent) {\n this.handleModelChange();\n }\n },\n\n /**\n * Handled when the view is changed\n */\n handleChange(e) {\n e.stopPropagation();\n this.setValue(this.getInputEl().value);\n this.elementUpdated();\n },\n\n /**\n * Handled when the view is changed\n */\n handleUnitChange(e) {\n e.stopPropagation();\n var value = this.getUnitEl().value;\n this.model.set('unit', value);\n this.elementUpdated();\n },\n\n /**\n * Fired when the element of the property is updated\n */\n elementUpdated() {\n this.model.trigger('el:change');\n },\n\n /**\n * Updates the view when the model is changed\n * */\n handleModelChange() {\n const model = this.model;\n this.getInputEl().value = model.get('value');\n const unitEl = this.getUnitEl();\n unitEl && (unitEl.value = model.get('unit') || '');\n },\n\n /**\n * Get the unit element\n * @return {HTMLElement}\n */\n getUnitEl() {\n if (!this.unitEl) {\n const model = this.model;\n const units = model.get('units') || [];\n\n if (units.length) {\n const options = [];\n\n units.forEach(unit => {\n const selected = unit == model.get('unit') ? 'selected' : '';\n options.push(``);\n });\n\n const temp = document.createElement('div');\n temp.innerHTML = ``;\n this.unitEl = temp.firstChild;\n }\n }\n\n return this.unitEl;\n },\n\n /**\n * Invoked when the up arrow is clicked\n * */\n upArrowClick() {\n const model = this.model;\n const step = model.get('step');\n let value = parseInt(model.get('value'), 10);\n value = this.normalizeValue(value + step);\n var valid = this.validateInputValue(value);\n model.set('value', valid.value);\n this.elementUpdated();\n },\n\n /**\n * Invoked when the down arrow is clicked\n * */\n downArrowClick() {\n const model = this.model;\n const step = model.get('step');\n const value = parseInt(model.get('value'), 10);\n const val = this.normalizeValue(value - step);\n var valid = this.validateInputValue(val);\n model.set('value', valid.value);\n this.elementUpdated();\n },\n\n /**\n * Change easily integer input value with click&drag method\n * @param Event\n *\n * @return void\n * */\n downIncrement(e) {\n e.preventDefault();\n this.moved = 0;\n var value = this.model.get('value');\n value = this.normalizeValue(value);\n this.current = { y: e.pageY, val: value };\n on(this.doc, 'mousemove', this.moveIncrement);\n on(this.doc, 'mouseup', this.upIncrement);\n },\n\n /** While the increment is clicked, moving the mouse will update input value\n * @param Object\n *\n * @return bool\n * */\n moveIncrement(ev) {\n this.moved = 1;\n const model = this.model;\n const step = model.get('step');\n const data = this.current;\n var pos = this.normalizeValue(data.val + (data.y - ev.pageY) * step);\n this.prValue = this.validateInputValue(pos).value;\n model.set('value', this.prValue, { avoidStore: 1 });\n return false;\n },\n\n /**\n * Stop moveIncrement method\n * */\n upIncrement() {\n const model = this.model;\n const step = model.get('step');\n off(this.doc, 'mouseup', this.upIncrement);\n off(this.doc, 'mousemove', this.moveIncrement);\n\n if (this.prValue && this.moved) {\n var value = this.prValue - step;\n model.set('value', value, { avoidStore: 1 }).set('value', value + step);\n this.elementUpdated();\n }\n },\n\n normalizeValue(value, defValue = 0) {\n const model = this.model;\n const step = model.get('step');\n let stepDecimals = 0;\n\n if (isNaN(value)) {\n return defValue;\n }\n\n value = parseFloat(value);\n\n if (Math.floor(value) !== value) {\n const side = step.toString().split('.')[1];\n stepDecimals = side ? side.length : 0;\n }\n\n return stepDecimals ? parseFloat(value.toFixed(stepDecimals)) : value;\n },\n\n /**\n * Validate input value\n * @param {String} value Raw value\n * @param {Object} opts Options\n * @return {Object} Validated string\n */\n validateInputValue(value, opts) {\n var force = 0;\n var opt = opts || {};\n var model = this.model;\n const defValue = ''; //model.get('defaults');\n var val = !isUndefined(value) ? value : defValue;\n var units = model.get('units') || [];\n var unit = model.get('unit') || (units.length && units[0]) || '';\n var max = model.get('max');\n var min = model.get('min');\n\n if (opt.deepCheck) {\n var fixed = model.get('fixedValues') || [];\n\n if (val) {\n // If the value is one of the fixed values I leave it as it is\n var regFixed = new RegExp('^' + fixed.join('|'), 'g');\n if (fixed.length && regFixed.test(val)) {\n val = val.match(regFixed)[0];\n unit = '';\n force = 1;\n } else {\n var valCopy = val + '';\n val += ''; // Make it suitable for replace\n val = parseFloat(val.replace(',', '.'));\n val = !isNaN(val) ? val : defValue;\n var uN = valCopy.replace(val, '');\n // Check if exists as unit\n if (_.indexOf(units, uN) >= 0) unit = uN;\n }\n }\n }\n\n if (!isUndefined(max) && max !== '') val = val > max ? max : val;\n if (!isUndefined(min) && min !== '') val = val < min ? min : val;\n\n return {\n force,\n value: val,\n unit\n };\n },\n\n render() {\n Input.prototype.render.call(this);\n const unit = this.getUnitEl();\n unit &&\n this.$el\n .find(`.${this.ppfx}field-units`)\n .get(0)\n .appendChild(unit);\n return this;\n }\n});\n","import Backbone from 'backbone';\nconst PropertyView = require('./PropertyView');\nconst $ = Backbone.$;\n\nmodule.exports = PropertyView.extend({\n templateInput() {\n const pfx = this.pfx;\n return `\n
\n \n
\n `;\n },\n\n inputValueChanged(...args) {\n // If it's not detached (eg. 'padding: 1px 2px 3px 4px;') it will follow\n // the same flow of PropertyView\n if (!this.model.get('detached')) {\n PropertyView.prototype.inputValueChanged.apply(this, args);\n }\n },\n\n clear(e) {\n const props = this.properties;\n props && props.forEach(propView => propView.clear());\n PropertyView.prototype.clear.apply(this, arguments);\n },\n\n /**\n * Renders input\n * */\n onRender() {\n var model = this.model;\n var props = model.get('properties') || [];\n var self = this;\n this.properties = [];\n\n if (props.length) {\n if (!this.$input) {\n this.$input = $('');\n this.input = this.$input.get(0);\n }\n\n if (!this.props) {\n this.props = model.get('properties');\n }\n\n if (!this.$props) {\n //Not yet supported nested composite\n this.props.each(function(prop, index) {\n if (prop && prop.get('type') == 'composite') {\n this.props.remove(prop);\n console.warn('Nested composite types not yet allowed.');\n }\n prop.parent = model;\n }, this);\n\n var PropertiesView = require('./PropertiesView');\n var propsView = new PropertiesView(this.getPropsConfig());\n this.$props = propsView.render().$el;\n this.properties = propsView.properties;\n this.$el.find(`#${this.pfx}input-holder`).append(this.$props);\n }\n }\n },\n\n /**\n * Returns configurations that should be past to properties\n * @param {Object} opts\n * @return {Object}\n */\n getPropsConfig(opts) {\n var that = this;\n const model = this.model;\n\n var result = {\n config: this.config,\n collection: this.props,\n target: this.target,\n propTarget: this.propTarget,\n // On any change made to children I need to update composite value\n onChange(el, view, opts) {\n model.set('value', model.getFullValue(), opts);\n },\n // Each child property will receive a full composite string, eg. '0px 0px 10px 0px'\n // I need to extract from that string the corresponding one to that property.\n customValue(property, mIndex) {\n return that.valueOnIndex(mIndex, property);\n }\n };\n\n // If detached let follow its standard flow\n if (model.get('detached')) {\n delete result.onChange;\n }\n\n return result;\n },\n\n /**\n * Extract string from composite value\n * @param {number} index Index\n * @param {Object} view Property view\n * @return {string}\n * */\n valueOnIndex(index, view) {\n let value;\n const targetValue = this.getTargetValue({ ignoreDefault: 1 });\n\n // If the target value of the composite is not empty I'll fetch\n // the corresponding value from the requested index, otherwise try\n // to get the value of the sub-property\n if (targetValue) {\n const values = targetValue.split(' ');\n value = values[index];\n } else {\n value =\n view && view.getTargetValue({ ignoreCustomValue: 1, ignoreDefault: 1 });\n }\n\n if (view) {\n value = view.model.parseValue(value).value;\n }\n\n return value;\n }\n});\n","import Backbone from 'backbone';\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n id: '',\n label: '',\n open: true,\n attributes: {}\n }\n});\n","import { isArray, contains } from 'underscore';\n\nmodule.exports = {\n run(ed) {\n const em = ed.getModel();\n const clp = em.get('clipboard');\n const selected = ed.getSelected();\n\n if (clp && selected && !em.isEditing()) {\n ed.getSelectedAll().forEach(comp => {\n if (!comp) return;\n const coll = comp.collection;\n const at = coll.indexOf(comp) + 1;\n const copyable = clp.filter(cop => cop.get('copyable'));\n let added;\n\n if (contains(clp, comp) && comp.get('copyable')) {\n added = coll.add(comp.clone(), { at });\n } else {\n added = coll.add(copyable.map(cop => cop.clone()), { at });\n }\n\n added = isArray(added) ? added : [added];\n added.forEach(add => ed.trigger('component:clone', add));\n });\n\n selected.emitUpdate();\n }\n }\n};\n","module.exports = {\n run(ed) {\n const em = ed.getModel();\n const models = [...ed.getSelectedAll()];\n\n if (models.length && !em.isEditing()) {\n em.set('clipboard', models);\n }\n }\n};\n","module.exports = {\n run(ed) {\n if (!ed.Canvas.hasFocus() || ed.getModel().isEditing()) return;\n const toSelect = [];\n\n ed.getSelectedAll().forEach(component => {\n const coll = component.collection;\n const at = coll.indexOf(component);\n const next = coll.at(at - 1);\n toSelect.push(next && at - 1 >= 0 ? next : component);\n });\n\n toSelect.length && ed.select(toSelect);\n }\n};\n","module.exports = {\n run(ed) {\n if (!ed.Canvas.hasFocus() || ed.getModel().isEditing()) return;\n const toSelect = [];\n\n ed.getSelectedAll().forEach(component => {\n const coll = component.collection;\n const at = coll.indexOf(component);\n const next = coll.at(at + 1);\n toSelect.push(next || component);\n });\n\n toSelect.length && ed.select(toSelect);\n }\n};\n","module.exports = {\n run(ed) {\n if (!ed.Canvas.hasFocus() || ed.getModel().isEditing()) return;\n const toSelect = [];\n\n ed.getSelectedAll().forEach(component => {\n const next = component.parent();\n next && toSelect.push(next);\n });\n\n toSelect.length && ed.select(toSelect);\n }\n};\n","module.exports = {\n run(ed) {\n if (!ed.Canvas.hasFocus() || ed.getModel().isEditing()) return;\n const toSelect = [];\n\n ed.getSelectedAll().forEach(component => {\n const coll = component.components();\n const next = coll && coll.at(0);\n next && toSelect.push(next);\n });\n\n toSelect.length && ed.select(toSelect);\n }\n};\n","import { isArray } from 'underscore';\n\nmodule.exports = {\n run(ed, sender, opts = {}) {\n if (ed.getModel().isEditing()) return;\n let components = opts.component || ed.getSelectedAll();\n components = isArray(components) ? [...components] : [components];\n\n // It's important to deselect components first otherwise,\n // with undo, the component will be set with the wrong `collection`\n ed.select(null);\n\n components.forEach(component => {\n if (!component || !component.get('removable')) {\n console.warn('The element is not removable', component);\n return;\n }\n if (component) {\n const coll = component.collection;\n coll && coll.remove(component);\n }\n });\n\n return components;\n }\n};\n","module.exports = {\n run(ed) {\n ed.DomComponents.clear();\n ed.CssComposer.clear();\n }\n};\n","import { isUndefined, isString } from 'underscore';\nimport { getModel } from 'utils/mixins';\nimport Backbone from 'backbone';\nconst ComponentView = require('dom_components/view/ComponentView');\nconst inputProp = 'contentEditable';\nconst $ = Backbone.$;\nlet ItemsView;\n\nmodule.exports = Backbone.View.extend({\n events: {\n 'mousedown [data-toggle-move]': 'startSort',\n 'click [data-toggle-visible]': 'toggleVisibility',\n 'click [data-toggle-select]': 'handleSelect',\n 'mouseover [data-toggle-select]': 'handleHover',\n 'click [data-toggle-open]': 'toggleOpening',\n 'dblclick [data-name]': 'handleEdit',\n 'focusout [data-name]': 'handleEditEnd'\n },\n\n template(model) {\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const hidable = this.config.hidable;\n const count = this.countChildren(model);\n const addClass = !count ? this.clsNoChild : '';\n const clsTitle = `${this.clsTitle} ${addClass}`;\n const clsTitleC = `${this.clsTitleC} ${ppfx}one-bg`;\n const clsCaret = `${this.clsCaret} fa fa-chevron-right`;\n const clsInput = `${this.inputNameCls} ${ppfx}no-app`;\n const level = this.level + 1;\n const gut = `${30 + level * 10}px`;\n const name = model.getName();\n\n return `\n ${\n hidable\n ? ``\n : ''\n }\n
\n
\n
\n \n ${model.getIcon()}\n ${name}\n
\n
\n
\n
${count || ''}
\n
\n \n
\n
`;\n },\n\n initialize(o = {}) {\n this.opt = o;\n this.level = o.level;\n this.config = o.config;\n this.em = o.config.em;\n this.ppfx = this.em.get('Config').stylePrefix;\n this.sorter = o.sorter || '';\n this.pfx = this.config.stylePrefix;\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const model = this.model;\n const components = model.get('components');\n model.set('open', false);\n this.listenTo(components, 'remove add change reset', this.checkChildren);\n this.listenTo(model, 'change:status', this.updateStatus);\n this.listenTo(model, 'change:open', this.updateOpening);\n this.listenTo(model, 'change:style:display', this.updateVisibility);\n this.className = `${pfx}layer no-select ${ppfx}two-color`;\n this.inputNameCls = `${ppfx}layer-name`;\n this.clsTitleC = `${pfx}layer-title-c`;\n this.clsTitle = `${pfx}layer-title`;\n this.clsCaret = `${pfx}layer-caret`;\n this.clsCount = `${pfx}layer-count`;\n this.clsMove = `${pfx}layer-move`;\n this.clsChildren = `${pfx}layer-children`;\n this.clsNoChild = `${pfx}layer-no-chld`;\n this.$el.data('model', model);\n this.$el.data('collection', components);\n model.viewLayer = this;\n },\n\n getVisibilityEl() {\n if (!this.eyeEl) {\n this.eyeEl = this.$el.children(`.${this.pfx}layer-vis`);\n }\n\n return this.eyeEl;\n },\n\n updateVisibility() {\n const pfx = this.pfx;\n const model = this.model;\n const hClass = `${pfx}layer-hidden`;\n const hideIcon = 'fa-eye-slash';\n const hidden = model.getStyle().display == 'none';\n const method = hidden ? 'addClass' : 'removeClass';\n this.$el[method](hClass);\n this.getVisibilityEl()[method](hideIcon);\n },\n\n /**\n * Toggle visibility\n * @param\tEvent\n *\n * @return \tvoid\n * */\n toggleVisibility(e) {\n e && e.stopPropagation();\n const model = this.model;\n const style = model.getStyle();\n const hidden = style.display == 'none';\n\n if (hidden) {\n delete style.display;\n } else {\n style.display = 'none';\n }\n\n model.setStyle(style);\n },\n\n /**\n * Handle the edit of the component name\n */\n handleEdit(e) {\n e && e.stopPropagation();\n const inputEl = this.getInputName();\n inputEl[inputProp] = true;\n inputEl.focus();\n },\n\n /**\n * Handle with the end of editing of the component name\n */\n handleEditEnd(e) {\n e && e.stopPropagation();\n const inputEl = this.getInputName();\n const name = inputEl.textContent;\n inputEl[inputProp] = false;\n this.model.set({ name });\n },\n\n /**\n * Get the input containing the name of the component\n * @return {HTMLElement}\n */\n getInputName() {\n if (!this.inputName) {\n this.inputName = this.el.querySelector(`.${this.inputNameCls}`);\n }\n return this.inputName;\n },\n\n /**\n * Update item opening\n *\n * @return void\n * */\n updateOpening() {\n var opened = this.opt.opened || {};\n var model = this.model;\n const chvDown = 'fa-chevron-down';\n\n if (model.get('open')) {\n this.$el.addClass('open');\n this.getCaret().addClass(chvDown);\n opened[model.cid] = model;\n } else {\n this.$el.removeClass('open');\n this.getCaret().removeClass(chvDown);\n delete opened[model.cid];\n }\n },\n\n /**\n * Toggle item opening\n * @param {Object}\te\n *\n * @return void\n * */\n toggleOpening(e) {\n e.stopPropagation();\n\n if (!this.model.get('components').length) return;\n\n this.model.set('open', !this.model.get('open'));\n },\n\n /**\n * Handle component selection\n */\n handleSelect(e) {\n e.stopPropagation();\n const { em, config } = this;\n\n if (em) {\n const model = this.model;\n em.setSelected(model, { fromLayers: 1 });\n const scroll = config.scrollCanvas;\n scroll && em.get('Canvas').scrollTo(model, scroll);\n }\n },\n\n /**\n * Handle component selection\n */\n handleHover(e) {\n e.stopPropagation();\n const { em, config, model } = this;\n em && config.showHover && em.setHovered(model, { fromLayers: 1 });\n },\n\n /**\n * Delegate to sorter\n * @param\tEvent\n * */\n startSort(e) {\n e.stopPropagation();\n const sorter = this.sorter;\n // Right or middel click\n if (e.button !== 0) return;\n sorter && sorter.startSort(e.target);\n },\n\n /**\n * Freeze item\n * @return\tvoid\n * */\n freeze() {\n this.$el.addClass(this.pfx + 'opac50');\n this.model.set('open', 0);\n },\n\n /**\n * Unfreeze item\n * @return\tvoid\n * */\n unfreeze() {\n this.$el.removeClass(this.pfx + 'opac50');\n },\n\n /**\n * Update item on status change\n * @param\tEvent\n * */\n updateStatus(e) {\n ComponentView.prototype.updateStatus.apply(this, [\n {\n avoidHover: !this.config.highlightHover\n }\n ]);\n },\n\n /**\n * Check if component is visible\n *\n * @return bool\n * */\n isVisible() {\n var css = this.model.get('style'),\n pr = css.display;\n if (pr && pr == 'none') return;\n return 1;\n },\n\n /**\n * Update item aspect after children changes\n *\n * @return void\n * */\n checkChildren() {\n const model = this.model;\n const c = this.countChildren(model);\n const pfx = this.pfx;\n const noChildCls = this.clsNoChild;\n const title = this.$el\n .children(`.${this.clsTitleC}`)\n .children(`.${this.clsTitle}`);\n\n if (!this.cnt) {\n this.cnt = this.$el.children(`.${this.clsCount}`);\n }\n\n if (c) {\n title.removeClass(noChildCls);\n this.cnt.html(c);\n } else {\n title.addClass(noChildCls);\n this.cnt.empty();\n model.set('open', 0);\n }\n },\n\n /**\n * Count children inside model\n * @param {Object} model\n * @return {number}\n * @private\n */\n countChildren(model) {\n var count = 0;\n model.get('components').each(function(m) {\n var isCountable = this.opt.isCountable;\n var hide = this.config.hideTextnode;\n if (isCountable && !isCountable(m, hide)) return;\n count++;\n }, this);\n return count;\n },\n\n getCaret() {\n if (!this.caret || !this.caret.length) {\n const pfx = this.pfx;\n this.caret = this.$el\n .children(`.${this.clsTitleC}`)\n .find(`.${this.clsCaret}`);\n }\n\n return this.caret;\n },\n\n setRoot(el) {\n el = isString(el) ? this.em.getWrapper().find(el)[0] : el;\n const model = getModel(el, $);\n if (!model) return;\n this.stopListening();\n this.model = model;\n this.initialize(this.opt);\n this.render();\n },\n\n render() {\n const model = this.model;\n var pfx = this.pfx;\n var vis = this.isVisible();\n const el = this.$el.empty();\n const level = this.level + 1;\n\n if (isUndefined(ItemsView)) {\n ItemsView = require('./ItemsView');\n }\n\n const children = new ItemsView({\n collection: model.get('components'),\n config: this.config,\n sorter: this.sorter,\n opened: this.opt.opened,\n parent: model,\n level\n }).render().$el;\n\n if (!this.config.showWrapper && level === 1) {\n el.append(children);\n } else {\n el.html(this.template(model));\n el.find(`.${this.clsChildren}`).append(children);\n }\n\n if (!model.get('draggable') || !this.config.sortable) {\n el.children(`.${this.clsMove}`).remove();\n }\n\n !vis && (this.className += ` ${pfx}hide`);\n el.attr('class', this.className);\n this.updateOpening();\n this.updateStatus();\n this.updateVisibility();\n return this;\n }\n});\n","import defaults from './config/config';\nimport ItemView from './view/ItemView';\nimport { isElement } from 'underscore';\n\nmodule.exports = () => {\n let em;\n let layers;\n let config = {};\n\n return {\n name: 'LayerManager',\n\n init(opts = {}) {\n config = { ...defaults, ...opts };\n config.stylePrefix = opts.pStylePrefix;\n em = config.em;\n\n return this;\n },\n\n getConfig() {\n return config;\n },\n\n onLoad() {\n layers = new ItemView({\n level: 0,\n config,\n opened: config.opened || {},\n model: em.get('DomComponents').getWrapper()\n });\n em && em.on('component:selected', this.componentChanged);\n this.componentChanged();\n },\n\n postRender() {\n const elTo = config.appendTo;\n const root = config.root;\n root && this.setRoot(root);\n\n if (elTo) {\n const el = isElement(elTo) ? elTo : document.querySelector(elTo);\n el.appendChild(this.render());\n }\n },\n\n /**\n * Set new root for layers\n * @param {HTMLElement|Component|String} el Component to be set as the root\n * @return {self}\n */\n setRoot(el) {\n layers.setRoot(el);\n return this;\n },\n\n /**\n * Get the root of layers\n * @return {Component}\n */\n getRoot() {\n return layers.model;\n },\n\n /**\n * Return the view of layers\n * @return {View}\n */\n getAll() {\n return layers;\n },\n\n /**\n * Triggered when the selected component is changed\n * @private\n */\n componentChanged(selected, opts = {}) {\n if (opts.fromLayers) return;\n const opened = em.get('opened');\n const model = em.getSelected();\n const scroll = config.scrollLayers;\n let parent = model && model.collection ? model.collection.parent : null;\n for (let cid in opened) opened[cid].set('open', 0);\n\n while (parent) {\n parent.set('open', 1);\n opened[parent.cid] = parent;\n parent = parent.collection ? parent.collection.parent : null;\n }\n\n if (model && scroll) {\n const el = model.viewLayer && model.viewLayer.el;\n el && el.scrollIntoView(scroll);\n }\n },\n\n render() {\n return layers.render().el;\n }\n };\n};\n","import { on, off } from 'utils/mixins';\n\nconst ComponentView = require('./ComponentView');\n\nmodule.exports = ComponentView.extend({\n events: {\n dblclick: 'enableEditing',\n input: 'onInput'\n },\n\n initialize(o) {\n ComponentView.prototype.initialize.apply(this, arguments);\n this.disableEditing = this.disableEditing.bind(this);\n const model = this.model;\n const em = this.em;\n this.listenTo(model, 'focus active', this.enableEditing);\n this.listenTo(model, 'change:content', this.updateContent);\n this.rte = em && em.get('RichTextEditor');\n },\n\n /**\n * Enable element content editing\n * @private\n * */\n enableEditing(e) {\n e && e.stopPropagation && e.stopPropagation();\n const rte = this.rte;\n\n if (this.rteEnabled || !this.model.get('editable')) {\n return;\n }\n\n if (rte) {\n try {\n this.activeRte = rte.enable(this, this.activeRte);\n } catch (err) {\n console.error(err);\n }\n }\n\n this.rteEnabled = 1;\n this.toggleEvents(1);\n },\n\n /**\n * Disable element content editing\n * @private\n * */\n disableEditing() {\n const model = this.model;\n const editable = model.get('editable');\n const rte = this.rte;\n\n if (rte && editable) {\n try {\n rte.disable(this, this.activeRte);\n } catch (err) {\n console.error(err);\n }\n\n const content = this.getChildrenContainer().innerHTML;\n const comps = model.get('components');\n comps.length && comps.reset();\n model.set('content', '');\n\n // If there is a custom RTE the content is just baked staticly\n // inside 'content'\n if (rte.customRte) {\n // Avoid double content by removing its children components\n // and force to trigger change\n model.set('content', content);\n } else {\n const clean = model => {\n model.set({\n editable: 0,\n highlightable: 0,\n removable: 0,\n draggable: 0,\n copyable: 0,\n toolbar: ''\n });\n model.get('components').each(model => clean(model));\n };\n\n // Avoid re-render on reset with silent option\n model.trigger('change:content', model);\n comps.add(content);\n comps.each(model => clean(model));\n comps.trigger('resetNavigator');\n }\n }\n\n this.rteEnabled = 0;\n this.toggleEvents();\n },\n\n /**\n * Callback on input event\n * @param {Event} e\n */\n onInput(e) {\n const { em } = this;\n\n // Update toolbars\n em && em.trigger('change:canvasOffset');\n },\n\n /**\n * Isolate disable propagation method\n * @param {Event}\n * @private\n * */\n disablePropagation(e) {\n e.stopPropagation();\n },\n\n /**\n * Enable/Disable events\n * @param {Boolean} enable\n */\n toggleEvents(enable) {\n var method = enable ? 'on' : 'off';\n const mixins = { on, off };\n this.em.setEditing(enable);\n\n // The ownerDocument is from the frame\n var elDocs = [this.el.ownerDocument, document];\n mixins.off(elDocs, 'mousedown', this.disableEditing);\n mixins[method](elDocs, 'mousedown', this.disableEditing);\n\n // Avoid closing edit mode on component click\n this.$el.off('mousedown', this.disablePropagation);\n this.$el[method]('mousedown', this.disablePropagation);\n }\n});\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentTextView');\n\nmodule.exports = ComponentView.extend({\n render(...args) {\n ComponentView.prototype.render.apply(this, args);\n\n // I need capturing instead of bubbling as bubbled clicks from other\n // children will execute the link event\n this.el.addEventListener('click', this.prevDef, true);\n\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport { isUndefined } from 'underscore';\n\nmodule.exports = Backbone.View.extend({\n initialize(o) {\n this.opts = o || {};\n this.config = o.config || {};\n const coll = this.collection;\n this.listenTo(coll, 'add', this.addTo);\n this.listenTo(coll, 'reset', this.resetChildren);\n this.listenTo(coll, 'remove', this.removeChildren);\n },\n\n removeChildren(removed) {\n const em = this.config.em;\n const view = removed.view;\n if (!view) return;\n view.remove.apply(view);\n const children = view.childrenView;\n children && children.stopListening();\n em && em.trigger('component:remove', removed);\n },\n\n /**\n * Add to collection\n * @param {Model} model\n * @param {Collection} coll\n * @param {Object} opts\n * @private\n * */\n addTo(model, coll = {}, opts = {}) {\n const em = this.config.em;\n const i = this.collection.indexOf(model);\n this.addToCollection(model, null, i);\n\n if (em && !opts.temporary) {\n em.trigger('component:add', model);\n }\n },\n\n /**\n * Add new object to collection\n * @param {Object} Model\n * @param {Object} Fragment collection\n * @param {Integer} Index of append\n *\n * @return {Object} Object rendered\n * @private\n * */\n addToCollection(model, fragmentEl, index) {\n if (!this.compView) this.compView = require('./ComponentView');\n var fragment = fragmentEl || null,\n viewObject = this.compView;\n\n var dt = this.opts.componentTypes;\n\n var type = model.get('type');\n\n for (var it = 0; it < dt.length; it++) {\n var dtId = dt[it].id;\n if (dtId == type) {\n viewObject = dt[it].view;\n break;\n }\n }\n //viewObject = dt[type] ? dt[type].view : dt.default.view;\n\n var view = new viewObject({\n model,\n config: this.config,\n componentTypes: dt\n });\n var rendered = view.render().el;\n if (view.model.get('type') == 'textnode')\n rendered = document.createTextNode(view.model.get('content'));\n\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n const parent = this.parentEl;\n const children = parent.childNodes;\n\n if (!isUndefined(index)) {\n const lastIndex = children.length == index;\n\n // If the added model is the last of collection\n // need to change the logic of append\n if (lastIndex) {\n index--;\n }\n\n // In case the added is new in the collection index will be -1\n if (lastIndex || !children.length) {\n parent.appendChild(rendered);\n } else {\n parent.insertBefore(rendered, children[index]);\n }\n } else {\n parent.appendChild(rendered);\n }\n }\n\n return rendered;\n },\n\n resetChildren() {\n this.parentEl.innerHTML = '';\n this.collection.each(model => this.addToCollection(model));\n },\n\n render(parent) {\n const el = this.el;\n const frag = document.createDocumentFragment();\n this.parentEl = parent || this.el;\n this.collection.each(model => this.addToCollection(model, frag));\n el.innerHTML = '';\n el.appendChild(frag);\n return this;\n }\n});\n","import { isEmpty } from 'underscore';\n\nconst Backbone = require('backbone');\n\nmodule.exports = Backbone.Collection.extend({\n initialize(models, opt = {}) {\n this.listenTo(this, 'add', this.onAdd);\n this.config = opt.config;\n this.em = opt.em;\n\n this.model = (attrs, options) => {\n var model;\n var df = opt.componentTypes;\n options.em = opt.em;\n options.config = opt.config;\n options.componentTypes = df;\n\n for (var it = 0; it < df.length; it++) {\n var dfId = df[it].id;\n if (dfId == attrs.type) {\n model = df[it].model;\n break;\n }\n }\n\n if (!model) {\n // get the last one\n model = df[df.length - 1].model;\n }\n\n return new model(attrs, options);\n };\n },\n\n add(models, opt = {}) {\n if (typeof models === 'string') {\n const cssc = this.em.get('CssComposer');\n const parsed = this.em.get('Parser').parseHtml(models);\n models = parsed.html;\n\n if (parsed.css && cssc) {\n const { avoidUpdateStyle } = opt;\n const added = cssc.addCollection(parsed.css, {\n extend: 1,\n avoidUpdateStyle\n });\n }\n }\n\n return Backbone.Collection.prototype.add.apply(this, [models, opt]);\n },\n\n onAdd(model, c, opts) {\n const em = this.em;\n const style = model.getStyle();\n const avoidInline = em && em.getConfig('avoidInlineStyle');\n\n if (\n !isEmpty(style) &&\n !avoidInline &&\n em &&\n em.get &&\n em.getConfig('forceClass')\n ) {\n const name = model.cid;\n const rule = em.get('CssComposer').setClassRule(name, style);\n model.setStyle({});\n model.addClass(name);\n }\n }\n});\n","var Backbone = require('backbone');\n\nmodule.exports = Backbone.View.extend({\n // Default view\n itemView: '',\n\n // Defines the View per type\n itemsView: '',\n\n itemType: 'type',\n\n initialize(opts, config) {\n this.config = config || {};\n },\n\n /**\n * Add new model to the collection\n * @param {Model} model\n * @private\n * */\n addTo(model) {\n this.add(model);\n },\n\n /**\n * Render new model inside the view\n * @param {Model} model\n * @param {Object} fragment Fragment collection\n * @private\n * */\n add(model, fragment) {\n var frag = fragment || null;\n var itemView = this.itemView;\n var typeField = model.get(this.itemType);\n if (this.itemsView && this.itemsView[typeField]) {\n itemView = this.itemsView[typeField];\n }\n var view = new itemView(\n {\n model,\n config: this.config\n },\n this.config\n );\n var rendered = view.render().el;\n\n if (frag) frag.appendChild(rendered);\n else this.$el.append(rendered);\n },\n\n render() {\n var frag = document.createDocumentFragment();\n this.$el.empty();\n\n if (this.collection.length)\n this.collection.each(function(model) {\n this.add(model, frag);\n }, this);\n\n this.$el.append(frag);\n return this;\n }\n});\n","module.exports = require('backbone').View.extend({\n tagName: 'style',\n\n initialize(o = {}) {\n this.config = o.config || {};\n const model = this.model;\n const toTrack = 'change:style change:state change:mediaText';\n this.listenTo(model, toTrack, this.render);\n this.listenTo(model, 'destroy remove', this.remove);\n this.listenTo(model.get('selectors'), 'change', this.render);\n },\n\n render() {\n const model = this.model;\n const important = model.get('important');\n this.el.innerHTML = this.model.toCSS({ important });\n return this;\n }\n});\n","import { isString, isArray, keys } from 'underscore';\nimport { shallowDiff } from 'utils/mixins';\nimport ParserHtml from 'parser/model/ParserHtml';\n\nconst parseStyle = ParserHtml().parseStyle;\nexport default {\n parseStyle,\n\n /**\n * To trigger the style change event on models I have to\n * pass a new object instance\n * @param {Object} prop\n * @return {Object}\n */\n extendStyle(prop) {\n return { ...this.getStyle(), ...prop };\n },\n\n /**\n * Get style object\n * @return {Object}\n */\n getStyle() {\n return { ...this.get('style') };\n },\n\n /**\n * Set new style object\n * @param {Object|string} prop\n * @param {Object} opts\n * @return {Object} Applied properties\n */\n setStyle(prop = {}, opts = {}) {\n if (isString(prop)) {\n prop = parseStyle(prop);\n }\n\n const propOrig = this.getStyle();\n const propNew = { ...prop };\n this.set('style', propNew, opts);\n const diff = shallowDiff(propOrig, propNew);\n keys(diff).forEach(pr => {\n const em = this.em;\n this.trigger(`change:style:${pr}`);\n if (em) {\n em.trigger(`styleable:change`, this, pr);\n em.trigger(`styleable:change:${pr}`, this, pr);\n }\n });\n\n return propNew;\n },\n\n /**\n * Add style property\n * @param {Object|string} prop\n * @param {string} value\n * @example\n * this.addStyle({color: 'red'});\n * this.addStyle('color', 'blue');\n */\n addStyle(prop, value = '', opts = {}) {\n if (typeof prop == 'string') {\n prop = {\n prop: value\n };\n } else {\n opts = value || {};\n }\n\n prop = this.extendStyle(prop);\n this.setStyle(prop, opts);\n },\n\n /**\n * Remove style property\n * @param {string} prop\n */\n removeStyle(prop) {\n let style = this.getStyle();\n delete style[prop];\n this.setStyle(style);\n },\n\n /**\n * Returns string of style properties\n * @param {Object} [opts={}] Options\n * @return {String}\n */\n styleToString(opts = {}) {\n const result = [];\n const style = this.getStyle();\n\n for (let prop in style) {\n const imp = opts.important;\n const important = isArray(imp) ? imp.indexOf(prop) >= 0 : imp;\n const value = `${style[prop]}${important ? ' !important' : ''}`;\n value && result.push(`${prop}:${value};`);\n }\n\n return result.join('');\n }\n};\n","import _ from 'underscore';\nimport Backbone from 'backbone';\nimport Styleable from 'domain_abstract/model/Styleable';\nimport { isEmpty, forEach } from 'underscore';\n\nvar Selectors = require('selector_manager/model/Selectors');\n\nmodule.exports = Backbone.Model.extend(Styleable).extend({\n defaults: {\n // Css selectors\n selectors: {},\n\n // Additional string css selectors\n selectorsAdd: '',\n\n // Css properties style\n style: {},\n\n // On which device width this rule should be rendered, eg. @media (max-width: 1000px)\n mediaText: '',\n\n // State of the rule, eg: hover | pressed | focused\n state: '',\n\n // Indicates if the rule is stylable\n stylable: true,\n\n // Type of at-rule, eg. 'media', 'font-face', etc.\n atRuleType: '',\n\n // This particolar property is used only on at-rules, like 'page' or\n // 'font-face', where the block containes only style declarations\n singleAtRule: 0,\n\n // If true, sets '!important' on all properties\n // You can use an array to specify properties to set important\n // Used in view\n important: 0\n },\n\n initialize(c, opt = {}) {\n this.config = c || {};\n const em = opt.em;\n let selectors = this.config.selectors || [];\n this.em = em;\n\n if (em) {\n const sm = em.get('SelectorManager');\n const slct = [];\n selectors.forEach(selector => {\n slct.push(sm.add(selector));\n });\n selectors = slct;\n }\n\n this.set('selectors', new Selectors(selectors));\n },\n\n /**\n * Returns an at-rule statement if possible, eg. '@media (...)', '@keyframes'\n * @return {string}\n */\n getAtRule() {\n const type = this.get('atRuleType');\n const condition = this.get('mediaText');\n // Avoid breaks with the last condition\n const typeStr = type ? `@${type}` : condition ? '@media' : '';\n\n return typeStr + (condition && typeStr ? ` ${condition}` : '');\n },\n\n /**\n * Return selectors fo the rule as a string\n * @return {string}\n */\n selectorsToString(opts = {}) {\n const result = [];\n const state = this.get('state');\n const addSelector = this.get('selectorsAdd');\n const selectors = this.get('selectors').getFullString();\n const stateStr = state ? `:${state}` : '';\n selectors && result.push(`${selectors}${stateStr}`);\n addSelector && !opts.skipAdd && result.push(addSelector);\n return result.join(', ');\n },\n\n /**\n * Get declaration block\n * @param {Object} [opts={}] Options\n * @return {string}\n */\n getDeclaration(opts = {}) {\n let result = '';\n const selectors = this.selectorsToString();\n const style = this.styleToString(opts);\n const singleAtRule = this.get('singleAtRule');\n\n if ((selectors || singleAtRule) && style) {\n result = singleAtRule ? style : `${selectors}{${style}}`;\n }\n\n return result;\n },\n\n /**\n * Returns CSS string of the rule\n * @param {Object} [opts={}] Options\n * @return {string}\n */\n toCSS(opts = {}) {\n let result = '';\n const atRule = this.getAtRule();\n const block = this.getDeclaration(opts);\n block && (result = block);\n\n if (atRule && result) {\n result = `${atRule}{${result}}`;\n }\n\n return result;\n },\n\n toJSON(...args) {\n const obj = Backbone.Model.prototype.toJSON.apply(this, args);\n\n if (this.em.getConfig('avoidDefaults')) {\n const defaults = this.defaults;\n\n forEach(defaults, (value, key) => {\n if (obj[key] === value) {\n delete obj[key];\n }\n });\n\n if (isEmpty(obj.selectors)) delete obj.selectors;\n if (isEmpty(obj.style)) delete obj.style;\n }\n\n return obj;\n },\n\n /**\n * Compare the actual model with parameters\n * @param {Object} selectors Collection of selectors\n * @param {String} state Css rule state\n * @param {String} width For which device this style is oriented\n * @param {Object} ruleProps Other rule props\n * @return {Boolean}\n * @private\n */\n compare(selectors, state, width, ruleProps = {}) {\n var st = state || '';\n var wd = width || '';\n var selectorsAdd = ruleProps.selectorsAdd || '';\n var atRuleType = ruleProps.atRuleType || '';\n var cId = 'cid';\n //var a1 = _.pluck(selectors.models || selectors, cId);\n //var a2 = _.pluck(this.get('selectors').models, cId);\n if (!(selectors instanceof Array) && !selectors.models)\n selectors = [selectors];\n var a1 = _.map(selectors.models || selectors, model => model.get('name'));\n var a2 = _.map(this.get('selectors').models, model => model.get('name'));\n var f = false;\n\n if (a1.length !== a2.length) return f;\n\n for (var i = 0; i < a1.length; i++) {\n var re = 0;\n for (var j = 0; j < a2.length; j++) {\n if (a1[i] === a2[j]) re = 1;\n }\n if (re === 0) return f;\n }\n\n if (\n this.get('state') !== st ||\n this.get('mediaText') !== wd ||\n this.get('selectorsAdd') !== selectorsAdd ||\n this.get('atRuleType') !== atRuleType\n ) {\n return f;\n }\n\n return true;\n }\n});\n","import _ from 'underscore';\nimport Backbone from 'backbone';\nimport fetch from 'utils/fetch';\n\nmodule.exports = Backbone.View.extend(\n {\n template: _.template(`\n
\n
title\"><%= title %>
\n \" name=\"file\" accept=\"*/*\" <%= disabled ? 'disabled' : '' %> multiple/>\n
\n
\n `),\n\n events: {},\n\n initialize(opts = {}) {\n this.options = opts;\n const c = opts.config || {};\n this.config = c;\n this.pfx = c.stylePrefix || '';\n this.ppfx = c.pStylePrefix || '';\n this.target = this.options.globalCollection || {};\n this.uploadId = this.pfx + 'uploadFile';\n this.disabled =\n c.disableUpload !== undefined\n ? c.disableUpload\n : !c.upload && !c.embedAsBase64;\n this.events['change #' + this.uploadId] = 'uploadFile';\n let uploadFile = c.uploadFile;\n\n if (uploadFile) {\n this.uploadFile = uploadFile.bind(this);\n } else if (c.embedAsBase64) {\n this.uploadFile = this.constructor.embedAsBase64;\n }\n\n this.delegateEvents();\n },\n\n /**\n * Triggered before the upload is started\n * @private\n */\n onUploadStart() {\n const em = this.config.em;\n em && em.trigger('asset:upload:start');\n },\n\n /**\n * Triggered after the upload is ended\n * @param {Object|string} res End result\n * @private\n */\n onUploadEnd(res) {\n const em = this.config.em;\n em && em.trigger('asset:upload:end', res);\n },\n\n /**\n * Triggered on upload error\n * @param {Object} err Error\n * @private\n */\n onUploadError(err) {\n const em = this.config.em;\n console.error(err);\n this.onUploadEnd(err);\n em && em.trigger('asset:upload:error', err);\n },\n\n /**\n * Triggered on upload response\n * @param {string} text Response text\n * @private\n */\n onUploadResponse(text, clb) {\n const em = this.config.em;\n const config = this.config;\n const target = this.target;\n const json = typeof text === 'string' ? JSON.parse(text) : text;\n em && em.trigger('asset:upload:response', json);\n\n if (config.autoAdd && target) {\n target.add(json.data, { at: 0 });\n }\n\n this.onUploadEnd(text);\n clb && clb(json);\n },\n\n /**\n * Upload files\n * @param {Object} e Event\n * @return {Promise}\n * @private\n * */\n uploadFile(e, clb) {\n const files = e.dataTransfer ? e.dataTransfer.files : e.target.files;\n const body = new FormData();\n const config = this.config;\n const params = config.params;\n\n for (let i = 0; i < files.length; i++) {\n body.append(`${config.uploadName}[]`, files[i]);\n }\n\n for (let param in params) {\n body.append(param, params[param]);\n }\n\n var target = this.target;\n const url = config.upload;\n const headers = config.headers;\n const reqHead = 'X-Requested-With';\n\n if (typeof headers[reqHead] == 'undefined') {\n headers[reqHead] = 'XMLHttpRequest';\n }\n\n if (url) {\n this.onUploadStart();\n return fetch(url, {\n method: 'post',\n credentials: 'include',\n headers,\n body\n })\n .then(\n res =>\n ((res.status / 200) | 0) == 1\n ? res.text()\n : res.text().then(text => Promise.reject(text))\n )\n .then(text => this.onUploadResponse(text, clb))\n .catch(err => this.onUploadError(err));\n }\n },\n\n /**\n * Make input file droppable\n * @private\n * */\n initDrop() {\n var that = this;\n if (!this.uploadForm) {\n this.uploadForm = this.$el.find('form').get(0);\n if ('draggable' in this.uploadForm) {\n var uploadFile = this.uploadFile;\n this.uploadForm.ondragover = function() {\n this.className = that.pfx + 'hover';\n return false;\n };\n this.uploadForm.ondragleave = function() {\n this.className = '';\n return false;\n };\n this.uploadForm.ondrop = function(e) {\n this.className = '';\n e.preventDefault();\n that.uploadFile(e);\n return;\n };\n }\n }\n },\n\n initDropzone(ev) {\n let addedCls = 0;\n const c = this.config;\n const em = ev.model;\n const edEl = ev.el;\n const editor = em.get('Editor');\n const container = em.get('Config').el;\n const frameEl = em.get('Canvas').getBody();\n const ppfx = this.ppfx;\n const updatedCls = `${ppfx}dropzone-active`;\n const dropzoneCls = `${ppfx}dropzone`;\n const cleanEditorElCls = () => {\n edEl.className = edEl.className.replace(updatedCls, '').trim();\n addedCls = 0;\n };\n const onDragOver = () => {\n if (!addedCls) {\n edEl.className += ` ${updatedCls}`;\n addedCls = 1;\n }\n return false;\n };\n const onDragLeave = () => {\n cleanEditorElCls();\n return false;\n };\n const onDrop = e => {\n cleanEditorElCls();\n e.preventDefault();\n e.stopPropagation();\n this.uploadFile(e);\n\n if (c.openAssetsOnDrop && editor) {\n const target = editor.getSelected();\n editor.runCommand('open-assets', {\n target,\n onSelect() {\n editor.Modal.close();\n editor.AssetManager.setTarget(null);\n }\n });\n }\n\n return false;\n };\n\n ev.$el.append(`
${c.dropzoneContent}
`);\n cleanEditorElCls();\n\n if ('draggable' in edEl) {\n [edEl, frameEl].forEach(item => {\n item.ondragover = onDragOver;\n item.ondragleave = onDragLeave;\n item.ondrop = onDrop;\n });\n }\n },\n\n render() {\n this.$el.html(\n this.template({\n title: this.config.uploadText,\n uploadId: this.uploadId,\n disabled: this.disabled,\n pfx: this.pfx\n })\n );\n this.initDrop();\n this.$el.attr('class', this.pfx + 'file-uploader');\n return this;\n }\n },\n {\n embedAsBase64: function(e, clb) {\n // List files dropped\n const files = e.dataTransfer ? e.dataTransfer.files : e.target.files;\n const response = { data: [] };\n\n // Unlikely, widely supported now\n if (!FileReader) {\n this.onUploadError(\n new Error('Unsupported platform, FileReader is not defined')\n );\n return;\n }\n\n const promises = [];\n const mimeTypeMatcher = /^(.+)\\/(.+)$/;\n\n for (const file of files) {\n // For each file a reader (to read the base64 URL)\n // and a promise (to track and merge results and errors)\n const promise = new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.addEventListener('load', event => {\n let type;\n const name = file.name;\n\n // Try to find the MIME type of the file.\n const match = mimeTypeMatcher.exec(file.type);\n if (match) {\n type = match[1]; // The first part in the MIME, \"image\" in image/png\n } else {\n type = file.type;\n }\n\n /*\n // Show local video files, http://jsfiddle.net/dsbonev/cCCZ2/embedded/result,js,html,css/\n var URL = window.URL || window.webkitURL\n var file = this.files[0]\n var type = file.type\n var videoNode = document.createElement('video');\n var canPlay = videoNode.canPlayType(type) // can use also for 'audio' types\n if (canPlay === '') canPlay = 'no'\n var message = 'Can play type \"' + type + '\": ' + canPlay\n var isError = canPlay === 'no'\n displayMessage(message, isError)\n\n if (isError) {\n return\n }\n\n var fileURL = URL.createObjectURL(file)\n videoNode.src = fileURL\n */\n\n // If it's an image, try to find its size\n if (type === 'image') {\n const data = {\n src: reader.result,\n name,\n type,\n height: 0,\n width: 0\n };\n\n const image = new Image();\n image.addEventListener('error', error => {\n reject(error);\n });\n image.addEventListener('load', () => {\n data.height = image.height;\n data.width = image.width;\n resolve(data);\n });\n image.src = data.src;\n } else if (type) {\n // Not an image, but has a type\n resolve({\n src: reader.result,\n name,\n type\n });\n } else {\n // No type found, resolve with the URL only\n resolve(reader.result);\n }\n });\n reader.addEventListener('error', error => {\n reject(error);\n });\n reader.addEventListener('abort', error => {\n reject('Aborted');\n });\n\n reader.readAsDataURL(file);\n });\n\n promises.push(promise);\n }\n\n Promise.all(promises).then(\n data => {\n response.data = data;\n this.onUploadResponse(response, clb);\n },\n error => {\n this.onUploadError(error);\n }\n );\n }\n }\n);\n","import Backbone from 'backbone';\n\nmodule.exports = Backbone.View.extend({\n initialize(o = {}) {\n this.options = o;\n this.collection = o.collection;\n const config = o.config || {};\n this.config = config;\n this.pfx = config.stylePrefix || '';\n this.ppfx = config.pStylePrefix || '';\n this.em = config.em;\n this.className = this.pfx + 'asset';\n this.listenTo(this.model, 'destroy remove', this.remove);\n this.model.view = this;\n const init = this.init && this.init.bind(this);\n init && init(o);\n },\n\n template() {\n const pfx = this.pfx;\n return `\n
\n ${this.getPreview()}\n
\n
\n ${this.getInfo()}\n
\n
\n ⨯\n
\n `;\n },\n\n /**\n * Update target if exists\n * @param {Model} target\n * @private\n * */\n updateTarget(target) {\n if (target && target.set) {\n target.set('attributes', _.clone(target.get('attributes')));\n target.set('src', this.model.get('src'));\n }\n },\n\n getPreview() {\n return '';\n },\n\n getInfo() {\n return '';\n },\n\n render() {\n const el = this.el;\n el.innerHTML = this.template(this, this.model);\n el.className = this.className;\n return this;\n }\n});\n","import { isFunction } from 'underscore';\n\nmodule.exports = require('./AssetView').extend({\n events: {\n 'click [data-toggle=asset-remove]': 'onRemove',\n click: 'onClick',\n dblclick: 'onDblClick'\n },\n\n getPreview() {\n const pfx = this.pfx;\n const src = this.model.get('src');\n return `\n
\n
\n `;\n },\n\n getInfo() {\n const pfx = this.pfx;\n const model = this.model;\n let name = model.get('name');\n let width = model.get('width');\n let height = model.get('height');\n let unit = model.get('unitDim');\n let dim = width && height ? `${width}x${height}${unit}` : '';\n name = name || model.getFilename();\n return `\n
${name}
\n
${dim}
\n `;\n },\n\n init(o) {\n const pfx = this.pfx;\n this.className += ` ${pfx}asset-image`;\n },\n\n /**\n * Triggered when the asset is clicked\n * @private\n * */\n onClick() {\n var onClick = this.config.onClick;\n var model = this.model;\n this.collection.trigger('deselectAll');\n this.$el.addClass(this.pfx + 'highlight');\n\n if (isFunction(onClick)) {\n onClick(model);\n } else {\n this.updateTarget(this.collection.target);\n }\n },\n\n /**\n * Triggered when the asset is double clicked\n * @private\n * */\n onDblClick() {\n const { em, model } = this;\n const onDblClick = this.config.onDblClick;\n\n if (isFunction(onDblClick)) {\n onDblClick(model);\n } else {\n this.updateTarget(this.collection.target);\n em && em.get('Modal').close();\n }\n\n var onSelect = this.collection.onSelect;\n isFunction(onSelect) && onSelect(model);\n },\n\n /**\n * Remove asset from collection\n * @private\n * */\n onRemove(e) {\n e.stopImmediatePropagation();\n this.model.collection.remove(this.model);\n }\n});\n","import { isUndefined } from 'underscore';\n\nconst Property = require('./Property');\nconst InputNumber = require('domain_abstract/ui/InputNumber');\n\nmodule.exports = Property.extend({\n defaults: {\n ...Property.prototype.defaults,\n // Array of units, eg. ['px', '%']\n units: [],\n\n // Selected unit, eg. 'px'\n unit: '',\n\n // Integer value steps\n step: 1,\n\n // Minimum value\n min: '',\n\n // Maximum value\n max: ''\n },\n\n init() {\n const unit = this.get('unit');\n const units = this.get('units');\n this.input = new InputNumber({ model: this });\n\n if (units.length && !unit) {\n this.set('unit', units[0]);\n }\n },\n\n clearValue(opts = {}) {\n this.set({ value: undefined, unit: undefined }, opts);\n return this;\n },\n\n parseValue(val) {\n const parsed = Property.prototype.parseValue.apply(this, arguments);\n const { value, unit } = this.input.validateInputValue(parsed.value, {\n deepCheck: 1\n });\n parsed.value = value;\n parsed.unit = unit;\n return parsed;\n },\n\n getFullValue() {\n let value = this.get('value');\n let unit = this.get('unit');\n value = !isUndefined(value) ? value : '';\n unit = !isUndefined(unit) && value ? unit : '';\n value = `${value}${unit}`;\n return Property.prototype.getFullValue.apply(this, [value]);\n }\n});\n","const Property = require('./Property');\n\nmodule.exports = Property.extend({\n defaults: () => ({\n ...Property.prototype.defaults,\n // Array of options, eg. [{name: 'Label ', value: '100'}]\n options: []\n }),\n\n initialize(...args) {\n Property.prototype.initialize.apply(this, args);\n this.listenTo(this, 'change:options', this.onOptionChange);\n },\n\n onOptionChange() {\n this.set('list', this.get('options'));\n },\n\n getOptions() {\n const { options, list } = this.attributes;\n return options && options.length ? options : list;\n },\n\n setOptions(opts = []) {\n this.set('options', opts);\n return this;\n },\n\n addOption(opt) {\n if (opt) {\n const opts = this.getOptions();\n this.setOptions([...opts, opt]);\n }\n return this;\n }\n});\n","import Backbone from 'backbone';\nconst PropertyView = require('./PropertyView');\nconst $ = Backbone.$;\n\nmodule.exports = PropertyView.extend({\n templateInput() {\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const assetsLabel = this.config.assetsLabel || 'Images';\n return `\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n `;\n },\n\n init() {\n const em = this.em;\n this.modal = em.get('Modal');\n this.am = em.get('AssetManager');\n this.events['click #' + this.pfx + 'close'] = 'removeFile';\n this.events['click #' + this.pfx + 'images'] = 'openAssetManager';\n this.delegateEvents();\n },\n\n onRender() {\n if (!this.$input) {\n const plh = this.model.getDefaultValue();\n this.$input = $(``);\n }\n\n if (!this.$preview) {\n this.$preview = this.$el.find('#' + this.pfx + 'preview-file');\n }\n\n if (!this.$previewBox) {\n this.$previewBox = this.$el.find('#' + this.pfx + 'preview-box');\n }\n\n this.setValue(this.componentValue, 0);\n },\n\n setValue(value, f) {\n PropertyView.prototype.setValue.apply(this, arguments);\n this.setPreviewView(value && value != this.model.getDefaultValue());\n this.setPreview(value);\n },\n\n /**\n * Change visibility of the preview box\n * @param bool Visibility\n *\n * @return void\n * */\n setPreviewView(v) {\n const pv = this.$previewBox;\n pv && pv[v ? 'addClass' : 'removeClass'](`${this.pfx}show`);\n },\n\n /**\n * Spread url\n * @param string Url\n *\n * @return void\n * */\n spreadUrl(url) {\n this.model.set('value', url);\n this.setPreviewView(1);\n },\n\n /**\n * Shows file preview\n * @param string Value\n * */\n setPreview(value) {\n const preview = this.$preview;\n value = value && value.indexOf('url(') < 0 ? `url(${value})` : value;\n preview && preview.css('background-image', value);\n },\n\n /** @inheritdoc */\n cleanValue() {\n this.setPreviewView(0);\n this.model.set({ value: '' }, { silent: true });\n },\n\n /**\n * Remove file from input\n *\n * @return void\n * */\n removeFile(...args) {\n this.model.set('value', this.model.getDefaultValue());\n PropertyView.prototype.cleanValue.apply(this, args);\n this.setPreviewView(0);\n },\n\n /**\n * Open dialog for image selecting\n * @param {Object} e Event\n *\n * @return void\n * */\n openAssetManager(e) {\n const that = this;\n const { em, modal } = this;\n const editor = em ? em.get('Editor') : '';\n\n if (editor) {\n editor.runCommand('open-assets', {\n types: ['image'],\n accept: 'image/*',\n target: this.getTargetModel(),\n onClick() {},\n onDblClick() {},\n onSelect(asset) {\n modal.close();\n that.spreadUrl(asset.get('src'));\n }\n });\n }\n }\n});\n","import Backbone from 'backbone';\nimport { isUndefined } from 'underscore';\nimport ColorPicker from 'utils/ColorPicker';\n\nconst Input = require('./Input');\nconst $ = Backbone.$;\nColorPicker($);\n\nmodule.exports = Input.extend({\n template() {\n const ppfx = this.ppfx;\n return `\n
\n
\n
\n
\n
\n
\n `;\n },\n\n inputClass() {\n const ppfx = this.ppfx;\n return `${ppfx}field ${ppfx}field-color`;\n },\n\n holderClass() {\n return `${this.ppfx}input-holder`;\n },\n\n /**\n * Set value to the model\n * @param {string} val\n * @param {Object} opts\n */\n setValue(val, opts = {}) {\n const model = this.model;\n const def = model.get('defaults');\n const value = !isUndefined(val) ? val : !isUndefined(def) ? def : '';\n const inputEl = this.getInputEl();\n const colorEl = this.getColorEl();\n const valueClr = value != 'none' ? value : '';\n inputEl.value = value;\n colorEl.get(0).style.backgroundColor = valueClr;\n\n // This prevents from adding multiple thumbs in spectrum\n if (opts.fromTarget) {\n colorEl.spectrum('set', valueClr);\n this.noneColor = value == 'none';\n }\n },\n\n /**\n * Get the color input element\n * @return {HTMLElement}\n */\n getColorEl() {\n if (!this.colorEl) {\n const self = this;\n const ppfx = this.ppfx;\n var model = this.model;\n\n var colorEl = $(`
`);\n var cpStyle = colorEl.get(0).style;\n var elToAppend = this.em && this.em.config ? this.em.config.el : '';\n var colorPickerConfig =\n (this.em && this.em.getConfig && this.em.getConfig('colorPicker')) ||\n {};\n const getColor = color => {\n let cl =\n color.getAlpha() == 1 ? color.toHexString() : color.toRgbString();\n return cl.replace(/ /g, '');\n };\n\n let changed = 0;\n let previousColor;\n this.$el.find(`[data-colorp-c]`).append(colorEl);\n colorEl.spectrum({\n containerClassName: `${ppfx}one-bg ${ppfx}two-color`,\n appendTo: elToAppend || 'body',\n maxSelectionSize: 8,\n showPalette: true,\n showAlpha: true,\n chooseText: 'Ok',\n cancelText: '⨯',\n palette: [],\n\n // config expanded here so that the functions below are not overridden\n ...colorPickerConfig,\n\n move(color) {\n const cl = getColor(color);\n cpStyle.backgroundColor = cl;\n model.setValueFromInput(cl, 0);\n },\n change(color) {\n changed = 1;\n const cl = getColor(color);\n cpStyle.backgroundColor = cl;\n model.setValueFromInput(cl);\n self.noneColor = 0;\n },\n show(color) {\n changed = 0;\n previousColor = getColor(color);\n },\n hide(color) {\n if (!changed && previousColor) {\n if (self.noneColor) {\n previousColor = '';\n }\n cpStyle.backgroundColor = previousColor;\n colorEl.spectrum('set', previousColor);\n model.setValueFromInput(previousColor, 0);\n }\n }\n });\n\n this.colorEl = colorEl;\n }\n return this.colorEl;\n },\n\n render() {\n Input.prototype.render.call(this);\n // This will make the color input available on render\n this.getColorEl();\n return this;\n }\n});\n","const InputColor = require('domain_abstract/ui/InputColor');\n\nmodule.exports = require('./PropertyIntegerView').extend({\n setValue(value, opts = {}) {\n opts = { ...opts, silent: 1 };\n this.inputInst.setValue(value, opts);\n },\n\n onRender() {\n if (!this.input) {\n const ppfx = this.ppfx;\n const inputColor = new InputColor({\n target: this.target,\n model: this.model,\n ppfx\n });\n const input = inputColor.render();\n this.el.querySelector(`.${ppfx}fields`).appendChild(input.el);\n this.$input = input.inputEl;\n this.$color = input.colorEl;\n this.input = this.$input.get(0);\n this.inputInst = input;\n }\n }\n});\n","import Backbone from 'backbone';\nimport PropertyView from './PropertyView';\nconst $ = Backbone.$;\n\nmodule.exports = PropertyView.extend({\n templateInput() {\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n return `\n
\n \n
\n
\n
\n
\n `;\n },\n\n initialize(...args) {\n PropertyView.prototype.initialize.apply(this, args);\n this.listenTo(this.model, 'change:options', this.updateOptions);\n },\n\n updateOptions() {\n this.input = null;\n this.onRender();\n },\n\n onRender() {\n var pfx = this.pfx;\n const options = this.model.getOptions();\n\n if (!this.input) {\n let optionsStr = '';\n\n options.forEach(option => {\n let name = option.name || option.value;\n let style = option.style ? option.style.replace(/\"/g, '"') : '';\n let styleAttr = style ? `style=\"${style}\"` : '';\n let value = option.value.replace(/\"/g, '"');\n optionsStr += ``;\n });\n\n const inputH = this.el.querySelector(`#${pfx}input-holder`);\n inputH.innerHTML = ``;\n this.input = inputH.firstChild;\n }\n }\n});\n","module.exports = require('./PropertyView').extend({\n templateInput() {\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n return `\n
\n
\n `;\n },\n\n onRender() {\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const itemCls = `${ppfx}radio-item-label`;\n const model = this.model;\n const prop = model.get('property');\n const options = model.get('list') || model.get('options') || [];\n\n if (!this.input) {\n if (options && options.length) {\n let inputStr = '';\n\n options.forEach(el => {\n let cl = el.className ? `${el.className} ${pfx}icon ${itemCls}` : '';\n let id = `${prop}-${el.value}`;\n let labelTxt = el.name || el.value;\n let titleAttr = el.title ? `title=\"${el.title}\"` : '';\n inputStr += `\n
\n \n \n
\n `;\n });\n\n const inputHld = this.el.querySelector(`.${ppfx}field`);\n inputHld.innerHTML = `
${inputStr}
`;\n this.input = inputHld.firstChild;\n }\n }\n },\n\n getInputValue() {\n const inputChk = this.getCheckedEl();\n return inputChk ? inputChk.value : '';\n },\n\n getCheckedEl() {\n const input = this.getInputEl();\n return input ? input.querySelector('input:checked') : '';\n },\n\n setValue(value) {\n const model = this.model;\n let val = value || model.get('value') || model.getDefaultValue();\n const input = this.getInputEl();\n const inputIn = input ? input.querySelector(`[value=\"${val}\"]`) : '';\n\n if (inputIn) {\n inputIn.checked = true;\n } else {\n const inputChk = this.getCheckedEl();\n inputChk && (inputChk.checked = false);\n }\n }\n});\n","const Backbone = require('backbone');\nconst $ = Backbone.$;\n\nmodule.exports = Backbone.View.extend({\n events: {\n change: 'handleChange'\n },\n\n template() {\n return ``;\n },\n\n inputClass() {\n return `${this.ppfx}field`;\n },\n\n holderClass() {\n return `${this.ppfx}input-holder`;\n },\n\n initialize(opts = {}) {\n const ppfx = opts.ppfx || '';\n this.opts = opts;\n this.ppfx = ppfx;\n this.em = opts.target || {};\n this.listenTo(this.model, 'change:value', this.handleModelChange);\n },\n\n /**\n * Fired when the element of the property is updated\n */\n elementUpdated() {\n this.model.trigger('el:change');\n },\n\n /**\n * Set value to the input element\n * @param {string} value\n */\n setValue(value) {\n const model = this.model;\n let val = value || model.get('defaults');\n const input = this.getInputEl();\n input && (input.value = val);\n },\n\n /**\n * Updates the view when the model is changed\n * */\n handleModelChange(model, value, opts) {\n this.setValue(value, opts);\n },\n\n /**\n * Handled when the view is changed\n */\n handleChange(e) {\n e.stopPropagation();\n const value = this.getInputEl().value;\n this.model.set({ value }, { fromInput: 1 });\n this.elementUpdated();\n },\n\n /**\n * Get the input element\n * @return {HTMLElement}\n */\n getInputEl() {\n if (!this.inputEl) {\n const plh = this.model.get('defaults') || '';\n this.inputEl = $(``);\n }\n\n return this.inputEl.get(0);\n },\n\n render() {\n const el = this.$el;\n el.addClass(this.inputClass());\n el.html(this.template());\n el.find(`.${this.holderClass()}`).append(this.getInputEl());\n return this;\n }\n});\n","const PropertyCompositeView = require('./PropertyCompositeView');\nconst LayersView = require('./LayersView');\n\nmodule.exports = PropertyCompositeView.extend({\n templateInput() {\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n return `\n
\n \n
\n
\n `;\n },\n\n init() {\n const model = this.model;\n const pfx = this.pfx;\n model.set('stackIndex', null);\n this.events[`click [data-add-layer]`] = 'addLayer';\n this.listenTo(model, 'change:stackIndex', this.indexChanged);\n this.listenTo(model, 'updateValue', this.inputValueChanged);\n this.delegateEvents();\n },\n\n clear(e) {\n e && e.stopPropagation();\n this.model.get('layers').reset();\n this.model.clearValue();\n this.targetUpdated();\n },\n\n /**\n * Fired when the target is updated.\n * With detached mode the component will be always empty as its value\n * so we gonna check all props and find if it has any difference\n * */\n targetUpdated(...args) {\n if (!this.model.get('detached')) {\n PropertyCompositeView.prototype.targetUpdated.apply(this, args);\n } else {\n this.checkVisibility();\n }\n\n this.refreshLayers();\n },\n\n /**\n * Returns the collection of layers\n * @return {Collection}\n */\n getLayers() {\n return this.model.get('layers');\n },\n\n /**\n * Triggered when another layer has been selected.\n * This allow to move all rendered properties to a new\n * selected layer\n * @param {Event}\n *\n * @return {Object}\n * */\n indexChanged(e) {\n const model = this.model;\n this.getLayers().active(model.get('stackIndex'));\n },\n\n addLayer() {\n const model = this.model;\n const layers = this.getLayers();\n const properties = model.get('properties').deepClone();\n properties.each(property => property.set('value', ''));\n const layer = layers.add({ properties });\n\n // In detached mode inputValueChanged will add new 'layer value'\n // to all subprops\n this.inputValueChanged();\n\n // This will set subprops with a new default values\n model.set('stackIndex', layers.indexOf(layer));\n },\n\n inputValueChanged() {\n const model = this.model;\n this.elementUpdated();\n\n // If not detached I'll just put all the values from layers to property\n // eg. background: layer1Value, layer2Value, layer3Value, ...\n if (!model.get('detached')) {\n model.set('value', this.getLayerValues());\n } else {\n model.get('properties').each(prop => prop.trigger('change:value'));\n }\n },\n\n /**\n * There is no need to handle input update by the property itself,\n * this will be done by layers\n * @private\n */\n setValue() {},\n\n /**\n * Create value by layers\n * @return string\n * */\n getLayerValues() {\n return this.getLayers().getFullValue();\n },\n\n /**\n * Refresh layers\n * */\n refreshLayers() {\n let layersObj = [];\n const model = this.model;\n const layers = this.getLayers();\n const detached = model.get('detached');\n\n // With detached layers values will be assigned to their properties\n if (detached) {\n const target = this.getTarget();\n const style = target ? target.getStyle() : {};\n layersObj = layers.getLayersFromStyle(style);\n } else {\n let value = this.getTargetValue();\n value = value == model.getDefaultValue() ? '' : value;\n layersObj = layers.getLayersFromValue(value);\n }\n\n layers.reset();\n layers.add(layersObj);\n model.set({ stackIndex: null }, { silent: true });\n },\n\n onRender() {\n const self = this;\n const model = this.model;\n const fieldEl = this.el.querySelector('[data-layers-wrapper]');\n const PropertiesView = require('./PropertiesView');\n const propsConfig = {\n target: this.target,\n propTarget: this.propTarget,\n\n // Things to do when a single sub-property is changed\n onChange(el, view, opt) {\n const subModel = view.model;\n\n if (model.get('detached')) {\n const subProp = subModel.get('property');\n const values = self.getLayers().getPropertyValues(subProp);\n view.updateTargetStyle(values, null, opt);\n } else {\n model.set('value', model.getFullValue(), opt);\n }\n }\n };\n const layers = new LayersView({\n collection: this.getLayers(),\n stackModel: model,\n preview: model.get('preview'),\n config: this.config,\n propsConfig\n }).render().el;\n\n // Will use it to propogate changes\n new PropertiesView({\n target: this.target,\n collection: this.model.get('properties'),\n stackModel: model,\n config: this.config,\n onChange: propsConfig.onChange,\n propTarget: propsConfig.propTarget,\n customValue: propsConfig.customValue\n }).render();\n\n //model.get('properties')\n fieldEl.appendChild(layers);\n }\n});\n","const Property = require('./Property');\n\nmodule.exports = Property.extend({\n defaults: {\n ...Property.prototype.defaults,\n // 'background' is a good example where to make a difference\n // between detached and not\n //\n // - NOT detached (default)\n // background: url(..) no-repeat center ...;\n // - Detached\n // background-image: url();\n // background-repeat: repeat;\n // ...\n detached: 0,\n\n // Array of sub properties\n properties: [],\n\n // Separator between properties\n separator: ' '\n },\n\n init() {\n const properties = this.get('properties') || [];\n const Properties = require('./Properties');\n this.set('properties', new Properties(properties));\n this.listenTo(this, 'change:value', this.updateValues);\n },\n\n /**\n * Clear the value\n * @return {this}\n */\n clearValue(opts = {}) {\n this.get('properties').each(property => property.clearValue());\n return Property.prototype.clearValue.apply(this, arguments);\n },\n\n /**\n * Update property values\n */\n updateValues() {\n const values = this.getFullValue().split(this.get('separator'));\n this.get('properties').each((property, i) => {\n const len = values.length;\n // Try to get value from a shorthand:\n // 11px -> 11px 11px 11px 11xp\n // 11px 22px -> 11px 22px 11px 22xp\n const value =\n values[i] || values[i % len + (len != 1 && len % 2 ? 1 : 0)];\n // There some issue with UndoManager\n //property.setValue(value, 0, {fromParent: 1});\n });\n },\n\n /**\n * Returns default value\n * @param {Boolean} defaultProps Force to get defaults from properties\n * @return {string}\n */\n getDefaultValue(defaultProps) {\n let value = this.get('defaults');\n\n if (value && !defaultProps) {\n return value;\n }\n\n value = '';\n const properties = this.get('properties');\n properties.each((prop, index) => (value += `${prop.getDefaultValue()} `));\n return value.trim();\n },\n\n getFullValue() {\n if (this.get('detached')) {\n return '';\n }\n\n return this.get('properties').getFullValue();\n }\n});\n","const Model = Backbone.Model;\nconst View = Backbone.View;\n\nexport default {\n types: [],\n\n initialize(models, opts) {\n this.model = (attrs = {}, options = {}) => {\n let Model, View, type;\n\n if (attrs && attrs.type) {\n const baseType = this.getBaseType();\n type = this.getType(attrs.type);\n Model = type ? type.model : baseType.model;\n View = type ? type.view : baseType.view;\n } else {\n const typeFound = this.recognizeType(attrs);\n type = typeFound.type;\n Model = type.model;\n View = type.view;\n attrs = typeFound.attributes;\n }\n\n const model = new Model(attrs, options);\n model.typeView = View;\n return model;\n };\n const init = this.init && this.init.bind(this);\n init && init();\n },\n\n /**\n * Recognize type by any value\n * @param {mixed} value\n * @return {Object} Found type\n */\n recognizeType(value) {\n const types = this.getTypes();\n\n for (let i = 0; i < types.length; i++) {\n const type = types[i];\n let typeFound = type.isType(value);\n typeFound =\n typeof typeFound == 'boolean' && typeFound\n ? { type: type.id }\n : typeFound;\n\n if (typeFound) {\n return {\n type,\n attributes: typeFound\n };\n }\n }\n\n // If, for any reason, the type is not found it'll return the base one\n return {\n type: this.getBaseType(),\n attributes: value\n };\n },\n\n /**\n * Returns the base type (last object in the stack)\n * @return {Object}\n */\n getBaseType() {\n const types = this.getTypes();\n return types[types.length - 1];\n },\n\n /**\n * Get types\n * @return {Array}\n */\n getTypes() {\n return this.types;\n },\n\n /**\n * Get type\n * @param {string} id Type ID\n * @return {Object} Type definition\n */\n getType(id) {\n const types = this.getTypes();\n\n for (let i = 0; i < types.length; i++) {\n const type = types[i];\n if (type.id === id) {\n return type;\n }\n }\n },\n\n /**\n * Add new type\n * @param {string} id Type ID\n * @param {Object} definition Definition of the type. Each definition contains\n * `model` (business logic), `view` (presentation logic)\n * and `isType` function which recognize the type of the\n * passed entity\n * addType('my-type', {\n * model: {},\n * view: {},\n * isType: (value) => {},\n * })\n */\n addType(id, definition) {\n const type = this.getType(id);\n const baseType = this.getBaseType();\n const ModelInst = type ? type.model : baseType.model;\n const ViewInst = type ? type.view : baseType.view;\n let { model, view, isType } = definition;\n model = model instanceof Model ? model : ModelInst.extend(model || {});\n view = view instanceof View ? view : ViewInst.extend(view || {});\n\n if (type) {\n type.model = model;\n type.view = view;\n type.isType = isType || type.isType;\n } else {\n definition.id = id;\n definition.model = model;\n definition.view = view;\n definition.isType =\n isType ||\n function(value) {\n if (value && value.type == id) {\n return true;\n }\n };\n this.getTypes().unshift(definition);\n }\n }\n};\n","/**\n * With Style Manager you build categories (called sectors) of CSS properties which could be used to customize the style of components.\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/style_manager/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * styleManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const styleManager = editor.StyleManager;\n * ```\n *\n * * [getConfig](#getconfig)\n * * [addSector](#addsector)\n * * [getSector](#getsector)\n * * [removeSector](#removesector)\n * * [getSectors](#getsectors)\n * * [addProperty](#addproperty)\n * * [getProperty](#getproperty)\n * * [removeProperty](#removeproperty)\n * * [getProperties](#getproperties)\n * * [getModelToStyle](#getmodeltostyle)\n * * [getModelToStyle](#getmodeltostyle)\n * * [addType](#addtype)\n * * [getType](#gettype)\n * * [getTypes](#gettypes)\n * * [createType](#createtype)\n *\n * @module StyleManager\n */\n\nimport { isElement } from 'underscore';\n\nmodule.exports = () => {\n var c = {},\n defaults = require('./config/config'),\n Sectors = require('./model/Sectors'),\n Properties = require('./model/Properties'),\n SectorsView = require('./view/SectorsView');\n let properties;\n var sectors, SectView;\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'StyleManager',\n\n /**\n * Get configuration object\n * @return {Object}\n */\n getConfig() {\n return c;\n },\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n properties = new Properties();\n sectors = new Sectors(c.sectors, c);\n SectView = new SectorsView({\n collection: sectors,\n target: c.em,\n config: c\n });\n return this;\n },\n\n postRender() {\n const elTo = this.getConfig().appendTo;\n\n if (elTo) {\n const el = isElement(elTo) ? elTo : document.querySelector(elTo);\n el.appendChild(this.render());\n }\n },\n\n /**\n * Add new sector to the collection. If the sector with the same id already exists,\n * that one will be returned\n * @param {string} id Sector id\n * @param {Object} sector Object representing sector\n * @param {string} [sector.name=''] Sector's label\n * @param {Boolean} [sector.open=true] Indicates if the sector should be opened\n * @param {Array} [sector.properties=[]] Array of properties\n * @return {Sector} Added Sector\n * @example\n * var sector = styleManager.addSector('mySector',{\n * name: 'My sector',\n * open: true,\n * properties: [{ name: 'My property'}]\n * });\n * */\n addSector(id, sector) {\n var result = this.getSector(id);\n if (!result) {\n sector.id = id;\n result = sectors.add(sector);\n }\n return result;\n },\n\n /**\n * Get sector by id\n * @param {string} id Sector id\n * @return {Sector|null}\n * @example\n * var sector = styleManager.getSector('mySector');\n * */\n getSector(id) {\n var res = sectors.where({ id });\n return res.length ? res[0] : null;\n },\n\n /**\n * Remove a sector by id\n * @param {string} id Sector id\n * @return {Sector} Removed sector\n * @example\n * const removed = styleManager.removeSector('mySector');\n */\n removeSector(id) {\n return this.getSectors().remove(this.getSector(id));\n },\n\n /**\n * Get all sectors\n * @return {Sectors} Collection of sectors\n * */\n getSectors() {\n return sectors;\n },\n\n /**\n * Add property to the sector identified by id\n * @param {string} sectorId Sector id\n * @param {Object} property Property object\n * @param {string} [property.name=''] Name of the property\n * @param {string} [property.property=''] CSS property, eg. `min-height`\n * @param {string} [property.type=''] Type of the property: integer | radio | select | color | file | composite | stack\n * @param {Array} [property.units=[]] Unit of measure available, eg. ['px','%','em']. Only for integer type\n * @param {string} [property.unit=''] Default selected unit from `units`. Only for integer type\n * @param {number} [property.min=null] Min possible value. Only for integer type\n * @param {number} [property.max=null] Max possible value. Only for integer type\n * @param {string} [property.defaults=''] Default value\n * @param {string} [property.info=''] Some description\n * @param {string} [property.icon=''] Class name. If exists no text will be displayed\n * @param {Boolean} [property.preview=false] Show layers preview. Only for stack type\n * @param {string} [property.functionName=''] Indicates if value need to be wrapped in some function, for istance `transform: rotate(90deg)`\n * @param {Array} [property.properties=[]] Nested properties for composite and stack type\n * @param {Array} [property.layers=[]] Layers for stack properties\n * @param {Array} [property.list=[]] List of possible options for radio and select types\n * @return {Property|null} Added Property or `null` in case sector doesn't exist\n * @example\n * var property = styleManager.addProperty('mySector',{\n * name: 'Minimum height',\n * property: 'min-height',\n * type: 'select',\n * defaults: '100px',\n * list: [{\n * value: '100px',\n * name: '100',\n * },{\n * value: '200px',\n * name: '200',\n * }],\n * });\n */\n addProperty(sectorId, property) {\n var prop = null;\n var sector = this.getSector(sectorId);\n\n if (sector) prop = sector.get('properties').add(property);\n\n return prop;\n },\n\n /**\n * Get property by its CSS name and sector id\n * @param {string} sectorId Sector id\n * @param {string} name CSS property name, eg. 'min-height'\n * @return {Property|null}\n * @example\n * var property = styleManager.getProperty('mySector','min-height');\n */\n getProperty(sectorId, name) {\n var prop = null;\n var sector = this.getSector(sectorId);\n\n if (sector) {\n prop = sector.get('properties').where({ property: name });\n prop = prop.length == 1 ? prop[0] : prop;\n }\n\n return prop;\n },\n\n /**\n * Remove a property from the sector\n * @param {string} sectorId Sector id\n * @param {string} name CSS property name, eg. 'min-height'\n * @return {Property} Removed property\n * @example\n * const property = styleManager.removeProperty('mySector', 'min-height');\n */\n removeProperty(sectorId, name) {\n const props = this.getProperties(sectorId);\n return props && props.remove(this.getProperty(sectorId, name));\n },\n\n /**\n * Get properties of the sector\n * @param {string} sectorId Sector id\n * @return {Properties} Collection of properties\n * @example\n * var properties = styleManager.getProperties('mySector');\n */\n getProperties(sectorId) {\n var props = null;\n var sector = this.getSector(sectorId);\n\n if (sector) props = sector.get('properties');\n\n return props;\n },\n\n /**\n * Get what to style inside Style Manager. If you select the component\n * without classes the entity is the Component itself and all changes will\n * go inside its 'style' property. Otherwise, if the selected component has\n * one or more classes, the function will return the corresponding CSS Rule\n * @param {Model} model\n * @return {Model}\n */\n getModelToStyle(model) {\n const em = c.em;\n const classes = model.get('classes');\n const id = model.getId();\n\n if (em) {\n const config = em.getConfig();\n const um = em.get('UndoManager');\n const cssC = em.get('CssComposer');\n const state = !config.devicePreviewMode ? model.get('state') : '';\n const valid = classes.getStyleable();\n const hasClasses = valid.length;\n const opts = { state };\n let rule;\n\n // I stop undo manager here as after adding the CSSRule (generally after\n // selecting the component) and calling undo() it will remove the rule from\n // the collection, therefore updating it in style manager will not affect it\n // #268\n um.stop();\n\n if (hasClasses) {\n const deviceW = em.getCurrentMedia();\n rule = cssC.get(valid, state, deviceW);\n\n if (!rule) {\n rule = cssC.add(valid, state, deviceW);\n rule.setStyle(model.getStyle());\n model.setStyle({});\n }\n } else if (config.avoidInlineStyle) {\n rule = cssC.getIdRule(id, opts);\n !rule && (rule = cssC.setIdRule(id, {}, opts));\n }\n\n rule && (model = rule);\n um.start();\n }\n\n return model;\n },\n\n /**\n * Add new property type\n * @param {string} id Type ID\n * @param {Object} definition Definition of the type. Each definition contains\n * `model` (business logic), `view` (presentation logic)\n * and `isType` function which recognize the type of the\n * passed entity\n *@example\n * styleManager.addType('my-type', {\n * model: {},\n * view: {},\n * isType: (value) => {\n * if (value && value.type == 'my-type') {\n * return value;\n * }\n * },\n * })\n */\n addType(id, definition) {\n properties.addType(id, definition);\n },\n\n /**\n * Get type\n * @param {string} id Type ID\n * @return {Object} Type definition\n */\n getType(id) {\n return properties.getType(id);\n },\n\n /**\n * Get all types\n * @return {Array}\n */\n getTypes() {\n return properties.getTypes();\n },\n\n /**\n * Create new property from type\n * @param {string} id Type ID\n * @param {Object} [options={}] Options\n * @param {Object} [options.model={}] Custom model object\n * @param {Object} [options.view={}] Custom view object\n * @return {PropertyView}\n * @example\n * const propView = styleManager.createType('integer', {\n * model: {units: ['px', 'rem']}\n * });\n * propView.render();\n * propView.model.on('change:value', ...);\n * someContainer.appendChild(propView.el);\n */\n createType(id, { model = {}, view = {} } = {}) {\n const type = this.getType(id);\n\n if (type) {\n return new type.view({\n model: new type.model(model),\n config: c,\n ...view\n });\n }\n },\n\n /**\n * Render sectors and properties\n * @return {HTMLElement}\n * @private\n * */\n render() {\n return SectView.render().el;\n }\n };\n};\n","var Backbone = require('backbone');\nvar ButtonsView = require('./ButtonsView');\n\nmodule.exports = Backbone.View.extend({\n initialize(o) {\n const config = o.config || {};\n const model = this.model;\n this.config = config;\n this.pfx = config.stylePrefix || '';\n this.ppfx = config.pStylePrefix || '';\n this.buttons = model.get('buttons');\n this.className = this.pfx + 'panel';\n this.id = this.pfx + model.get('id');\n this.listenTo(model, 'change:appendContent', this.appendContent);\n this.listenTo(model, 'change:content', this.updateContent);\n model.view = this;\n },\n\n /**\n * Append content of the panel\n * */\n appendContent() {\n this.$el.append(this.model.get('appendContent'));\n },\n\n /**\n * Update content\n * */\n updateContent() {\n this.$el.html(this.model.get('content'));\n },\n\n attributes() {\n return this.model.get('attributes');\n },\n\n initResize() {\n const em = this.config.em;\n const editor = em ? em.get('Editor') : '';\n const resizable = this.model.get('resizable');\n\n if (editor && resizable) {\n var resz = resizable === true ? [1, 1, 1, 1] : resizable;\n var resLen = resz.length;\n var tc,\n cr,\n bc,\n cl = 0;\n\n // Choose which sides of the panel are resizable\n if (resLen == 2) {\n tc = resz[0];\n bc = resz[0];\n cr = resz[1];\n cl = resz[1];\n } else if (resLen == 4) {\n tc = resz[0];\n cr = resz[1];\n bc = resz[2];\n cl = resz[3];\n }\n\n var resizer = editor.Utils.Resizer.init({\n tc,\n cr,\n bc,\n cl,\n tl: 0,\n tr: 0,\n bl: 0,\n br: 0,\n appendTo: this.el,\n silentFrames: 1,\n avoidContainerUpdate: 1,\n prefix: editor.getConfig().stylePrefix,\n onEnd() {\n em && em.trigger('change:canvasOffset');\n },\n posFetcher: (el, { target }) => {\n const style = el.style;\n const config = resizer.getConfig();\n const keyWidth = config.keyWidth;\n const keyHeight = config.keyHeight;\n const rect = el.getBoundingClientRect();\n const forContainer = target == 'container';\n const styleWidth = style[keyWidth];\n const styleHeight = style[keyHeight];\n const width =\n styleWidth && !forContainer ? parseFloat(styleWidth) : rect.width;\n const height =\n styleHeight && !forContainer\n ? parseFloat(styleHeight)\n : rect.height;\n return {\n left: 0,\n top: 0,\n width,\n height\n };\n },\n ...resizable\n });\n resizer.blur = () => {};\n resizer.focus(this.el);\n }\n },\n\n render() {\n const $el = this.$el;\n const ppfx = this.ppfx;\n const cls = `${this.className} ${this.id} ${ppfx}one-bg ${ppfx}two-color`;\n $el.addClass(cls);\n\n if (this.buttons.length) {\n var buttons = new ButtonsView({\n collection: this.buttons,\n config: this.config\n });\n $el.append(buttons.render().el);\n }\n\n $el.append(this.model.get('content'));\n return this;\n }\n});\n","var Backbone = require('backbone');\nvar Button = require('./Button');\n\nmodule.exports = Backbone.Collection.extend({\n model: Button,\n\n /**\n * Deactivate all buttons, except one passed\n * @param {Object} except Model to ignore\n * @param {Boolean} r Recursive flag\n *\n * @return void\n * */\n deactivateAllExceptOne(except, r) {\n this.forEach((model, index) => {\n if (model !== except) {\n model.set('active', false);\n if (r && model.get('buttons').length)\n model.get('buttons').deactivateAllExceptOne(except, r);\n }\n });\n },\n\n /**\n * Deactivate all buttons\n * @param {String} ctx Context string\n *\n * @return void\n * */\n deactivateAll(ctx) {\n var context = ctx || '';\n this.forEach((model, index) => {\n if (model.get('context') == context) {\n model.set('active', false);\n if (model.get('buttons').length)\n model.get('buttons').deactivateAll(context);\n }\n });\n },\n\n /**\n * Disables all buttons\n * @param {String} ctx Context string\n *\n * @return void\n * */\n disableAllButtons(ctx) {\n var context = ctx || '';\n this.forEach((model, index) => {\n if (model.get('context') == context) {\n model.set('disable', true);\n if (model.get('buttons').length)\n model.get('buttons').disableAllButtons(context);\n }\n });\n },\n\n /**\n * Disables all buttons, except one passed\n * @param {Object} except Model to ignore\n * @param {Boolean} r Recursive flag\n *\n * @return void\n * */\n disableAllButtonsExceptOne(except, r) {\n this.forEach((model, index) => {\n if (model !== except) {\n model.set('disable', true);\n if (r && model.get('buttons').length)\n model.get('buttons').disableAllButtonsExceptOne(except, r);\n }\n });\n }\n});\n","var Backbone = require('backbone');\nvar Buttons = require('./Buttons');\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n id: '',\n content: '',\n visible: true,\n buttons: [],\n attributes: {}\n },\n\n initialize(options) {\n this.btn = this.get('buttons') || [];\n this.buttons = new Buttons(this.btn);\n this.set('buttons', this.buttons);\n }\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"css\", function(config, parserConfig) {\n var inline = parserConfig.inline\n if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode(\"text/css\");\n\n var indentUnit = config.indentUnit,\n tokenHooks = parserConfig.tokenHooks,\n documentTypes = parserConfig.documentTypes || {},\n mediaTypes = parserConfig.mediaTypes || {},\n mediaFeatures = parserConfig.mediaFeatures || {},\n mediaValueKeywords = parserConfig.mediaValueKeywords || {},\n propertyKeywords = parserConfig.propertyKeywords || {},\n nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {},\n fontProperties = parserConfig.fontProperties || {},\n counterDescriptors = parserConfig.counterDescriptors || {},\n colorKeywords = parserConfig.colorKeywords || {},\n valueKeywords = parserConfig.valueKeywords || {},\n allowNested = parserConfig.allowNested,\n lineComment = parserConfig.lineComment,\n supportsAtComponent = parserConfig.supportsAtComponent === true;\n\n var type, override;\n function ret(style, tp) { type = tp; return style; }\n\n // Tokenizers\n\n function tokenBase(stream, state) {\n var ch = stream.next();\n if (tokenHooks[ch]) {\n var result = tokenHooks[ch](stream, state);\n if (result !== false) return result;\n }\n if (ch == \"@\") {\n stream.eatWhile(/[\\w\\\\\\-]/);\n return ret(\"def\", stream.current());\n } else if (ch == \"=\" || (ch == \"~\" || ch == \"|\") && stream.eat(\"=\")) {\n return ret(null, \"compare\");\n } else if (ch == \"\\\"\" || ch == \"'\") {\n state.tokenize = tokenString(ch);\n return state.tokenize(stream, state);\n } else if (ch == \"#\") {\n stream.eatWhile(/[\\w\\\\\\-]/);\n return ret(\"atom\", \"hash\");\n } else if (ch == \"!\") {\n stream.match(/^\\s*\\w*/);\n return ret(\"keyword\", \"important\");\n } else if (/\\d/.test(ch) || ch == \".\" && stream.eat(/\\d/)) {\n stream.eatWhile(/[\\w.%]/);\n return ret(\"number\", \"unit\");\n } else if (ch === \"-\") {\n if (/[\\d.]/.test(stream.peek())) {\n stream.eatWhile(/[\\w.%]/);\n return ret(\"number\", \"unit\");\n } else if (stream.match(/^-[\\w\\\\\\-]+/)) {\n stream.eatWhile(/[\\w\\\\\\-]/);\n if (stream.match(/^\\s*:/, false))\n return ret(\"variable-2\", \"variable-definition\");\n return ret(\"variable-2\", \"variable\");\n } else if (stream.match(/^\\w+-/)) {\n return ret(\"meta\", \"meta\");\n }\n } else if (/[,+>*\\/]/.test(ch)) {\n return ret(null, \"select-op\");\n } else if (ch == \".\" && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {\n return ret(\"qualifier\", \"qualifier\");\n } else if (/[:;{}\\[\\]\\(\\)]/.test(ch)) {\n return ret(null, ch);\n } else if (((ch == \"u\" || ch == \"U\") && stream.match(/rl(-prefix)?\\(/i)) ||\n ((ch == \"d\" || ch == \"D\") && stream.match(\"omain(\", true, true)) ||\n ((ch == \"r\" || ch == \"R\") && stream.match(\"egexp(\", true, true))) {\n stream.backUp(1);\n state.tokenize = tokenParenthesized;\n return ret(\"property\", \"word\");\n } else if (/[\\w\\\\\\-]/.test(ch)) {\n stream.eatWhile(/[\\w\\\\\\-]/);\n return ret(\"property\", \"word\");\n } else {\n return ret(null, null);\n }\n }\n\n function tokenString(quote) {\n return function(stream, state) {\n var escaped = false, ch;\n while ((ch = stream.next()) != null) {\n if (ch == quote && !escaped) {\n if (quote == \")\") stream.backUp(1);\n break;\n }\n escaped = !escaped && ch == \"\\\\\";\n }\n if (ch == quote || !escaped && quote != \")\") state.tokenize = null;\n return ret(\"string\", \"string\");\n };\n }\n\n function tokenParenthesized(stream, state) {\n stream.next(); // Must be '('\n if (!stream.match(/\\s*[\\\"\\')]/, false))\n state.tokenize = tokenString(\")\");\n else\n state.tokenize = null;\n return ret(null, \"(\");\n }\n\n // Context management\n\n function Context(type, indent, prev) {\n this.type = type;\n this.indent = indent;\n this.prev = prev;\n }\n\n function pushContext(state, stream, type, indent) {\n state.context = new Context(type, stream.indentation() + (indent === false ? 0 : indentUnit), state.context);\n return type;\n }\n\n function popContext(state) {\n if (state.context.prev)\n state.context = state.context.prev;\n return state.context.type;\n }\n\n function pass(type, stream, state) {\n return states[state.context.type](type, stream, state);\n }\n function popAndPass(type, stream, state, n) {\n for (var i = n || 1; i > 0; i--)\n state.context = state.context.prev;\n return pass(type, stream, state);\n }\n\n // Parser\n\n function wordAsValue(stream) {\n var word = stream.current().toLowerCase();\n if (valueKeywords.hasOwnProperty(word))\n override = \"atom\";\n else if (colorKeywords.hasOwnProperty(word))\n override = \"keyword\";\n else\n override = \"variable\";\n }\n\n var states = {};\n\n states.top = function(type, stream, state) {\n if (type == \"{\") {\n return pushContext(state, stream, \"block\");\n } else if (type == \"}\" && state.context.prev) {\n return popContext(state);\n } else if (supportsAtComponent && /@component/i.test(type)) {\n return pushContext(state, stream, \"atComponentBlock\");\n } else if (/^@(-moz-)?document$/i.test(type)) {\n return pushContext(state, stream, \"documentTypes\");\n } else if (/^@(media|supports|(-moz-)?document|import)$/i.test(type)) {\n return pushContext(state, stream, \"atBlock\");\n } else if (/^@(font-face|counter-style)/i.test(type)) {\n state.stateArg = type;\n return \"restricted_atBlock_before\";\n } else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(type)) {\n return \"keyframes\";\n } else if (type && type.charAt(0) == \"@\") {\n return pushContext(state, stream, \"at\");\n } else if (type == \"hash\") {\n override = \"builtin\";\n } else if (type == \"word\") {\n override = \"tag\";\n } else if (type == \"variable-definition\") {\n return \"maybeprop\";\n } else if (type == \"interpolation\") {\n return pushContext(state, stream, \"interpolation\");\n } else if (type == \":\") {\n return \"pseudo\";\n } else if (allowNested && type == \"(\") {\n return pushContext(state, stream, \"parens\");\n }\n return state.context.type;\n };\n\n states.block = function(type, stream, state) {\n if (type == \"word\") {\n var word = stream.current().toLowerCase();\n if (propertyKeywords.hasOwnProperty(word)) {\n override = \"property\";\n return \"maybeprop\";\n } else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {\n override = \"string-2\";\n return \"maybeprop\";\n } else if (allowNested) {\n override = stream.match(/^\\s*:(?:\\s|$)/, false) ? \"property\" : \"tag\";\n return \"block\";\n } else {\n override += \" error\";\n return \"maybeprop\";\n }\n } else if (type == \"meta\") {\n return \"block\";\n } else if (!allowNested && (type == \"hash\" || type == \"qualifier\")) {\n override = \"error\";\n return \"block\";\n } else {\n return states.top(type, stream, state);\n }\n };\n\n states.maybeprop = function(type, stream, state) {\n if (type == \":\") return pushContext(state, stream, \"prop\");\n return pass(type, stream, state);\n };\n\n states.prop = function(type, stream, state) {\n if (type == \";\") return popContext(state);\n if (type == \"{\" && allowNested) return pushContext(state, stream, \"propBlock\");\n if (type == \"}\" || type == \"{\") return popAndPass(type, stream, state);\n if (type == \"(\") return pushContext(state, stream, \"parens\");\n\n if (type == \"hash\" && !/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(stream.current())) {\n override += \" error\";\n } else if (type == \"word\") {\n wordAsValue(stream);\n } else if (type == \"interpolation\") {\n return pushContext(state, stream, \"interpolation\");\n }\n return \"prop\";\n };\n\n states.propBlock = function(type, _stream, state) {\n if (type == \"}\") return popContext(state);\n if (type == \"word\") { override = \"property\"; return \"maybeprop\"; }\n return state.context.type;\n };\n\n states.parens = function(type, stream, state) {\n if (type == \"{\" || type == \"}\") return popAndPass(type, stream, state);\n if (type == \")\") return popContext(state);\n if (type == \"(\") return pushContext(state, stream, \"parens\");\n if (type == \"interpolation\") return pushContext(state, stream, \"interpolation\");\n if (type == \"word\") wordAsValue(stream);\n return \"parens\";\n };\n\n states.pseudo = function(type, stream, state) {\n if (type == \"meta\") return \"pseudo\";\n\n if (type == \"word\") {\n override = \"variable-3\";\n return state.context.type;\n }\n return pass(type, stream, state);\n };\n\n states.documentTypes = function(type, stream, state) {\n if (type == \"word\" && documentTypes.hasOwnProperty(stream.current())) {\n override = \"tag\";\n return state.context.type;\n } else {\n return states.atBlock(type, stream, state);\n }\n };\n\n states.atBlock = function(type, stream, state) {\n if (type == \"(\") return pushContext(state, stream, \"atBlock_parens\");\n if (type == \"}\" || type == \";\") return popAndPass(type, stream, state);\n if (type == \"{\") return popContext(state) && pushContext(state, stream, allowNested ? \"block\" : \"top\");\n\n if (type == \"interpolation\") return pushContext(state, stream, \"interpolation\");\n\n if (type == \"word\") {\n var word = stream.current().toLowerCase();\n if (word == \"only\" || word == \"not\" || word == \"and\" || word == \"or\")\n override = \"keyword\";\n else if (mediaTypes.hasOwnProperty(word))\n override = \"attribute\";\n else if (mediaFeatures.hasOwnProperty(word))\n override = \"property\";\n else if (mediaValueKeywords.hasOwnProperty(word))\n override = \"keyword\";\n else if (propertyKeywords.hasOwnProperty(word))\n override = \"property\";\n else if (nonStandardPropertyKeywords.hasOwnProperty(word))\n override = \"string-2\";\n else if (valueKeywords.hasOwnProperty(word))\n override = \"atom\";\n else if (colorKeywords.hasOwnProperty(word))\n override = \"keyword\";\n else\n override = \"error\";\n }\n return state.context.type;\n };\n\n states.atComponentBlock = function(type, stream, state) {\n if (type == \"}\")\n return popAndPass(type, stream, state);\n if (type == \"{\")\n return popContext(state) && pushContext(state, stream, allowNested ? \"block\" : \"top\", false);\n if (type == \"word\")\n override = \"error\";\n return state.context.type;\n };\n\n states.atBlock_parens = function(type, stream, state) {\n if (type == \")\") return popContext(state);\n if (type == \"{\" || type == \"}\") return popAndPass(type, stream, state, 2);\n return states.atBlock(type, stream, state);\n };\n\n states.restricted_atBlock_before = function(type, stream, state) {\n if (type == \"{\")\n return pushContext(state, stream, \"restricted_atBlock\");\n if (type == \"word\" && state.stateArg == \"@counter-style\") {\n override = \"variable\";\n return \"restricted_atBlock_before\";\n }\n return pass(type, stream, state);\n };\n\n states.restricted_atBlock = function(type, stream, state) {\n if (type == \"}\") {\n state.stateArg = null;\n return popContext(state);\n }\n if (type == \"word\") {\n if ((state.stateArg == \"@font-face\" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) ||\n (state.stateArg == \"@counter-style\" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase())))\n override = \"error\";\n else\n override = \"property\";\n return \"maybeprop\";\n }\n return \"restricted_atBlock\";\n };\n\n states.keyframes = function(type, stream, state) {\n if (type == \"word\") { override = \"variable\"; return \"keyframes\"; }\n if (type == \"{\") return pushContext(state, stream, \"top\");\n return pass(type, stream, state);\n };\n\n states.at = function(type, stream, state) {\n if (type == \";\") return popContext(state);\n if (type == \"{\" || type == \"}\") return popAndPass(type, stream, state);\n if (type == \"word\") override = \"tag\";\n else if (type == \"hash\") override = \"builtin\";\n return \"at\";\n };\n\n states.interpolation = function(type, stream, state) {\n if (type == \"}\") return popContext(state);\n if (type == \"{\" || type == \";\") return popAndPass(type, stream, state);\n if (type == \"word\") override = \"variable\";\n else if (type != \"variable\" && type != \"(\" && type != \")\") override = \"error\";\n return \"interpolation\";\n };\n\n return {\n startState: function(base) {\n return {tokenize: null,\n state: inline ? \"block\" : \"top\",\n stateArg: null,\n context: new Context(inline ? \"block\" : \"top\", base || 0, null)};\n },\n\n token: function(stream, state) {\n if (!state.tokenize && stream.eatSpace()) return null;\n var style = (state.tokenize || tokenBase)(stream, state);\n if (style && typeof style == \"object\") {\n type = style[1];\n style = style[0];\n }\n override = style;\n if (type != \"comment\")\n state.state = states[state.state](type, stream, state);\n return override;\n },\n\n indent: function(state, textAfter) {\n var cx = state.context, ch = textAfter && textAfter.charAt(0);\n var indent = cx.indent;\n if (cx.type == \"prop\" && (ch == \"}\" || ch == \")\")) cx = cx.prev;\n if (cx.prev) {\n if (ch == \"}\" && (cx.type == \"block\" || cx.type == \"top\" ||\n cx.type == \"interpolation\" || cx.type == \"restricted_atBlock\")) {\n // Resume indentation from parent context.\n cx = cx.prev;\n indent = cx.indent;\n } else if (ch == \")\" && (cx.type == \"parens\" || cx.type == \"atBlock_parens\") ||\n ch == \"{\" && (cx.type == \"at\" || cx.type == \"atBlock\")) {\n // Dedent relative to current context.\n indent = Math.max(0, cx.indent - indentUnit);\n }\n }\n return indent;\n },\n\n electricChars: \"}\",\n blockCommentStart: \"/*\",\n blockCommentEnd: \"*/\",\n blockCommentContinue: \" * \",\n lineComment: lineComment,\n fold: \"brace\"\n };\n});\n\n function keySet(array) {\n var keys = {};\n for (var i = 0; i < array.length; ++i) {\n keys[array[i].toLowerCase()] = true;\n }\n return keys;\n }\n\n var documentTypes_ = [\n \"domain\", \"regexp\", \"url\", \"url-prefix\"\n ], documentTypes = keySet(documentTypes_);\n\n var mediaTypes_ = [\n \"all\", \"aural\", \"braille\", \"handheld\", \"print\", \"projection\", \"screen\",\n \"tty\", \"tv\", \"embossed\"\n ], mediaTypes = keySet(mediaTypes_);\n\n var mediaFeatures_ = [\n \"width\", \"min-width\", \"max-width\", \"height\", \"min-height\", \"max-height\",\n \"device-width\", \"min-device-width\", \"max-device-width\", \"device-height\",\n \"min-device-height\", \"max-device-height\", \"aspect-ratio\",\n \"min-aspect-ratio\", \"max-aspect-ratio\", \"device-aspect-ratio\",\n \"min-device-aspect-ratio\", \"max-device-aspect-ratio\", \"color\", \"min-color\",\n \"max-color\", \"color-index\", \"min-color-index\", \"max-color-index\",\n \"monochrome\", \"min-monochrome\", \"max-monochrome\", \"resolution\",\n \"min-resolution\", \"max-resolution\", \"scan\", \"grid\", \"orientation\",\n \"device-pixel-ratio\", \"min-device-pixel-ratio\", \"max-device-pixel-ratio\",\n \"pointer\", \"any-pointer\", \"hover\", \"any-hover\"\n ], mediaFeatures = keySet(mediaFeatures_);\n\n var mediaValueKeywords_ = [\n \"landscape\", \"portrait\", \"none\", \"coarse\", \"fine\", \"on-demand\", \"hover\",\n \"interlace\", \"progressive\"\n ], mediaValueKeywords = keySet(mediaValueKeywords_);\n\n var propertyKeywords_ = [\n \"align-content\", \"align-items\", \"align-self\", \"alignment-adjust\",\n \"alignment-baseline\", \"anchor-point\", \"animation\", \"animation-delay\",\n \"animation-direction\", \"animation-duration\", \"animation-fill-mode\",\n \"animation-iteration-count\", \"animation-name\", \"animation-play-state\",\n \"animation-timing-function\", \"appearance\", \"azimuth\", \"backface-visibility\",\n \"background\", \"background-attachment\", \"background-blend-mode\", \"background-clip\",\n \"background-color\", \"background-image\", \"background-origin\", \"background-position\",\n \"background-repeat\", \"background-size\", \"baseline-shift\", \"binding\",\n \"bleed\", \"bookmark-label\", \"bookmark-level\", \"bookmark-state\",\n \"bookmark-target\", \"border\", \"border-bottom\", \"border-bottom-color\",\n \"border-bottom-left-radius\", \"border-bottom-right-radius\",\n \"border-bottom-style\", \"border-bottom-width\", \"border-collapse\",\n \"border-color\", \"border-image\", \"border-image-outset\",\n \"border-image-repeat\", \"border-image-slice\", \"border-image-source\",\n \"border-image-width\", \"border-left\", \"border-left-color\",\n \"border-left-style\", \"border-left-width\", \"border-radius\", \"border-right\",\n \"border-right-color\", \"border-right-style\", \"border-right-width\",\n \"border-spacing\", \"border-style\", \"border-top\", \"border-top-color\",\n \"border-top-left-radius\", \"border-top-right-radius\", \"border-top-style\",\n \"border-top-width\", \"border-width\", \"bottom\", \"box-decoration-break\",\n \"box-shadow\", \"box-sizing\", \"break-after\", \"break-before\", \"break-inside\",\n \"caption-side\", \"caret-color\", \"clear\", \"clip\", \"color\", \"color-profile\", \"column-count\",\n \"column-fill\", \"column-gap\", \"column-rule\", \"column-rule-color\",\n \"column-rule-style\", \"column-rule-width\", \"column-span\", \"column-width\",\n \"columns\", \"content\", \"counter-increment\", \"counter-reset\", \"crop\", \"cue\",\n \"cue-after\", \"cue-before\", \"cursor\", \"direction\", \"display\",\n \"dominant-baseline\", \"drop-initial-after-adjust\",\n \"drop-initial-after-align\", \"drop-initial-before-adjust\",\n \"drop-initial-before-align\", \"drop-initial-size\", \"drop-initial-value\",\n \"elevation\", \"empty-cells\", \"fit\", \"fit-position\", \"flex\", \"flex-basis\",\n \"flex-direction\", \"flex-flow\", \"flex-grow\", \"flex-shrink\", \"flex-wrap\",\n \"float\", \"float-offset\", \"flow-from\", \"flow-into\", \"font\", \"font-feature-settings\",\n \"font-family\", \"font-kerning\", \"font-language-override\", \"font-size\", \"font-size-adjust\",\n \"font-stretch\", \"font-style\", \"font-synthesis\", \"font-variant\",\n \"font-variant-alternates\", \"font-variant-caps\", \"font-variant-east-asian\",\n \"font-variant-ligatures\", \"font-variant-numeric\", \"font-variant-position\",\n \"font-weight\", \"grid\", \"grid-area\", \"grid-auto-columns\", \"grid-auto-flow\",\n \"grid-auto-rows\", \"grid-column\", \"grid-column-end\", \"grid-column-gap\",\n \"grid-column-start\", \"grid-gap\", \"grid-row\", \"grid-row-end\", \"grid-row-gap\",\n \"grid-row-start\", \"grid-template\", \"grid-template-areas\", \"grid-template-columns\",\n \"grid-template-rows\", \"hanging-punctuation\", \"height\", \"hyphens\",\n \"icon\", \"image-orientation\", \"image-rendering\", \"image-resolution\",\n \"inline-box-align\", \"justify-content\", \"justify-items\", \"justify-self\", \"left\", \"letter-spacing\",\n \"line-break\", \"line-height\", \"line-stacking\", \"line-stacking-ruby\",\n \"line-stacking-shift\", \"line-stacking-strategy\", \"list-style\",\n \"list-style-image\", \"list-style-position\", \"list-style-type\", \"margin\",\n \"margin-bottom\", \"margin-left\", \"margin-right\", \"margin-top\",\n \"marks\", \"marquee-direction\", \"marquee-loop\",\n \"marquee-play-count\", \"marquee-speed\", \"marquee-style\", \"max-height\",\n \"max-width\", \"min-height\", \"min-width\", \"move-to\", \"nav-down\", \"nav-index\",\n \"nav-left\", \"nav-right\", \"nav-up\", \"object-fit\", \"object-position\",\n \"opacity\", \"order\", \"orphans\", \"outline\",\n \"outline-color\", \"outline-offset\", \"outline-style\", \"outline-width\",\n \"overflow\", \"overflow-style\", \"overflow-wrap\", \"overflow-x\", \"overflow-y\",\n \"padding\", \"padding-bottom\", \"padding-left\", \"padding-right\", \"padding-top\",\n \"page\", \"page-break-after\", \"page-break-before\", \"page-break-inside\",\n \"page-policy\", \"pause\", \"pause-after\", \"pause-before\", \"perspective\",\n \"perspective-origin\", \"pitch\", \"pitch-range\", \"place-content\", \"place-items\", \"place-self\", \"play-during\", \"position\",\n \"presentation-level\", \"punctuation-trim\", \"quotes\", \"region-break-after\",\n \"region-break-before\", \"region-break-inside\", \"region-fragment\",\n \"rendering-intent\", \"resize\", \"rest\", \"rest-after\", \"rest-before\", \"richness\",\n \"right\", \"rotation\", \"rotation-point\", \"ruby-align\", \"ruby-overhang\",\n \"ruby-position\", \"ruby-span\", \"shape-image-threshold\", \"shape-inside\", \"shape-margin\",\n \"shape-outside\", \"size\", \"speak\", \"speak-as\", \"speak-header\",\n \"speak-numeral\", \"speak-punctuation\", \"speech-rate\", \"stress\", \"string-set\",\n \"tab-size\", \"table-layout\", \"target\", \"target-name\", \"target-new\",\n \"target-position\", \"text-align\", \"text-align-last\", \"text-decoration\",\n \"text-decoration-color\", \"text-decoration-line\", \"text-decoration-skip\",\n \"text-decoration-style\", \"text-emphasis\", \"text-emphasis-color\",\n \"text-emphasis-position\", \"text-emphasis-style\", \"text-height\",\n \"text-indent\", \"text-justify\", \"text-outline\", \"text-overflow\", \"text-shadow\",\n \"text-size-adjust\", \"text-space-collapse\", \"text-transform\", \"text-underline-position\",\n \"text-wrap\", \"top\", \"transform\", \"transform-origin\", \"transform-style\",\n \"transition\", \"transition-delay\", \"transition-duration\",\n \"transition-property\", \"transition-timing-function\", \"unicode-bidi\",\n \"user-select\", \"vertical-align\", \"visibility\", \"voice-balance\", \"voice-duration\",\n \"voice-family\", \"voice-pitch\", \"voice-range\", \"voice-rate\", \"voice-stress\",\n \"voice-volume\", \"volume\", \"white-space\", \"widows\", \"width\", \"will-change\", \"word-break\",\n \"word-spacing\", \"word-wrap\", \"z-index\",\n // SVG-specific\n \"clip-path\", \"clip-rule\", \"mask\", \"enable-background\", \"filter\", \"flood-color\",\n \"flood-opacity\", \"lighting-color\", \"stop-color\", \"stop-opacity\", \"pointer-events\",\n \"color-interpolation\", \"color-interpolation-filters\",\n \"color-rendering\", \"fill\", \"fill-opacity\", \"fill-rule\", \"image-rendering\",\n \"marker\", \"marker-end\", \"marker-mid\", \"marker-start\", \"shape-rendering\", \"stroke\",\n \"stroke-dasharray\", \"stroke-dashoffset\", \"stroke-linecap\", \"stroke-linejoin\",\n \"stroke-miterlimit\", \"stroke-opacity\", \"stroke-width\", \"text-rendering\",\n \"baseline-shift\", \"dominant-baseline\", \"glyph-orientation-horizontal\",\n \"glyph-orientation-vertical\", \"text-anchor\", \"writing-mode\"\n ], propertyKeywords = keySet(propertyKeywords_);\n\n var nonStandardPropertyKeywords_ = [\n \"scrollbar-arrow-color\", \"scrollbar-base-color\", \"scrollbar-dark-shadow-color\",\n \"scrollbar-face-color\", \"scrollbar-highlight-color\", \"scrollbar-shadow-color\",\n \"scrollbar-3d-light-color\", \"scrollbar-track-color\", \"shape-inside\",\n \"searchfield-cancel-button\", \"searchfield-decoration\", \"searchfield-results-button\",\n \"searchfield-results-decoration\", \"zoom\"\n ], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);\n\n var fontProperties_ = [\n \"font-family\", \"src\", \"unicode-range\", \"font-variant\", \"font-feature-settings\",\n \"font-stretch\", \"font-weight\", \"font-style\"\n ], fontProperties = keySet(fontProperties_);\n\n var counterDescriptors_ = [\n \"additive-symbols\", \"fallback\", \"negative\", \"pad\", \"prefix\", \"range\",\n \"speak-as\", \"suffix\", \"symbols\", \"system\"\n ], counterDescriptors = keySet(counterDescriptors_);\n\n var colorKeywords_ = [\n \"aliceblue\", \"antiquewhite\", \"aqua\", \"aquamarine\", \"azure\", \"beige\",\n \"bisque\", \"black\", \"blanchedalmond\", \"blue\", \"blueviolet\", \"brown\",\n \"burlywood\", \"cadetblue\", \"chartreuse\", \"chocolate\", \"coral\", \"cornflowerblue\",\n \"cornsilk\", \"crimson\", \"cyan\", \"darkblue\", \"darkcyan\", \"darkgoldenrod\",\n \"darkgray\", \"darkgreen\", \"darkkhaki\", \"darkmagenta\", \"darkolivegreen\",\n \"darkorange\", \"darkorchid\", \"darkred\", \"darksalmon\", \"darkseagreen\",\n \"darkslateblue\", \"darkslategray\", \"darkturquoise\", \"darkviolet\",\n \"deeppink\", \"deepskyblue\", \"dimgray\", \"dodgerblue\", \"firebrick\",\n \"floralwhite\", \"forestgreen\", \"fuchsia\", \"gainsboro\", \"ghostwhite\",\n \"gold\", \"goldenrod\", \"gray\", \"grey\", \"green\", \"greenyellow\", \"honeydew\",\n \"hotpink\", \"indianred\", \"indigo\", \"ivory\", \"khaki\", \"lavender\",\n \"lavenderblush\", \"lawngreen\", \"lemonchiffon\", \"lightblue\", \"lightcoral\",\n \"lightcyan\", \"lightgoldenrodyellow\", \"lightgray\", \"lightgreen\", \"lightpink\",\n \"lightsalmon\", \"lightseagreen\", \"lightskyblue\", \"lightslategray\",\n \"lightsteelblue\", \"lightyellow\", \"lime\", \"limegreen\", \"linen\", \"magenta\",\n \"maroon\", \"mediumaquamarine\", \"mediumblue\", \"mediumorchid\", \"mediumpurple\",\n \"mediumseagreen\", \"mediumslateblue\", \"mediumspringgreen\", \"mediumturquoise\",\n \"mediumvioletred\", \"midnightblue\", \"mintcream\", \"mistyrose\", \"moccasin\",\n \"navajowhite\", \"navy\", \"oldlace\", \"olive\", \"olivedrab\", \"orange\", \"orangered\",\n \"orchid\", \"palegoldenrod\", \"palegreen\", \"paleturquoise\", \"palevioletred\",\n \"papayawhip\", \"peachpuff\", \"peru\", \"pink\", \"plum\", \"powderblue\",\n \"purple\", \"rebeccapurple\", \"red\", \"rosybrown\", \"royalblue\", \"saddlebrown\",\n \"salmon\", \"sandybrown\", \"seagreen\", \"seashell\", \"sienna\", \"silver\", \"skyblue\",\n \"slateblue\", \"slategray\", \"snow\", \"springgreen\", \"steelblue\", \"tan\",\n \"teal\", \"thistle\", \"tomato\", \"turquoise\", \"violet\", \"wheat\", \"white\",\n \"whitesmoke\", \"yellow\", \"yellowgreen\"\n ], colorKeywords = keySet(colorKeywords_);\n\n var valueKeywords_ = [\n \"above\", \"absolute\", \"activeborder\", \"additive\", \"activecaption\", \"afar\",\n \"after-white-space\", \"ahead\", \"alias\", \"all\", \"all-scroll\", \"alphabetic\", \"alternate\",\n \"always\", \"amharic\", \"amharic-abegede\", \"antialiased\", \"appworkspace\",\n \"arabic-indic\", \"armenian\", \"asterisks\", \"attr\", \"auto\", \"auto-flow\", \"avoid\", \"avoid-column\", \"avoid-page\",\n \"avoid-region\", \"background\", \"backwards\", \"baseline\", \"below\", \"bidi-override\", \"binary\",\n \"bengali\", \"blink\", \"block\", \"block-axis\", \"bold\", \"bolder\", \"border\", \"border-box\",\n \"both\", \"bottom\", \"break\", \"break-all\", \"break-word\", \"bullets\", \"button\", \"button-bevel\",\n \"buttonface\", \"buttonhighlight\", \"buttonshadow\", \"buttontext\", \"calc\", \"cambodian\",\n \"capitalize\", \"caps-lock-indicator\", \"caption\", \"captiontext\", \"caret\",\n \"cell\", \"center\", \"checkbox\", \"circle\", \"cjk-decimal\", \"cjk-earthly-branch\",\n \"cjk-heavenly-stem\", \"cjk-ideographic\", \"clear\", \"clip\", \"close-quote\",\n \"col-resize\", \"collapse\", \"color\", \"color-burn\", \"color-dodge\", \"column\", \"column-reverse\",\n \"compact\", \"condensed\", \"contain\", \"content\", \"contents\",\n \"content-box\", \"context-menu\", \"continuous\", \"copy\", \"counter\", \"counters\", \"cover\", \"crop\",\n \"cross\", \"crosshair\", \"currentcolor\", \"cursive\", \"cyclic\", \"darken\", \"dashed\", \"decimal\",\n \"decimal-leading-zero\", \"default\", \"default-button\", \"dense\", \"destination-atop\",\n \"destination-in\", \"destination-out\", \"destination-over\", \"devanagari\", \"difference\",\n \"disc\", \"discard\", \"disclosure-closed\", \"disclosure-open\", \"document\",\n \"dot-dash\", \"dot-dot-dash\",\n \"dotted\", \"double\", \"down\", \"e-resize\", \"ease\", \"ease-in\", \"ease-in-out\", \"ease-out\",\n \"element\", \"ellipse\", \"ellipsis\", \"embed\", \"end\", \"ethiopic\", \"ethiopic-abegede\",\n \"ethiopic-abegede-am-et\", \"ethiopic-abegede-gez\", \"ethiopic-abegede-ti-er\",\n \"ethiopic-abegede-ti-et\", \"ethiopic-halehame-aa-er\",\n \"ethiopic-halehame-aa-et\", \"ethiopic-halehame-am-et\",\n \"ethiopic-halehame-gez\", \"ethiopic-halehame-om-et\",\n \"ethiopic-halehame-sid-et\", \"ethiopic-halehame-so-et\",\n \"ethiopic-halehame-ti-er\", \"ethiopic-halehame-ti-et\", \"ethiopic-halehame-tig\",\n \"ethiopic-numeric\", \"ew-resize\", \"exclusion\", \"expanded\", \"extends\", \"extra-condensed\",\n \"extra-expanded\", \"fantasy\", \"fast\", \"fill\", \"fixed\", \"flat\", \"flex\", \"flex-end\", \"flex-start\", \"footnotes\",\n \"forwards\", \"from\", \"geometricPrecision\", \"georgian\", \"graytext\", \"grid\", \"groove\",\n \"gujarati\", \"gurmukhi\", \"hand\", \"hangul\", \"hangul-consonant\", \"hard-light\", \"hebrew\",\n \"help\", \"hidden\", \"hide\", \"higher\", \"highlight\", \"highlighttext\",\n \"hiragana\", \"hiragana-iroha\", \"horizontal\", \"hsl\", \"hsla\", \"hue\", \"icon\", \"ignore\",\n \"inactiveborder\", \"inactivecaption\", \"inactivecaptiontext\", \"infinite\",\n \"infobackground\", \"infotext\", \"inherit\", \"initial\", \"inline\", \"inline-axis\",\n \"inline-block\", \"inline-flex\", \"inline-grid\", \"inline-table\", \"inset\", \"inside\", \"intrinsic\", \"invert\",\n \"italic\", \"japanese-formal\", \"japanese-informal\", \"justify\", \"kannada\",\n \"katakana\", \"katakana-iroha\", \"keep-all\", \"khmer\",\n \"korean-hangul-formal\", \"korean-hanja-formal\", \"korean-hanja-informal\",\n \"landscape\", \"lao\", \"large\", \"larger\", \"left\", \"level\", \"lighter\", \"lighten\",\n \"line-through\", \"linear\", \"linear-gradient\", \"lines\", \"list-item\", \"listbox\", \"listitem\",\n \"local\", \"logical\", \"loud\", \"lower\", \"lower-alpha\", \"lower-armenian\",\n \"lower-greek\", \"lower-hexadecimal\", \"lower-latin\", \"lower-norwegian\",\n \"lower-roman\", \"lowercase\", \"ltr\", \"luminosity\", \"malayalam\", \"match\", \"matrix\", \"matrix3d\",\n \"media-controls-background\", \"media-current-time-display\",\n \"media-fullscreen-button\", \"media-mute-button\", \"media-play-button\",\n \"media-return-to-realtime-button\", \"media-rewind-button\",\n \"media-seek-back-button\", \"media-seek-forward-button\", \"media-slider\",\n \"media-sliderthumb\", \"media-time-remaining-display\", \"media-volume-slider\",\n \"media-volume-slider-container\", \"media-volume-sliderthumb\", \"medium\",\n \"menu\", \"menulist\", \"menulist-button\", \"menulist-text\",\n \"menulist-textfield\", \"menutext\", \"message-box\", \"middle\", \"min-intrinsic\",\n \"mix\", \"mongolian\", \"monospace\", \"move\", \"multiple\", \"multiply\", \"myanmar\", \"n-resize\",\n \"narrower\", \"ne-resize\", \"nesw-resize\", \"no-close-quote\", \"no-drop\",\n \"no-open-quote\", \"no-repeat\", \"none\", \"normal\", \"not-allowed\", \"nowrap\",\n \"ns-resize\", \"numbers\", \"numeric\", \"nw-resize\", \"nwse-resize\", \"oblique\", \"octal\", \"opacity\", \"open-quote\",\n \"optimizeLegibility\", \"optimizeSpeed\", \"oriya\", \"oromo\", \"outset\",\n \"outside\", \"outside-shape\", \"overlay\", \"overline\", \"padding\", \"padding-box\",\n \"painted\", \"page\", \"paused\", \"persian\", \"perspective\", \"plus-darker\", \"plus-lighter\",\n \"pointer\", \"polygon\", \"portrait\", \"pre\", \"pre-line\", \"pre-wrap\", \"preserve-3d\",\n \"progress\", \"push-button\", \"radial-gradient\", \"radio\", \"read-only\",\n \"read-write\", \"read-write-plaintext-only\", \"rectangle\", \"region\",\n \"relative\", \"repeat\", \"repeating-linear-gradient\",\n \"repeating-radial-gradient\", \"repeat-x\", \"repeat-y\", \"reset\", \"reverse\",\n \"rgb\", \"rgba\", \"ridge\", \"right\", \"rotate\", \"rotate3d\", \"rotateX\", \"rotateY\",\n \"rotateZ\", \"round\", \"row\", \"row-resize\", \"row-reverse\", \"rtl\", \"run-in\", \"running\",\n \"s-resize\", \"sans-serif\", \"saturation\", \"scale\", \"scale3d\", \"scaleX\", \"scaleY\", \"scaleZ\", \"screen\",\n \"scroll\", \"scrollbar\", \"scroll-position\", \"se-resize\", \"searchfield\",\n \"searchfield-cancel-button\", \"searchfield-decoration\",\n \"searchfield-results-button\", \"searchfield-results-decoration\", \"self-start\", \"self-end\",\n \"semi-condensed\", \"semi-expanded\", \"separate\", \"serif\", \"show\", \"sidama\",\n \"simp-chinese-formal\", \"simp-chinese-informal\", \"single\",\n \"skew\", \"skewX\", \"skewY\", \"skip-white-space\", \"slide\", \"slider-horizontal\",\n \"slider-vertical\", \"sliderthumb-horizontal\", \"sliderthumb-vertical\", \"slow\",\n \"small\", \"small-caps\", \"small-caption\", \"smaller\", \"soft-light\", \"solid\", \"somali\",\n \"source-atop\", \"source-in\", \"source-out\", \"source-over\", \"space\", \"space-around\", \"space-between\", \"space-evenly\", \"spell-out\", \"square\",\n \"square-button\", \"start\", \"static\", \"status-bar\", \"stretch\", \"stroke\", \"sub\",\n \"subpixel-antialiased\", \"super\", \"sw-resize\", \"symbolic\", \"symbols\", \"system-ui\", \"table\",\n \"table-caption\", \"table-cell\", \"table-column\", \"table-column-group\",\n \"table-footer-group\", \"table-header-group\", \"table-row\", \"table-row-group\",\n \"tamil\",\n \"telugu\", \"text\", \"text-bottom\", \"text-top\", \"textarea\", \"textfield\", \"thai\",\n \"thick\", \"thin\", \"threeddarkshadow\", \"threedface\", \"threedhighlight\",\n \"threedlightshadow\", \"threedshadow\", \"tibetan\", \"tigre\", \"tigrinya-er\",\n \"tigrinya-er-abegede\", \"tigrinya-et\", \"tigrinya-et-abegede\", \"to\", \"top\",\n \"trad-chinese-formal\", \"trad-chinese-informal\", \"transform\",\n \"translate\", \"translate3d\", \"translateX\", \"translateY\", \"translateZ\",\n \"transparent\", \"ultra-condensed\", \"ultra-expanded\", \"underline\", \"unset\", \"up\",\n \"upper-alpha\", \"upper-armenian\", \"upper-greek\", \"upper-hexadecimal\",\n \"upper-latin\", \"upper-norwegian\", \"upper-roman\", \"uppercase\", \"urdu\", \"url\",\n \"var\", \"vertical\", \"vertical-text\", \"visible\", \"visibleFill\", \"visiblePainted\",\n \"visibleStroke\", \"visual\", \"w-resize\", \"wait\", \"wave\", \"wider\",\n \"window\", \"windowframe\", \"windowtext\", \"words\", \"wrap\", \"wrap-reverse\", \"x-large\", \"x-small\", \"xor\",\n \"xx-large\", \"xx-small\"\n ], valueKeywords = keySet(valueKeywords_);\n\n var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_)\n .concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_)\n .concat(valueKeywords_);\n CodeMirror.registerHelper(\"hintWords\", \"css\", allWords);\n\n function tokenCComment(stream, state) {\n var maybeEnd = false, ch;\n while ((ch = stream.next()) != null) {\n if (maybeEnd && ch == \"/\") {\n state.tokenize = null;\n break;\n }\n maybeEnd = (ch == \"*\");\n }\n return [\"comment\", \"comment\"];\n }\n\n CodeMirror.defineMIME(\"text/css\", {\n documentTypes: documentTypes,\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n mediaValueKeywords: mediaValueKeywords,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n fontProperties: fontProperties,\n counterDescriptors: counterDescriptors,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n tokenHooks: {\n \"/\": function(stream, state) {\n if (!stream.eat(\"*\")) return false;\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n }\n },\n name: \"css\"\n });\n\n CodeMirror.defineMIME(\"text/x-scss\", {\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n mediaValueKeywords: mediaValueKeywords,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n fontProperties: fontProperties,\n allowNested: true,\n lineComment: \"//\",\n tokenHooks: {\n \"/\": function(stream, state) {\n if (stream.eat(\"/\")) {\n stream.skipToEnd();\n return [\"comment\", \"comment\"];\n } else if (stream.eat(\"*\")) {\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n } else {\n return [\"operator\", \"operator\"];\n }\n },\n \":\": function(stream) {\n if (stream.match(/\\s*\\{/, false))\n return [null, null]\n return false;\n },\n \"$\": function(stream) {\n stream.match(/^[\\w-]+/);\n if (stream.match(/^\\s*:/, false))\n return [\"variable-2\", \"variable-definition\"];\n return [\"variable-2\", \"variable\"];\n },\n \"#\": function(stream) {\n if (!stream.eat(\"{\")) return false;\n return [null, \"interpolation\"];\n }\n },\n name: \"css\",\n helperType: \"scss\"\n });\n\n CodeMirror.defineMIME(\"text/x-less\", {\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n mediaValueKeywords: mediaValueKeywords,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n fontProperties: fontProperties,\n allowNested: true,\n lineComment: \"//\",\n tokenHooks: {\n \"/\": function(stream, state) {\n if (stream.eat(\"/\")) {\n stream.skipToEnd();\n return [\"comment\", \"comment\"];\n } else if (stream.eat(\"*\")) {\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n } else {\n return [\"operator\", \"operator\"];\n }\n },\n \"@\": function(stream) {\n if (stream.eat(\"{\")) return [null, \"interpolation\"];\n if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\\b/i, false)) return false;\n stream.eatWhile(/[\\w\\\\\\-]/);\n if (stream.match(/^\\s*:/, false))\n return [\"variable-2\", \"variable-definition\"];\n return [\"variable-2\", \"variable\"];\n },\n \"&\": function() {\n return [\"atom\", \"atom\"];\n }\n },\n name: \"css\",\n helperType: \"less\"\n });\n\n CodeMirror.defineMIME(\"text/x-gss\", {\n documentTypes: documentTypes,\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n fontProperties: fontProperties,\n counterDescriptors: counterDescriptors,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n supportsAtComponent: true,\n tokenHooks: {\n \"/\": function(stream, state) {\n if (!stream.eat(\"*\")) return false;\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n }\n },\n name: \"css\",\n helperType: \"gss\"\n });\n\n});\n","module.exports = config => {\n var TEXT_NODE = 'span';\n var c = config;\n var modelAttrStart = 'data-gjs-';\n\n return {\n compTypes: '',\n\n /**\n * Parse style string to object\n * @param {string} str\n * @return {Object}\n * @example\n * var stl = ParserHtml.parseStyle('color:black; width:100px; test:value;');\n * console.log(stl);\n * // {color: 'black', width: '100px', test: 'value'}\n */\n parseStyle(str) {\n var result = {};\n var decls = str.split(';');\n for (var i = 0, len = decls.length; i < len; i++) {\n var decl = decls[i].trim();\n if (!decl) continue;\n var prop = decl.split(':');\n result[prop[0].trim()] = prop\n .slice(1)\n .join(':')\n .trim();\n }\n return result;\n },\n\n /**\n * Parse class string to array\n * @param {string} str\n * @return {Array}\n * @example\n * var res = ParserHtml.parseClass('test1 test2 test3');\n * console.log(res);\n * // ['test1', 'test2', 'test3']\n */\n parseClass(str) {\n const result = [];\n const cls = str.split(' ');\n for (let i = 0, len = cls.length; i < len; i++) {\n const cl = cls[i].trim();\n if (!cl) continue;\n result.push(cl);\n }\n return result;\n },\n\n /**\n * Get data from the node element\n * @param {HTMLElement} el DOM element to traverse\n * @return {Array}\n */\n parseNode(el) {\n const result = [];\n const nodes = el.childNodes;\n\n for (var i = 0, len = nodes.length; i < len; i++) {\n const node = nodes[i];\n const attrs = node.attributes || [];\n const attrsLen = attrs.length;\n const nodePrev = result[result.length - 1];\n const nodeChild = node.childNodes.length;\n const ct = this.compTypes;\n let model = {};\n\n // Start with understanding what kind of component it is\n if (ct) {\n let obj = '';\n let type =\n node.getAttribute && node.getAttribute(`${modelAttrStart}type`);\n\n // If the type is already defined, use it\n if (type) {\n model = { type };\n } else {\n // Iterate over all available Component Types and\n // the first with a valid result will be that component\n for (let it = 0; it < ct.length; it++) {\n obj = ct[it].model.isComponent(node);\n if (obj) break;\n }\n\n model = obj;\n }\n }\n\n // Set tag name if not yet done\n if (!model.tagName) {\n model.tagName = node.tagName ? node.tagName.toLowerCase() : '';\n }\n\n if (attrsLen) {\n model.attributes = {};\n }\n\n // Parse attributes\n for (let j = 0; j < attrsLen; j++) {\n const nodeName = attrs[j].nodeName;\n let nodeValue = attrs[j].nodeValue;\n\n // Isolate attributes\n if (nodeName == 'style') {\n model.style = this.parseStyle(nodeValue);\n } else if (nodeName == 'class') {\n model.classes = this.parseClass(nodeValue);\n } else if (nodeName == 'contenteditable') {\n continue;\n } else if (nodeName.indexOf(modelAttrStart) === 0) {\n const modelAttr = nodeName.replace(modelAttrStart, '');\n const valueLen = nodeValue.length;\n const firstChar = nodeValue && nodeValue.substr(0, 1);\n const lastChar = nodeValue && nodeValue.substr(valueLen - 1);\n nodeValue = nodeValue === 'true' ? true : nodeValue;\n nodeValue = nodeValue === 'false' ? false : nodeValue;\n\n // Try to parse JSON where it's possible\n // I can get false positive here (eg. a selector '[data-attr]')\n // so put it under try/catch and let fail silently\n try {\n nodeValue =\n (firstChar == '{' && lastChar == '}') ||\n (firstChar == '[' && lastChar == ']')\n ? JSON.parse(nodeValue)\n : nodeValue;\n } catch (e) {}\n\n model[modelAttr] = nodeValue;\n } else {\n model.attributes[nodeName] = nodeValue;\n }\n }\n\n // Check for nested elements but avoid it if already provided\n if (nodeChild && !model.components) {\n // Avoid infinite nested text nodes\n const firstChild = node.childNodes[0];\n\n // If there is only one child and it's a TEXTNODE\n // just make it content of the current node\n if (nodeChild === 1 && firstChild.nodeType === 3) {\n !model.type && (model.type = 'text');\n model.content = firstChild.nodeValue;\n } else {\n model.components = this.parseNode(node);\n }\n }\n\n // Check if it's a text node and if could be moved to the prevous model\n if (model.type == 'textnode') {\n if (nodePrev && nodePrev.type == 'textnode') {\n nodePrev.content += model.content;\n continue;\n }\n\n // Throw away empty nodes (keep spaces)\n if (!config.keepEmptyTextNodes) {\n const content = node.nodeValue;\n if (content != ' ' && !content.trim()) {\n continue;\n }\n }\n }\n\n // If all children are texts and there is some textnode the parent should\n // be text too otherwise I'm unable to edit texnodes\n const comps = model.components;\n if (!model.type && comps) {\n let allTxt = 1;\n let foundTextNode = 0;\n\n for (let ci = 0; ci < comps.length; ci++) {\n const comp = comps[ci];\n const cType = comp.type;\n\n if (\n ['text', 'textnode'].indexOf(cType) < 0 &&\n c.textTags.indexOf(comp.tagName) < 0\n ) {\n allTxt = 0;\n break;\n }\n\n if (cType == 'textnode') {\n foundTextNode = 1;\n }\n }\n\n if (allTxt && foundTextNode) {\n model.type = 'text';\n }\n }\n\n // If tagName is still empty and is not a textnode, do not push it\n if (!model.tagName && model.type != 'textnode') {\n continue;\n }\n\n result.push(model);\n }\n\n return result;\n },\n\n /**\n * Parse HTML string to a desired model object\n * @param {string} str HTML string\n * @param {ParserCss} parserCss In case there is style tags inside HTML\n * @return {Object}\n */\n parse(str, parserCss) {\n var config = (c.em && c.em.get('Config')) || {};\n var res = { html: '', css: '' };\n var el = document.createElement('div');\n el.innerHTML = str;\n var scripts = el.querySelectorAll('script');\n var i = scripts.length;\n\n // Remove all scripts\n if (!config.allowScripts) {\n while (i--) scripts[i].parentNode.removeChild(scripts[i]);\n }\n\n // Detach style tags and parse them\n if (parserCss) {\n var styleStr = '';\n var styles = el.querySelectorAll('style');\n var j = styles.length;\n\n while (j--) {\n styleStr = styles[j].innerHTML + styleStr;\n styles[j].parentNode.removeChild(styles[j]);\n }\n\n if (styleStr) res.css = parserCss.parse(styleStr);\n }\n\n var result = this.parseNode(el);\n\n if (result.length == 1) result = result[0];\n\n res.html = result;\n\n return res;\n }\n };\n};\n","import Promise from 'promise-polyfill';\n\nwindow.Promise = window.Promise || Promise;\n\nexport default (typeof fetch == 'function'\n ? fetch.bind()\n : (url, options) => {\n return new Promise((res, rej) => {\n const req = new XMLHttpRequest();\n req.open(options.method || 'get', url);\n req.withCredentials = options.credentials == 'include';\n\n for (let k in options.headers || {}) {\n req.setRequestHeader(k, options.headers[k]);\n }\n\n req.onload = e =>\n res({\n status: req.status,\n statusText: req.statusText,\n text: () => Promise.resolve(req.responseText)\n });\n req.onerror = rej;\n\n // Actually, fetch doesn't support onProgress feature\n if (req.upload && options.onProgress) {\n req.upload.onprogress = options.onProgress;\n }\n\n // Include body only if present\n options.body ? req.send(options.body) : req.send();\n });\n });\n","// Underscore.js 1.8.3\n// http://underscorejs.org\n// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n// Underscore may be freely distributed under the MIT license.\n\n(function() {\n\n // Baseline setup\n // --------------\n\n // Establish the root object, `window` in the browser, or `exports` on the server.\n var root = this;\n\n // Save the previous value of the `_` variable.\n var previousUnderscore = root._;\n\n // Save bytes in the minified (but not gzipped) version:\n var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;\n\n // Create quick reference variables for speed access to core prototypes.\n var\n push = ArrayProto.push,\n slice = ArrayProto.slice,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n // All **ECMAScript 5** native function implementations that we hope to use\n // are declared here.\n var\n nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeBind = FuncProto.bind,\n nativeCreate = Object.create;\n\n // Naked function reference for surrogate-prototype-swapping.\n var Ctor = function(){};\n\n // Create a safe reference to the Underscore object for use below.\n var _ = function(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n };\n\n // Export the Underscore object for **Node.js**, with\n // backwards-compatibility for the old `require()` API. If we're in\n // the browser, add `_` as a global object.\n if (typeof exports !== 'undefined') {\n if (typeof module !== 'undefined' && module.exports) {\n exports = module.exports = _;\n }\n exports._ = _;\n } else {\n root._ = _;\n }\n\n // Current version.\n _.VERSION = '1.8.3';\n\n // Internal function that returns an efficient (for current engines) version\n // of the passed-in callback, to be repeatedly applied in other Underscore\n // functions.\n var optimizeCb = function(func, context, argCount) {\n if (context === void 0) return func;\n switch (argCount == null ? 3 : argCount) {\n case 1: return function(value) {\n return func.call(context, value);\n };\n case 2: return function(value, other) {\n return func.call(context, value, other);\n };\n case 3: return function(value, index, collection) {\n return func.call(context, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(context, accumulator, value, index, collection);\n };\n }\n return function() {\n return func.apply(context, arguments);\n };\n };\n\n // A mostly-internal function to generate callbacks that can be applied\n // to each element in a collection, returning the desired result — either\n // identity, an arbitrary callback, a property matcher, or a property accessor.\n var cb = function(value, context, argCount) {\n if (value == null) return _.identity;\n if (_.isFunction(value)) return optimizeCb(value, context, argCount);\n if (_.isObject(value)) return _.matcher(value);\n return _.property(value);\n };\n _.iteratee = function(value, context) {\n return cb(value, context, Infinity);\n };\n\n // An internal function for creating assigner functions.\n var createAssigner = function(keysFunc, undefinedOnly) {\n return function(obj) {\n var length = arguments.length;\n if (length < 2 || obj == null) return obj;\n for (var index = 1; index < length; index++) {\n var source = arguments[index],\n keys = keysFunc(source),\n l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key];\n }\n }\n return obj;\n };\n };\n\n // An internal function for creating a new object that inherits from another.\n var baseCreate = function(prototype) {\n if (!_.isObject(prototype)) return {};\n if (nativeCreate) return nativeCreate(prototype);\n Ctor.prototype = prototype;\n var result = new Ctor;\n Ctor.prototype = null;\n return result;\n };\n\n var property = function(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n };\n\n // Helper for collection methods to determine whether a collection\n // should be iterated as an array or as an object\n // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\n var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\n var getLength = property('length');\n var isArrayLike = function(collection) {\n var length = getLength(collection);\n return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;\n };\n\n // Collection Functions\n // --------------------\n\n // The cornerstone, an `each` implementation, aka `forEach`.\n // Handles raw objects in addition to array-likes. Treats all\n // sparse array-likes as if they were dense.\n _.each = _.forEach = function(obj, iteratee, context) {\n iteratee = optimizeCb(iteratee, context);\n var i, length;\n if (isArrayLike(obj)) {\n for (i = 0, length = obj.length; i < length; i++) {\n iteratee(obj[i], i, obj);\n }\n } else {\n var keys = _.keys(obj);\n for (i = 0, length = keys.length; i < length; i++) {\n iteratee(obj[keys[i]], keys[i], obj);\n }\n }\n return obj;\n };\n\n // Return the results of applying the iteratee to each element.\n _.map = _.collect = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n results = Array(length);\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n results[index] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Create a reducing function iterating left or right.\n function createReduce(dir) {\n // Optimized iterator function as using arguments.length\n // in the main function will deoptimize the, see #1991.\n function iterator(obj, iteratee, memo, keys, index, length) {\n for (; index >= 0 && index < length; index += dir) {\n var currentKey = keys ? keys[index] : index;\n memo = iteratee(memo, obj[currentKey], currentKey, obj);\n }\n return memo;\n }\n\n return function(obj, iteratee, memo, context) {\n iteratee = optimizeCb(iteratee, context, 4);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n index = dir > 0 ? 0 : length - 1;\n // Determine the initial value if none is provided.\n if (arguments.length < 3) {\n memo = obj[keys ? keys[index] : index];\n index += dir;\n }\n return iterator(obj, iteratee, memo, keys, index, length);\n };\n }\n\n // **Reduce** builds up a single result from a list of values, aka `inject`,\n // or `foldl`.\n _.reduce = _.foldl = _.inject = createReduce(1);\n\n // The right-associative version of reduce, also known as `foldr`.\n _.reduceRight = _.foldr = createReduce(-1);\n\n // Return the first value which passes a truth test. Aliased as `detect`.\n _.find = _.detect = function(obj, predicate, context) {\n var key;\n if (isArrayLike(obj)) {\n key = _.findIndex(obj, predicate, context);\n } else {\n key = _.findKey(obj, predicate, context);\n }\n if (key !== void 0 && key !== -1) return obj[key];\n };\n\n // Return all the elements that pass a truth test.\n // Aliased as `select`.\n _.filter = _.select = function(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n _.each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n };\n\n // Return all the elements for which a truth test fails.\n _.reject = function(obj, predicate, context) {\n return _.filter(obj, _.negate(cb(predicate)), context);\n };\n\n // Determine whether all of the elements match a truth test.\n // Aliased as `all`.\n _.every = _.all = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (!predicate(obj[currentKey], currentKey, obj)) return false;\n }\n return true;\n };\n\n // Determine if at least one element in the object matches a truth test.\n // Aliased as `any`.\n _.some = _.any = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (predicate(obj[currentKey], currentKey, obj)) return true;\n }\n return false;\n };\n\n // Determine if the array or object contains a given item (using `===`).\n // Aliased as `includes` and `include`.\n _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n return _.indexOf(obj, item, fromIndex) >= 0;\n };\n\n // Invoke a method (with arguments) on every item in a collection.\n _.invoke = function(obj, method) {\n var args = slice.call(arguments, 2);\n var isFunc = _.isFunction(method);\n return _.map(obj, function(value) {\n var func = isFunc ? method : value[method];\n return func == null ? func : func.apply(value, args);\n });\n };\n\n // Convenience version of a common use case of `map`: fetching a property.\n _.pluck = function(obj, key) {\n return _.map(obj, _.property(key));\n };\n\n // Convenience version of a common use case of `filter`: selecting only objects\n // containing specific `key:value` pairs.\n _.where = function(obj, attrs) {\n return _.filter(obj, _.matcher(attrs));\n };\n\n // Convenience version of a common use case of `find`: getting the first object\n // containing specific `key:value` pairs.\n _.findWhere = function(obj, attrs) {\n return _.find(obj, _.matcher(attrs));\n };\n\n // Return the maximum element (or element-based computation).\n _.max = function(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index, list) {\n computed = iteratee(value, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = value;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Return the minimum element (or element-based computation).\n _.min = function(obj, iteratee, context) {\n var result = Infinity, lastComputed = Infinity,\n value, computed;\n if (iteratee == null && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value < result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index, list) {\n computed = iteratee(value, index, list);\n if (computed < lastComputed || computed === Infinity && result === Infinity) {\n result = value;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Shuffle a collection, using the modern version of the\n // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n _.shuffle = function(obj) {\n var set = isArrayLike(obj) ? obj : _.values(obj);\n var length = set.length;\n var shuffled = Array(length);\n for (var index = 0, rand; index < length; index++) {\n rand = _.random(0, index);\n if (rand !== index) shuffled[index] = shuffled[rand];\n shuffled[rand] = set[index];\n }\n return shuffled;\n };\n\n // Sample **n** random values from a collection.\n // If **n** is not specified, returns a single random element.\n // The internal `guard` argument allows it to work with `map`.\n _.sample = function(obj, n, guard) {\n if (n == null || guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n return obj[_.random(obj.length - 1)];\n }\n return _.shuffle(obj).slice(0, Math.max(0, n));\n };\n\n // Sort the object's values by a criterion produced by an iteratee.\n _.sortBy = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n return _.pluck(_.map(obj, function(value, index, list) {\n return {\n value: value,\n index: index,\n criteria: iteratee(value, index, list)\n };\n }).sort(function(left, right) {\n var a = left.criteria;\n var b = right.criteria;\n if (a !== b) {\n if (a > b || a === void 0) return 1;\n if (a < b || b === void 0) return -1;\n }\n return left.index - right.index;\n }), 'value');\n };\n\n // An internal function used for aggregate \"group by\" operations.\n var group = function(behavior) {\n return function(obj, iteratee, context) {\n var result = {};\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index) {\n var key = iteratee(value, index, obj);\n behavior(result, value, key);\n });\n return result;\n };\n };\n\n // Groups the object's values by a criterion. Pass either a string attribute\n // to group by, or a function that returns the criterion.\n _.groupBy = group(function(result, value, key) {\n if (_.has(result, key)) result[key].push(value); else result[key] = [value];\n });\n\n // Indexes the object's values by a criterion, similar to `groupBy`, but for\n // when you know that your index values will be unique.\n _.indexBy = group(function(result, value, key) {\n result[key] = value;\n });\n\n // Counts instances of an object that group by a certain criterion. Pass\n // either a string attribute to count by, or a function that returns the\n // criterion.\n _.countBy = group(function(result, value, key) {\n if (_.has(result, key)) result[key]++; else result[key] = 1;\n });\n\n // Safely create a real, live array from anything iterable.\n _.toArray = function(obj) {\n if (!obj) return [];\n if (_.isArray(obj)) return slice.call(obj);\n if (isArrayLike(obj)) return _.map(obj, _.identity);\n return _.values(obj);\n };\n\n // Return the number of elements in an object.\n _.size = function(obj) {\n if (obj == null) return 0;\n return isArrayLike(obj) ? obj.length : _.keys(obj).length;\n };\n\n // Split a collection into two arrays: one whose elements all satisfy the given\n // predicate, and one whose elements all do not satisfy the predicate.\n _.partition = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var pass = [], fail = [];\n _.each(obj, function(value, key, obj) {\n (predicate(value, key, obj) ? pass : fail).push(value);\n });\n return [pass, fail];\n };\n\n // Array Functions\n // ---------------\n\n // Get the first element of an array. Passing **n** will return the first N\n // values in the array. Aliased as `head` and `take`. The **guard** check\n // allows it to work with `_.map`.\n _.first = _.head = _.take = function(array, n, guard) {\n if (array == null) return void 0;\n if (n == null || guard) return array[0];\n return _.initial(array, array.length - n);\n };\n\n // Returns everything but the last entry of the array. Especially useful on\n // the arguments object. Passing **n** will return all the values in\n // the array, excluding the last N.\n _.initial = function(array, n, guard) {\n return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n };\n\n // Get the last element of an array. Passing **n** will return the last N\n // values in the array.\n _.last = function(array, n, guard) {\n if (array == null) return void 0;\n if (n == null || guard) return array[array.length - 1];\n return _.rest(array, Math.max(0, array.length - n));\n };\n\n // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.\n // Especially useful on the arguments object. Passing an **n** will return\n // the rest N values in the array.\n _.rest = _.tail = _.drop = function(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n };\n\n // Trim out all falsy values from an array.\n _.compact = function(array) {\n return _.filter(array, _.identity);\n };\n\n // Internal implementation of a recursive `flatten` function.\n var flatten = function(input, shallow, strict, startIndex) {\n var output = [], idx = 0;\n for (var i = startIndex || 0, length = getLength(input); i < length; i++) {\n var value = input[i];\n if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {\n //flatten current level of array or arguments object\n if (!shallow) value = flatten(value, shallow, strict);\n var j = 0, len = value.length;\n output.length += len;\n while (j < len) {\n output[idx++] = value[j++];\n }\n } else if (!strict) {\n output[idx++] = value;\n }\n }\n return output;\n };\n\n // Flatten out an array, either recursively (by default), or just one level.\n _.flatten = function(array, shallow) {\n return flatten(array, shallow, false);\n };\n\n // Return a version of the array that does not contain the specified value(s).\n _.without = function(array) {\n return _.difference(array, slice.call(arguments, 1));\n };\n\n // Produce a duplicate-free version of the array. If the array has already\n // been sorted, you have the option of using a faster algorithm.\n // Aliased as `unique`.\n _.uniq = _.unique = function(array, isSorted, iteratee, context) {\n if (!_.isBoolean(isSorted)) {\n context = iteratee;\n iteratee = isSorted;\n isSorted = false;\n }\n if (iteratee != null) iteratee = cb(iteratee, context);\n var result = [];\n var seen = [];\n for (var i = 0, length = getLength(array); i < length; i++) {\n var value = array[i],\n computed = iteratee ? iteratee(value, i, array) : value;\n if (isSorted) {\n if (!i || seen !== computed) result.push(value);\n seen = computed;\n } else if (iteratee) {\n if (!_.contains(seen, computed)) {\n seen.push(computed);\n result.push(value);\n }\n } else if (!_.contains(result, value)) {\n result.push(value);\n }\n }\n return result;\n };\n\n // Produce an array that contains the union: each distinct element from all of\n // the passed-in arrays.\n _.union = function() {\n return _.uniq(flatten(arguments, true, true));\n };\n\n // Produce an array that contains every item shared between all the\n // passed-in arrays.\n _.intersection = function(array) {\n var result = [];\n var argsLength = arguments.length;\n for (var i = 0, length = getLength(array); i < length; i++) {\n var item = array[i];\n if (_.contains(result, item)) continue;\n for (var j = 1; j < argsLength; j++) {\n if (!_.contains(arguments[j], item)) break;\n }\n if (j === argsLength) result.push(item);\n }\n return result;\n };\n\n // Take the difference between one array and a number of other arrays.\n // Only the elements present in just the first array will remain.\n _.difference = function(array) {\n var rest = flatten(arguments, true, true, 1);\n return _.filter(array, function(value){\n return !_.contains(rest, value);\n });\n };\n\n // Zip together multiple lists into a single array -- elements that share\n // an index go together.\n _.zip = function() {\n return _.unzip(arguments);\n };\n\n // Complement of _.zip. Unzip accepts an array of arrays and groups\n // each array's elements on shared indices\n _.unzip = function(array) {\n var length = array && _.max(array, getLength).length || 0;\n var result = Array(length);\n\n for (var index = 0; index < length; index++) {\n result[index] = _.pluck(array, index);\n }\n return result;\n };\n\n // Converts lists into objects. Pass either a single array of `[key, value]`\n // pairs, or two parallel arrays of the same length -- one of keys, and one of\n // the corresponding values.\n _.object = function(list, values) {\n var result = {};\n for (var i = 0, length = getLength(list); i < length; i++) {\n if (values) {\n result[list[i]] = values[i];\n } else {\n result[list[i][0]] = list[i][1];\n }\n }\n return result;\n };\n\n // Generator function to create the findIndex and findLastIndex functions\n function createPredicateIndexFinder(dir) {\n return function(array, predicate, context) {\n predicate = cb(predicate, context);\n var length = getLength(array);\n var index = dir > 0 ? 0 : length - 1;\n for (; index >= 0 && index < length; index += dir) {\n if (predicate(array[index], index, array)) return index;\n }\n return -1;\n };\n }\n\n // Returns the first index on an array-like that passes a predicate test\n _.findIndex = createPredicateIndexFinder(1);\n _.findLastIndex = createPredicateIndexFinder(-1);\n\n // Use a comparator function to figure out the smallest index at which\n // an object should be inserted so as to maintain order. Uses binary search.\n _.sortedIndex = function(array, obj, iteratee, context) {\n iteratee = cb(iteratee, context, 1);\n var value = iteratee(obj);\n var low = 0, high = getLength(array);\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n }\n return low;\n };\n\n // Generator function to create the indexOf and lastIndexOf functions\n function createIndexFinder(dir, predicateFind, sortedIndex) {\n return function(array, item, idx) {\n var i = 0, length = getLength(array);\n if (typeof idx == 'number') {\n if (dir > 0) {\n i = idx >= 0 ? idx : Math.max(idx + length, i);\n } else {\n length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n }\n } else if (sortedIndex && idx && length) {\n idx = sortedIndex(array, item);\n return array[idx] === item ? idx : -1;\n }\n if (item !== item) {\n idx = predicateFind(slice.call(array, i, length), _.isNaN);\n return idx >= 0 ? idx + i : -1;\n }\n for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n if (array[idx] === item) return idx;\n }\n return -1;\n };\n }\n\n // Return the position of the first occurrence of an item in an array,\n // or -1 if the item is not included in the array.\n // If the array is large and already in sort order, pass `true`\n // for **isSorted** to use binary search.\n _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex);\n _.lastIndexOf = createIndexFinder(-1, _.findLastIndex);\n\n // Generate an integer Array containing an arithmetic progression. A port of\n // the native Python `range()` function. See\n // [the Python documentation](http://docs.python.org/library/functions.html#range).\n _.range = function(start, stop, step) {\n if (stop == null) {\n stop = start || 0;\n start = 0;\n }\n step = step || 1;\n\n var length = Math.max(Math.ceil((stop - start) / step), 0);\n var range = Array(length);\n\n for (var idx = 0; idx < length; idx++, start += step) {\n range[idx] = start;\n }\n\n return range;\n };\n\n // Function (ahem) Functions\n // ------------------\n\n // Determines whether to execute a function as a constructor\n // or a normal function with the provided arguments\n var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {\n if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n var self = baseCreate(sourceFunc.prototype);\n var result = sourceFunc.apply(self, args);\n if (_.isObject(result)) return result;\n return self;\n };\n\n // Create a function bound to a given object (assigning `this`, and arguments,\n // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\n // available.\n _.bind = function(func, context) {\n if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));\n if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');\n var args = slice.call(arguments, 2);\n var bound = function() {\n return executeBound(func, bound, context, this, args.concat(slice.call(arguments)));\n };\n return bound;\n };\n\n // Partially apply a function by creating a version that has had some of its\n // arguments pre-filled, without changing its dynamic `this` context. _ acts\n // as a placeholder, allowing any combination of arguments to be pre-filled.\n _.partial = function(func) {\n var boundArgs = slice.call(arguments, 1);\n var bound = function() {\n var position = 0, length = boundArgs.length;\n var args = Array(length);\n for (var i = 0; i < length; i++) {\n args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i];\n }\n while (position < arguments.length) args.push(arguments[position++]);\n return executeBound(func, bound, this, this, args);\n };\n return bound;\n };\n\n // Bind a number of an object's methods to that object. Remaining arguments\n // are the method names to be bound. Useful for ensuring that all callbacks\n // defined on an object belong to it.\n _.bindAll = function(obj) {\n var i, length = arguments.length, key;\n if (length <= 1) throw new Error('bindAll must be passed function names');\n for (i = 1; i < length; i++) {\n key = arguments[i];\n obj[key] = _.bind(obj[key], obj);\n }\n return obj;\n };\n\n // Memoize an expensive function by storing its results.\n _.memoize = function(func, hasher) {\n var memoize = function(key) {\n var cache = memoize.cache;\n var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n if (!_.has(cache, address)) cache[address] = func.apply(this, arguments);\n return cache[address];\n };\n memoize.cache = {};\n return memoize;\n };\n\n // Delays a function for the given number of milliseconds, and then calls\n // it with the arguments supplied.\n _.delay = function(func, wait) {\n var args = slice.call(arguments, 2);\n return setTimeout(function(){\n return func.apply(null, args);\n }, wait);\n };\n\n // Defers a function, scheduling it to run after the current call stack has\n // cleared.\n _.defer = _.partial(_.delay, _, 1);\n\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time. Normally, the throttled function will run\n // as much as it can, without ever going more than once per `wait` duration;\n // but if you'd like to disable the execution on the leading edge, pass\n // `{leading: false}`. To disable execution on the trailing edge, ditto.\n _.throttle = function(func, wait, options) {\n var context, args, result;\n var timeout = null;\n var previous = 0;\n if (!options) options = {};\n var later = function() {\n previous = options.leading === false ? 0 : _.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n return function() {\n var now = _.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n };\n\n // Returns a function, that, as long as it continues to be invoked, will not\n // be triggered. The function will be called after it stops being called for\n // N milliseconds. If `immediate` is passed, trigger the function on the\n // leading edge, instead of the trailing.\n _.debounce = function(func, wait, immediate) {\n var timeout, args, context, timestamp, result;\n\n var later = function() {\n var last = _.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n }\n }\n };\n\n return function() {\n context = this;\n args = arguments;\n timestamp = _.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n };\n\n // Returns the first function passed as an argument to the second,\n // allowing you to adjust arguments, run code before and after, and\n // conditionally execute the original function.\n _.wrap = function(func, wrapper) {\n return _.partial(wrapper, func);\n };\n\n // Returns a negated version of the passed-in predicate.\n _.negate = function(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n };\n };\n\n // Returns a function that is the composition of a list of functions, each\n // consuming the return value of the function that follows.\n _.compose = function() {\n var args = arguments;\n var start = args.length - 1;\n return function() {\n var i = start;\n var result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n };\n\n // Returns a function that will only be executed on and after the Nth call.\n _.after = function(times, func) {\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n };\n\n // Returns a function that will only be executed up to (but not including) the Nth call.\n _.before = function(times, func) {\n var memo;\n return function() {\n if (--times > 0) {\n memo = func.apply(this, arguments);\n }\n if (times <= 1) func = null;\n return memo;\n };\n };\n\n // Returns a function that will be executed at most one time, no matter how\n // often you call it. Useful for lazy initialization.\n _.once = _.partial(_.before, 2);\n\n // Object Functions\n // ----------------\n\n // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\n var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\n var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\n function collectNonEnumProps(obj, keys) {\n var nonEnumIdx = nonEnumerableProps.length;\n var constructor = obj.constructor;\n var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto;\n\n // Constructor is a special case.\n var prop = 'constructor';\n if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);\n\n while (nonEnumIdx--) {\n prop = nonEnumerableProps[nonEnumIdx];\n if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {\n keys.push(prop);\n }\n }\n }\n\n // Retrieve the names of an object's own properties.\n // Delegates to **ECMAScript 5**'s native `Object.keys`\n _.keys = function(obj) {\n if (!_.isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var keys = [];\n for (var key in obj) if (_.has(obj, key)) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve all the property names of an object.\n _.allKeys = function(obj) {\n if (!_.isObject(obj)) return [];\n var keys = [];\n for (var key in obj) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve the values of an object's properties.\n _.values = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[keys[i]];\n }\n return values;\n };\n\n // Returns the results of applying the iteratee to each element of the object\n // In contrast to _.map it returns an object\n _.mapObject = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = _.keys(obj),\n length = keys.length,\n results = {},\n currentKey;\n for (var index = 0; index < length; index++) {\n currentKey = keys[index];\n results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Convert an object into a list of `[key, value]` pairs.\n _.pairs = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var pairs = Array(length);\n for (var i = 0; i < length; i++) {\n pairs[i] = [keys[i], obj[keys[i]]];\n }\n return pairs;\n };\n\n // Invert the keys and values of an object. The values must be serializable.\n _.invert = function(obj) {\n var result = {};\n var keys = _.keys(obj);\n for (var i = 0, length = keys.length; i < length; i++) {\n result[obj[keys[i]]] = keys[i];\n }\n return result;\n };\n\n // Return a sorted list of the function names available on the object.\n // Aliased as `methods`\n _.functions = _.methods = function(obj) {\n var names = [];\n for (var key in obj) {\n if (_.isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n };\n\n // Extend a given object with all the properties in passed-in object(s).\n _.extend = createAssigner(_.allKeys);\n\n // Assigns a given object with all the own properties in the passed-in object(s)\n // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\n _.extendOwn = _.assign = createAssigner(_.keys);\n\n // Returns the first key on an object that passes a predicate test\n _.findKey = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = _.keys(obj), key;\n for (var i = 0, length = keys.length; i < length; i++) {\n key = keys[i];\n if (predicate(obj[key], key, obj)) return key;\n }\n };\n\n // Return a copy of the object only containing the whitelisted properties.\n _.pick = function(object, oiteratee, context) {\n var result = {}, obj = object, iteratee, keys;\n if (obj == null) return result;\n if (_.isFunction(oiteratee)) {\n keys = _.allKeys(obj);\n iteratee = optimizeCb(oiteratee, context);\n } else {\n keys = flatten(arguments, false, false, 1);\n iteratee = function(value, key, obj) { return key in obj; };\n obj = Object(obj);\n }\n for (var i = 0, length = keys.length; i < length; i++) {\n var key = keys[i];\n var value = obj[key];\n if (iteratee(value, key, obj)) result[key] = value;\n }\n return result;\n };\n\n // Return a copy of the object without the blacklisted properties.\n _.omit = function(obj, iteratee, context) {\n if (_.isFunction(iteratee)) {\n iteratee = _.negate(iteratee);\n } else {\n var keys = _.map(flatten(arguments, false, false, 1), String);\n iteratee = function(value, key) {\n return !_.contains(keys, key);\n };\n }\n return _.pick(obj, iteratee, context);\n };\n\n // Fill in a given object with default properties.\n _.defaults = createAssigner(_.allKeys, true);\n\n // Creates an object that inherits from the given prototype object.\n // If additional properties are provided then they will be added to the\n // created object.\n _.create = function(prototype, props) {\n var result = baseCreate(prototype);\n if (props) _.extendOwn(result, props);\n return result;\n };\n\n // Create a (shallow-cloned) duplicate of an object.\n _.clone = function(obj) {\n if (!_.isObject(obj)) return obj;\n return _.isArray(obj) ? obj.slice() : _.extend({}, obj);\n };\n\n // Invokes interceptor with the obj, and then returns obj.\n // The primary purpose of this method is to \"tap into\" a method chain, in\n // order to perform operations on intermediate results within the chain.\n _.tap = function(obj, interceptor) {\n interceptor(obj);\n return obj;\n };\n\n // Returns whether an object has a given set of `key:value` pairs.\n _.isMatch = function(object, attrs) {\n var keys = _.keys(attrs), length = keys.length;\n if (object == null) return !length;\n var obj = Object(object);\n for (var i = 0; i < length; i++) {\n var key = keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) return false;\n }\n return true;\n };\n\n\n // Internal recursive comparison function for `isEqual`.\n var eq = function(a, b, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a instanceof _) a = a._wrapped;\n if (b instanceof _) b = b._wrapped;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n case '[object RegExp]':\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return '' + a === '' + b;\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN\n if (+a !== +a) return +b !== +b;\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n }\n\n var areArrays = className === '[object Array]';\n if (!areArrays) {\n if (typeof a != 'object' || typeof b != 'object') return false;\n\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&\n _.isFunction(bCtor) && bCtor instanceof bCtor)\n && ('constructor' in a && 'constructor' in b)) {\n return false;\n }\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n }\n\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false;\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var keys = _.keys(a), key;\n length = keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (_.keys(b).length !== length) return false;\n while (length--) {\n // Deep compare each member\n key = keys[length];\n if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n };\n\n // Perform a deep comparison to check if two objects are equal.\n _.isEqual = function(a, b) {\n return eq(a, b);\n };\n\n // Is a given array, string, or object empty?\n // An \"empty\" object has no enumerable own-properties.\n _.isEmpty = function(obj) {\n if (obj == null) return true;\n if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;\n return _.keys(obj).length === 0;\n };\n\n // Is a given value a DOM element?\n _.isElement = function(obj) {\n return !!(obj && obj.nodeType === 1);\n };\n\n // Is a given value an array?\n // Delegates to ECMA5's native Array.isArray\n _.isArray = nativeIsArray || function(obj) {\n return toString.call(obj) === '[object Array]';\n };\n\n // Is a given variable an object?\n _.isObject = function(obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object' && !!obj;\n };\n\n // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError.\n _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) {\n _['is' + name] = function(obj) {\n return toString.call(obj) === '[object ' + name + ']';\n };\n });\n\n // Define a fallback version of the method in browsers (ahem, IE < 9), where\n // there isn't any inspectable \"Arguments\" type.\n if (!_.isArguments(arguments)) {\n _.isArguments = function(obj) {\n return _.has(obj, 'callee');\n };\n }\n\n // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,\n // IE 11 (#1621), and in Safari 8 (#1929).\n if (typeof /./ != 'function' && typeof Int8Array != 'object') {\n _.isFunction = function(obj) {\n return typeof obj == 'function' || false;\n };\n }\n\n // Is a given object a finite number?\n _.isFinite = function(obj) {\n return isFinite(obj) && !isNaN(parseFloat(obj));\n };\n\n // Is the given value `NaN`? (NaN is the only number which does not equal itself).\n _.isNaN = function(obj) {\n return _.isNumber(obj) && obj !== +obj;\n };\n\n // Is a given value a boolean?\n _.isBoolean = function(obj) {\n return obj === true || obj === false || toString.call(obj) === '[object Boolean]';\n };\n\n // Is a given value equal to null?\n _.isNull = function(obj) {\n return obj === null;\n };\n\n // Is a given variable undefined?\n _.isUndefined = function(obj) {\n return obj === void 0;\n };\n\n // Shortcut function for checking if an object has a given property directly\n // on itself (in other words, not on a prototype).\n _.has = function(obj, key) {\n return obj != null && hasOwnProperty.call(obj, key);\n };\n\n // Utility Functions\n // -----------------\n\n // Run Underscore.js in *noConflict* mode, returning the `_` variable to its\n // previous owner. Returns a reference to the Underscore object.\n _.noConflict = function() {\n root._ = previousUnderscore;\n return this;\n };\n\n // Keep the identity function around for default iteratees.\n _.identity = function(value) {\n return value;\n };\n\n // Predicate-generating functions. Often useful outside of Underscore.\n _.constant = function(value) {\n return function() {\n return value;\n };\n };\n\n _.noop = function(){};\n\n _.property = property;\n\n // Generates a function for a given object that returns a given property.\n _.propertyOf = function(obj) {\n return obj == null ? function(){} : function(key) {\n return obj[key];\n };\n };\n\n // Returns a predicate for checking whether an object has a given set of\n // `key:value` pairs.\n _.matcher = _.matches = function(attrs) {\n attrs = _.extendOwn({}, attrs);\n return function(obj) {\n return _.isMatch(obj, attrs);\n };\n };\n\n // Run a function **n** times.\n _.times = function(n, iteratee, context) {\n var accum = Array(Math.max(0, n));\n iteratee = optimizeCb(iteratee, context, 1);\n for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n return accum;\n };\n\n // Return a random integer between min and max (inclusive).\n _.random = function(min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n return min + Math.floor(Math.random() * (max - min + 1));\n };\n\n // A (possibly faster) way to get the current timestamp as an integer.\n _.now = Date.now || function() {\n return new Date().getTime();\n };\n\n // List of HTML entities for escaping.\n var escapeMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n };\n var unescapeMap = _.invert(escapeMap);\n\n // Functions for escaping and unescaping strings to/from HTML interpolation.\n var createEscaper = function(map) {\n var escaper = function(match) {\n return map[match];\n };\n // Regexes for identifying a key that needs to be escaped\n var source = '(?:' + _.keys(map).join('|') + ')';\n var testRegexp = RegExp(source);\n var replaceRegexp = RegExp(source, 'g');\n return function(string) {\n string = string == null ? '' : '' + string;\n return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n };\n };\n _.escape = createEscaper(escapeMap);\n _.unescape = createEscaper(unescapeMap);\n\n // If the value of the named `property` is a function then invoke it with the\n // `object` as context; otherwise, return it.\n _.result = function(object, property, fallback) {\n var value = object == null ? void 0 : object[property];\n if (value === void 0) {\n value = fallback;\n }\n return _.isFunction(value) ? value.call(object) : value;\n };\n\n // Generate a unique integer id (unique within the entire client session).\n // Useful for temporary DOM ids.\n var idCounter = 0;\n _.uniqueId = function(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n };\n\n // By default, Underscore uses ERB-style template delimiters, change the\n // following template settings to use alternative delimiters.\n _.templateSettings = {\n evaluate : /<%([\\s\\S]+?)%>/g,\n interpolate : /<%=([\\s\\S]+?)%>/g,\n escape : /<%-([\\s\\S]+?)%>/g\n };\n\n // When customizing `templateSettings`, if you don't want to define an\n // interpolation, evaluation or escaping regex, we need one that is\n // guaranteed not to match.\n var noMatch = /(.)^/;\n\n // Certain characters need to be escaped so that they can be put into a\n // string literal.\n var escapes = {\n \"'\": \"'\",\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n var escaper = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\n var escapeChar = function(match) {\n return '\\\\' + escapes[match];\n };\n\n // JavaScript micro-templating, similar to John Resig's implementation.\n // Underscore templating handles arbitrary delimiters, preserves whitespace,\n // and correctly escapes quotes within interpolated code.\n // NB: `oldSettings` only exists for backwards compatibility.\n _.template = function(text, settings, oldSettings) {\n if (!settings && oldSettings) settings = oldSettings;\n settings = _.defaults({}, settings, _.templateSettings);\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g');\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0;\n var source = \"__p+='\";\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset).replace(escaper, escapeChar);\n index = offset + match.length;\n\n if (escape) {\n source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n } else if (interpolate) {\n source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n } else if (evaluate) {\n source += \"';\\n\" + evaluate + \"\\n__p+='\";\n }\n\n // Adobe VMs need the match returned to produce the correct offest.\n return match;\n });\n source += \"';\\n\";\n\n // If a variable is not specified, place data values in local scope.\n if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\n source = \"var __t,__p='',__j=Array.prototype.join,\" +\n \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n source + 'return __p;\\n';\n\n try {\n var render = new Function(settings.variable || 'obj', '_', source);\n } catch (e) {\n e.source = source;\n throw e;\n }\n\n var template = function(data) {\n return render.call(this, data, _);\n };\n\n // Provide the compiled source as a convenience for precompilation.\n var argument = settings.variable || 'obj';\n template.source = 'function(' + argument + '){\\n' + source + '}';\n\n return template;\n };\n\n // Add a \"chain\" function. Start chaining a wrapped Underscore object.\n _.chain = function(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n };\n\n // OOP\n // ---------------\n // If Underscore is called as a function, it returns a wrapped object that\n // can be used OO-style. This wrapper holds altered versions of all the\n // underscore functions. Wrapped objects may be chained.\n\n // Helper function to continue chaining intermediate results.\n var result = function(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n };\n\n // Add your own custom functions to the Underscore object.\n _.mixin = function(obj) {\n _.each(_.functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return result(this, func.apply(_, args));\n };\n });\n };\n\n // Add all of the Underscore functions to the wrapper object.\n _.mixin(_);\n\n // Add all mutator Array functions to the wrapper.\n _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n method.apply(obj, arguments);\n if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];\n return result(this, obj);\n };\n });\n\n // Add all accessor Array functions to the wrapper.\n _.each(['concat', 'join', 'slice'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n return result(this, method.apply(this._wrapped, arguments));\n };\n });\n\n // Extracts the result from a wrapped and chained object.\n _.prototype.value = function() {\n return this._wrapped;\n };\n\n // Provide unwrapping proxy for some methods used in engine operations\n // such as arithmetic and JSON stringification.\n _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;\n\n _.prototype.toString = function() {\n return '' + this._wrapped;\n };\n\n // AMD registration happens at the end for compatibility with AMD loaders\n // that may not enforce next-turn semantics on modules. Even though general\n // practice for AMD registration is to be anonymous, underscore registers\n // as a named module because, like jQuery, it is a base library that is\n // popular enough to be bundled in a third party lib, but not be part of\n // an AMD load request. Those cases could generate an error when an\n // anonymous define() is called outside of a loader request.\n if (typeof define === 'function' && define.amd) {\n define('underscore', [], function() {\n return _;\n });\n }\n}.call(this));\n","// keymaster.js\n// (c) 2011-2013 Thomas Fuchs\n// keymaster.js may be freely distributed under the MIT license.\n\n;(function(global){\n var k,\n _handlers = {},\n _mods = { 16: false, 18: false, 17: false, 91: false },\n _scope = 'all',\n // modifier keys\n _MODIFIERS = {\n '⇧': 16, shift: 16,\n '⌥': 18, alt: 18, option: 18,\n '⌃': 17, ctrl: 17, control: 17,\n '⌘': 91, command: 91\n },\n // special keys\n _MAP = {\n backspace: 8, tab: 9, clear: 12,\n enter: 13, 'return': 13,\n esc: 27, escape: 27, space: 32,\n left: 37, up: 38,\n right: 39, down: 40,\n del: 46, 'delete': 46,\n home: 36, end: 35,\n pageup: 33, pagedown: 34,\n ',': 188, '.': 190, '/': 191,\n '`': 192, '-': 189, '=': 187,\n ';': 186, '\\'': 222,\n '[': 219, ']': 221, '\\\\': 220\n },\n code = function(x){\n return _MAP[x] || x.toUpperCase().charCodeAt(0);\n },\n _downKeys = [];\n\n for(k=1;k<20;k++) _MAP['f'+k] = 111+k;\n\n // IE doesn't support Array#indexOf, so have a simple replacement\n function index(array, item){\n var i = array.length;\n while(i--) if(array[i]===item) return i;\n return -1;\n }\n\n // for comparing mods before unassignment\n function compareArray(a1, a2) {\n if (a1.length != a2.length) return false;\n for (var i = 0; i < a1.length; i++) {\n if (a1[i] !== a2[i]) return false;\n }\n return true;\n }\n\n var modifierMap = {\n 16:'shiftKey',\n 18:'altKey',\n 17:'ctrlKey',\n 91:'metaKey'\n };\n function updateModifierKey(event) {\n for(k in _mods) _mods[k] = event[modifierMap[k]];\n };\n\n // handle keydown event\n function dispatch(event) {\n var key, handler, k, i, modifiersMatch, scope;\n key = event.keyCode;\n\n if (index(_downKeys, key) == -1) {\n _downKeys.push(key);\n }\n\n // if a modifier key, set the key. property to true and return\n if(key == 93 || key == 224) key = 91; // right command on webkit, command on Gecko\n if(key in _mods) {\n _mods[key] = true;\n // 'assignKey' from inside this closure is exported to window.key\n for(k in _MODIFIERS) if(_MODIFIERS[k] == key) assignKey[k] = true;\n return;\n }\n updateModifierKey(event);\n\n // see if we need to ignore the keypress (filter() can can be overridden)\n // by default ignore key presses if a select, textarea, or input is focused\n if(!assignKey.filter.call(this, event)) return;\n\n // abort if no potentially matching shortcuts found\n if (!(key in _handlers)) return;\n\n scope = getScope();\n\n // for each potential shortcut\n for (i = 0; i < _handlers[key].length; i++) {\n handler = _handlers[key][i];\n\n // see if it's in the current scope\n if(handler.scope == scope || handler.scope == 'all'){\n // check if modifiers match if any\n modifiersMatch = handler.mods.length > 0;\n for(k in _mods)\n if((!_mods[k] && index(handler.mods, +k) > -1) ||\n (_mods[k] && index(handler.mods, +k) == -1)) modifiersMatch = false;\n // call the handler and stop the event if neccessary\n if((handler.mods.length == 0 && !_mods[16] && !_mods[18] && !_mods[17] && !_mods[91]) || modifiersMatch){\n if(handler.method(event, handler)===false){\n if(event.preventDefault) event.preventDefault();\n else event.returnValue = false;\n if(event.stopPropagation) event.stopPropagation();\n if(event.cancelBubble) event.cancelBubble = true;\n }\n }\n }\n }\n };\n\n // unset modifier keys on keyup\n function clearModifier(event){\n var key = event.keyCode, k,\n i = index(_downKeys, key);\n\n // remove key from _downKeys\n if (i >= 0) {\n _downKeys.splice(i, 1);\n }\n\n if(key == 93 || key == 224) key = 91;\n if(key in _mods) {\n _mods[key] = false;\n for(k in _MODIFIERS) if(_MODIFIERS[k] == key) assignKey[k] = false;\n }\n };\n\n function resetModifiers() {\n for(k in _mods) _mods[k] = false;\n for(k in _MODIFIERS) assignKey[k] = false;\n };\n\n // parse and assign shortcut\n function assignKey(key, scope, method){\n var keys, mods;\n keys = getKeys(key);\n if (method === undefined) {\n method = scope;\n scope = 'all';\n }\n\n // for each shortcut\n for (var i = 0; i < keys.length; i++) {\n // set modifier keys if any\n mods = [];\n key = keys[i].split('+');\n if (key.length > 1){\n mods = getMods(key);\n key = [key[key.length-1]];\n }\n // convert to keycode and...\n key = key[0]\n key = code(key);\n // ...store handler\n if (!(key in _handlers)) _handlers[key] = [];\n _handlers[key].push({ shortcut: keys[i], scope: scope, method: method, key: keys[i], mods: mods });\n }\n };\n\n // unbind all handlers for given key in current scope\n function unbindKey(key, scope) {\n var multipleKeys, keys,\n mods = [],\n i, j, obj;\n\n multipleKeys = getKeys(key);\n\n for (j = 0; j < multipleKeys.length; j++) {\n keys = multipleKeys[j].split('+');\n\n if (keys.length > 1) {\n mods = getMods(keys);\n key = keys[keys.length - 1];\n }\n\n key = code(key);\n\n if (scope === undefined) {\n scope = getScope();\n }\n if (!_handlers[key]) {\n return;\n }\n for (i = 0; i < _handlers[key].length; i++) {\n obj = _handlers[key][i];\n // only clear handlers if correct scope and mods match\n if (obj.scope === scope && compareArray(obj.mods, mods)) {\n _handlers[key][i] = {};\n }\n }\n }\n };\n\n // Returns true if the key with code 'keyCode' is currently down\n // Converts strings into key codes.\n function isPressed(keyCode) {\n if (typeof(keyCode)=='string') {\n keyCode = code(keyCode);\n }\n return index(_downKeys, keyCode) != -1;\n }\n\n function getPressedKeyCodes() {\n return _downKeys.slice(0);\n }\n\n function filter(event){\n var tagName = (event.target || event.srcElement).tagName;\n // ignore keypressed in any elements that support keyboard data input\n return !(tagName == 'INPUT' || tagName == 'SELECT' || tagName == 'TEXTAREA');\n }\n\n // initialize key. to false\n for(k in _MODIFIERS) assignKey[k] = false;\n\n // set current scope (default 'all')\n function setScope(scope){ _scope = scope || 'all' };\n function getScope(){ return _scope || 'all' };\n\n // delete all handlers for a given scope\n function deleteScope(scope){\n var key, handlers, i;\n\n for (key in _handlers) {\n handlers = _handlers[key];\n for (i = 0; i < handlers.length; ) {\n if (handlers[i].scope === scope) handlers.splice(i, 1);\n else i++;\n }\n }\n };\n\n // abstract key logic for assign and unassign\n function getKeys(key) {\n var keys;\n key = key.replace(/\\s/g, '');\n keys = key.split(',');\n if ((keys[keys.length - 1]) == '') {\n keys[keys.length - 2] += ',';\n }\n return keys;\n }\n\n // abstract mods logic for assign and unassign\n function getMods(key) {\n var mods = key.slice(0, key.length - 1);\n for (var mi = 0; mi < mods.length; mi++)\n mods[mi] = _MODIFIERS[mods[mi]];\n return mods;\n }\n\n // cross-browser events\n function addEvent(object, event, method) {\n if (object.addEventListener)\n object.addEventListener(event, method, false);\n else if(object.attachEvent)\n object.attachEvent('on'+event, function(){ method(window.event) });\n };\n\n // set the handlers globally on document\n addEvent(document, 'keydown', function(event) { dispatch(event) }); // Passing _scope to a callback to ensure it remains the same by execution. Fixes #48\n addEvent(document, 'keyup', clearModifier);\n\n // reset modifiers to false whenever the window is (re)focused.\n addEvent(window, 'focus', resetModifiers);\n\n // store previously defined key\n var previousKey = global.key;\n\n // restore previously defined key and return reference to our key object\n function noConflict() {\n var k = global.key;\n global.key = previousKey;\n return k;\n }\n\n // set window.key and window.key.set/get/deleteScope, and the default filter\n global.key = assignKey;\n global.key.setScope = setScope;\n global.key.getScope = getScope;\n global.key.deleteScope = deleteScope;\n global.key.filter = filter;\n global.key.isPressed = isPressed;\n global.key.getPressedKeyCodes = getPressedKeyCodes;\n global.key.noConflict = noConflict;\n global.key.unbind = unbindKey;\n\n if(typeof module !== 'undefined') module.exports = assignKey;\n\n})(this);\n","module.exports = {\n plugins: []\n};\n","module.exports = config => {\n var c = config || {},\n defaults = require('./config/config');\n\n // Set default options\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var plugins = {};\n\n return {\n /**\n * Add new plugin. Plugins could not be overwritten\n * @param {string} id Plugin ID\n * @param {Function} plugin Function which contains all plugin logic\n * @return {Function} The plugin function\n * @example\n * PluginManager.add('some-plugin', function(editor){\n * editor.Commands.add('new-command', {\n * run: function(editor, senderBtn){\n * console.log('Executed new-command');\n * }\n * })\n * });\n */\n add(id, plugin) {\n if (plugins[id]) {\n return plugins[id];\n }\n\n plugins[id] = plugin;\n return plugin;\n },\n\n /**\n * Returns plugin by ID\n * @param {string} id Plugin ID\n * @return {Function|undefined} Plugin\n * @example\n * var plugin = PluginManager.get('some-plugin');\n * plugin(editor);\n */\n get(id) {\n return plugins[id];\n },\n\n /**\n * Returns object with all plugins\n * @return {Object}\n */\n getAll() {\n return plugins;\n }\n };\n};\n","/**\n * File made for IE/Edge support\n * https://github.com/artf/grapesjs/issues/214\n */\n\nexport default () => {\n /**\n * Check if IE/Edge\n * @return {Boolean}\n */\n const isIE = () => {\n let match;\n const agent = window.navigator.userAgent;\n const rules = [\n ['edge', /Edge\\/([0-9\\._]+)/],\n ['ie', /MSIE\\s(7\\.0)/],\n ['ie', /MSIE\\s([0-9\\.]+);.*Trident\\/[4-7].0/],\n ['ie', /Trident\\/7\\.0.*rv\\:([0-9\\.]+).*\\).*Gecko$/]\n ];\n\n for (let i = 0; i < rules.length; i++) {\n const rule = rules[i];\n match = rule[1].exec(agent);\n if (match) break;\n }\n\n return !!match;\n };\n\n if (isIE()) {\n const originalCreateHTMLDocument =\n DOMImplementation.prototype.createHTMLDocument;\n DOMImplementation.prototype.createHTMLDocument = title => {\n if (!title) title = '';\n return originalCreateHTMLDocument.apply(document.implementation, [title]);\n };\n }\n};\n","const $ = Backbone.$;\n\nmodule.exports = Backbone.View.extend({\n initialize() {\n const model = this.model;\n model.view = this;\n this.conf = model.config;\n this.pn = model.get('Panels');\n model.on('loaded', () => {\n this.pn.active();\n this.pn.disableButtons();\n model.runDefault();\n setTimeout(() => model.trigger('load'), 0);\n });\n },\n\n render() {\n const model = this.model;\n const el = this.$el;\n const conf = this.conf;\n const contEl = $(conf.el || `body ${conf.container}`);\n const pfx = conf.stylePrefix;\n el.empty();\n\n if (conf.width) contEl.css('width', conf.width);\n\n if (conf.height) contEl.css('height', conf.height);\n\n el.append(model.get('Canvas').render());\n el.append(this.pn.render());\n el.attr('class', `${pfx}editor ${pfx}one-bg ${pfx}two-color`);\n contEl\n .addClass(`${pfx}editor-cont`)\n .empty()\n .append(el);\n\n return this;\n }\n});\n","import { isObject, isString, each, isUndefined } from 'underscore';\n\nmodule.exports = ({ $, Backbone }) => {\n if (Backbone) {\n const ViewProt = Backbone.View.prototype;\n const eventNsMap = {};\n ViewProt.eventNsMap = eventNsMap;\n\n ViewProt.delegate = function(eventName, selector, listener) {\n const vid = '.delegateEvents' + this.cid;\n this.$el.on(eventName, selector, listener);\n //return this;\n let eventMap = eventNsMap[vid];\n\n if (!eventMap) {\n eventMap = [];\n eventNsMap[vid] = eventMap;\n }\n\n eventMap.push({ eventName, selector, listener });\n return this;\n };\n\n ViewProt.undelegateEvents = function() {\n const vid = '.delegateEvents' + this.cid;\n if (this.$el) {\n //this.$el.off(); return this;\n let eventMap = eventNsMap[vid];\n\n if (eventMap) {\n eventMap.forEach(({ eventName, selector, listener }) => {\n this.$el.off(eventName);\n });\n }\n }\n return this;\n };\n\n ViewProt.undelegate = function(ev, sel, list) {\n const vid = '.delegateEvents' + this.cid;\n //this.$el.off(ev, sel, list); return this;\n let eventMap = eventNsMap[vid];\n\n if (eventMap) {\n eventMap.forEach(({ eventName, selector, listener }) => {\n if (eventName == ev && selector == sel) {\n this.$el.off(eventName);\n }\n });\n }\n\n return this;\n };\n }\n\n if ($ && $.prototype.constructor.name !== 'jQuery') {\n const fn = $.fn;\n\n const splitNamespace = function(name) {\n const namespaceArray = name.split('.');\n return name.indexOf('.') !== 0\n ? [namespaceArray[0], namespaceArray.slice(1)]\n : [null, namespaceArray];\n };\n\n const on = $.prototype.on;\n const off = $.prototype.off;\n const trigger = $.prototype.trigger;\n const offset = $.prototype.offset;\n const getEvents = eventName => eventName.split(/[,\\s]+/g);\n const getNamespaces = eventName => eventName.split('.');\n\n fn.on = function(eventName, delegate, callback, runOnce) {\n if (typeof eventName == 'string') {\n const events = getEvents(eventName);\n\n if (events.length == 1) {\n eventName = events[0];\n let namespaces = getNamespaces(eventName);\n\n if (eventName.indexOf('.') !== 0) {\n eventName = namespaces[0];\n }\n\n namespaces = namespaces.slice(1);\n\n if (namespaces.length) {\n //console.log('Found event with namespaces', namespaces, eventName, delegate, this);\n const cashNs = this.data('_cashNs') || [];\n // cashNs[namespace]\n this.data('_cashNs', namespaces); // for each ns need to store '.store' => eventName, delegate, callback\n }\n\n return on.call(this, eventName, delegate, callback, runOnce);\n } else {\n events.forEach(eventName =>\n this.on(eventName, delegate, callback, runOnce)\n );\n return this;\n }\n } else {\n return on.call(this, eventName, delegate, callback, runOnce);\n }\n };\n\n fn.off = function(eventName, callback) {\n if (typeof eventName == 'string') {\n const events = getEvents(eventName);\n\n if (events.length == 1) {\n eventName = events[0];\n let namespaces = getNamespaces(eventName);\n\n if (eventName.indexOf('.') !== 0) {\n eventName = namespaces[0];\n }\n\n namespaces = namespaces.slice(1);\n\n if (namespaces.length) {\n // Have to off only with the same namespace\n }\n\n return off.call(this, eventName, callback);\n } else {\n events.forEach(eventName => this.off(eventName, callback));\n return this;\n }\n } else {\n return off.call(this, eventName, callback);\n }\n };\n\n fn.trigger = function(eventName, data) {\n if (eventName instanceof $.Event) {\n return this.trigger(eventName.type, data);\n }\n\n if (typeof eventName == 'string') {\n const events = getEvents(eventName);\n\n if (events.length == 1) {\n eventName = events[0];\n let namespaces = getNamespaces(eventName);\n\n if (eventName.indexOf('.') !== 0) {\n eventName = namespaces[0];\n }\n\n namespaces = namespaces.slice(1);\n\n if (namespaces.length) {\n // have to trigger with same namespaces and eventName\n }\n\n return trigger.call(this, eventName, data);\n } else {\n events.forEach(eventName => this.trigger(eventName, data));\n return this;\n }\n } else {\n return trigger.call(this, eventName, data);\n }\n };\n\n fn.hide = function() {\n return this.css('display', 'none');\n };\n\n fn.show = function() {\n return this.css('display', 'block');\n };\n\n fn.focus = function() {\n const el = this.get(0);\n el && el.focus();\n return this;\n };\n\n // For SVGs in IE\n (fn.removeClass = function(c) {\n if (!arguments.length) {\n return this.attr('class', '');\n }\n const classes = isString(c) && c.match(/\\S+/g);\n return classes\n ? this.each(function(el) {\n each(classes, function(c) {\n if (el.classList) {\n el.classList.remove(c);\n } else {\n const val = el.className;\n const bval = el.className.baseVal;\n\n if (!isUndefined(bval)) {\n val.baseVal = bval.replace(c, '');\n } else {\n el.className = val.replace(c, '');\n }\n }\n });\n })\n : this;\n }),\n (fn.remove = function() {\n return this.each(node => {\n return node.parentNode && node.parentNode.removeChild(node);\n });\n }),\n // For spectrum compatibility\n (fn.bind = function(ev, h) {\n return this.on(ev, h);\n });\n\n fn.unbind = function(ev, h) {\n if (isObject(ev)) {\n for (let name in ev) {\n ev.hasOwnProperty(name) && this.off(name, ev[name]);\n }\n\n return this;\n } else {\n return this.off(ev, h);\n }\n };\n\n fn.click = function(h) {\n return h ? this.on('click', h) : this.trigger('click');\n };\n\n fn.change = function(h) {\n return h ? this.on('change', h) : this.trigger('change');\n };\n\n fn.keydown = function(h) {\n return h ? this.on('keydown', h) : this.trigger('keydown');\n };\n\n fn.delegate = function(selector, events, data, handler) {\n if (!handler) {\n handler = data;\n }\n\n return this.on(events, selector, function(e) {\n e.data = data;\n handler(e);\n });\n };\n\n fn.scrollLeft = function() {\n let el = this.get(0);\n el = el.nodeType == 9 ? el.defaultView : el;\n let win = el instanceof Window ? el : null;\n return win ? win.pageXOffset : el.scrollLeft || 0;\n };\n\n fn.scrollTop = function() {\n let el = this.get(0);\n el = el.nodeType == 9 ? el.defaultView : el;\n let win = el instanceof Window ? el : null;\n return win ? win.pageYOffset : el.scrollTop || 0;\n };\n\n fn.offset = function(coords) {\n let top, left;\n\n if (coords) {\n top = coords.top;\n left = coords.left;\n }\n\n if (typeof top != 'undefined') {\n this.css('top', `${top}px`);\n }\n if (typeof left != 'undefined') {\n this.css('left', `${left}px`);\n }\n\n return offset.call(this);\n };\n\n $.map = function(items, clb) {\n const ar = [];\n\n for (var i = 0; i < items.length; i++) {\n ar.push(clb(items[i], i));\n }\n\n return ar;\n };\n\n const indexOf = Array.prototype.indexOf;\n\n $.inArray = function(val, arr, i) {\n return arr == null ? -1 : indexOf.call(arr, val, i);\n };\n\n $.Event = function(src, props) {\n if (!(this instanceof $.Event)) {\n return new $.Event(src, props);\n }\n\n this.type = src;\n this.isDefaultPrevented = () => false;\n };\n }\n};\n","import _ from 'underscore';\nimport Backbone from 'backbone';\n\nmodule.exports = Backbone.View.extend({\n template: _.template(`\n
title\">\n caret-icon\">\n <%= label %>\n
\n
blocks-c\">
\n `),\n\n events: {},\n\n initialize(o = {}, config = {}) {\n this.config = config;\n const pfx = this.config.pStylePrefix || '';\n this.pfx = pfx;\n this.caretR = 'fa fa-caret-right';\n this.caretD = 'fa fa-caret-down';\n this.iconClass = `${pfx}caret-icon`;\n this.activeClass = `${pfx}open`;\n this.className = `${pfx}block-category`;\n this.events[`click .${pfx}title`] = 'toggle';\n this.listenTo(this.model, 'change:open', this.updateVisibility);\n this.delegateEvents();\n },\n\n updateVisibility() {\n if (this.model.get('open')) this.open();\n else this.close();\n },\n\n open() {\n this.el.className = `${this.className} ${this.activeClass}`;\n this.getIconEl().className = `${this.iconClass} ${this.caretD}`;\n this.getBlocksEl().style.display = '';\n },\n\n close() {\n this.el.className = this.className;\n this.getIconEl().className = `${this.iconClass} ${this.caretR}`;\n this.getBlocksEl().style.display = 'none';\n },\n\n toggle() {\n var model = this.model;\n model.set('open', !model.get('open'));\n },\n\n getIconEl() {\n if (!this.iconEl) {\n this.iconEl = this.el.querySelector('.' + this.iconClass);\n }\n\n return this.iconEl;\n },\n\n getBlocksEl() {\n if (!this.blocksEl) {\n this.blocksEl = this.el.querySelector('.' + this.pfx + 'blocks-c');\n }\n\n return this.blocksEl;\n },\n\n append(el) {\n this.getBlocksEl().appendChild(el);\n },\n\n render() {\n this.el.innerHTML = this.template({\n pfx: this.pfx,\n label: this.model.get('label')\n });\n this.el.className = this.className;\n this.$el.css({ order: this.model.get('order') });\n this.updateVisibility();\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport { isObject } from 'underscore';\nimport { on, off, hasDnd } from 'utils/mixins';\n\nmodule.exports = Backbone.View.extend({\n events: {\n mousedown: 'startDrag',\n dragstart: 'handleDragStart',\n drag: 'handleDrag',\n dragend: 'handleDragEnd'\n },\n\n initialize(o, config = {}) {\n this.em = config.em;\n this.config = config;\n this.endDrag = this.endDrag.bind(this);\n this.ppfx = config.pStylePrefix || '';\n this.listenTo(this.model, 'destroy remove', this.remove);\n },\n\n /**\n * Start block dragging\n * @private\n */\n startDrag(e) {\n const config = this.config;\n //Right or middel click\n if (e.button !== 0 || !config.getSorter || this.el.draggable) return;\n config.em.refreshCanvas();\n const sorter = config.getSorter();\n sorter.setDragHelper(this.el, e);\n sorter.setDropContent(this.model.get('content'));\n sorter.startSort(this.el);\n on(document, 'mouseup', this.endDrag);\n },\n\n handleDragStart(ev) {\n const { em, model } = this;\n const content = model.get('content');\n const isObj = isObject(content);\n const type = isObj ? 'text/json' : 'text';\n const data = isObj ? JSON.stringify(content) : content;\n\n // Note: data are not available on dragenter for security reason,\n // but will use dragContent as I need it for the Sorter context\n // IE11 supports only 'text' data type\n ev.dataTransfer.setData('text', data);\n em.set('dragContent', content);\n em.trigger('block:drag:start', model, ev);\n },\n\n handleDrag(ev) {\n this.em.trigger('block:drag', this.model, ev);\n },\n\n handleDragEnd() {\n const { em, model } = this;\n const result = em.get('dragResult');\n\n if (result) {\n const oldKey = 'activeOnRender';\n const oldActive = result.get && result.get(oldKey);\n\n if (model.get('activate') || oldActive) {\n result.trigger('active');\n result.set(oldKey, 0);\n }\n\n if (model.get('select')) {\n em.setSelected(result);\n }\n\n if (model.get('resetId')) {\n result.onAll(model => model.resetId());\n }\n }\n\n em.set({\n dragResult: null,\n dragContent: null\n });\n\n em.trigger('block:drag:stop', result, model);\n },\n\n /**\n * Drop block\n * @private\n */\n endDrag(e) {\n off(document, 'mouseup', this.endDrag);\n const sorter = this.config.getSorter();\n\n // After dropping the block in the canvas the mouseup event is not yet\n // triggerd on 'this.doc' and so clicking outside, the sorter, tries to move\n // things (throws false positives). As this method just need to drop away\n // the block helper I use the trick of 'moved = 0' to void those errors.\n sorter.moved = 0;\n sorter.endMove();\n },\n\n render() {\n const el = this.el;\n const pfx = this.ppfx;\n const className = `${pfx}block`;\n const label = this.model.get('label');\n el.className += ` ${className} ${pfx}one-bg ${pfx}four-color-h`;\n el.innerHTML = `
${label}
`;\n el.title = el.textContent.trim();\n hasDnd(this.em) && el.setAttribute('draggable', true);\n return this;\n }\n});\n","import { isString, isObject, bindAll } from 'underscore';\n\nconst BlockView = require('./BlockView');\nconst CategoryView = require('./CategoryView');\n\nmodule.exports = require('backbone').View.extend({\n initialize(opts, config) {\n bindAll(this, 'getSorter', 'onDrag', 'onDrop');\n this.config = config || {};\n this.categories = opts.categories || '';\n this.renderedCategories = [];\n var ppfx = this.config.pStylePrefix || '';\n this.ppfx = ppfx;\n this.noCatClass = `${ppfx}blocks-no-cat`;\n this.blockContClass = `${ppfx}blocks-c`;\n this.catsClass = `${ppfx}block-categories`;\n const coll = this.collection;\n this.listenTo(coll, 'add', this.addTo);\n this.listenTo(coll, 'reset', this.render);\n this.em = this.config.em;\n this.tac = 'test-tac';\n this.grabbingCls = this.ppfx + 'grabbing';\n\n if (this.em) {\n this.config.getSorter = this.getSorter;\n this.canvas = this.em.get('Canvas');\n }\n },\n\n /**\n * Get sorter\n * @private\n */\n getSorter() {\n if (!this.em) return;\n if (!this.sorter) {\n var utils = this.em.get('Utils');\n var canvas = this.canvas;\n this.sorter = new utils.Sorter({\n container: canvas.getBody(),\n placer: canvas.getPlacerEl(),\n containerSel: '*',\n itemSel: '*',\n pfx: this.ppfx,\n onStart: this.onDrag,\n onEndMove: this.onDrop,\n onMove: this.onMove,\n document: canvas.getFrameEl().contentDocument,\n direction: 'a',\n wmargin: 1,\n nested: 1,\n em: this.em,\n canvasRelative: 1\n });\n }\n return this.sorter;\n },\n\n /**\n * Callback when block is on drag\n * @private\n */\n onDrag(e) {\n this.em.stopDefault();\n this.em.trigger('block:drag:start', e);\n },\n\n onMove(e) {\n this.em.trigger('block:drag:move', e);\n },\n\n /**\n * Callback when block is dropped\n * @private\n */\n onDrop(model) {\n const em = this.em;\n em.runDefault();\n\n if (model && model.get) {\n if (model.get('activeOnRender')) {\n model.trigger('active');\n model.set('activeOnRender', 0);\n }\n\n em.trigger('block:drag:stop', model);\n }\n },\n\n /**\n * Add new model to the collection\n * @param {Model} model\n * @private\n * */\n addTo(model) {\n this.add(model);\n },\n\n /**\n * Render new model inside the view\n * @param {Model} model\n * @param {Object} fragment Fragment collection\n * @private\n * */\n add(model, fragment) {\n var frag = fragment || null;\n var view = new BlockView(\n {\n model,\n attributes: model.get('attributes')\n },\n this.config\n );\n var rendered = view.render().el;\n var category = model.get('category');\n\n // Check for categories\n if (category && this.categories) {\n if (isString(category)) {\n category = {\n id: category,\n label: category\n };\n } else if (isObject(category) && !category.id) {\n category.id = category.label;\n }\n\n var catModel = this.categories.add(category);\n var catId = catModel.get('id');\n var catView = this.renderedCategories[catId];\n var categories = this.getCategoriesEl();\n model.set('category', catModel);\n\n if (!catView && categories) {\n catView = new CategoryView(\n {\n model: catModel\n },\n this.config\n ).render();\n this.renderedCategories[catId] = catView;\n categories.appendChild(catView.el);\n }\n\n catView && catView.append(rendered);\n return;\n }\n\n if (frag) frag.appendChild(rendered);\n else this.append(rendered);\n },\n\n getCategoriesEl() {\n if (!this.catsEl) {\n this.catsEl = this.el.querySelector(`.${this.catsClass}`);\n }\n\n return this.catsEl;\n },\n\n getBlocksEl() {\n if (!this.blocksEl) {\n this.blocksEl = this.el.querySelector(\n `.${this.noCatClass} .${this.blockContClass}`\n );\n }\n\n return this.blocksEl;\n },\n\n append(el) {\n let blocks = this.getBlocksEl();\n blocks && blocks.appendChild(el);\n },\n\n render() {\n const ppfx = this.ppfx;\n const frag = document.createDocumentFragment();\n this.catsEl = null;\n this.blocksEl = null;\n this.renderedCategories = [];\n this.el.innerHTML = `\n
\n
\n
\n
\n `;\n\n this.collection.each(model => this.add(model, frag));\n this.append(frag);\n const cls = `${this.blockContClass}s ${ppfx}one-bg ${ppfx}two-color`;\n this.$el.addClass(cls);\n return this;\n }\n});\n","import Backbone from 'backbone';\n\nmodule.exports = Backbone.Collection.extend({\n model: require('./Category')\n});\n","import Backbone from 'backbone';\nvar Category = require('./Category');\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n // If true, triggers an 'active' event on dropped component\n activate: 0,\n // If true, the dropped component will be selected\n select: 0,\n // If true, all IDs of dropped component and its style will be changed\n resetId: 0,\n label: '',\n content: '',\n category: '',\n attributes: {}\n },\n\n initialize(opts = {}) {\n let category = this.get('category');\n\n if (category) {\n if (typeof category == 'string') {\n var catObj = new Category({\n id: category,\n label: category\n });\n }\n }\n }\n});\n","import Backbone from 'backbone';\nvar Block = require('./Block');\n\nmodule.exports = Backbone.Collection.extend({\n model: Block\n});\n","module.exports = {\n // Specify the element to use as a container, string (query) or HTMLElement\n // With the empty value, nothing will be rendered\n appendTo: '',\n\n blocks: []\n};\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/block_manager/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * blockManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const blockManager = editor.BlockManager;\n * ```\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getall)\n * * [getAllVisible](#getallvisible)\n * * [remove](#remove)\n * * [getConfig](#getconfig)\n * * [getCategories](#getcategories)\n * * [getContainer](#getcontainer)\n * * [render](#render)\n *\n * @module BlockManager\n */\nimport { isElement } from 'underscore';\n\nmodule.exports = () => {\n var c = {},\n defaults = require('./config/config'),\n Blocks = require('./model/Blocks'),\n BlockCategories = require('./model/Categories'),\n BlocksView = require('./view/BlocksView');\n var blocks, blocksVisible, blocksView;\n var categories = [];\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'BlockManager',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @return {this}\n * @private\n */\n init(config) {\n c = config || {};\n const em = c.em;\n\n for (let name in defaults) {\n if (!(name in c)) {\n c[name] = defaults[name];\n }\n }\n\n // Global blocks collection\n blocks = new Blocks([]);\n blocksVisible = new Blocks([]);\n (categories = new BlockCategories()),\n (blocksView = new BlocksView(\n {\n // Visible collection\n collection: blocksVisible,\n categories\n },\n c\n ));\n\n // Setup the sync between the global and public collections\n blocks.listenTo(blocks, 'add', model => {\n blocksVisible.add(model);\n em && em.trigger('block:add', model);\n });\n\n blocks.listenTo(blocks, 'remove', model => {\n blocksVisible.remove(model);\n em && em.trigger('block:remove', model);\n });\n\n blocks.listenTo(blocks, 'reset', coll => {\n blocksVisible.reset(coll.models);\n });\n\n return this;\n },\n\n /**\n * Get configuration object\n * @return {Object}\n */\n getConfig() {\n return c;\n },\n\n /**\n * Load default blocks if the collection is empty\n */\n onLoad() {\n const blocks = this.getAll();\n !blocks.length && blocks.reset(c.blocks);\n },\n\n postRender() {\n const elTo = this.getConfig().appendTo;\n\n if (elTo) {\n const el = isElement(elTo) ? elTo : document.querySelector(elTo);\n el.appendChild(this.render());\n }\n },\n\n /**\n * Add new block to the collection.\n * @param {string} id Block id\n * @param {Object} opts Options\n * @param {string} opts.label Name of the block\n * @param {string} opts.content HTML content\n * @param {string|Object} opts.category Group the block inside a catgegory.\n * You should pass objects with id property, eg:\n * {id: 'some-uid', label: 'My category'}\n * The string will be converted in:\n * 'someid' => {id: 'someid', label: 'someid'}\n * @param {Object} [opts.attributes={}] Block attributes\n * @return {Block} Added block\n * @example\n * blockManager.add('h1-block', {\n * label: 'Heading',\n * content: '

Put your title here

',\n * category: 'Basic',\n * attributes: {\n * title: 'Insert h1 block'\n * }\n * });\n */\n add(id, opts) {\n var obj = opts || {};\n obj.id = id;\n return blocks.add(obj);\n },\n\n /**\n * Return the block by id\n * @param {string} id Block id\n * @example\n * const block = blockManager.get('h1-block');\n * console.log(JSON.stringify(block));\n * // {label: 'Heading', content: '

Put your ...', ...}\n */\n get(id) {\n return blocks.get(id);\n },\n\n /**\n * Return all blocks\n * @return {Collection}\n * @example\n * const blocks = blockManager.getAll();\n * console.log(JSON.stringify(blocks));\n * // [{label: 'Heading', content: '

Put your ...'}, ...]\n */\n getAll() {\n return blocks;\n },\n\n /**\n * Return the visible collection, which containes blocks actually rendered\n * @return {Collection}\n */\n getAllVisible() {\n return blocksVisible;\n },\n\n /**\n * Remove a block by id\n * @param {string} id Block id\n * @return {Block} Removed block\n */\n remove(id) {\n return blocks.remove(id);\n },\n\n /**\n * Get all available categories.\n * It's possible to add categories only within blocks via 'add()' method\n * @return {Array|Collection}\n */\n getCategories() {\n return categories;\n },\n\n /**\n * Return the Blocks container element\n * @return {HTMLElement}\n */\n getContainer() {\n return blocksView.el;\n },\n\n /**\n * Render blocks\n * @param {Array} blocks Blocks to render, without the argument will render\n * all global blocks\n * @return {HTMLElement} Rendered element\n * @example\n * // Render all blocks (inside the global collection)\n * blockManager.render();\n *\n * // Render new set of blocks\n * const blocks = blockManager.getAll();\n * blockManager.render(blocks.filter(\n * block => block.get('category') == 'sections'\n * ));\n * // Or a new set from an array\n * blockManager.render([\n * {label: 'Label text', content: '
Content
'}\n * ]);\n *\n * // Back to blocks from the global collection\n * blockManager.render();\n */\n render(blocks) {\n const toRender = blocks || this.getAll().models;\n\n if (!blocksView.rendered) {\n blocksView.render();\n blocksView.rendered = 1;\n }\n\n blocksView.collection.reset(toRender);\n return this.getContainer();\n }\n };\n};\n","var map = {\n\t\"./CanvasClear\": 52,\n\t\"./CanvasClear.js\": 52,\n\t\"./CommandAbstract\": 38,\n\t\"./CommandAbstract.js\": 38,\n\t\"./ComponentDelete\": 51,\n\t\"./ComponentDelete.js\": 51,\n\t\"./ComponentEnter\": 50,\n\t\"./ComponentEnter.js\": 50,\n\t\"./ComponentExit\": 49,\n\t\"./ComponentExit.js\": 49,\n\t\"./ComponentNext\": 48,\n\t\"./ComponentNext.js\": 48,\n\t\"./ComponentPrev\": 47,\n\t\"./ComponentPrev.js\": 47,\n\t\"./CopyComponent\": 46,\n\t\"./CopyComponent.js\": 46,\n\t\"./CreateComponent\": 7,\n\t\"./CreateComponent.js\": 7,\n\t\"./DeleteComponent\": 36,\n\t\"./DeleteComponent.js\": 36,\n\t\"./Drag\": 21,\n\t\"./Drag.js\": 21,\n\t\"./ExportTemplate\": 37,\n\t\"./ExportTemplate.js\": 37,\n\t\"./Fullscreen\": 24,\n\t\"./Fullscreen.js\": 24,\n\t\"./ImageComponent\": 35,\n\t\"./ImageComponent.js\": 35,\n\t\"./InsertCustom\": 12,\n\t\"./InsertCustom.js\": 12,\n\t\"./MoveComponent\": 34,\n\t\"./MoveComponent.js\": 34,\n\t\"./OpenAssets\": 27,\n\t\"./OpenAssets.js\": 27,\n\t\"./OpenBlocks\": 28,\n\t\"./OpenBlocks.js\": 28,\n\t\"./OpenLayers\": 31,\n\t\"./OpenLayers.js\": 31,\n\t\"./OpenStyleManager\": 30,\n\t\"./OpenStyleManager.js\": 30,\n\t\"./OpenTraitManager\": 29,\n\t\"./OpenTraitManager.js\": 29,\n\t\"./PasteComponent\": 45,\n\t\"./PasteComponent.js\": 45,\n\t\"./Preview\": 23,\n\t\"./Preview.js\": 23,\n\t\"./Resize\": 22,\n\t\"./Resize.js\": 22,\n\t\"./SelectComponent\": 8,\n\t\"./SelectComponent.js\": 8,\n\t\"./SelectParent\": 25,\n\t\"./SelectParent.js\": 25,\n\t\"./SelectPosition\": 13,\n\t\"./SelectPosition.js\": 13,\n\t\"./ShowOffset\": 26,\n\t\"./ShowOffset.js\": 26,\n\t\"./SwitchVisibility\": 32,\n\t\"./SwitchVisibility.js\": 32,\n\t\"./TextComponent\": 33,\n\t\"./TextComponent.js\": 33\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) { // check for number or string\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn id;\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 99;","const Backbone = require('backbone');\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n command: '',\n attributes: {}\n }\n});\n","const Backbone = require('backbone');\nconst ToolbarButton = require('./ToolbarButton');\n\nmodule.exports = Backbone.Collection.extend({ model: ToolbarButton });\n","var Backbone = require('backbone');\n\nmodule.exports = Backbone.View.extend({\n events() {\n return (\n this.model.get('events') || {\n mousedown: 'handleClick'\n }\n );\n },\n\n attributes() {\n return this.model.get('attributes');\n },\n\n initialize(opts) {\n this.editor = opts.config.editor;\n },\n\n handleClick(event) {\n event.preventDefault();\n event.stopPropagation();\n this.execCommand(event);\n },\n\n execCommand(event) {\n const opts = { event };\n const command = this.model.get('command');\n const editor = this.editor;\n\n if (typeof command === 'function') {\n command(editor, null, opts);\n }\n\n if (typeof command === 'string') {\n editor.runCommand(command, opts);\n }\n },\n\n render() {\n const { editor, $el, model } = this;\n const id = model.get('id');\n const label = model.get('label');\n const pfx = editor.getConfig('stylePrefix');\n $el.addClass(`${pfx}toolbar-item`);\n id && $el.addClass(`${pfx}toolbar-item__${id}`);\n label && $el.append(label);\n return this;\n }\n});\n","var Backbone = require('backbone');\nvar DomainViews = require('domain_abstract/view/DomainViews');\nvar ToolbarButtonView = require('./ToolbarButtonView');\n\nmodule.exports = DomainViews.extend({\n itemView: ToolbarButtonView,\n\n initialize(opts) {\n this.config = { editor: opts.editor || '' };\n this.listenTo(this.collection, 'reset', this.render);\n }\n});\n","module.exports = {\n ESCAPE_KEY: 27,\n\n stylePrefix: 'com-',\n\n defaults: [],\n\n // Editor model\n // @deprecated\n em: null,\n\n // If true center new first-level components\n // @deprecated\n firstCentered: true,\n\n // If true the new component will created with 'height', else 'min-height'\n // @deprecated\n newFixedH: false,\n\n // Minimum height (in px) of new component\n // @deprecated\n minComponentH: 50,\n\n // Minimum width (in px) of component on creation\n // @deprecated\n minComponentW: 50\n};\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/commands/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * commands: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const commands = editor.Commands;\n * ```\n *\n * * [add](#add)\n * * [get](#get)\n * * [has](#has)\n * * [run](#run)\n * * [stop](#stop)\n *\n * @module Commands\n */\n\nimport { isFunction } from 'underscore';\n\nmodule.exports = () => {\n let em;\n var c = {},\n commands = {},\n defaultCommands = {},\n defaults = require('./config/config'),\n CommandAbstract = require('./view/CommandAbstract');\n\n // Need it here as it would be used below\n var add = function(id, obj) {\n if (isFunction(obj)) {\n obj = { run: obj };\n }\n\n delete obj.initialize;\n obj.id = id;\n commands[id] = CommandAbstract.extend(obj);\n return this;\n };\n\n return {\n CommandAbstract,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Commands',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n em = c.em;\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n // Load commands passed via configuration\n for (var k in c.defaults) {\n var obj = c.defaults[k];\n if (obj.id) this.add(obj.id, obj);\n }\n\n const ViewCode = require('./view/ExportTemplate');\n defaultCommands['select-comp'] = require('./view/SelectComponent');\n defaultCommands['create-comp'] = require('./view/CreateComponent');\n defaultCommands['delete-comp'] = require('./view/DeleteComponent');\n defaultCommands['image-comp'] = require('./view/ImageComponent');\n defaultCommands['move-comp'] = require('./view/MoveComponent');\n defaultCommands['text-comp'] = require('./view/TextComponent');\n defaultCommands['insert-custom'] = require('./view/InsertCustom');\n defaultCommands['export-template'] = ViewCode;\n defaultCommands['sw-visibility'] = require('./view/SwitchVisibility');\n defaultCommands['open-layers'] = require('./view/OpenLayers');\n defaultCommands['open-sm'] = require('./view/OpenStyleManager');\n defaultCommands['open-tm'] = require('./view/OpenTraitManager');\n defaultCommands['open-blocks'] = require('./view/OpenBlocks');\n defaultCommands['open-assets'] = require('./view/OpenAssets');\n defaultCommands['show-offset'] = require('./view/ShowOffset');\n defaultCommands['select-parent'] = require('./view/SelectParent');\n defaultCommands.fullscreen = require('./view/Fullscreen');\n defaultCommands.preview = require('./view/Preview');\n defaultCommands.resize = require('./view/Resize');\n defaultCommands.drag = require('./view/Drag');\n\n defaultCommands['tlb-delete'] = {\n run(ed) {\n return ed.runCommand('core:component-delete');\n }\n };\n\n defaultCommands['tlb-clone'] = {\n run(ed) {\n ed.runCommand('core:copy');\n ed.runCommand('core:paste');\n }\n };\n\n defaultCommands['tlb-move'] = {\n run(ed, sender, opts) {\n let dragger;\n const em = ed.getModel();\n const event = opts && opts.event;\n const sel = ed.getSelected();\n const selAll = [...ed.getSelectedAll()];\n const toolbarStyle = ed.Canvas.getToolbarEl().style;\n const nativeDrag = event && event.type == 'dragstart';\n const defComOptions = { preserveSelected: 1 };\n\n const hideTlb = () => {\n toolbarStyle.display = 'none';\n em.stopDefault(defComOptions);\n };\n\n if (!sel || !sel.get('draggable')) {\n console.warn('The element is not draggable');\n return;\n }\n\n // Without setTimeout the ghost image disappears\n nativeDrag ? setTimeout(() => hideTlb, 0) : hideTlb();\n\n const onStart = (e, opts) => {\n console.log('start mouse pos ', opts.start);\n console.log('el rect ', opts.elRect);\n var el = opts.el;\n el.style.position = 'absolute';\n el.style.margin = 0;\n };\n\n const onEnd = (e, opts) => {\n em.runDefault(defComOptions);\n selAll.forEach(sel => sel.set('status', 'selected'));\n ed.select(selAll);\n sel.emitUpdate();\n dragger && dragger.blur();\n };\n\n const onDrag = (e, opts) => {\n console.log('Delta ', opts.delta);\n console.log('Current ', opts.current);\n };\n\n if (em.get('designerMode')) {\n // TODO move grabbing func in editor/canvas from the Sorter\n dragger = editor.runCommand('drag', {\n el: sel.view.el,\n options: {\n event,\n onStart,\n onDrag,\n onEnd\n }\n });\n } else {\n if (nativeDrag) {\n event.dataTransfer.setDragImage(sel.view.el, 0, 0);\n //sel.set('status', 'freezed');\n }\n\n const cmdMove = ed.Commands.get('move-comp');\n cmdMove.onEndMoveFromModel = onEnd;\n cmdMove.initSorterFromModels(selAll);\n }\n\n selAll.forEach(sel => sel.set('status', 'freezed-selected'));\n }\n };\n\n // Core commands\n defaultCommands['core:undo'] = e => e.UndoManager.undo();\n defaultCommands['core:redo'] = e => e.UndoManager.redo();\n [\n ['copy', 'CopyComponent'],\n ['paste', 'PasteComponent'],\n ['component-next', 'ComponentNext'],\n ['component-prev', 'ComponentPrev'],\n ['component-enter', 'ComponentEnter'],\n ['component-exit', 'ComponentExit'],\n ['canvas-clear', 'CanvasClear'],\n ['component-delete', 'ComponentDelete']\n ].forEach(\n item =>\n (defaultCommands[`core:${item[0]}`] = require(`./view/${\n item[1]\n }`).run)\n );\n\n if (c.em) c.model = c.em.get('Canvas');\n\n this.loadDefaultCommands();\n\n return this;\n },\n\n /**\n * Add new command to the collection\n * @param\t{string} id Command's ID\n * @param\t{Object|Function} command Object representing your command,\n * By passing just a function it's intended as a stateless command\n * (just like passing an object with only `run` method).\n * @return {this}\n * @example\n * commands.add('myCommand', {\n * \trun(editor, sender) {\n * \t\talert('Hello world!');\n * \t},\n * \tstop(editor, sender) {\n * \t},\n * });\n * // As a function\n * commands.add('myCommand2', editor => { ... });\n * */\n add,\n\n /**\n * Get command by ID\n * @param\t{string}\tid Command's ID\n * @return {Object} Object representing the command\n * @example\n * var myCommand = commands.get('myCommand');\n * myCommand.run();\n * */\n get(id) {\n var el = commands[id];\n\n if (typeof el == 'function') {\n el = new el(c);\n commands[id] = el;\n }\n\n return el;\n },\n\n /**\n * Check if command exists\n * @param\t{string}\tid Command's ID\n * @return {Boolean}\n * */\n has(id) {\n return !!commands[id];\n },\n\n /**\n * Execute the command\n * @param {String} id Command ID\n * @param {Object} [options={}] Options\n * @return {*} The return is defined by the command\n * @example\n * commands.run('myCommand', { someOption: 1 });\n */\n run(id, options = {}) {\n let result;\n const command = this.get(id);\n const editor = em.get('Editor');\n if (command) result = command.callRun(editor, options);\n\n return result;\n },\n\n /**\n * Stop the command\n * @param {String} id Command ID\n * @param {Object} [options={}] Options\n * @return {*} The return is defined by the command\n * @example\n * commands.stop('myCommand', { someOption: 1 });\n */\n stop(id, options = {}) {\n let result;\n const command = this.get(id);\n const editor = em.get('Editor');\n if (command) result = command.callStop(editor, options);\n\n return result;\n },\n\n /**\n * Load default commands\n * @return {this}\n * @private\n * */\n loadDefaultCommands() {\n for (var id in defaultCommands) {\n this.add(id, defaultCommands[id]);\n }\n\n return this;\n },\n\n /**\n * Create anonymous Command instance\n * @param {Object} command Command object\n * @return {Command}\n * @private\n * */\n create(command) {\n const cmd = CommandAbstract.extend(command);\n return new cmd(c);\n }\n };\n};\n","import { bindAll } from 'underscore';\n\nconst motionsEv =\n 'transitionend oTransitionEnd transitionend webkitTransitionEnd';\n\nmodule.exports = require('backbone').View.extend({\n tagName: 'iframe',\n\n attributes: {\n allowfullscreen: 'allowfullscreen'\n },\n\n initialize(o) {\n bindAll(this, 'udpateOffset');\n this.config = o.config || {};\n this.ppfx = this.config.pStylePrefix || '';\n this.em = this.config.em;\n this.listenTo(this.em, 'change:device', this.updateDim);\n },\n\n /**\n * Update dimensions of the frame\n * @private\n */\n updateDim(model) {\n const em = this.em;\n const device = em.getDeviceModel();\n const style = this.el.style;\n const currW = style.width || '';\n const currH = style.height || '';\n const newW = device ? device.get('width') : '';\n const newH = device ? device.get('height') : '';\n const noChanges = currW == newW && currH == newH;\n style.width = newW;\n style.height = newH;\n this.udpateOffset();\n // Prevent fixed highlighting box which appears when on\n // component hover during the animation\n em.stopDefault({ preserveSelected: 1 });\n noChanges ? this.udpateOffset() : this.$el.on(motionsEv, this.udpateOffset);\n },\n\n udpateOffset() {\n const em = this.em;\n const offset = em.get('Canvas').getOffset();\n em.set('canvasOffset', offset);\n em.runDefault({ preserveSelected: 1 });\n this.$el.off(motionsEv, this.udpateOffset);\n },\n\n getBody() {\n this.$el.contents().find('body');\n },\n\n getWrapper() {\n return this.$el.contents().find('body > div');\n },\n\n render() {\n this.$el.attr({ class: this.ppfx + 'frame' });\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport { on, off, getElement } from 'utils/mixins';\nconst FrameView = require('./FrameView');\nconst $ = Backbone.$;\n\nmodule.exports = Backbone.View.extend({\n initialize(o) {\n _.bindAll(this, 'renderBody', 'onFrameScroll', 'clearOff');\n on(window, 'scroll resize', this.clearOff);\n this.config = o.config || {};\n this.em = this.config.em || {};\n this.ppfx = this.config.pStylePrefix || '';\n this.className = this.config.stylePrefix + 'canvas';\n this.listenTo(this.em, 'change:canvasOffset', this.clearOff);\n this.frame = new FrameView({\n model: this.model.get('frame'),\n config: this.config\n });\n },\n\n /**\n * Checks if the element is visible in the canvas's viewport\n * @param {HTMLElement} el\n * @return {Boolean}\n */\n isElInViewport(el) {\n const rect = getElement(el).getBoundingClientRect();\n const frameRect = this.getFrameOffset(1);\n const rTop = rect.top;\n const rLeft = rect.left;\n return (\n rTop >= 0 &&\n rLeft >= 0 &&\n rTop <= frameRect.height &&\n rLeft <= frameRect.width\n );\n },\n\n /**\n * Update tools position\n * @private\n */\n onFrameScroll() {\n var u = 'px';\n var body = this.frame.el.contentDocument.body;\n this.toolsEl.style.top = '-' + body.scrollTop + u;\n this.toolsEl.style.left = '-' + body.scrollLeft + u;\n this.em.trigger('canvasScroll');\n },\n\n /**\n * Insert scripts into head, it will call renderBody after all scripts loaded or failed\n * @private\n */\n renderScripts() {\n var frame = this.frame;\n var that = this;\n\n frame.el.onload = () => {\n var scripts = that.config.scripts.slice(0), // clone\n counter = 0;\n\n function appendScript(scripts) {\n if (scripts.length > 0) {\n var script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = scripts.shift();\n script.onerror = script.onload = appendScript.bind(null, scripts);\n frame.el.contentDocument.head.appendChild(script);\n } else {\n that.renderBody();\n }\n }\n appendScript(scripts);\n };\n },\n\n /**\n * Render inside frame's body\n * @private\n */\n renderBody() {\n var wrap = this.model.get('frame').get('wrapper');\n var em = this.config.em;\n if (wrap) {\n var ppfx = this.ppfx;\n //var body = this.frame.$el.contents().find('body');\n var body = $(this.frame.el.contentWindow.document.body);\n var cssc = em.get('CssComposer');\n var conf = em.get('Config');\n var confCanvas = this.config;\n var protCss = conf.protectedCss;\n var externalStyles = '';\n\n confCanvas.styles.forEach(style => {\n externalStyles += ``;\n });\n\n const colorWarn = '#ffca6f';\n\n // I need all this styles to make the editor work properly\n // Remove `html { height: 100%;}` from the baseCss as it gives jumpings\n // effects (on ENTER) with RTE like CKEditor (maybe some bug there?!?)\n // With `body {height: auto;}` jumps in CKEditor are removed but in\n // Firefox is impossible to drag stuff in empty canvas, so bring back\n // `body {height: 100%;}`.\n // For the moment I give the priority to Firefox as it might be\n // CKEditor's issue\n var frameCss = `\n ${em.config.baseCss || ''}\n\n .${ppfx}dashed *[data-highlightable] {\n outline: 1px dashed rgba(170,170,170,0.7);\n outline-offset: -2px;\n }\n\n .${ppfx}comp-selected {\n outline: 3px solid #3b97e3 !important;\n outline-offset: -3px;\n }\n\n .${ppfx}comp-selected-parent {\n outline: 2px solid ${colorWarn} !important\n }\n\n .${ppfx}no-select {\n user-select: none;\n -webkit-user-select:none;\n -moz-user-select: none;\n }\n\n .${ppfx}freezed {\n opacity: 0.5;\n pointer-events: none;\n }\n\n .${ppfx}no-pointer {\n pointer-events: none;\n }\n\n .${ppfx}plh-image {\n background: #f5f5f5;\n border: none;\n height: 50px;\n width: 50px;\n display: block;\n outline: 3px solid #ffca6f;\n cursor: pointer;\n outline-offset: -2px\n }\n\n .${ppfx}grabbing {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n\n ${conf.canvasCss || ''}\n ${protCss || ''}\n `;\n\n if (externalStyles) {\n body.append(externalStyles);\n }\n\n body.append('');\n body.append(wrap.render()).append(cssc.render());\n body.append(this.getJsContainer());\n em.trigger('loaded');\n this.frame.el.contentWindow.onscroll = this.onFrameScroll;\n this.frame.udpateOffset();\n\n // When the iframe is focused the event dispatcher is not the same so\n // I need to delegate all events to the parent document\n const doc = document;\n const fdoc = this.frame.el.contentDocument;\n\n // Unfortunately just creating `KeyboardEvent(e.type, e)` is not enough,\n // the keyCode/which will be always `0`. Even if it's an old/deprecated\n // property keymaster (and many others) still use it... using `defineProperty`\n // hack seems the only way\n const createCustomEvent = (e, cls) => {\n let oEvent;\n try {\n oEvent = new window[cls](e.type, e);\n } catch (e) {\n oEvent = document.createEvent(cls);\n oEvent.initEvent(e.type, true, true);\n }\n oEvent.keyCodeVal = e.keyCode;\n ['keyCode', 'which'].forEach(prop => {\n Object.defineProperty(oEvent, prop, {\n get() {\n return this.keyCodeVal;\n }\n });\n });\n return oEvent;\n };\n\n [\n { event: 'keydown keyup', class: 'KeyboardEvent' }\n //{ event: 'mousedown mousemove mouseup', class: 'MouseEvent' },\n ].forEach(obj =>\n obj.event.split(' ').forEach(event => {\n fdoc.addEventListener(event, e =>\n doc.dispatchEvent(createCustomEvent(e, obj.class))\n );\n })\n );\n }\n },\n\n /**\n * Get the offset of the element\n * @param {HTMLElement} el\n * @return {Object}\n */\n offset(el) {\n var rect = el.getBoundingClientRect();\n var docBody = el.ownerDocument.body;\n return {\n top: rect.top + docBody.scrollTop,\n left: rect.left + docBody.scrollLeft,\n width: rect.width,\n height: rect.height\n };\n },\n\n /**\n * Cleare cached offsets\n * @private\n */\n clearOff() {\n this.frmOff = null;\n this.cvsOff = null;\n },\n\n /**\n * Return frame offset\n * @return {Object}\n * @private\n */\n getFrameOffset(force = 0) {\n if (!this.frmOff || force) this.frmOff = this.offset(this.frame.el);\n return this.frmOff;\n },\n\n /**\n * Return canvas offset\n * @return {Object}\n * @private\n */\n getCanvasOffset() {\n if (!this.cvsOff) this.cvsOff = this.offset(this.el);\n return this.cvsOff;\n },\n\n /**\n * Returns element's data info\n * @param {HTMLElement} el\n * @return {Object}\n * @private\n */\n getElementPos(el, opts) {\n var opt = opts || {};\n var frmOff = this.getFrameOffset();\n var cvsOff = this.getCanvasOffset();\n var eo = this.offset(el);\n\n var frmTop = opt.avoidFrameOffset ? 0 : frmOff.top;\n var frmLeft = opt.avoidFrameOffset ? 0 : frmOff.left;\n\n const top = eo.top + frmTop - cvsOff.top;\n const left = eo.left + frmLeft - cvsOff.left;\n // clientHeight/clientWidth are for SVGs\n const height = el.offsetHeight || el.clientHeight;\n const width = el.offsetWidth || el.clientWidth;\n\n return { top, left, height, width };\n },\n\n /**\n * Returns position data of the canvas element\n * @return {Object} obj Position object\n * @private\n */\n getPosition() {\n const doc = this.frame.el.contentDocument;\n if (!doc) return;\n const bEl = doc.body;\n const fo = this.getFrameOffset();\n const co = this.getCanvasOffset();\n return {\n top: fo.top + bEl.scrollTop - co.top,\n left: fo.left + bEl.scrollLeft - co.left\n };\n },\n\n /**\n * Update javascript of a specific component passed by its View\n * @param {View} view Component's View\n * @private\n */\n updateScript(view) {\n if (!view.scriptContainer) {\n view.scriptContainer = $('
');\n this.getJsContainer().appendChild(view.scriptContainer.get(0));\n }\n\n const model = view.model;\n const id = model.getId();\n view.el.id = id;\n view.scriptContainer.html('');\n // In editor, I make use of setTimeout as during the append process of elements\n // those will not be available immediatly, therefore 'item' variable\n const script = document.createElement('script');\n script.innerHTML = `\n setTimeout(function() {\n var item = document.getElementById('${id}');\n if (!item) return;\n (function(){\n ${model.getScriptString()};\n }.bind(item))()\n }, 1);`;\n // #873\n // Adding setTimeout will make js components work on init of the editor\n setTimeout(() => view.scriptContainer.get(0).appendChild(script), 0);\n },\n\n /**\n * Get javascript container\n * @private\n */\n getJsContainer() {\n if (!this.jsContainer) {\n this.jsContainer = $(`
`).get(0);\n }\n return this.jsContainer;\n },\n\n render() {\n this.wrapper = this.model.get('wrapper');\n\n if (this.wrapper && typeof this.wrapper.render == 'function') {\n this.model.get('frame').set('wrapper', this.wrapper);\n this.$el.append(this.frame.render().el);\n var frame = this.frame;\n if (this.config.scripts.length === 0) {\n frame.el.onload = this.renderBody;\n } else {\n this.renderScripts(); // will call renderBody later\n }\n }\n var ppfx = this.ppfx;\n this.$el.append(`\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n `);\n const el = this.el;\n const toolsEl = el.querySelector(`#${ppfx}tools`);\n this.hlEl = el.querySelector(`.${ppfx}highlighter`);\n this.badgeEl = el.querySelector(`.${ppfx}badge`);\n this.placerEl = el.querySelector(`.${ppfx}placeholder`);\n this.ghostEl = el.querySelector(`.${ppfx}ghost`);\n this.toolbarEl = el.querySelector(`.${ppfx}toolbar`);\n this.resizerEl = el.querySelector(`.${ppfx}resizer`);\n this.offsetEl = el.querySelector(`.${ppfx}offset-v`);\n this.fixedOffsetEl = el.querySelector(`.${ppfx}offset-fixed-v`);\n this.toolsEl = toolsEl;\n this.el.className = this.className;\n return this;\n }\n});\n","import Backbone from 'backbone';\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n wrapper: '',\n width: '',\n height: '',\n attributes: {}\n }\n});\n","import Backbone from 'backbone';\nvar Frame = require('./Frame');\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n frame: '',\n wrapper: '',\n rulers: false\n },\n\n initialize(config) {\n var conf = this.conf || {};\n this.set('frame', new Frame(conf.frame));\n }\n});\n","module.exports = {\n stylePrefix: 'cv-',\n\n // Coming soon\n rulers: false,\n\n /*\n * Append external scripts in head of the iframe before renderBody content\n * In this case, you have to add them manually later in the final HTML page\n * @example\n * scripts: [\n * 'https://...',\n * ]\n */\n scripts: [],\n\n /*\n * Append external styles. This styles won't be added to the final HTML/CSS\n * @example\n * styles: [\n * 'https://...',\n * ]\n */\n styles: [],\n\n /**\n * Add custom badge naming strategy\n * @example\n * customBadgeLabel: function(ComponentModel) {\n * return ComponentModel.getName();\n * }\n */\n customBadgeLabel: ''\n};\n","/*\n This class makes the canvas droppable\n */\n\nimport { on } from 'utils/mixins';\nimport { bindAll, indexOf } from 'underscore';\n\nexport default class Droppable {\n constructor(em) {\n this.em = em;\n const el = em\n .get('DomComponents')\n .getWrapper()\n .getEl();\n this.el = el;\n this.counter = 0;\n bindAll(\n this,\n 'handleDragEnter',\n 'handleDragOver',\n 'handleDrop',\n 'handleDragLeave'\n );\n on(el, 'dragenter', this.handleDragEnter);\n on(el, 'dragover', this.handleDragOver);\n on(el, 'drop', this.handleDrop);\n on(el, 'dragleave', this.handleDragLeave);\n\n return this;\n }\n\n endDrop(cancel, ev) {\n const em = this.em;\n this.counter = 0;\n this.over = 0;\n // force out like in BlockView\n const sorter = this.sorter;\n cancel && (sorter.moved = 0);\n sorter.endMove();\n em.trigger('canvas:dragend', ev);\n }\n\n handleDragLeave(ev) {\n this.updateCounter(-1, ev);\n }\n\n updateCounter(value, ev) {\n this.counter += value;\n this.counter === 0 && this.endDrop(1, ev);\n }\n\n handleDragEnter(ev) {\n const em = this.em;\n const dt = ev.dataTransfer;\n this.updateCounter(1, ev);\n if (this.over) return;\n this.over = 1;\n const utils = em.get('Utils');\n const canvas = em.get('Canvas');\n this.sorter = new utils.Sorter({\n em,\n wmargin: 1,\n nested: 1,\n canvasRelative: 1,\n direction: 'a',\n container: canvas.getBody(),\n placer: canvas.getPlacerEl(),\n eventMoving: 'mousemove dragover',\n containerSel: '*',\n itemSel: '*',\n pfx: 'gjs-',\n onStart: () => em.stopDefault(),\n onEndMove: model => {\n em.runDefault();\n em.set('dragResult', model);\n model && em.trigger('canvas:drop', dt, model);\n },\n document: canvas.getFrameEl().contentDocument\n });\n // For security reason I can't read the drag data on dragenter, but\n // as I need it for the Sorter context I will use `dragContent` or just\n // any not empty element\n const content = em.get('dragContent') || '
';\n this.sorter.setDropContent(content);\n this.sorter.startSort();\n em.trigger('canvas:dragenter', dt, content);\n }\n\n /**\n * Always need to have this handler active for enabling the drop\n * @param {Event} ev\n */\n handleDragOver(ev) {\n ev.preventDefault();\n this.em.trigger('canvas:dragover', ev);\n }\n\n handleDrop(ev) {\n ev.preventDefault();\n const dt = ev.dataTransfer;\n const content = this.getContentByData(dt).content;\n ev.target.style.border = '';\n\n if (content) {\n this.sorter.setDropContent(content);\n } else {\n this.sorter.moved = 0;\n }\n\n this.endDrop(0, ev);\n }\n\n getContentByData(dataTransfer) {\n const em = this.em;\n const types = dataTransfer.types;\n const files = dataTransfer.files;\n const dragContent = em.get('dragContent');\n let content = dataTransfer.getData('text');\n\n if (files.length) {\n content = [];\n for (let i = 0; i < files.length; i++) {\n const file = files[i];\n const type = file.type.split('/')[0];\n\n if (type == 'image') {\n content.push({\n type,\n file,\n attributes: { alt: file.name }\n });\n }\n }\n } else if (dragContent) {\n content = dragContent;\n } else if (indexOf(types, 'text/html') >= 0) {\n content = dataTransfer\n .getData('text/html')\n .replace(/<\\/?meta[^>]*>/g, '');\n } else if (indexOf(types, 'text/uri-list') >= 0) {\n content = {\n type: 'link',\n attributes: { href: content },\n content: content\n };\n } else if (indexOf(types, 'text/json') >= 0) {\n const json = dataTransfer.getData('text/json');\n json && (content = JSON.parse(json));\n }\n\n const result = { content };\n em.trigger('canvas:dragdata', dataTransfer, result);\n\n return result;\n }\n}\n","import { on, off, hasDnd, getElement } from 'utils/mixins';\nimport Droppable from 'utils/Droppable';\n\nmodule.exports = () => {\n var c = {},\n defaults = require('./config/config'),\n Canvas = require('./model/Canvas'),\n CanvasView = require('./view/CanvasView');\n var canvas;\n var frameRect;\n\n return {\n /**\n * Used inside RTE\n * @private\n */\n getCanvasView() {\n return CanvasView;\n },\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Canvas',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n canvas = new Canvas(config);\n CanvasView = new CanvasView({\n model: canvas,\n config: c\n });\n\n var cm = c.em.get('DomComponents');\n if (cm) this.setWrapper(cm);\n\n this.startAutoscroll = this.startAutoscroll.bind(this);\n this.stopAutoscroll = this.stopAutoscroll.bind(this);\n this.autoscroll = this.autoscroll.bind(this);\n return this;\n },\n\n /**\n * Return config object\n * @return {Object}\n */\n getConfig() {\n return c;\n },\n\n /**\n * Add wrapper\n * @param\t{Object}\twrp Wrapper\n *\n * */\n setWrapper(wrp) {\n canvas.set('wrapper', wrp);\n },\n\n /**\n * Returns canvas element\n * @return {HTMLElement}\n */\n getElement() {\n return CanvasView.el;\n },\n\n /**\n * Returns frame element of the canvas\n * @return {HTMLElement}\n */\n getFrameEl() {\n return CanvasView.frame.el;\n },\n\n /**\n * Returns the frame document\n * @return {HTMLElement}\n */\n getDocument() {\n return this.getFrameEl().contentDocument;\n },\n\n /**\n * Returns the frame's window\n * @return {HTMLElement}\n */\n getWindow() {\n return this.getFrameEl().contentWindow;\n },\n\n /**\n * Returns body element of the frame\n * @return {HTMLElement}\n */\n getBody() {\n return CanvasView.frame.el.contentDocument.body;\n },\n\n /**\n * Returns body wrapper element of the frame\n * @return {HTMLElement}\n */\n getWrapperEl() {\n return this.getBody().querySelector('#wrapper');\n },\n\n /**\n * Returns element containing all canvas tools\n * @return {HTMLElement}\n */\n getToolsEl() {\n return CanvasView.toolsEl;\n },\n\n /**\n * Returns highlighter element\n * @return {HTMLElement}\n */\n getHighlighter() {\n return CanvasView.hlEl;\n },\n\n /**\n * Returns badge element\n * @return {HTMLElement}\n */\n getBadgeEl() {\n return CanvasView.badgeEl;\n },\n\n /**\n * Returns placer element\n * @return {HTMLElement}\n */\n getPlacerEl() {\n return CanvasView.placerEl;\n },\n\n /**\n * Returns ghost element\n * @return {HTMLElement}\n * @private\n */\n getGhostEl() {\n return CanvasView.ghostEl;\n },\n\n /**\n * Returns toolbar element\n * @return {HTMLElement}\n */\n getToolbarEl() {\n return CanvasView.toolbarEl;\n },\n\n /**\n * Returns resizer element\n * @return {HTMLElement}\n */\n getResizerEl() {\n return CanvasView.resizerEl;\n },\n\n /**\n * Returns offset viewer element\n * @return {HTMLElement}\n */\n getOffsetViewerEl() {\n return CanvasView.offsetEl;\n },\n\n /**\n * Returns fixed offset viewer element\n * @return {HTMLElement}\n */\n getFixedOffsetViewerEl() {\n return CanvasView.fixedOffsetEl;\n },\n\n /**\n * Render canvas\n * */\n render() {\n return CanvasView.render().el;\n },\n\n /**\n * Get frame position\n * @return {Object}\n * @private\n */\n getOffset() {\n var frameOff = this.offset(this.getFrameEl());\n var canvasOff = this.offset(this.getElement());\n return {\n top: frameOff.top - canvasOff.top,\n left: frameOff.left - canvasOff.left\n };\n },\n\n /**\n * Get the offset of the element\n * @param {HTMLElement} el\n * @return {Object}\n * @private\n */\n offset(el) {\n return CanvasView.offset(el);\n },\n\n /**\n * Set custom badge naming strategy\n * @param {Function} f\n * @example\n * canvas.setCustomBadgeLabel(function(model){\n * return ComponentModel.getName();\n * });\n */\n setCustomBadgeLabel(f) {\n c.customBadgeLabel = f;\n },\n\n /**\n * Get element position relative to the canvas\n * @param {HTMLElement} el\n * @return {Object}\n */\n getElementPos(el, opts) {\n return CanvasView.getElementPos(el, opts);\n },\n\n /**\n * This method comes handy when you need to attach something like toolbars\n * to elements inside the canvas, dealing with all relative position,\n * offsets, etc. and returning as result the object with positions which are\n * viewable by the user (when the canvas is scrolled the top edge of the element\n * is not viewable by the user anymore so the new top edge is the one of the canvas)\n *\n * The target should be visible before being passed here as invisible elements\n * return empty string as width\n * @param {HTMLElement} target The target in this case could be the toolbar\n * @param {HTMLElement} element The element on which I'd attach the toolbar\n * @param {Object} options Custom options\n * @param {Boolean} options.toRight Set to true if you want the toolbar attached to the right\n * @return {Object}\n */\n getTargetToElementDim(target, element, options) {\n var opts = options || {};\n var canvasPos = CanvasView.getPosition();\n if (!canvasPos) return;\n var pos = opts.elPos || CanvasView.getElementPos(element);\n var toRight = options.toRight || 0;\n var targetHeight = opts.targetHeight || target.offsetHeight;\n var targetWidth = opts.targetWidth || target.offsetWidth;\n var eventToTrigger = opts.event || null;\n\n var elTop = pos.top - targetHeight;\n var elLeft = pos.left;\n elLeft += toRight ? pos.width : 0;\n elLeft = toRight ? elLeft - targetWidth : elLeft;\n\n var leftPos = elLeft < canvasPos.left ? canvasPos.left : elLeft;\n var topPos = elTop < canvasPos.top ? canvasPos.top : elTop;\n topPos = topPos > pos.top + pos.height ? pos.top + pos.height : topPos;\n\n var result = {\n top: topPos,\n left: leftPos,\n elementTop: pos.top,\n elementLeft: pos.left,\n elementWidth: pos.width,\n elementHeight: pos.height,\n targetWidth: target.offsetWidth,\n targetHeight: target.offsetHeight,\n canvasTop: canvasPos.top,\n canvasLeft: canvasPos.left\n };\n\n // In this way I can catch data and also change the position strategy\n if (eventToTrigger && c.em) {\n c.em.trigger(eventToTrigger, result);\n }\n\n return result;\n },\n\n /**\n * Instead of simply returning e.clientX and e.clientY this function\n * calculates also the offset based on the canvas. This is helpful when you\n * need to get X and Y position while moving between the editor area and\n * canvas area, which is in the iframe\n * @param {Event} e\n * @return {Object}\n */\n getMouseRelativePos(e, options) {\n var opts = options || {};\n var addTop = 0;\n var addLeft = 0;\n var subWinOffset = opts.subWinOffset;\n var doc = e.target.ownerDocument;\n var win = doc.defaultView || doc.parentWindow;\n var frame = win.frameElement;\n var yOffset = subWinOffset ? win.pageYOffset : 0;\n var xOffset = subWinOffset ? win.pageXOffset : 0;\n\n if (frame) {\n var frameRect = frame.getBoundingClientRect();\n addTop = frameRect.top || 0;\n addLeft = frameRect.left || 0;\n }\n\n return {\n y: e.clientY + addTop - yOffset,\n x: e.clientX + addLeft - xOffset\n };\n },\n\n /**\n * X and Y mouse position relative to the canvas\n * @param {Event} e\n * @return {Object}\n */\n getMouseRelativeCanvas(e, options) {\n var opts = options || {};\n var frame = this.getFrameEl();\n var body = this.getBody();\n var addTop = frame.offsetTop || 0;\n var addLeft = frame.offsetLeft || 0;\n var yOffset = body.scrollTop || 0;\n var xOffset = body.scrollLeft || 0;\n\n return {\n y: e.clientY + addTop + yOffset,\n x: e.clientX + addLeft + xOffset\n };\n },\n\n /**\n * Check if the canvas is focused\n * @return {Boolean}\n */\n hasFocus() {\n return this.getDocument().hasFocus();\n },\n\n /**\n * Detects if some input is focused (input elements, text components, etc.)\n * Used internally, for example, to avoid undo/redo in text editing mode\n * @return {Boolean}\n */\n isInputFocused() {\n return this.getFrameEl().contentDocument.activeElement.tagName !== 'BODY';\n },\n\n /**\n * Scroll canvas to the element if it's not visible. The scrolling is\n * executed via `scrollIntoView` API and options of this method are\n * passed to it. For instance, you can scroll smoothly with\n * `{ behavior: 'smooth' }`. You can also force the scroll\n * @param {HTMLElement|Component} el\n * @param {Object} [opts={}] Options, same as options for `scrollIntoView`\n * @example\n * const selected = editor.getSelected();\n * // Scroll smoothly (this behavior can be polyfilled)\n * cv.scrollTo(selected, { behavior: 'smooth' });\n * // Force the scroll, even if the element is alredy visible\n * cv.scrollTo(selected, { force: true });\n */\n scrollTo(el, opts = {}) {\n const elem = getElement(el);\n const cv = this.getCanvasView();\n\n if (!cv.isElInViewport(elem) || opts.force) {\n elem.scrollIntoView(opts);\n }\n },\n\n /**\n * Start autoscroll\n */\n startAutoscroll() {\n this.dragging = 1;\n let toListen = this.getScrollListeners();\n frameRect = CanvasView.getFrameOffset(1);\n\n // By detaching those from the stack avoid browsers lags\n // Noticeable with \"fast\" drag of blocks\n setTimeout(() => {\n on(toListen, 'mousemove', this.autoscroll);\n on(toListen, 'mouseup', this.stopAutoscroll);\n }, 0);\n },\n\n autoscroll(e) {\n e.preventDefault();\n if (this.dragging) {\n let frameWindow = this.getFrameEl().contentWindow;\n let actualTop = frameWindow.document.body.scrollTop;\n let nextTop = actualTop;\n let clientY = e.clientY;\n let limitTop = 50;\n let limitBottom = frameRect.height - limitTop;\n\n if (clientY < limitTop) {\n nextTop -= limitTop - clientY;\n }\n\n if (clientY > limitBottom) {\n nextTop += clientY - limitBottom;\n }\n\n //console.log(`actualTop: ${actualTop} clientY: ${clientY} nextTop: ${nextTop} frameHeigh: ${frameRect.height}`);\n frameWindow.scrollTo(0, nextTop);\n }\n },\n\n /**\n * Stop autoscroll\n */\n stopAutoscroll() {\n this.dragging = 0;\n let toListen = this.getScrollListeners();\n off(toListen, 'mousemove', this.autoscroll);\n off(toListen, 'mouseup', this.stopAutoscroll);\n },\n\n getScrollListeners() {\n return [this.getFrameEl().contentWindow, this.getElement()];\n },\n\n postRender() {\n if (hasDnd(c.em)) this.droppable = new Droppable(c.em);\n },\n\n /**\n * Returns wrapper element\n * @return {HTMLElement}\n * ????\n */\n getFrameWrapperEl() {\n return CanvasView.frame.getWrapper();\n }\n };\n};\n","const ItemView = require('./ItemView');\n\nmodule.exports = require('backbone').View.extend({\n initialize(o = {}) {\n this.opt = o;\n const config = o.config || {};\n this.level = o.level;\n this.config = config;\n this.preview = o.preview;\n this.ppfx = config.pStylePrefix || '';\n this.pfx = config.stylePrefix || '';\n this.parent = o.parent;\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const parent = this.parent;\n const coll = this.collection;\n this.listenTo(coll, 'add', this.addTo);\n this.listenTo(coll, 'reset resetNavigator', this.render);\n this.listenTo(coll, 'remove', this.removeChildren);\n this.className = `${pfx}layers`;\n const em = config.em;\n\n if (config.sortable && !this.opt.sorter) {\n const utils = em.get('Utils');\n this.opt.sorter = new utils.Sorter({\n container: config.sortContainer || this.el,\n containerSel: `.${this.className}`,\n itemSel: `.${pfx}layer`,\n ignoreViewChildren: 1,\n onEndMove(created, sorter) {\n const srcModel = sorter.getSourceModel();\n em.setSelected(srcModel, { forceChange: 1 });\n },\n avoidSelectOnEnd: 1,\n nested: 1,\n ppfx,\n pfx\n });\n }\n\n this.sorter = this.opt.sorter || '';\n\n // For the sorter\n this.$el.data('collection', coll);\n parent && this.$el.data('model', parent);\n },\n\n removeChildren(removed) {\n const view = removed.viewLayer;\n if (!view) return;\n view.remove.apply(view);\n },\n\n /**\n * Add to collection\n * @param Object Model\n *\n * @return Object\n * */\n addTo(model) {\n var i = this.collection.indexOf(model);\n this.addToCollection(model, null, i);\n },\n\n /**\n * Add new object to collection\n * @param Object Model\n * @param Object Fragment collection\n * @param integer Index of append\n *\n * @return Object Object created\n * */\n addToCollection(model, fragmentEl, index) {\n const level = this.level;\n var fragment = fragmentEl || null;\n var viewObject = ItemView;\n\n if (!this.isCountable(model, this.config.hideTextnode)) {\n return;\n }\n\n var view = new viewObject({\n level,\n model,\n config: this.config,\n sorter: this.sorter,\n isCountable: this.isCountable,\n opened: this.opt.opened\n });\n var rendered = view.render().el;\n\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n if (typeof index != 'undefined') {\n var method = 'before';\n // If the added model is the last of collection\n // need to change the logic of append\n if (this.$el.children().length == index) {\n index--;\n method = 'after';\n }\n // In case the added is new in the collection index will be -1\n if (index < 0) {\n this.$el.append(rendered);\n } else\n this.$el\n .children()\n .eq(index)\n [method](rendered);\n } else this.$el.append(rendered);\n }\n\n return rendered;\n },\n\n /**\n * Check if the model could be count by the navigator\n * @param {Object} model\n * @return {Boolean}\n * @private\n */\n isCountable(model, hide) {\n var type = model.get('type');\n var tag = model.get('tagName');\n if (\n ((type == 'textnode' || tag == 'br') && hide) ||\n !model.get('layerable')\n ) {\n return false;\n }\n return true;\n },\n\n render() {\n const frag = document.createDocumentFragment();\n const el = this.el;\n el.innerHTML = '';\n this.collection.each(model => this.addToCollection(model, frag));\n el.appendChild(frag);\n el.className = this.className;\n return this;\n }\n});\n","module.exports = {\n stylePrefix: '',\n\n // Specify the element to use as a container, string (query) or HTMLElement\n // With the empty value, nothing will be rendered\n appendTo: '',\n\n // Enable/Disable globally the possibility to sort layers\n sortable: 1,\n\n // Enable/Disable globally the possibility to hide layers\n hidable: 1,\n\n // Hide textnodes\n hideTextnode: 1,\n\n // Indicate a query string of the element to be selected as the root of layers.\n // By default the root is the wrapper\n root: '',\n\n // Indicates if the wrapper is visible in layers\n showWrapper: 1,\n\n // Show hovered components in canvas\n showHover: 1,\n\n // Scroll to selected component in Canvas when it's selected in Layers\n // true, false or `scrollIntoView`-like options\n scrollCanvas: { behavior: 'smooth' },\n\n // Scroll to selected component in Layers when it's selected in Canvas\n // true, false or `scrollIntoView`-like options\n scrollLayers: 1,\n\n // Highlight when a layer component is hovered\n highlightHover: 1\n};\n","module.exports = require('backbone').View.extend({});\n","const Component = require('./Component');\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n droppable: false,\n editable: true\n },\n\n toHTML() {\n return this.get('content');\n }\n },\n {\n isComponent(el) {\n var result = '';\n if (el.nodeType === 3) {\n result = {\n type: 'textnode',\n content: el.textContent\n };\n }\n return result;\n }\n }\n);\n","const ComponentView = require('./ComponentView');\n\nmodule.exports = ComponentView.extend({\n _createElement: function(tagName) {\n return document.createElementNS('http://www.w3.org/2000/svg', tagName);\n }\n});\n","const Component = require('./Component');\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n highlightable: 0\n },\n\n getName() {\n let name = this.get('tagName');\n let customName = this.get('custom-name');\n name = name.charAt(0).toUpperCase() + name.slice(1);\n return customName || name;\n }\n },\n {\n isComponent(el) {\n if (SVGElement && el instanceof SVGElement) {\n // Some SVG elements require uppercase letters (eg. )\n const tagName = el.tagName;\n // Make the root resizable\n const resizable = tagName == 'svg' ? true : false;\n\n return {\n tagName,\n type: 'svg',\n resizable\n };\n }\n }\n }\n);\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentImageView');\n\nmodule.exports = ComponentView.extend({\n tagName: 'script',\n\n events: {},\n\n render() {\n var model = this.model;\n var src = model.get('src');\n var em = this.em;\n var scriptCount = em && em.get('scriptCount') ? em.get('scriptCount') : 0;\n var content = '';\n\n // If it's an external script\n if (src) {\n var onload = model.get('onload');\n var svar = 'script' + scriptCount;\n var svarNext = 'script' + (scriptCount + 1);\n content =\n 'var ' +\n svar +\n \" = document.createElement('script');\\n\" +\n svar +\n '.onload = function(){\\n' +\n (onload ? onload + '();\\n' : '') +\n 'typeof ' +\n svarNext +\n \"Start == 'function' && \" +\n svarNext +\n 'Start();\\n' +\n '};\\n' +\n svar +\n \".src = '\" +\n src +\n \"';\\n\" +\n 'function ' +\n svar +\n 'Start() { document.body.appendChild(' +\n svar +\n '); };\\n' +\n (!scriptCount ? svar + 'Start();' : '');\n if (em) {\n em.set('scriptCount', scriptCount + 1);\n }\n } else {\n content = model.get('content');\n }\n\n this.el.innerHTML = content;\n return this;\n }\n});\n","const Component = require('./Component');\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n type: 'script',\n droppable: false,\n draggable: false,\n layerable: false\n }\n },\n {\n isComponent(el) {\n if (el.tagName == 'SCRIPT') {\n var result = { type: 'script' };\n\n if (el.src) {\n result.src = el.src;\n result.onload = el.onload;\n }\n\n return result;\n }\n }\n }\n);\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentImageView');\nvar OComponentView = require('./ComponentView');\n\nmodule.exports = ComponentView.extend({\n tagName: 'div',\n\n events: {},\n\n initialize(o) {\n OComponentView.prototype.initialize.apply(this, arguments);\n this.listenTo(this.model, 'change:src', this.updateSrc);\n this.listenTo(\n this.model,\n 'change:loop change:autoplay change:controls change:color change:rel change:modestbranding',\n this.updateVideo\n );\n this.listenTo(this.model, 'change:provider', this.updateProvider);\n },\n\n /**\n * Rerender on update of the provider\n * @private\n */\n updateProvider() {\n var prov = this.model.get('provider');\n this.el.innerHTML = '';\n this.el.appendChild(this.renderByProvider(prov));\n },\n\n /**\n * Update the source of the video\n * @private\n */\n updateSrc() {\n var prov = this.model.get('provider');\n var src = this.model.get('src');\n switch (prov) {\n case 'yt':\n src = this.model.getYoutubeSrc();\n break;\n case 'ytnc':\n src = this.model.getYoutubeNoCookieSrc();\n break;\n case 'vi':\n src = this.model.getVimeoSrc();\n break;\n }\n this.videoEl.src = src;\n },\n\n /**\n * Update video parameters\n * @private\n */\n updateVideo() {\n var prov = this.model.get('provider');\n var videoEl = this.videoEl;\n var md = this.model;\n switch (prov) {\n case 'yt':\n case 'ytnc':\n case 'vi':\n this.model.trigger('change:videoId');\n break;\n default:\n videoEl.loop = md.get('loop');\n videoEl.autoplay = md.get('autoplay');\n videoEl.controls = md.get('controls');\n }\n },\n\n renderByProvider(prov) {\n var videoEl;\n switch (prov) {\n case 'yt':\n videoEl = this.renderYoutube();\n break;\n case 'ytnc':\n videoEl = this.renderYoutubeNoCookie();\n break;\n case 'vi':\n videoEl = this.renderVimeo();\n break;\n default:\n videoEl = this.renderSource();\n }\n this.videoEl = videoEl;\n return videoEl;\n },\n\n renderSource() {\n var el = document.createElement('video');\n el.src = this.model.get('src');\n this.initVideoEl(el);\n return el;\n },\n\n renderYoutube() {\n var el = document.createElement('iframe');\n el.src = this.model.getYoutubeSrc();\n el.frameBorder = 0;\n el.setAttribute('allowfullscreen', true);\n this.initVideoEl(el);\n return el;\n },\n\n renderYoutubeNoCookie() {\n var el = document.createElement('iframe');\n el.src = this.model.getYoutubeNoCookieSrc();\n el.frameBorder = 0;\n el.setAttribute('allowfullscreen', true);\n this.initVideoEl(el);\n return el;\n },\n\n renderVimeo() {\n var el = document.createElement('iframe');\n el.src = this.model.getVimeoSrc();\n el.frameBorder = 0;\n el.setAttribute('allowfullscreen', true);\n this.initVideoEl(el);\n return el;\n },\n\n initVideoEl(el) {\n el.className = this.ppfx + 'no-pointer';\n el.style.height = '100%';\n el.style.width = '100%';\n },\n\n render(...args) {\n ComponentView.prototype.render.apply(this, args);\n this.updateClasses();\n var prov = this.model.get('provider');\n this.el.appendChild(this.renderByProvider(prov));\n return this;\n }\n});\n","const Component = require('./ComponentImage');\nconst OComponent = require('./Component');\nconst yt = 'yt';\nconst vi = 'vi';\nconst ytnc = 'ytnc';\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n type: 'video',\n tagName: 'video',\n videoId: '',\n void: 0,\n provider: '', // on change of provider, traits are switched\n ytUrl: 'https://www.youtube.com/embed/',\n ytncUrl: 'https://www.youtube-nocookie.com/embed/',\n viUrl: 'https://player.vimeo.com/video/',\n loop: 0,\n muted: 0,\n autoplay: 0,\n controls: 1,\n color: '',\n rel: 1, // YT related videos\n modestbranding: 0, // YT modest branding\n sources: [],\n attributes: { allowfullscreen: 'allowfullscreen' },\n toolbar: OComponent.prototype.defaults.toolbar\n },\n\n initialize(o, opt) {\n var traits = [];\n var prov = this.get('provider');\n switch (prov) {\n case yt:\n case ytnc:\n traits = this.getYoutubeTraits();\n break;\n case vi:\n traits = this.getVimeoTraits();\n break;\n default:\n traits = this.getSourceTraits();\n }\n if (this.get('src')) this.parseFromSrc();\n this.set('traits', traits);\n Component.prototype.initialize.apply(this, arguments);\n this.listenTo(this, 'change:provider', this.updateTraits);\n this.listenTo(this, 'change:videoId change:provider', this.updateSrc);\n },\n\n initToolbar(...args) {\n OComponent.prototype.initToolbar.apply(this, args);\n },\n\n /**\n * Set attributes by src string\n */\n parseFromSrc() {\n var prov = this.get('provider');\n var uri = this.parseUri(this.get('src'));\n var qr = uri.query;\n switch (prov) {\n case yt:\n case ytnc:\n case vi:\n var videoId = uri.pathname.split('/').pop();\n this.set('videoId', videoId);\n if (qr.autoplay) this.set('autoplay', 1);\n if (qr.loop) this.set('loop', 1);\n if (parseInt(qr.controls) === 0) this.set('controls', 0);\n if (qr.color) this.set('color', qr.color);\n if (qr.rel === '0') this.set('rel', 0);\n if (qr.modestbranding === '1') this.set('modestbranding', 1);\n break;\n default:\n }\n },\n\n /**\n * Update src on change of video ID\n * @private\n */\n updateSrc() {\n var prov = this.get('provider');\n switch (prov) {\n case yt:\n this.set('src', this.getYoutubeSrc());\n break;\n case ytnc:\n this.set('src', this.getYoutubeNoCookieSrc());\n break;\n case vi:\n this.set('src', this.getVimeoSrc());\n break;\n }\n },\n\n /**\n * Returns object of attributes for HTML\n * @return {Object}\n * @private\n */\n getAttrToHTML(...args) {\n var attr = Component.prototype.getAttrToHTML.apply(this, args);\n var prov = this.get('provider');\n switch (prov) {\n case yt:\n case ytnc:\n case vi:\n break;\n default:\n if (this.get('loop')) attr.loop = 'loop';\n if (this.get('autoplay')) attr.autoplay = 'autoplay';\n if (this.get('controls')) attr.controls = 'controls';\n }\n return attr;\n },\n\n /**\n * Update traits by provider\n * @private\n */\n updateTraits() {\n var prov = this.get('provider');\n var traits = this.getSourceTraits();\n switch (prov) {\n case yt:\n case ytnc:\n this.set('tagName', 'iframe');\n traits = this.getYoutubeTraits();\n break;\n case vi:\n this.set('tagName', 'iframe');\n traits = this.getVimeoTraits();\n break;\n default:\n this.set('tagName', 'video');\n }\n this.loadTraits(traits);\n this.em.trigger('component:toggled');\n },\n\n // Listen provider change and switch traits, in TraitView listen traits change\n\n /**\n * Return the provider trait\n * @return {Object}\n * @private\n */\n getProviderTrait() {\n return {\n type: 'select',\n label: 'Provider',\n name: 'provider',\n changeProp: 1,\n value: this.get('provider'),\n options: [\n { value: 'so', name: 'HTML5 Source' },\n { value: yt, name: 'Youtube' },\n { value: ytnc, name: 'Youtube (no cookie)' },\n { value: vi, name: 'Vimeo' }\n ]\n };\n },\n\n /**\n * Return traits for the source provider\n * @return {Array}\n * @private\n */\n getSourceTraits() {\n return [\n this.getProviderTrait(),\n {\n label: 'Source',\n name: 'src',\n placeholder: 'eg. ./media/video.mp4',\n changeProp: 1\n },\n this.getAutoplayTrait(),\n this.getLoopTrait(),\n this.getControlsTrait()\n ];\n },\n /**\n * Return traits for the source provider\n * @return {Array}\n * @private\n */\n getYoutubeTraits() {\n return [\n this.getProviderTrait(),\n {\n label: 'Video ID',\n name: 'videoId',\n placeholder: 'eg. jNQXAC9IVRw',\n changeProp: 1\n },\n this.getAutoplayTrait(),\n this.getLoopTrait(),\n this.getControlsTrait(),\n {\n type: 'checkbox',\n label: 'Related',\n name: 'rel',\n changeProp: 1\n },\n {\n type: 'checkbox',\n label: 'Modest',\n name: 'modestbranding',\n changeProp: 1\n }\n ];\n },\n\n /**\n * Return traits for the source provider\n * @return {Array}\n * @private\n */\n getVimeoTraits() {\n return [\n this.getProviderTrait(),\n {\n label: 'Video ID',\n name: 'videoId',\n placeholder: 'eg. 123456789',\n changeProp: 1\n },\n {\n label: 'Color',\n name: 'color',\n placeholder: 'eg. FF0000',\n changeProp: 1\n },\n this.getAutoplayTrait(),\n this.getLoopTrait()\n ];\n },\n\n /**\n * Return object trait\n * @return {Object}\n * @private\n */\n getAutoplayTrait() {\n return {\n type: 'checkbox',\n label: 'Autoplay',\n name: 'autoplay',\n changeProp: 1\n };\n },\n\n /**\n * Return object trait\n * @return {Object}\n * @private\n */\n getLoopTrait() {\n return {\n type: 'checkbox',\n label: 'Loop',\n name: 'loop',\n changeProp: 1\n };\n },\n\n /**\n * Return object trait\n * @return {Object}\n * @private\n */\n getControlsTrait() {\n return {\n type: 'checkbox',\n label: 'Controls',\n name: 'controls',\n changeProp: 1\n };\n },\n\n /**\n * Returns url to youtube video\n * @return {string}\n * @private\n */\n getYoutubeSrc() {\n const id = this.get('videoId');\n let url = this.get('ytUrl');\n url += id + '?';\n url += this.get('autoplay') ? '&autoplay=1' : '';\n url += !this.get('controls') ? '&controls=0&showinfo=0' : '';\n // Loop works only with playlist enabled\n // https://stackoverflow.com/questions/25779966/youtube-iframe-loop-doesnt-work\n url += this.get('loop') ? `&loop=1&playlist=${id}` : '';\n url += this.get('rel') ? '' : '&rel=0';\n url += this.get('modestbranding') ? '&modestbranding=1' : '';\n return url;\n },\n\n /**\n * Returns url to youtube no cookie video\n * @return {string}\n * @private\n */\n getYoutubeNoCookieSrc() {\n let url = this.getYoutubeSrc();\n url = url.replace(this.get('ytUrl'), this.get('ytncUrl'));\n return url;\n },\n\n /**\n * Returns url to vimeo video\n * @return {string}\n * @private\n */\n getVimeoSrc() {\n var url = this.get('viUrl');\n url += this.get('videoId') + '?';\n url += this.get('autoplay') ? '&autoplay=1' : '';\n url += this.get('loop') ? '&loop=1' : '';\n url += !this.get('controls') ? '&title=0&portrait=0&badge=0' : '';\n url += this.get('color') ? '&color=' + this.get('color') : '';\n return url;\n }\n },\n {\n /**\n * Detect if the passed element is a valid component.\n * In case the element is valid an object abstracted\n * from the element will be returned\n * @param {HTMLElement}\n * @return {Object}\n * @private\n */\n isComponent(el) {\n var result = '';\n var isYtProv = /youtube\\.com\\/embed/.test(el.src);\n var isYtncProv = /youtube-nocookie\\.com\\/embed/.test(el.src);\n var isViProv = /player\\.vimeo\\.com\\/video/.test(el.src);\n var isExtProv = isYtProv || isYtncProv || isViProv;\n if (el.tagName == 'VIDEO' || (el.tagName == 'IFRAME' && isExtProv)) {\n result = { type: 'video' };\n if (el.src) result.src = el.src;\n if (isExtProv) {\n if (isYtProv) result.provider = yt;\n else if (isYtncProv) result.provider = ytnc;\n else if (isViProv) result.provider = vi;\n }\n }\n return result;\n }\n }\n);\n","module.exports = require('./ComponentLinkView').extend({});\n","import Component from './ComponentText';\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n tagName: 'label',\n traits: ['id', 'title', 'for']\n }\n },\n {\n isComponent(el) {\n if (el.tagName == 'LABEL') {\n return { type: 'label' };\n }\n }\n }\n);\n","const Component = require('./ComponentText');\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n type: 'link',\n tagName: 'a',\n traits: ['title', 'href', 'target']\n },\n\n /**\n * Returns object of attributes for HTML\n * @return {Object}\n * @private\n */\n getAttrToHTML(...args) {\n const attr = Component.prototype.getAttrToHTML.apply(this, args);\n delete attr.onmousedown;\n return attr;\n }\n },\n {\n isComponent(el) {\n let result;\n let avoidEdit;\n\n if (el.tagName == 'A') {\n result = {\n type: 'link',\n editable: 0\n };\n\n // The link is editable only if, at least, one of its\n // children is a text node (not empty one)\n const children = el.childNodes;\n const len = children.length;\n if (!len) delete result.editable;\n\n for (let i = 0; i < len; i++) {\n const child = children[i];\n\n if (child.nodeType == 3 && child.textContent.trim() != '') {\n delete result.editable;\n break;\n }\n }\n }\n\n return result;\n }\n }\n);\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentImageView');\n\nmodule.exports = ComponentView.extend({\n tagName: 'div',\n\n events: {},\n\n initialize(o) {\n ComponentView.prototype.initialize.apply(this, arguments);\n this.classEmpty = this.ppfx + 'plh-map';\n },\n\n /**\n * Update the map on the canvas\n * @private\n */\n updateSrc() {\n this.getIframe().src = this.model.get('src');\n },\n\n getIframe() {\n if (!this.iframe) {\n var ifrm = document.createElement('iframe');\n ifrm.src = this.model.get('src');\n ifrm.frameBorder = 0;\n ifrm.style.height = '100%';\n ifrm.style.width = '100%';\n ifrm.className = this.ppfx + 'no-pointer';\n this.iframe = ifrm;\n }\n return this.iframe;\n },\n\n render(...args) {\n ComponentView.prototype.render.apply(this, args);\n this.updateClasses();\n this.el.appendChild(this.getIframe());\n return this;\n }\n});\n","const Component = require('./ComponentImage');\nconst OComponent = require('./Component');\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n type: 'map',\n void: 0,\n mapUrl: 'https://maps.google.com/maps',\n tagName: 'iframe',\n mapType: 'q',\n address: '',\n zoom: '1',\n attributes: { frameborder: 0 },\n toolbar: OComponent.prototype.defaults.toolbar,\n traits: [\n {\n label: 'Address',\n name: 'address',\n placeholder: 'eg. London, UK',\n changeProp: 1\n },\n {\n type: 'select',\n label: 'Map type',\n name: 'mapType',\n changeProp: 1,\n options: [\n { value: 'q', name: 'Roadmap' },\n { value: 'w', name: 'Satellite' }\n ]\n },\n {\n label: 'Zoom',\n name: 'zoom',\n type: 'range',\n min: '1',\n max: '20',\n changeProp: 1\n }\n ]\n },\n\n initialize(o, opt) {\n if (this.get('src')) this.parseFromSrc();\n else this.updateSrc();\n Component.prototype.initialize.apply(this, arguments);\n this.listenTo(\n this,\n 'change:address change:zoom change:mapType',\n this.updateSrc\n );\n },\n\n updateSrc() {\n this.set('src', this.getMapUrl());\n },\n\n /**\n * Returns url of the map\n * @return {string}\n * @private\n */\n getMapUrl() {\n var md = this;\n var addr = md.get('address');\n var zoom = md.get('zoom');\n var type = md.get('mapType');\n var size = '';\n addr = addr ? '&q=' + addr : '';\n zoom = zoom ? '&z=' + zoom : '';\n type = type ? '&t=' + type : '';\n var result = md.get('mapUrl') + '?' + addr + zoom + type;\n result += '&output=embed';\n return result;\n },\n\n /**\n * Set attributes by src string\n * @private\n */\n parseFromSrc() {\n var uri = this.parseUri(this.get('src'));\n var qr = uri.query;\n if (qr.q) this.set('address', qr.q);\n if (qr.z) this.set('zoom', qr.z);\n if (qr.t) this.set('mapType', qr.t);\n }\n },\n {\n /**\n * Detect if the passed element is a valid component.\n * In case the element is valid an object abstracted\n * from the element will be returned\n * @param {HTMLElement}\n * @return {Object}\n * @private\n */\n isComponent(el) {\n var result = '';\n if (el.tagName == 'IFRAME' && /maps\\.google\\.com/.test(el.src)) {\n result = { type: 'map', src: el.src };\n }\n return result;\n }\n }\n);\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentView');\n\nmodule.exports = ComponentView.extend({});\n","const ComponentTableBody = require('./ComponentTableBody');\n\nmodule.exports = ComponentTableBody.extend(\n {\n defaults: {\n ...ComponentTableBody.prototype.defaults,\n type: 'tfoot',\n tagName: 'tfoot'\n }\n },\n {\n isComponent(el) {\n let result = '';\n\n if (el.tagName == 'TFOOT') {\n result = { type: 'tfoot' };\n }\n\n return result;\n }\n }\n);\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentView');\n\nmodule.exports = ComponentView.extend({});\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentView');\n\nmodule.exports = ComponentView.extend({});\n","const ComponentTableBody = require('./ComponentTableBody');\n\nmodule.exports = ComponentTableBody.extend(\n {\n defaults: {\n ...ComponentTableBody.prototype.defaults,\n type: 'thead',\n tagName: 'thead'\n }\n },\n {\n isComponent(el) {\n let result = '';\n\n if (el.tagName == 'THEAD') {\n result = { type: 'thead' };\n }\n\n return result;\n }\n }\n);\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentView');\n\nmodule.exports = ComponentView.extend({\n events: {}\n});\n","const Component = require('./Component');\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n type: 'table',\n tagName: 'table',\n droppable: ['tbody', 'thead', 'tfoot']\n },\n\n initialize(o, opt) {\n Component.prototype.initialize.apply(this, arguments);\n const components = this.get('components');\n !components.length && components.add({ type: 'tbody' });\n }\n },\n {\n isComponent(el) {\n let result = '';\n\n if (el.tagName == 'TABLE') {\n result = { type: 'table' };\n }\n\n return result;\n }\n }\n);\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentView');\n\nmodule.exports = ComponentView.extend({});\n","const Component = require('./Component');\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n type: 'row',\n tagName: 'tr',\n draggable: ['thead', 'tbody', 'tfoot'],\n droppable: ['th', 'td']\n },\n\n initialize(o, opt) {\n Component.prototype.initialize.apply(this, arguments);\n\n // Clean the row from non cell components\n const cells = [];\n const components = this.get('components');\n components.each(model => model.is('cell') && cells.push(model));\n components.reset(cells);\n }\n },\n {\n isComponent(el) {\n let result = '';\n\n if (el.tagName == 'TR') {\n result = { type: 'row' };\n }\n\n return result;\n }\n }\n);\n","var Backbone = require('backbone');\nvar ComponentView = require('./ComponentView');\n\nmodule.exports = ComponentView.extend({});\n","const Component = require('./Component');\n\nmodule.exports = Component.extend(\n {\n defaults: {\n ...Component.prototype.defaults,\n type: 'cell',\n tagName: 'td',\n draggable: ['tr']\n }\n },\n {\n isComponent(el) {\n let result = '';\n const tag = el.tagName;\n\n if (tag == 'TD' || tag == 'TH') {\n result = {\n type: 'cell',\n tagName: tag.toLowerCase()\n };\n }\n\n return result;\n }\n }\n);\n","module.exports = (config = {}) => ({\n /**\n * Build props object by their name\n * @param {Array|string} props Array of properties name\n * @return {Array}\n */\n build(props) {\n var objs = [];\n\n if (typeof props === 'string') props = [props];\n\n for (var i = 0; i < props.length; i++) {\n var obj = {};\n var prop = props[i];\n obj.name = prop;\n\n // Define type\n switch (prop) {\n case 'target':\n obj.type = 'select';\n break;\n }\n\n // Define placeholder\n switch (prop) {\n case 'title':\n case 'alt':\n case 'id':\n obj.placeholder = config.labelPlhText;\n break;\n case 'href':\n obj.placeholder = config.labelPlhHref;\n break;\n }\n\n // Define options\n switch (prop) {\n case 'target':\n obj.options = config.optionsTarget;\n break;\n }\n\n objs.push(obj);\n }\n\n return objs;\n }\n});\n","import { isUndefined } from 'underscore';\n\nmodule.exports = require('backbone').Model.extend({\n defaults: {\n type: 'text', // text, number, range, select\n label: '',\n name: '',\n min: '',\n max: '',\n unit: '',\n step: 1,\n value: '',\n target: '',\n default: '',\n placeholder: '',\n changeProp: 0,\n options: []\n },\n\n initialize() {\n const target = this.get('target');\n const name = this.get('name');\n const changeProp = this.get('changeProp');\n\n if (target) {\n this.target = target;\n this.unset('target');\n const targetEvent = changeProp\n ? `change:${name}`\n : `change:attributes:${name}`;\n this.listenTo(target, targetEvent, this.targetUpdated);\n }\n },\n\n targetUpdated() {\n const value = this.getTargetValue();\n this.set({ value }, { fromTarget: 1 });\n },\n\n getTargetValue() {\n const name = this.get('name');\n const target = this.target;\n let value;\n\n if (this.get('changeProp')) {\n value = target.get(name);\n } else {\n value = target.getAttributes()[name];\n }\n\n return !isUndefined(value) ? value : '';\n },\n\n setTargetValue(value, opts = {}) {\n const target = this.target;\n const name = this.get('name');\n if (isUndefined(value)) return;\n\n if (this.get('changeProp')) {\n target.set(name, value, opts);\n } else {\n const attrs = { ...target.get('attributes') };\n attrs[name] = value;\n target.set('attributes', attrs, opts);\n }\n },\n\n setValueFromInput(value, final = 1, opts = {}) {\n const toSet = { value };\n this.set(toSet, { ...opts, avoidStore: 1 });\n\n // Have to trigger the change\n if (final) {\n this.set('value', '', opts);\n this.set(toSet, opts);\n }\n },\n\n /**\n * Get the initial value of the trait\n * @return {string}\n */\n getInitValue() {\n const target = this.target;\n const name = this.get('name');\n let value;\n\n if (target) {\n const attrs = target.get('attributes');\n value = this.get('changeProp') ? target.get(name) : attrs[name];\n }\n\n return value || this.get('value') || this.get('default');\n }\n});\n","import { isString, isArray } from 'underscore';\nconst Backbone = require('backbone');\nconst Trait = require('./Trait');\nconst TraitFactory = require('./TraitFactory');\n\nmodule.exports = Backbone.Collection.extend({\n model: Trait,\n\n initialize(coll, options = {}) {\n this.em = options.em || '';\n this.listenTo(this, 'add', this.handleAdd);\n },\n\n handleAdd(model) {\n const target = this.target;\n\n if (target) {\n model.target = target;\n }\n },\n\n setTarget(target) {\n this.target = target;\n },\n\n add(models, opt) {\n const em = this.em;\n\n // Use TraitFactory if necessary\n if (isString(models) || isArray(models)) {\n const tm = em && em.get && em.get('TraitManager');\n const tmOpts = tm && tm.getConfig();\n const tf = TraitFactory(tmOpts);\n\n if (isString(models)) {\n models = [models];\n }\n\n for (var i = 0, len = models.length; i < len; i++) {\n const str = models[i];\n const model = isString(str) ? tf.build(str)[0] : str;\n model.target = this.target;\n models[i] = model;\n }\n }\n\n return Backbone.Collection.prototype.add.apply(this, [models, opt]);\n }\n});\n","module.exports = {\n stylePrefix: 'comp-',\n\n wrapperId: 'wrapper',\n\n wrapperName: 'Body',\n\n // Default wrapper configuration\n wrapper: {\n removable: false,\n copyable: false,\n draggable: false,\n components: [],\n traits: [],\n stylable: [\n 'background',\n 'background-color',\n 'background-image',\n 'background-repeat',\n 'background-attachment',\n 'background-position',\n 'background-size'\n ]\n },\n\n // Could be used for default components\n components: [],\n\n // Class for new image component\n imageCompClass: 'fa fa-picture-o',\n\n // Open assets manager on create of image component\n oAssetsOnCreate: true,\n\n // TODO to remove\n // Editor should also store the wrapper informations, but as this change might\n // break stuff I set ii as an opt-in option, for now.\n storeWrapper: 0,\n\n // List of void elements\n voidElements: [\n 'area',\n 'base',\n 'br',\n 'col',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'keygen',\n 'link',\n 'menuitem',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr'\n ]\n};\n","/**\n * With this module is possible to manage components inside the canvas. You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/dom_components/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * domComponents: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const domComponents = editor.DomComponents;\n * ```\n *\n * * [getWrapper](#getwrapper)\n * * [getComponents](#getcomponents)\n * * [addComponent](#addcomponent)\n * * [clear](#clear)\n * * [load](#load)\n * * [store](#store)\n * * [render](#render)\n *\n * @module DomComponents\n */\n\nimport { isEmpty } from 'underscore';\n\nmodule.exports = () => {\n var c = {};\n let em;\n const defaults = require('./config/config');\n const Component = require('./model/Component');\n const ComponentView = require('./view/ComponentView');\n const Components = require('./model/Components');\n const ComponentsView = require('./view/ComponentsView');\n\n var component, componentView;\n var componentTypes = [\n {\n id: 'cell',\n model: require('./model/ComponentTableCell'),\n view: require('./view/ComponentTableCellView')\n },\n {\n id: 'row',\n model: require('./model/ComponentTableRow'),\n view: require('./view/ComponentTableRowView')\n },\n {\n id: 'table',\n model: require('./model/ComponentTable'),\n view: require('./view/ComponentTableView')\n },\n {\n id: 'thead',\n model: require('./model/ComponentTableHead'),\n view: require('./view/ComponentTableHeadView')\n },\n {\n id: 'tbody',\n model: require('./model/ComponentTableBody'),\n view: require('./view/ComponentTableBodyView')\n },\n {\n id: 'tfoot',\n model: require('./model/ComponentTableFoot'),\n view: require('./view/ComponentTableFootView')\n },\n {\n id: 'map',\n model: require('./model/ComponentMap'),\n view: require('./view/ComponentMapView')\n },\n {\n id: 'link',\n model: require('./model/ComponentLink'),\n view: require('./view/ComponentLinkView')\n },\n {\n id: 'label',\n model: require('./model/ComponentLabel'),\n view: require('./view/ComponentLabelView')\n },\n {\n id: 'video',\n model: require('./model/ComponentVideo'),\n view: require('./view/ComponentVideoView')\n },\n {\n id: 'image',\n model: require('./model/ComponentImage'),\n view: require('./view/ComponentImageView')\n },\n {\n id: 'script',\n model: require('./model/ComponentScript'),\n view: require('./view/ComponentScriptView')\n },\n {\n id: 'svg',\n model: require('./model/ComponentSvg'),\n view: require('./view/ComponentSvgView')\n },\n {\n id: 'textnode',\n model: require('./model/ComponentTextNode'),\n view: require('./view/ComponentTextNodeView')\n },\n {\n id: 'text',\n model: require('./model/ComponentText'),\n view: require('./view/ComponentTextView')\n },\n {\n id: 'default',\n model: Component,\n view: ComponentView\n }\n ];\n\n return {\n Component,\n\n Components,\n\n ComponentsView,\n\n componentTypes,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'DomComponents',\n\n /**\n * Returns config\n * @return {Object} Config object\n * @private\n */\n getConfig() {\n return c;\n },\n\n /**\n * Mandatory for the storage manager\n * @type {String}\n * @private\n */\n storageKey() {\n var keys = [];\n var smc = (c.stm && c.stm.getConfig()) || {};\n if (smc.storeHtml) keys.push('html');\n if (smc.storeComponents) keys.push('components');\n return keys;\n },\n\n /**\n * Initialize module. Called on a new instance of the editor with configurations passed\n * inside 'domComponents' field\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = config || {};\n em = c.em;\n this.em = em;\n\n if (em) {\n c.components = em.config.components || c.components;\n }\n\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n // Load dependencies\n if (em) {\n c.modal = em.get('Modal') || '';\n c.am = em.get('AssetManager') || '';\n em.get('Parser').compTypes = componentTypes;\n em.on('change:componentHovered', this.componentHovered, this);\n\n const selected = em.get('selected');\n em.listenTo(selected, 'add', (sel, c, opts) =>\n this.selectAdd(sel, opts)\n );\n em.listenTo(selected, 'remove', (sel, c, opts) =>\n this.selectRemove(sel, opts)\n );\n }\n\n // Build wrapper\n let components = c.components;\n let wrapper = { ...c.wrapper };\n wrapper['custom-name'] = c.wrapperName;\n wrapper.wrapper = 1;\n\n // Components might be a wrapper\n if (\n components &&\n components.constructor === Object &&\n components.wrapper\n ) {\n wrapper = { ...components };\n components = components.components || [];\n wrapper.components = [];\n\n // Have to put back the real object of components\n if (em) {\n em.config.components = components;\n c.components = components;\n }\n }\n\n component = new Component(wrapper, {\n em,\n config: c,\n componentTypes\n });\n component.set({ attributes: { id: 'wrapper' } });\n\n componentView = new ComponentView({\n model: component,\n config: c,\n componentTypes\n });\n return this;\n },\n\n /**\n * On load callback\n * @private\n */\n onLoad() {\n this.setComponents(c.components);\n },\n\n /**\n * Do stuff after load\n * @param {Editor} em\n * @private\n */\n postLoad(em) {\n this.handleChanges(this.getWrapper(), null, { avoidStore: 1 });\n },\n\n /**\n * Handle component changes\n * @private\n */\n handleChanges(model, value, opts = {}) {\n const comps = model.components();\n const um = em.get('UndoManager');\n const handleUpdates = em.handleUpdates.bind(em);\n const handleChanges = this.handleChanges.bind(this);\n const handleRemoves = this.handleRemoves.bind(this);\n um && um.add(model);\n um && comps && um.add(comps);\n const evn = 'change:style change:content change:attributes change:src';\n\n [\n [model, evn, handleUpdates],\n [comps, 'add', handleChanges],\n [comps, 'remove', handleRemoves],\n [model.get('classes'), 'add remove', handleUpdates]\n ].forEach(els => {\n em.stopListening(els[0], els[1], els[2]);\n em.listenTo(els[0], els[1], els[2]);\n });\n\n !opts.avoidStore && handleUpdates('', '', opts);\n comps.each(model => this.handleChanges(model, value, opts));\n },\n\n /**\n * Triggered when some component is removed\n * @private\n * */\n handleRemoves(model, value, opts = {}) {\n !opts.avoidStore && em.handleUpdates(model, value, opts);\n },\n\n /**\n * Load components from the passed object, if the object is empty will try to fetch them\n * autonomously from the selected storage\n * The fetched data will be added to the collection\n * @param {Object} data Object of data to load\n * @return {Object} Loaded data\n */\n load(data = '') {\n let result = '';\n\n if (!data && c.stm) {\n data = c.em.getCacheLoad();\n }\n\n if (data.components) {\n try {\n result = JSON.parse(data.components);\n } catch (err) {}\n } else if (data.html) {\n result = data.html;\n }\n\n const isObj = result && result.constructor === Object;\n\n if ((result && result.length) || isObj) {\n this.clear();\n this.getComponents().reset();\n\n // If the result is an object I consider it the wrapper\n if (isObj) {\n this.getWrapper()\n .set(result)\n .initComponents()\n .initClasses()\n .loadTraits();\n } else {\n this.getComponents().add(result);\n }\n }\n\n return result;\n },\n\n /**\n * Store components on the selected storage\n * @param {Boolean} noStore If true, won't store\n * @return {Object} Data to store\n */\n store(noStore) {\n if (!c.stm) {\n return;\n }\n\n var obj = {};\n var keys = this.storageKey();\n\n if (keys.indexOf('html') >= 0) {\n obj.html = c.em.getHtml();\n }\n\n if (keys.indexOf('components') >= 0) {\n const toStore = c.storeWrapper\n ? this.getWrapper()\n : this.getComponents();\n obj.components = JSON.stringify(toStore);\n }\n\n if (!noStore) {\n c.stm.store(obj);\n }\n\n return obj;\n },\n\n /**\n * Returns privately the main wrapper\n * @return {Object}\n * @private\n */\n getComponent() {\n return component;\n },\n\n /**\n * Returns root component inside the canvas. Something like `` inside HTML page\n * The wrapper doesn't differ from the original Component Model\n * @return {Component} Root Component\n * @example\n * // Change background of the wrapper and set some attribute\n * var wrapper = domComponents.getWrapper();\n * wrapper.set('style', {'background-color': 'red'});\n * wrapper.set('attributes', {'title': 'Hello!'});\n */\n getWrapper() {\n return this.getComponent();\n },\n\n /**\n * Returns wrapper's children collection. Once you have the collection you can\n * add other Components(Models) inside. Each component can have several nested\n * components inside and you can nest them as more as you wish.\n * @return {Components} Collection of components\n * @example\n * // Let's add some component\n * var wrapperChildren = domComponents.getComponents();\n * var comp1 = wrapperChildren.add({\n * style: { 'background-color': 'red'}\n * });\n * var comp2 = wrapperChildren.add({\n * tagName: 'span',\n * attributes: { title: 'Hello!'}\n * });\n * // Now let's add an other one inside first component\n * // First we have to get the collection inside. Each\n * // component has 'components' property\n * var comp1Children = comp1.get('components');\n * // Procede as before. You could also add multiple objects\n * comp1Children.add([\n * { style: { 'background-color': 'blue'}},\n * { style: { height: '100px', width: '100px'}}\n * ]);\n * // Remove comp2\n * wrapperChildren.remove(comp2);\n */\n getComponents() {\n return this.getWrapper().get('components');\n },\n\n /**\n * Add new components to the wrapper's children. It's the same\n * as 'domComponents.getComponents().add(...)'\n * @param {Object|Component|Array} component Component/s to add\n * @param {string} [component.tagName='div'] Tag name\n * @param {string} [component.type=''] Type of the component. Available: ''(default), 'text', 'image'\n * @param {boolean} [component.removable=true] If component is removable\n * @param {boolean} [component.draggable=true] If is possible to move the component around the structure\n * @param {boolean} [component.droppable=true] If is possible to drop inside other components\n * @param {boolean} [component.badgable=true] If the badge is visible when the component is selected\n * @param {boolean} [component.stylable=true] If is possible to style component\n * @param {boolean} [component.copyable=true] If is possible to copy&paste the component\n * @param {string} [component.content=''] String inside component\n * @param {Object} [component.style={}] Style object\n * @param {Object} [component.attributes={}] Attribute object\n * @return {Component|Array} Component/s added\n * @example\n * // Example of a new component with some extra property\n * var comp1 = domComponents.addComponent({\n * tagName: 'div',\n * removable: true, // Can't remove it\n * draggable: true, // Can't move it\n * copyable: true, // Disable copy/past\n * content: 'Content text', // Text inside component\n * style: { color: 'red'},\n * attributes: { title: 'here' }\n * });\n */\n addComponent(component) {\n return this.getComponents().add(component);\n },\n\n /**\n * Render and returns wrapper element with all components inside.\n * Once the wrapper is rendered, and it's what happens when you init the editor,\n * the all new components will be added automatically and property changes are all\n * updated immediately\n * @return {HTMLElement}\n */\n render() {\n return componentView.render().el;\n },\n\n /**\n * Remove all components\n * @return {this}\n */\n clear() {\n this.getComponents().reset();\n return this;\n },\n\n /**\n * Set components\n * @param {Object|string} components HTML string or components model\n * @return {this}\n * @private\n */\n setComponents(components) {\n this.clear().addComponent(components);\n },\n\n /**\n * Add new component type\n * @param {string} type\n * @param {Object} methods\n * @private\n */\n addType(type, methods) {\n var compType = this.getType(type);\n if (compType) {\n compType.model = methods.model;\n compType.view = methods.view;\n } else {\n methods.id = type;\n componentTypes.unshift(methods);\n }\n },\n\n /**\n * Get component type\n * @param {string} type\n * @private\n */\n getType(type) {\n var df = componentTypes;\n\n for (var it = 0; it < df.length; it++) {\n var dfId = df[it].id;\n if (dfId == type) {\n return df[it];\n }\n }\n return;\n },\n\n selectAdd(component, opts = {}) {\n if (component) {\n component.set({\n status: 'selected'\n });\n ['component:selected', 'component:toggled'].forEach(event =>\n this.em.trigger(event, component, opts)\n );\n }\n },\n\n selectRemove(component, opts = {}) {\n if (component) {\n const { em } = this;\n component.set({\n status: '',\n state: ''\n });\n ['component:deselected', 'component:toggled'].forEach(event =>\n this.em.trigger(event, component, opts)\n );\n }\n },\n\n /**\n * Triggered when the component is hovered\n * @private\n */\n componentHovered() {\n const em = c.em;\n const model = em.get('componentHovered');\n const previous = em.previous('componentHovered');\n const state = 'hovered';\n\n // Deselect the previous component\n previous &&\n previous.get('status') == state &&\n previous.set({\n status: '',\n state: ''\n });\n\n model && isEmpty(model.get('status')) && model.set('status', state);\n }\n };\n};\n","var TraitView = require('./TraitView');\nvar InputColor = require('domain_abstract/ui/InputColor');\n\nmodule.exports = TraitView.extend({\n /**\n * Returns input element\n * @return {HTMLElement}\n * @private\n */\n getInputEl() {\n if (!this.$input) {\n const model = this.model;\n const value = this.getModelValue();\n const inputColor = new InputColor({\n model,\n target: this.config.em,\n contClass: this.ppfx + 'field-color',\n ppfx: this.ppfx\n });\n const input = inputColor.render();\n this.$input = input.colorEl;\n input.setValue(value, { fromTarget: 1 });\n this.input = input;\n }\n\n return this.$input.get(0);\n },\n\n /**\n * Renders input\n * @private\n * */\n renderField() {\n if (!this.$input) {\n this.getInputEl();\n this.$el.append(this.input.el);\n }\n }\n});\n","var TraitView = require('./TraitView');\nvar InputNumber = require('domain_abstract/ui/InputNumber');\n\nmodule.exports = TraitView.extend({\n getValueForTarget() {\n var model = this.model;\n var value = model.get('value');\n var unit = model.get('unit');\n return value ? value + unit : '';\n },\n\n /**\n * Returns input element\n * @return {HTMLElement}\n * @private\n */\n getInputEl() {\n if (!this.$input) {\n var value = this.getModelValue();\n var inputNumber = new InputNumber({\n contClass: this.ppfx + 'field-int',\n model: this.model,\n ppfx: this.ppfx\n });\n this.input = inputNumber.render();\n this.$input = this.input.inputEl;\n this.$unit = this.input.unitEl;\n this.model.set('value', value);\n this.$input.val(value);\n }\n return this.$input.get(0);\n },\n\n /**\n * Renders input\n * @private\n * */\n renderField() {\n if (!this.$input) {\n this.$el.append(this.tmpl);\n this.getInputEl();\n this.$el.find('.' + this.inputhClass).prepend(this.input.el);\n }\n }\n});\n","var TraitView = require('./TraitView');\n\nmodule.exports = TraitView.extend({\n initialize(o) {\n TraitView.prototype.initialize.apply(this, arguments);\n var iconCls = this.ppfx + 'chk-icon';\n this.tmpl =\n '
';\n },\n\n /**\n * Fires when the input is changed\n * @private\n */\n onChange() {\n this.model.set('value', this.getInputEl().checked);\n },\n\n /**\n * Returns input element\n * @return {HTMLElement}\n * @private\n */\n getInputEl(...args) {\n var first;\n if (!this.$input) first = 1;\n var el = TraitView.prototype.getInputEl.apply(this, args);\n if (first) {\n var md = this.model;\n var name = md.get('name');\n var target = this.target;\n if (md.get('changeProp')) {\n el.checked = target.get(name);\n } else {\n var attrs = target.get('attributes');\n el.checked = !!attrs[name];\n }\n }\n return el;\n }\n});\n","const TraitView = require('./TraitView');\nconst $ = require('backbone').$;\n\nmodule.exports = TraitView.extend({\n initialize(o) {\n TraitView.prototype.initialize.apply(this, arguments);\n var ppfx = this.ppfx;\n this.tmpl =\n '
' +\n '
';\n },\n\n /**\n * Returns input element\n * @return {HTMLElement}\n * @private\n */\n getInputEl() {\n if (!this.$input) {\n var md = this.model;\n var opts = md.get('options') || [];\n var input = '';\n this.input = input;\n this.$input = $(this.input);\n\n var target = this.target;\n var name = md.get('name');\n var val = md.get('value');\n\n if (md.get('changeProp')) {\n val = val || target.get(name);\n } else {\n var attrs = target.get('attributes');\n val = attrs[name];\n }\n\n if (val) this.$input.val(val);\n }\n\n return this.$input.get(0);\n }\n});\n","var DomainViews = require('domain_abstract/view/DomainViews');\nvar TraitView = require('./TraitView');\nvar TraitSelectView = require('./TraitSelectView');\nvar TraitCheckboxView = require('./TraitCheckboxView');\nvar TraitNumberView = require('./TraitNumberView');\nvar TraitColorView = require('./TraitColorView');\n\nmodule.exports = DomainViews.extend({\n itemView: TraitView,\n\n itemsView: {\n text: TraitView,\n number: TraitNumberView,\n select: TraitSelectView,\n checkbox: TraitCheckboxView,\n color: TraitColorView\n },\n\n initialize(o = {}) {\n const config = o.config || {};\n this.config = config;\n this.em = o.editor;\n this.pfx = config.stylePrefix || '';\n this.ppfx = config.pStylePrefix || '';\n this.className = this.pfx + 'traits';\n const toListen = 'component:toggled';\n this.listenTo(this.em, toListen, this.updatedCollection);\n this.updatedCollection();\n },\n\n /**\n * Update view collection\n * @private\n */\n updatedCollection() {\n const ppfx = this.ppfx;\n const comp = this.em.getSelected();\n this.el.className = `${this.className} ${ppfx}one-bg ${ppfx}two-color`;\n\n if (comp) {\n this.collection = comp.get('traits');\n this.render();\n }\n }\n});\n","module.exports = {\n stylePrefix: 'trt-',\n\n // Specify the element to use as a container, string (query) or HTMLElement\n // With the empty value, nothing will be rendered\n appendTo: '',\n\n labelContainer: 'Component settings',\n\n // Placeholder label for text input types\n labelPlhText: 'eg. Text here',\n\n // Placeholder label for href input\n labelPlhHref: 'eg. https://google.com',\n\n // Default options for the target input\n optionsTarget: [\n { value: '', name: 'This window' },\n { value: '_blank', name: 'New window' }\n ],\n\n // Text to show in case no element selected\n textNoElement: 'Select an element before using Trait Manager'\n};\n","import { defaults, isElement } from 'underscore';\n\nconst defaultOpts = require('./config/config');\nconst TraitsView = require('./view/TraitsView');\n\nmodule.exports = () => {\n let c = {};\n let TraitsViewer;\n\n return {\n TraitsView,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'TraitManager',\n\n /**\n * Get configuration object\n * @return {Object}\n * @private\n */\n getConfig() {\n return c;\n },\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n */\n init(config = {}) {\n c = config;\n defaults(c, defaultOpts);\n const ppfx = c.pStylePrefix;\n ppfx && (c.stylePrefix = `${ppfx}${c.stylePrefix}`);\n TraitsViewer = new TraitsView({\n collection: [],\n editor: c.em,\n config: c\n });\n return this;\n },\n\n postRender() {\n const elTo = this.getConfig().appendTo;\n\n if (elTo) {\n const el = isElement(elTo) ? elTo : document.querySelector(elTo);\n el.appendChild(this.render());\n }\n },\n\n /**\n *\n * Get Traits viewer\n * @private\n */\n getTraitsViewer() {\n return TraitsViewer;\n },\n\n /**\n * Add new trait type\n * @param {string} name Type name\n * @param {Object} methods Object representing the trait\n */\n addType(name, trait) {\n var itemView = TraitsViewer.itemView;\n TraitsViewer.itemsView[name] = itemView.extend(trait);\n },\n\n /**\n * Get trait type\n * @param {string} name Type name\n * @return {Object}\n */\n getType(name) {\n return TraitsViewer.itemsView[name];\n },\n\n render() {\n return TraitsViewer.render().el;\n }\n };\n};\n","module.exports = require('./CssRuleView').extend({\n _createElement: function(tagName) {\n return document.createTextNode('');\n },\n\n render() {\n const model = this.model;\n const important = model.get('important');\n this.el.textContent = model.getDeclaration({ important });\n return this;\n }\n});\n","import Backbone from 'backbone';\nconst CssRuleView = require('./CssRuleView');\nconst CssGroupRuleView = require('./CssGroupRuleView');\nconst $ = Backbone.$;\n\n// % is not a valid character for classes\nconst getBlockId = (pfx, widthMedia) =>\n `${pfx}${widthMedia ? `-${widthMedia.replace('%', 'pc')}` : ''}`;\n\nmodule.exports = Backbone.View.extend({\n initialize(o) {\n const config = o.config || {};\n this.atRules = {};\n this.config = config;\n this.em = config.em;\n this.pfx = config.stylePrefix || '';\n this.className = this.pfx + 'rules';\n const coll = this.collection;\n this.listenTo(coll, 'add', this.addTo);\n this.listenTo(coll, 'reset', this.render);\n },\n\n /**\n * Add to collection\n * @param {Object} model\n * @private\n * */\n addTo(model) {\n this.addToCollection(model);\n },\n\n /**\n * Add new object to collection\n * @param {Object} model\n * @param {Object} fragmentEl\n * @return {Object}\n * @private\n * */\n addToCollection(model, fragmentEl) {\n // If the render is not yet started\n if (!this.renderStarted) {\n return;\n }\n\n var fragment = fragmentEl || null;\n var viewObject = CssRuleView;\n var config = this.config;\n let rendered, view;\n const opts = { model, config };\n\n // I have to render keyframes of the same name together\n // Unfortunately at the moment I didn't find the way of appending them\n // if not staticly, via appendData\n if (model.get('atRuleType') === 'keyframes') {\n const atRule = model.getAtRule();\n let atRuleEl = this.atRules[atRule];\n\n if (!atRuleEl) {\n const styleEl = document.createElement('style');\n atRuleEl = document.createTextNode('');\n styleEl.appendChild(document.createTextNode(`${atRule}{`));\n styleEl.appendChild(atRuleEl);\n styleEl.appendChild(document.createTextNode(`}`));\n this.atRules[atRule] = atRuleEl;\n rendered = styleEl;\n }\n\n view = new CssGroupRuleView(opts);\n atRuleEl.appendData(view.render().el.textContent);\n } else {\n view = new CssRuleView(opts);\n rendered = view.render().el;\n }\n\n const clsName = this.className;\n const mediaText = model.get('mediaText');\n const defaultBlockId = getBlockId(clsName);\n let blockId = defaultBlockId;\n\n // If the rule contains a media query it might have a different container\n // for it (eg. rules created with Device Manager)\n if (mediaText) {\n blockId = getBlockId(clsName, this.getMediaWidth(mediaText));\n }\n\n if (rendered) {\n const container = fragment || this.el;\n let contRules;\n\n // Try to find a specific container for the rule (if it\n // containes a media query), otherwise get the default one\n try {\n contRules = container.querySelector(`#${blockId}`);\n } catch (e) {}\n\n if (!contRules) {\n contRules = container.querySelector(`#${defaultBlockId}`);\n }\n\n contRules.appendChild(rendered);\n }\n\n return rendered;\n },\n\n getMediaWidth(mediaText) {\n return (\n mediaText &&\n mediaText\n .replace(`(${this.em.getConfig('mediaCondition')}: `, '')\n .replace(')', '')\n );\n },\n\n render() {\n this.renderStarted = 1;\n this.atRules = {};\n const $el = this.$el;\n const frag = document.createDocumentFragment();\n const className = this.className;\n $el.empty();\n\n // Create devices related DOM structure\n this.em\n .get('DeviceManager')\n .getAll()\n .map(model => model.get('widthMedia'))\n .sort(\n (left, right) =>\n ((right && right.replace('px', '')) || Number.MAX_VALUE) -\n ((left && left.replace('px', '')) || Number.MAX_VALUE)\n )\n .forEach(widthMedia => {\n $(`
`).appendTo(\n frag\n );\n });\n\n this.collection.each(model => this.addToCollection(model, frag));\n $el.append(frag);\n $el.attr('class', className);\n return this;\n }\n});\n","import Backbone from 'backbone';\nvar CssRule = require('./CssRule');\n\nmodule.exports = Backbone.Collection.extend({\n initialize(models, opt) {\n // Inject editor\n if (opt && opt.em) this.editor = opt.em;\n\n // Not used\n this.model = (attrs, options) => {\n var model;\n\n if (!options.em && opt && opt.em) options.em = opt.em;\n\n switch (1) {\n default:\n model = new CssRule(attrs, options);\n }\n\n return model;\n };\n },\n\n add(models, opt = {}) {\n if (typeof models === 'string') {\n models = this.editor.get('Parser').parseCss(models);\n }\n opt.em = this.editor;\n return Backbone.Collection.prototype.add.apply(this, [models, opt]);\n }\n});\n","module.exports = {\n // Style prefix\n stylePrefix: 'css-',\n\n // Custom CSS string to render on top\n staticRules: '',\n\n // Default CSS style\n rules: []\n};\n","/**\n * This module contains and manage CSS rules for the template inside the canvas.\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/css_composer/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * cssComposer: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const cssComposer = editor.CssComposer;\n * ```\n *\n * * [load](#load)\n * * [store](#store)\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getall)\n * * [clear](#clear)\n * * [setIdRule](#setidrule)\n * * [getIdRule](#getidrule)\n * * [setClassRule](#setclassrule)\n * * [getClassRule](#getclassrule)\n *\n * @module CssComposer\n */\n\nimport { isArray } from 'underscore';\n\nmodule.exports = () => {\n let em;\n var c = {},\n defaults = require('./config/config'),\n CssRule = require('./model/CssRule'),\n CssRules = require('./model/CssRules'),\n CssRulesView = require('./view/CssRulesView');\n const Selectors = require('selector_manager/model/Selectors');\n const Selector = require('selector_manager/model/Selector');\n\n var rules, rulesView;\n\n return {\n Selectors,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'CssComposer',\n\n /**\n * Mandatory for the storage manager\n * @type {String}\n * @private\n */\n storageKey() {\n var keys = [];\n var smc = (c.stm && c.stm.getConfig()) || {};\n if (smc.storeCss) keys.push('css');\n if (smc.storeStyles) keys.push('styles');\n return keys;\n },\n\n /**\n * Initializes module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n var elStyle = (c.em && c.em.config.style) || '';\n c.rules = elStyle || c.rules;\n\n em = c.em;\n rules = new CssRules([], c);\n rulesView = new CssRulesView({\n collection: rules,\n config: c\n });\n return this;\n },\n\n /**\n * On load callback\n * @private\n */\n onLoad() {\n rules.add(c.rules);\n },\n\n /**\n * Do stuff after load\n * @param {Editor} em\n * @private\n */\n postLoad(em) {\n const ev = 'add remove';\n const rules = this.getAll();\n const um = em.get('UndoManager');\n um && um.add(rules);\n em.stopListening(rules, ev, this.handleChange);\n em.listenTo(rules, ev, this.handleChange);\n rules.each(rule => this.handleChange(rule, { avoidStore: 1 }));\n },\n\n /**\n * Handle rule changes\n * @private\n */\n handleChange(model, opts = {}) {\n const ev = 'change:style';\n const um = em.get('UndoManager');\n um && um.add(model);\n const handleUpdates = em.handleUpdates.bind(em);\n em.stopListening(model, ev, handleUpdates);\n em.listenTo(model, ev, handleUpdates);\n !opts.avoidStore && handleUpdates('', '', opts);\n },\n\n /**\n * Load data from the passed object, if the object is empty will try to fetch them\n * autonomously from the storage manager.\n * The fetched data will be added to the collection\n * @param {Object} data Object of data to load\n * @return {Object} Loaded rules\n */\n load(data) {\n var d = data || '';\n\n if (!d && c.stm) {\n d = c.em.getCacheLoad();\n }\n\n var obj = d.styles || '';\n\n if (d.styles) {\n try {\n obj = JSON.parse(d.styles);\n } catch (err) {}\n } else if (d.css) {\n obj = c.em.get('Parser').parseCss(d.css);\n }\n\n if (isArray(obj)) {\n obj.length && rules.reset(obj);\n } else if (obj) {\n rules.reset(obj);\n }\n\n return obj;\n },\n\n /**\n * Store data to the selected storage\n * @param {Boolean} noStore If true, won't store\n * @return {Object} Data to store\n */\n store(noStore) {\n if (!c.stm) return;\n var obj = {};\n var keys = this.storageKey();\n if (keys.indexOf('css') >= 0) obj.css = c.em.getCss();\n if (keys.indexOf('styles') >= 0) obj.styles = JSON.stringify(rules);\n if (!noStore) c.stm.store(obj);\n return obj;\n },\n\n /**\n * Add new rule to the collection, if not yet exists with the same selectors\n * @param {Array} selectors Array of selectors\n * @param {String} state Css rule state\n * @param {String} width For which device this style is oriented\n * @param {Object} opts Other options for the rule\n * @return {Model}\n * @example\n * var sm = editor.SelectorManager;\n * var sel1 = sm.add('myClass1');\n * var sel2 = sm.add('myClass2');\n * var rule = cssComposer.add([sel1, sel2], 'hover');\n * rule.set('style', {\n * width: '100px',\n * color: '#fff',\n * });\n * */\n add(selectors, state, width, opts = {}) {\n var s = state || '';\n var w = width || '';\n var opt = { ...opts };\n var rule = this.get(selectors, s, w, opt);\n\n // do not create rules that were found before\n // unless this is an at-rule, for which multiple declarations\n // make sense (e.g. multiple `@font-type`s)\n if (rule && rule.config && !rule.config.atRuleType) {\n return rule;\n } else {\n opt.state = s;\n opt.mediaText = w;\n opt.selectors = '';\n rule = new CssRule(opt, c);\n rule.get('selectors').add(selectors);\n rules.add(rule);\n return rule;\n }\n },\n\n /**\n * Get the rule\n * @param {Array} selectors Array of selectors\n * @param {String} state Css rule state\n * @param {String} width For which device this style is oriented\n * @param {Object} ruleProps Other rule props\n * @return {Model|null}\n * @example\n * var sm = editor.SelectorManager;\n * var sel1 = sm.add('myClass1');\n * var sel2 = sm.add('myClass2');\n * var rule = cssComposer.get([sel1, sel2], 'hover');\n * // Update the style\n * rule.set('style', {\n * width: '300px',\n * color: '#000',\n * });\n * */\n get(selectors, state, width, ruleProps) {\n var rule = null;\n rules.each(m => {\n if (rule) return;\n if (m.compare(selectors, state, width, ruleProps)) rule = m;\n });\n return rule;\n },\n\n /**\n * Get the collection of rules\n * @return {Collection}\n * */\n getAll() {\n return rules;\n },\n\n /**\n * Remove all rules\n * @return {this}\n */\n clear() {\n this.getAll().reset();\n return this;\n },\n\n /**\n * Add a raw collection of rule objects\n * This method overrides styles, in case, of already defined rule\n * @param {Array} data Array of rule objects, eg . [{selectors: ['class1'], style: {....}}, ..]\n * @param {Object} opts Options\n * @return {Array}\n * @private\n */\n addCollection(data, opts = {}) {\n var result = [];\n var d = data instanceof Array ? data : [data];\n\n for (var i = 0, l = d.length; i < l; i++) {\n var rule = d[i] || {};\n if (!rule.selectors) continue;\n var sm = c.em && c.em.get('SelectorManager');\n if (!sm) console.warn('Selector Manager not found');\n var sl = rule.selectors;\n var sels = sl instanceof Array ? sl : [sl];\n var newSels = [];\n\n for (var j = 0, le = sels.length; j < le; j++) {\n var selec = sm.add(sels[j]);\n newSels.push(selec);\n }\n\n var modelExists = this.get(newSels, rule.state, rule.mediaText, rule);\n var model = this.add(newSels, rule.state, rule.mediaText, rule);\n var updateStyle = !modelExists || !opts.avoidUpdateStyle;\n const style = rule.style || {};\n\n if (updateStyle) {\n let styleUpdate = opts.extend\n ? { ...model.get('style'), ...style }\n : style;\n model.set('style', styleUpdate);\n }\n\n result.push(model);\n }\n\n return result;\n },\n\n /**\n * Add/update the CSS rule with id selector\n * @param {string} name Id selector name, eg. 'my-id'\n * @param {Object} style Style properties and values\n * @param {Object} [opts={}] Custom options, like `state` and `mediaText`\n * @return {CssRule} The new/updated rule\n * @example\n * const rule = cc.setIdRule('myid', { color: 'red' });\n * const ruleHover = cc.setIdRule('myid', { color: 'blue' }, { state: 'hover' });\n * // This will add current CSS:\n * // #myid { color: red }\n * // #myid:hover { color: blue }\n */\n setIdRule(name, style = {}, opts = {}) {\n const state = opts.state || '';\n const media = opts.mediaText || em.getCurrentMedia();\n const sm = em.get('SelectorManager');\n const selector = sm.add({ name, type: Selector.TYPE_ID });\n const rule = this.add(selector, state, media);\n rule.setStyle(style, opts);\n return rule;\n },\n\n /**\n * Get the CSS rule by id selector\n * @param {string} name Id selector name, eg. 'my-id'\n * @param {Object} [opts={}] Custom options, like `state` and `mediaText`\n * @return {CssRule}\n * @example\n * const rule = cc.getIdRule('myid');\n * const ruleHover = cc.setIdRule('myid', { state: 'hover' });\n */\n getIdRule(name, opts = {}) {\n const state = opts.state || '';\n const media = opts.mediaText || em.getCurrentMedia();\n const selector = em.get('SelectorManager').get(name, Selector.TYPE_ID);\n return selector && this.get(selector, state, media);\n },\n\n /**\n * Add/update the CSS rule with class selector\n * @param {string} name Class selector name, eg. 'my-class'\n * @param {Object} style Style properties and values\n * @param {Object} [opts={}] Custom options, like `state` and `mediaText`\n * @return {CssRule} The new/updated rule\n * @example\n * const rule = cc.setClassRule('myclass', { color: 'red' });\n * const ruleHover = cc.setClassRule('myclass', { color: 'blue' }, { state: 'hover' });\n * // This will add current CSS:\n * // .myclass { color: red }\n * // .myclass:hover { color: blue }\n */\n setClassRule(name, style = {}, opts = {}) {\n const state = opts.state || '';\n const media = opts.mediaText || em.getCurrentMedia();\n const sm = em.get('SelectorManager');\n const selector = sm.add({ name, type: Selector.TYPE_CLASS });\n const rule = this.add(selector, state, media);\n rule.setStyle(style, opts);\n return rule;\n },\n\n /**\n * Get the CSS rule by class selector\n * @param {string} name Class selector name, eg. 'my-class'\n * @param {Object} [opts={}] Custom options, like `state` and `mediaText`\n * @return {CssRule}\n * @example\n * const rule = cc.getClassRule('myclass');\n * const ruleHover = cc.getClassRule('myclass', { state: 'hover' });\n */\n getClassRule(name, opts = {}) {\n const state = opts.state || '';\n const media = opts.mediaText || em.getCurrentMedia();\n const selector = em.get('SelectorManager').get(name, Selector.TYPE_CLASS);\n return selector && this.get(selector, state, media);\n },\n\n /**\n * Render the block of CSS rules\n * @return {HTMLElement}\n * @private\n */\n render() {\n return rulesView.render().el;\n }\n };\n};\n","import Backbone from 'backbone';\nvar AssetView = require('./AssetView');\nvar AssetImageView = require('./AssetImageView');\nvar FileUploader = require('./FileUploader');\n\nmodule.exports = Backbone.View.extend({\n events: {\n submit: 'handleSubmit'\n },\n\n template(view) {\n const pfx = view.pfx;\n const ppfx = view.ppfx;\n return `\n
\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n
\n
\n `;\n },\n\n initialize(o) {\n this.options = o;\n this.config = o.config;\n this.pfx = this.config.stylePrefix || '';\n this.ppfx = this.config.pStylePrefix || '';\n const coll = this.collection;\n this.listenTo(coll, 'reset', this.renderAssets);\n this.listenTo(coll, 'add', this.addToAsset);\n this.listenTo(coll, 'remove', this.removedAsset);\n this.listenTo(coll, 'deselectAll', this.deselectAll);\n },\n\n /**\n * Add new asset to the collection via string\n * @param {Event} e Event object\n * @return {this}\n * @private\n */\n handleSubmit(e) {\n e.preventDefault();\n const input = this.getAddInput();\n const url = input.value.trim();\n const handleAdd = this.config.handleAdd;\n\n if (!url) {\n return;\n }\n\n input.value = '';\n this.getAssetsEl().scrollTop = 0;\n\n if (handleAdd) {\n handleAdd.bind(this)(url);\n } else {\n this.options.globalCollection.add(url, { at: 0 });\n }\n },\n\n /**\n * Returns assets element\n * @return {HTMLElement}\n * @private\n */\n getAssetsEl() {\n //if(!this.assets) // Not able to cache as after the rerender it losses the ref\n return this.el.querySelector(`.${this.pfx}assets`);\n },\n\n /**\n * Returns input url element\n * @return {HTMLElement}\n * @private\n */\n getAddInput() {\n if (!this.inputUrl || !this.inputUrl.value)\n this.inputUrl = this.el.querySelector(`.${this.pfx}add-asset input`);\n return this.inputUrl;\n },\n\n /**\n * Triggered when an asset is removed\n * @param {Asset} model Removed asset\n * @private\n */\n removedAsset(model) {\n if (!this.collection.length) {\n this.toggleNoAssets();\n }\n },\n\n /**\n * Add asset to collection\n * @private\n * */\n addToAsset(model) {\n if (this.collection.length == 1) {\n this.toggleNoAssets(1);\n }\n this.addAsset(model);\n },\n\n /**\n * Add new asset to collection\n * @param Object Model\n * @param Object Fragment collection\n * @return Object Object created\n * @private\n * */\n addAsset(model, fragmentEl = null) {\n const fragment = fragmentEl;\n const collection = this.collection;\n const config = this.config;\n const rendered = new model.typeView({\n model,\n collection,\n config\n }).render().el;\n\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n const assetsEl = this.getAssetsEl();\n if (assetsEl) {\n assetsEl.insertBefore(rendered, assetsEl.firstChild);\n }\n }\n\n return rendered;\n },\n\n /**\n * Checks if to show noAssets\n * @param {Boolean} hide\n * @private\n */\n toggleNoAssets(hide) {\n const assetsEl = this.$el.find(`.${this.pfx}assets`);\n\n if (hide) {\n assetsEl.empty();\n } else {\n const noAssets = this.config.noAssets;\n noAssets && assetsEl.append(noAssets);\n }\n },\n\n /**\n * Deselect all assets\n * @private\n * */\n deselectAll() {\n const pfx = this.pfx;\n this.$el.find(`.${pfx}highlight`).removeClass(`${pfx}highlight`);\n },\n\n renderAssets() {\n const fragment = document.createDocumentFragment();\n const assets = this.$el.find(`.${this.pfx}assets`);\n assets.empty();\n this.toggleNoAssets(this.collection.length);\n this.collection.each(model => this.addAsset(model, fragment));\n assets.append(fragment);\n },\n\n render() {\n const fuRendered = this.options.fu.render().el;\n this.$el.empty();\n this.$el.append(fuRendered).append(this.template(this));\n this.el.className = `${this.ppfx}asset-manager`;\n this.renderAssets();\n this.rendered = 1;\n return this;\n }\n});\n","module.exports = require('backbone').Model.extend({\n idAttribute: 'src',\n\n defaults: {\n type: '',\n src: ''\n },\n\n /**\n * Get filename of the asset\n * @return {string}\n * @private\n * */\n getFilename() {\n return this.get('src')\n .split('/')\n .pop();\n },\n\n /**\n * Get extension of the asset\n * @return {string}\n * @private\n * */\n getExtension() {\n return this.getFilename()\n .split('.')\n .pop();\n }\n});\n","const Asset = require('./Asset');\n\nmodule.exports = Asset.extend({\n defaults: {\n ...Asset.prototype.defaults,\n type: 'image',\n unitDim: 'px',\n height: 0,\n width: 0\n },\n});\n","import TypeableCollection from 'domain_abstract/model/TypeableCollection';\n\nmodule.exports = require('backbone')\n .Collection.extend(TypeableCollection)\n .extend({\n types: [\n {\n id: 'image',\n model: require('./AssetImage'),\n view: require('./../view/AssetImageView'),\n isType(value) {\n if (typeof value == 'string') {\n return {\n type: 'image',\n src: value\n };\n }\n return value;\n }\n }\n ]\n });\n","module.exports = {\n // Default assets\n // eg. [\n // 'https://...image1.png',\n // 'https://...image2.png',\n // {type: 'image', src: 'https://...image3.png', someOtherCustomProp: 1},\n // ..\n // ]\n assets: [],\n\n // Content to add where there is no assets to show\n // eg. 'No assets here, drag to upload'\n noAssets: '',\n\n // Style prefix\n stylePrefix: 'am-',\n\n // Upload endpoint, set `false` to disable upload\n // upload: 'https://endpoint/upload/assets',\n // upload: false,\n upload: 0,\n\n // The name used in POST to pass uploaded files\n uploadName: 'files',\n\n // Custom headers to pass with the upload request\n headers: {},\n\n // Custom parameters to pass with the upload request, eg. csrf token\n params: {},\n\n // If true, tries to add automatically uploaded assets.\n // To make it work the server should respond with a JSON containing assets\n // in a data key, eg:\n // {\n // data: [\n // 'https://.../image.png',\n // ...\n // {src: 'https://.../image2.png'},\n // ...\n // ]\n // }\n autoAdd: 1,\n\n // Text on upload input\n uploadText: 'Drop files here or click to upload',\n\n // Label for the add button\n addBtnText: 'Add image',\n\n // Custom uploadFile function\n // @example\n // uploadFile: (e) => {\n // var files = e.dataTransfer ? e.dataTransfer.files : e.target.files;\n // // ...send somewhere\n // }\n uploadFile: '',\n\n // Handle the image url submit from the built-in 'Add image' form\n // @example\n // handleAdd: (textFromInput) => {\n // // some check...\n // editor.AssetManager.add(textFromInput);\n // }\n handleAdd: '',\n\n // Enable an upload dropzone on the entire editor (not document) when dragging\n // files over it\n // If active the dropzone disable/hide the upload dropzone in asset modal,\n // otherwise you will get double drops (#507)\n dropzone: 0,\n\n // Open the asset manager once files are been dropped via the dropzone\n openAssetsOnDrop: 1,\n\n // Any dropzone content to append inside dropzone element\n dropzoneContent: '',\n\n // Default title for the asset manager modal\n modalTitle: 'Select Image',\n\n //Default placeholder for input\n inputPlaceholder: 'http://path/to/the/image.jpg'\n};\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/asset_manager/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * assetManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const assetManager = editor.AssetManager;\n * ```\n *\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getall)\n * * [getAllVisible](#getallvisible)\n * * [remove](#remove)\n * * [store](#store)\n * * [load](#load)\n * * [getContainer](#getcontainer)\n * * [getAssetsEl](#getassetsel)\n * * [addType](#addtype)\n * * [getType](#gettype)\n * * [getTypes](#gettypes)\n *\n * @module AssetManager\n */\n\nmodule.exports = () => {\n let c = {};\n const defaults = require('./config/config');\n const Assets = require('./model/Assets');\n const AssetsView = require('./view/AssetsView');\n const FileUpload = require('./view/FileUploader');\n let assets, am, fu;\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'AssetManager',\n\n /**\n * Mandatory for the storage manager\n * @type {String}\n * @private\n */\n storageKey: 'assets',\n\n getConfig() {\n return c;\n },\n\n /**\n * Initialize module\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = config || {};\n\n for (let name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n const ppfx = c.pStylePrefix;\n const em = c.em;\n\n if (ppfx) {\n c.stylePrefix = ppfx + c.stylePrefix;\n }\n\n // Global assets collection\n assets = new Assets([]);\n const obj = {\n // Collection visible in asset manager\n collection: new Assets([]),\n globalCollection: assets,\n config: c\n };\n fu = new FileUpload(obj);\n obj.fu = fu;\n am = new AssetsView(obj);\n\n // Setup the sync between the global and public collections\n assets.listenTo(assets, 'add', model => {\n this.getAllVisible().add(model);\n em && em.trigger('asset:add', model);\n });\n\n assets.listenTo(assets, 'remove', model => {\n this.getAllVisible().remove(model);\n em && em.trigger('asset:remove', model);\n });\n\n return this;\n },\n\n /**\n * Add new asset/s to the collection. URLs are supposed to be unique\n * @param {string|Object|Array|Array} asset URL strings or an objects representing the resource.\n * @param {Object} [opts] Options\n * @return {Model}\n * @example\n * // In case of strings, would be interpreted as images\n * assetManager.add('http://img.jpg');\n * assetManager.add(['http://img.jpg', './path/to/img.png']);\n *\n * // Using objects you could indicate the type and other meta informations\n * assetManager.add({\n * \tsrc: 'http://img.jpg',\n * \t//type: 'image',\t//image is default\n * \theight: 300,\n *\twidth: 200,\n * });\n * assetManager.add([{\n * \tsrc: 'http://img.jpg',\n * },{\n * \tsrc: './path/to/img.png',\n * }]);\n */\n add(asset, opts = {}) {\n // Put the model at the beginning\n if (typeof opts.at == 'undefined') {\n opts.at = 0;\n }\n\n return assets.add(asset, opts);\n },\n\n /**\n * Returns the asset by URL\n * @param {string} src URL of the asset\n * @return {Object} Object representing the asset\n * @example\n * var asset = assetManager.get('http://img.jpg');\n */\n get(src) {\n return assets.where({ src })[0];\n },\n\n /**\n * Return the global collection, containing all the assets\n * @return {Collection}\n */\n getAll() {\n return assets;\n },\n\n /**\n * Return the visible collection, which containes assets actually rendered\n * @return {Collection}\n */\n getAllVisible() {\n return am.collection;\n },\n\n /**\n * Remove the asset by its URL\n * @param {string} src URL of the asset\n * @return {this}\n * @example\n * assetManager.remove('http://img.jpg');\n */\n remove(src) {\n var asset = this.get(src);\n this.getAll().remove(asset);\n return this;\n },\n\n /**\n * Store assets data to the selected storage\n * @param {Boolean} noStore If true, won't store\n * @return {Object} Data to store\n * @example\n * var assets = assetManager.store();\n */\n store(noStore) {\n var obj = {};\n var assets = JSON.stringify(this.getAll().toJSON());\n obj[this.storageKey] = assets;\n if (!noStore && c.stm) c.stm.store(obj);\n return obj;\n },\n\n /**\n * Load data from the passed object.\n * The fetched data will be added to the collection.\n * @param {Object} data Object of data to load\n * @return {Object} Loaded assets\n * @example\n * var assets = assetManager.load({\n * \tassets: [...]\n * })\n *\n */\n load(data = {}) {\n const name = this.storageKey;\n let assets = data[name] || [];\n\n if (typeof assets == 'string') {\n try {\n assets = JSON.parse(data[name]);\n } catch (err) {}\n }\n\n if (assets && assets.length) {\n this.getAll().reset(assets);\n }\n\n return assets;\n },\n\n /**\n * Return the Asset Manager Container\n * @return {HTMLElement}\n */\n getContainer() {\n return am.el;\n },\n\n /**\n * Get assets element container\n * @return {HTMLElement}\n */\n getAssetsEl() {\n return am.el.querySelector('[data-el=assets]');\n },\n\n /**\n * Render assets\n * @param {array} assets Assets to render, without the argument will render\n * all global assets\n * @return {HTMLElement}\n * @example\n * // Render all assets\n * assetManager.render();\n *\n * // Render some of the assets\n * const assets = assetManager.getAll();\n * assetManager.render(assets.filter(\n * asset => asset.get('category') == 'cats'\n * ));\n */\n render(assets) {\n const toRender = assets || this.getAll().models;\n\n if (!am.rendered) {\n am.render();\n }\n\n am.collection.reset(toRender);\n return this.getContainer();\n },\n\n /**\n * Add new type. If you want to get more about type definition we suggest to read the [module's page](/modules/Assets.html)\n * @param {string} id Type ID\n * @param {Object} definition Definition of the type. Each definition contains\n * `model` (business logic), `view` (presentation logic)\n * and `isType` function which recognize the type of the\n * passed entity\n * @example\n * assetManager.addType('my-type', {\n * model: {},\n * view: {},\n * isType: (value) => {},\n * })\n */\n addType(id, definition) {\n this.getAll().addType(id, definition);\n },\n\n /**\n * Get type\n * @param {string} id Type ID\n * @return {Object} Type definition\n */\n getType(id) {\n return this.getAll().getType(id);\n },\n\n /**\n * Get types\n * @return {Array}\n */\n getTypes() {\n return this.getAll().getTypes();\n },\n\n //-------\n\n AssetsView() {\n return am;\n },\n\n FileUploader() {\n return fu;\n },\n\n onLoad() {\n this.getAll().reset(c.assets);\n },\n\n postRender(editorView) {\n c.dropzone && fu.initDropzone(editorView);\n },\n\n /**\n * Set new target\n * @param\t{Object}\tm Model\n * @private\n * */\n setTarget(m) {\n am.collection.target = m;\n },\n\n /**\n * Set callback after asset was selected\n * @param\t{Object}\tf Callback function\n * @private\n * */\n onSelect(f) {\n am.collection.onSelect = f;\n },\n\n /**\n * Set callback to fire when the asset is clicked\n * @param {function} func\n * @private\n */\n onClick(func) {\n c.onClick = func;\n },\n\n /**\n * Set callback to fire when the asset is double clicked\n * @param {function} func\n * @private\n */\n onDblClick(func) {\n c.onDblClick = func;\n }\n };\n};\n","import _ from 'underscore';\nimport Backbone from 'backbone';\nvar PropertiesView = require('./PropertiesView');\n\nmodule.exports = Backbone.View.extend({\n template: _.template(`\n
title\" data-sector-title>\n caret\" class=\"fa\">\n <%= label %>\n
`),\n\n events: {\n 'click [data-sector-title]': 'toggle'\n },\n\n initialize(o) {\n this.config = o.config || {};\n this.pfx = this.config.stylePrefix || '';\n this.target = o.target || {};\n this.propTarget = o.propTarget || {};\n this.caretR = 'fa-caret-right';\n this.caretD = 'fa-caret-down';\n const model = this.model;\n this.listenTo(model, 'change:open', this.updateOpen);\n this.listenTo(model, 'updateVisibility', this.updateVisibility);\n this.listenTo(model, 'destroy remove', this.remove);\n },\n\n /**\n * If all properties are hidden this will hide the sector\n */\n updateVisibility() {\n var show;\n this.model.get('properties').each(prop => {\n if (prop.get('visible')) {\n show = 1;\n }\n });\n this.el.style.display = show ? 'block' : 'none';\n },\n\n /**\n * Update visibility\n */\n updateOpen() {\n if (this.model.get('open')) this.show();\n else this.hide();\n },\n\n /**\n * Show the content of the sector\n * */\n show() {\n this.$el.addClass(this.pfx + 'open');\n this.getPropertiesEl().style.display = '';\n this.$caret.removeClass(this.caretR).addClass(this.caretD);\n },\n\n /**\n * Hide the content of the sector\n * */\n hide() {\n this.$el.removeClass(this.pfx + 'open');\n this.getPropertiesEl().style.display = 'none';\n this.$caret.removeClass(this.caretD).addClass(this.caretR);\n },\n\n getPropertiesEl() {\n return this.$el.find(`.${this.pfx}properties`).get(0);\n },\n\n /**\n * Toggle visibility\n * */\n toggle(e) {\n var v = this.model.get('open') ? 0 : 1;\n this.model.set('open', v);\n },\n\n render() {\n this.$el.html(\n this.template({\n pfx: this.pfx,\n label: this.model.get('name')\n })\n );\n this.$caret = this.$el.find('#' + this.pfx + 'caret');\n this.renderProperties();\n this.$el.attr('class', this.pfx + 'sector no-select');\n this.updateOpen();\n return this;\n },\n\n renderProperties() {\n var objs = this.model.get('properties');\n\n if (objs) {\n var view = new PropertiesView({\n collection: objs,\n target: this.target,\n propTarget: this.propTarget,\n config: this.config\n });\n this.$el.append(view.render().el);\n }\n }\n});\n","import Backbone from 'backbone';\nimport { extend } from 'underscore';\n\nconst SectorView = require('./SectorView');\n\nmodule.exports = Backbone.View.extend({\n initialize(o = {}) {\n const config = o.config || {};\n this.pfx = config.stylePrefix || '';\n this.ppfx = config.pStylePrefix || '';\n this.target = o.target || {};\n this.config = config;\n\n // The target that will emit events for properties\n const target = {};\n extend(target, Backbone.Events);\n const body = document.body;\n const dummy = document.createElement(`el-${new Date().getTime()}`);\n body.appendChild(dummy);\n target.computedDefault = { ...window.getComputedStyle(dummy) };\n body.removeChild(dummy);\n this.propTarget = target;\n const coll = this.collection;\n const events =\n 'component:toggled component:update:classes component:update:state change:device';\n this.listenTo(coll, 'add', this.addTo);\n this.listenTo(coll, 'reset', this.render);\n this.listenTo(this.target, events, this.targetUpdated);\n },\n\n /**\n * Add to collection\n * @param {Object} model Model\n * @return {Object}\n * @private\n * */\n addTo(model) {\n this.addToCollection(model);\n },\n\n /**\n * Fired when target is updated\n * @private\n */\n targetUpdated() {\n const em = this.target;\n const pt = this.propTarget;\n let model = em.getSelected();\n if (!model) return;\n\n const config = em.get('Config');\n const state = !config.devicePreviewMode ? model.get('state') : '';\n const el = model.getEl();\n pt.helper = null;\n\n // Create computed style container\n if (el) {\n const stateStr = state ? `:${state}` : null;\n pt.computed = window.getComputedStyle(el, stateStr);\n }\n\n // Create a new rule for the state as a helper\n const appendStateRule = (style = {}) => {\n const cc = em.get('CssComposer');\n const helperCls = 'hc-state';\n const rules = cc.getAll();\n let helperRule = cc.getClassRule(helperCls);\n\n if (!helperRule) {\n helperRule = cc.setClassRule(helperCls);\n } else {\n // I will make it last again, otherwise it could be overridden\n rules.remove(helperRule);\n rules.add(helperRule);\n }\n\n helperRule.set('important', 1);\n helperRule.setStyle(style);\n pt.helper = helperRule;\n };\n\n model = em.get('StyleManager').getModelToStyle(model);\n state && appendStateRule(model.getStyle());\n pt.model = model;\n pt.trigger('update');\n },\n\n /**\n * Add new object to collection\n * @param {Object} model Model\n * @param {Object} fragmentEl collection\n * @return {Object} Object created\n * @private\n * */\n addToCollection(model, fragmentEl) {\n var fragment = fragmentEl || null;\n var view = new SectorView({\n model,\n id:\n this.pfx +\n model\n .get('name')\n .replace(' ', '_')\n .toLowerCase(),\n name: model.get('name'),\n properties: model.get('properties'),\n target: this.target,\n propTarget: this.propTarget,\n config: this.config\n });\n var rendered = view.render().el;\n\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n this.$el.append(rendered);\n }\n\n return rendered;\n },\n\n render() {\n const frag = document.createDocumentFragment();\n const $el = this.$el;\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n $el.empty();\n this.collection.each(model => this.addToCollection(model, frag));\n $el.append(frag);\n $el.addClass(`${pfx}sectors ${ppfx}one-bg ${ppfx}two-color`);\n return this;\n }\n});\n","var Backbone = require('backbone');\n\nmodule.exports = () => ({\n /**\n * Build props object by their name\n * @param {Array|string} props Array of properties name\n * @return {Array}\n */\n build(props) {\n var objs = [];\n var dftFixedValues = ['initial', 'inherit'];\n\n if (typeof props === 'string') props = [props];\n\n for (var i = 0, len = props.length; i < len; i++) {\n var obj = {};\n var prop = props[i];\n obj.property = prop;\n\n // Property\n switch (prop) {\n case 'border-radius-c':\n obj.property = 'border-radius';\n break;\n }\n\n // Fixed values\n switch (prop) {\n case 'margin-top':\n case 'margin-right':\n case 'margin-bottom':\n case 'margin-left':\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n case 'width':\n case 'max-width':\n case 'min-width':\n case 'height':\n case 'max-height':\n case 'min-height':\n obj.fixedValues = ['initial', 'inherit', 'auto'];\n break;\n case 'font-size':\n obj.fixedValues = [\n 'medium',\n 'xx-small',\n 'x-small',\n 'small',\n 'large',\n 'x-large',\n 'xx-large',\n 'smaller',\n 'larger',\n 'length',\n 'initial',\n 'inherit'\n ];\n break;\n case 'letter-spacing':\n case 'line-height':\n obj.fixedValues = ['normal', 'initial', 'inherit'];\n break;\n }\n\n // Type\n switch (prop) {\n case 'float':\n case 'position':\n case 'text-align':\n obj.type = 'radio';\n break;\n case 'display':\n case 'font-family':\n case 'font-weight':\n case 'border-style':\n case 'box-shadow-type':\n case 'background-repeat':\n case 'background-position':\n case 'background-attachment':\n case 'background-size':\n case 'transition-property':\n case 'transition-timing-function':\n case 'cursor':\n case 'overflow':\n obj.type = 'select';\n break;\n case 'top':\n case 'right':\n case 'bottom':\n case 'left':\n case 'margin-top':\n case 'margin-right':\n case 'margin-bottom':\n case 'margin-left':\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n case 'min-height':\n case 'min-width':\n case 'max-height':\n case 'max-width':\n case 'width':\n case 'height':\n case 'font-size':\n case 'letter-spacing':\n case 'line-height':\n case 'text-shadow-h':\n case 'text-shadow-v':\n case 'text-shadow-blur':\n case 'border-radius-c':\n case 'border-top-left-radius':\n case 'border-top-right-radius':\n case 'border-bottom-left-radius':\n case 'border-bottom-right-radius':\n case 'border-width':\n case 'box-shadow-h':\n case 'box-shadow-v':\n case 'box-shadow-blur':\n case 'box-shadow-spread':\n case 'transition-duration':\n case 'perspective':\n case 'transform-rotate-x':\n case 'transform-rotate-y':\n case 'transform-rotate-z':\n case 'transform-scale-x':\n case 'transform-scale-y':\n case 'transform-scale-z':\n obj.type = 'integer';\n break;\n case 'margin':\n case 'padding':\n case 'border-radius':\n case 'border':\n case 'transform':\n obj.type = 'composite';\n break;\n case 'color':\n case 'text-shadow-color':\n case 'background-color':\n case 'border-color':\n case 'box-shadow-color':\n obj.type = 'color';\n break;\n case 'text-shadow':\n case 'box-shadow':\n case 'background':\n case 'transition':\n obj.type = 'stack';\n break;\n case 'background-image':\n obj.type = 'file';\n break;\n }\n\n // Defaults\n switch (prop) {\n case 'float':\n case 'background-color':\n case 'background-image':\n case 'text-shadow':\n obj.defaults = 'none';\n break;\n case 'display':\n obj.defaults = 'block';\n break;\n case 'position':\n obj.defaults = 'static';\n break;\n case 'top':\n case 'right':\n case 'bottom':\n case 'left':\n case 'margin-top':\n case 'margin-right':\n case 'margin-bottom':\n case 'margin-left':\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n case 'text-shadow-h':\n case 'text-shadow-v':\n case 'text-shadow-blur':\n case 'border-radius-c':\n case 'border-top-left-radius':\n case 'border-top-right-radius':\n case 'border-bottom-left-radius':\n case 'border-bottom-right-radius':\n case 'box-shadow-h':\n case 'box-shadow-v':\n case 'box-shadow-spread':\n case 'perspective':\n case 'transform-rotate-x':\n case 'transform-rotate-y':\n case 'transform-rotate-z':\n obj.defaults = 0;\n break;\n case 'transform-scale-x':\n case 'transform-scale-y':\n case 'transform-scale-z':\n obj.defaults = 1;\n break;\n case 'box-shadow-blur':\n obj.defaults = '5px';\n break;\n case 'min-height':\n case 'min-width':\n case 'max-height':\n case 'max-width':\n case 'width':\n case 'height':\n case 'background-size':\n case 'cursor':\n obj.defaults = 'auto';\n break;\n case 'font-family':\n obj.defaults = 'Arial, Helvetica, sans-serif';\n break;\n case 'font-size':\n case 'border-width':\n obj.defaults = 'medium';\n break;\n case 'font-weight':\n obj.defaults = '400';\n break;\n case 'letter-spacing':\n case 'line-height':\n obj.defaults = 'normal';\n break;\n case 'color':\n case 'text-shadow-color':\n case 'border-color':\n case 'box-shadow-color':\n obj.defaults = 'black';\n break;\n case 'text-align':\n obj.defaults = 'left';\n break;\n case 'border-style':\n obj.defaults = 'solid';\n break;\n case 'box-shadow-type':\n obj.defaults = '';\n break;\n case 'background-repeat':\n obj.defaults = 'repeat';\n break;\n case 'background-position':\n obj.defaults = 'left top';\n break;\n case 'background-attachment':\n obj.defaults = 'scroll';\n break;\n case 'transition-property':\n obj.defaults = 'width';\n break;\n case 'transition-duration':\n obj.defaults = '2';\n break;\n case 'transition-timing-function':\n obj.defaults = 'ease';\n break;\n case 'overflow':\n obj.defaults = 'visible';\n break;\n }\n\n // Units\n switch (prop) {\n case 'top':\n case 'right':\n case 'bottom':\n case 'left':\n case 'margin-top':\n case 'margin-right':\n case 'margin-bottom':\n case 'margin-left':\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n case 'min-height':\n case 'min-width':\n case 'max-height':\n case 'max-width':\n case 'width':\n case 'height':\n case 'text-shadow-h':\n case 'text-shadow-v':\n case 'text-shadow-blur':\n case 'border-radius-c':\n case 'border-top-left-radius':\n case 'border-top-right-radius':\n case 'border-bottom-left-radius':\n case 'border-bottom-right-radius':\n case 'box-shadow-h':\n case 'box-shadow-v':\n obj.units = ['px', '%'];\n break;\n case 'font-size':\n case 'letter-spacing':\n case 'line-height':\n obj.units = ['px', 'em', 'rem', '%'];\n break;\n case 'border-width':\n obj.units = ['px', 'em'];\n break;\n case 'box-shadow-blur':\n case 'box-shadow-spread':\n case 'perspective':\n obj.units = ['px'];\n break;\n case 'transition-duration':\n obj.units = ['s'];\n break;\n case 'transform-rotate-x':\n case 'transform-rotate-y':\n case 'transform-rotate-z':\n obj.units = ['deg'];\n break;\n }\n\n // Min/Max\n switch (prop) {\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n case 'min-height':\n case 'min-width':\n case 'max-height':\n case 'max-width':\n case 'width':\n case 'height':\n case 'font-size':\n case 'text-shadow-blur':\n case 'border-radius-c':\n case 'border-top-left-radius':\n case 'border-top-right-radius':\n case 'border-bottom-left-radius':\n case 'border-bottom-right-radius':\n case 'border-width':\n case 'box-shadow-blur':\n case 'transition-duration':\n case 'perspective':\n obj.min = 0;\n break;\n }\n\n // Preview\n switch (prop) {\n case 'text-shadow':\n case 'box-shadow':\n case 'background':\n obj.preview = true;\n break;\n }\n\n // Detached\n switch (prop) {\n case 'background':\n obj.detached = true;\n break;\n }\n\n // Functions\n switch (prop) {\n case 'transform-rotate-x':\n obj.functionName = 'rotateX';\n break;\n case 'transform-rotate-y':\n obj.functionName = 'rotateY';\n break;\n case 'transform-rotate-z':\n obj.functionName = 'rotateZ';\n break;\n case 'transform-scale-x':\n obj.functionName = 'scaleX';\n break;\n case 'transform-scale-y':\n obj.functionName = 'scaleY';\n break;\n case 'transform-scale-z':\n obj.functionName = 'scaleZ';\n break;\n case 'background-image':\n obj.functionName = 'url';\n break;\n }\n\n // Options\n switch (prop) {\n case 'float':\n obj.list = [{ value: 'none' }, { value: 'left' }, { value: 'right' }];\n break;\n case 'display':\n obj.list = [\n { value: 'block' },\n { value: 'inline' },\n { value: 'inline-block' },\n { value: 'none' }\n ];\n break;\n case 'position':\n obj.list = [\n { value: 'static' },\n { value: 'relative' },\n { value: 'absolute' },\n { value: 'fixed' }\n ];\n break;\n case 'font-family':\n var ss = ', sans-serif';\n var fonts = [\n 'Arial, Helvetica' + ss,\n 'Arial Black, Gadget' + ss,\n 'Brush Script MT' + ss,\n 'Comic Sans MS, cursive' + ss,\n 'Courier New, Courier, monospace',\n 'Georgia, serif',\n 'Helvetica, serif',\n 'Impact, Charcoal' + ss,\n 'Lucida Sans Unicode, Lucida Grande' + ss,\n 'Tahoma, Geneva' + ss,\n 'Times New Roman, Times, serif',\n 'Trebuchet MS, Helvetica' + ss,\n 'Verdana, Geneva' + ss\n ];\n obj.list = [];\n for (var j = 0, l = fonts.length; j < l; j++) {\n var font = {};\n font.value = fonts[j];\n font.name = fonts[j].split(',')[0];\n obj.list.push(font);\n }\n break;\n case 'font-weight':\n obj.list = [\n { value: '100', name: 'Thin' },\n { value: '200', name: 'Extra-Light' },\n { value: '300', name: 'Light' },\n { value: '400', name: 'Normal' },\n { value: '500', name: 'Medium' },\n { value: '600', name: 'Semi-Bold' },\n { value: '700', name: 'Bold' },\n { value: '800', name: 'Extra-Bold' },\n { value: '900', name: 'Ultra-Bold' }\n ];\n break;\n case 'text-align':\n obj.list = [\n { value: 'left' },\n { value: 'center' },\n { value: 'right' },\n { value: 'justify' }\n ];\n break;\n case 'border-style':\n obj.list = [\n { value: 'none' },\n { value: 'solid' },\n { value: 'dotted' },\n { value: 'dashed' },\n { value: 'double' },\n { value: 'groove' },\n { value: 'ridge' },\n { value: 'inset' },\n { value: 'outset' }\n ];\n break;\n case 'box-shadow-type':\n obj.list = [\n { value: '', name: 'Outside' },\n { value: 'inset', name: 'Inside' }\n ];\n break;\n case 'background-repeat':\n obj.list = [\n { value: 'repeat' },\n { value: 'repeat-x' },\n { value: 'repeat-y' },\n { value: 'no-repeat' }\n ];\n break;\n case 'background-position':\n obj.list = [\n { value: 'left top' },\n { value: 'left center' },\n { value: 'left bottom' },\n { value: 'right top' },\n { value: 'right center' },\n { value: 'right bottom' },\n { value: 'center top' },\n { value: 'center center' },\n { value: 'center bottom' }\n ];\n break;\n case 'background-attachment':\n obj.list = [\n { value: 'scroll' },\n { value: 'fixed' },\n { value: 'local' }\n ];\n break;\n case 'background-size':\n obj.list = [\n { value: 'auto' },\n { value: 'cover' },\n { value: 'contain' }\n ];\n break;\n case 'transition-property':\n obj.list = [\n { value: 'all' },\n { value: 'width' },\n { value: 'height' },\n { value: 'background-color' },\n { value: 'transform' },\n { value: 'box-shadow' },\n { value: 'opacity' }\n ];\n break;\n case 'transition-timing-function':\n obj.list = [\n { value: 'linear' },\n { value: 'ease' },\n { value: 'ease-in' },\n { value: 'ease-out' },\n { value: 'ease-in-out' }\n ];\n break;\n case 'cursor':\n obj.list = [\n { value: 'auto' },\n { value: 'pointer' },\n { value: 'copy' },\n { value: 'crosshair' },\n { value: 'grab' },\n { value: 'grabbing' },\n { value: 'help' },\n { value: 'move' },\n { value: 'text' }\n ];\n break;\n case 'overflow':\n obj.list = [\n { value: 'visible' },\n { value: 'hidden' },\n { value: 'scroll' },\n { value: 'auto' }\n ];\n break;\n }\n\n // Properties\n switch (prop) {\n case 'margin':\n obj.properties = this.build([\n 'margin-top',\n 'margin-right',\n 'margin-bottom',\n 'margin-left'\n ]);\n break;\n case 'padding':\n obj.properties = this.build([\n 'padding-top',\n 'padding-right',\n 'padding-bottom',\n 'padding-left'\n ]);\n break;\n case 'text-shadow':\n obj.properties = this.build([\n 'text-shadow-h',\n 'text-shadow-v',\n 'text-shadow-blur',\n 'text-shadow-color'\n ]);\n break;\n case 'border':\n obj.properties = this.build([\n 'border-width',\n 'border-style',\n 'border-color'\n ]);\n break;\n case 'border-radius':\n obj.properties = this.build([\n 'border-top-left-radius',\n 'border-top-right-radius',\n 'border-bottom-left-radius',\n 'border-bottom-right-radius'\n ]);\n break;\n case 'box-shadow':\n obj.properties = this.build([\n 'box-shadow-h',\n 'box-shadow-v',\n 'box-shadow-blur',\n 'box-shadow-spread',\n 'box-shadow-color',\n 'box-shadow-type'\n ]);\n break;\n case 'background':\n obj.properties = this.build([\n 'background-image',\n 'background-repeat',\n 'background-position',\n 'background-attachment',\n 'background-size'\n ]);\n break;\n case 'transition':\n obj.properties = this.build([\n 'transition-property',\n 'transition-duration',\n 'transition-timing-function'\n ]);\n break;\n case 'transform':\n obj.properties = this.build([\n 'transform-rotate-x',\n 'transform-rotate-y',\n 'transform-rotate-z',\n 'transform-scale-x',\n 'transform-scale-y',\n 'transform-scale-z'\n ]);\n break;\n }\n\n objs.push(obj);\n }\n\n return objs;\n }\n});\n","const Property = require('./PropertyIntegerView');\n\nmodule.exports = Property.extend({\n events() {\n return {\n ...Property.prototype.events,\n 'change [type=range]': 'inputValueChanged',\n 'input [type=range]': 'inputValueChangedSoft',\n change: ''\n };\n },\n\n templateInput(model) {\n const ppfx = this.ppfx;\n return `\n
\n \n
\n `;\n },\n\n getSliderEl() {\n if (!this.slider) {\n this.slider = this.el.querySelector('input[type=range]');\n }\n\n return this.slider;\n },\n\n inputValueChanged() {\n const model = this.model;\n const step = model.get('step');\n this.getInputEl().value = this.getSliderEl().value;\n const value = this.getInputValue() - step;\n model.set('value', value, { avoidStore: 1 }).set('value', value + step);\n this.elementUpdated();\n },\n\n inputValueChangedSoft() {\n this.getInputEl().value = this.getSliderEl().value;\n this.model.set('value', this.getInputValue(), { avoidStore: 1 });\n this.elementUpdated();\n },\n\n setValue(value) {\n this.getSliderEl().value = value;\n this.inputInst.setValue(value, { silent: 1 });\n },\n\n onRender() {\n Property.prototype.onRender.apply(this, arguments);\n\n if (!this.model.get('showInput')) {\n this.inputInst.el.style.display = 'none';\n }\n }\n});\n","const Property = require('./PropertyInteger');\n\nmodule.exports = Property.extend({\n defaults: {\n ...Property.prototype.defaults,\n showInput: 1\n }\n});\n","import Backbone from 'backbone';\n\nmodule.exports = Backbone.View.extend({\n events: {\n click: 'active',\n 'click [data-close-layer]': 'remove',\n 'mousedown [data-move-layer]': 'initSorter'\n },\n\n template(model) {\n const pfx = this.pfx;\n const label = `Layer ${model.get('index')}`;\n\n return `\n
\n \n
\n
${label}
\n
\n \t
\n
\n
\n ⨯\n
\n
\n
\n `;\n },\n\n initialize(o = {}) {\n let model = this.model;\n this.stackModel = o.stackModel || {};\n this.config = o.config || {};\n this.pfx = this.config.stylePrefix || '';\n this.sorter = o.sorter || null;\n this.propsConfig = o.propsConfig || {};\n this.customPreview = o.onPreview;\n this.listenTo(model, 'destroy remove', this.remove);\n this.listenTo(model, 'change:active', this.updateVisibility);\n this.listenTo(model.get('properties'), 'change', this.updatePreview);\n\n if (!model.get('preview')) {\n this.$el.addClass(this.pfx + 'no-preview');\n }\n\n // For the sorter\n model.view = this;\n model.set({ droppable: 0, draggable: 1 });\n this.$el.data('model', model);\n },\n\n /**\n * Delegate sorting\n * @param {Event} e\n * */\n initSorter(e) {\n if (this.sorter) this.sorter.startSort(this.el);\n },\n\n remove(e) {\n if (e && e.stopPropagation) e.stopPropagation();\n\n const model = this.model;\n const collection = model.collection;\n const stackModel = this.stackModel;\n\n Backbone.View.prototype.remove.apply(this, arguments);\n\n if (collection.contains(model)) {\n collection.remove(model);\n }\n\n if (stackModel && stackModel.set) {\n stackModel.set({ stackIndex: null }, { silent: true });\n stackModel.trigger('updateValue');\n }\n },\n\n /**\n * Default method for changing preview box\n * @param {Collection} props\n * @param {Element} $el\n */\n onPreview(value) {\n const values = value.split(' ');\n const lim = 3;\n const result = [];\n this.model.get('properties').each((prop, index) => {\n var value = values[index] || '';\n\n if (value) {\n if (prop.get('type') == 'integer') {\n let valueInt = parseInt(value, 10);\n let unit = value.replace(valueInt, '');\n valueInt = !isNaN(valueInt) ? valueInt : 0;\n valueInt = valueInt > lim ? lim : valueInt;\n valueInt = valueInt < -lim ? -lim : valueInt;\n value = valueInt + unit;\n }\n }\n\n result.push(value);\n });\n\n return result.join(' ');\n },\n\n updatePreview() {\n const stackModel = this.stackModel;\n const customPreview = this.customPreview;\n const previewEl = this.getPreviewEl();\n const value = this.model.getFullValue();\n const preview = customPreview\n ? customPreview(value)\n : this.onPreview(value);\n\n if (preview && stackModel && previewEl) {\n previewEl.style[stackModel.get('property')] = preview;\n }\n },\n\n getPropertiesWrapper() {\n if (!this.propsWrapEl) {\n this.propsWrapEl = this.el.querySelector('[data-properties]');\n }\n return this.propsWrapEl;\n },\n\n getPreviewEl() {\n if (!this.previewEl) {\n this.previewEl = this.el.querySelector('[data-preview]');\n }\n return this.previewEl;\n },\n\n active() {\n const model = this.model;\n const collection = model.collection;\n collection.active(collection.indexOf(model));\n },\n\n updateVisibility() {\n const pfx = this.pfx;\n const wrapEl = this.getPropertiesWrapper();\n const active = this.model.get('active');\n wrapEl.style.display = active ? '' : 'none';\n this.$el[active ? 'addClass' : 'removeClass'](`${pfx}active`);\n },\n\n render() {\n const PropertiesView = require('./PropertiesView');\n const propsConfig = this.propsConfig;\n const className = `${this.pfx}layer`;\n const model = this.model;\n const el = this.el;\n const properties = new PropertiesView({\n collection: model.get('properties'),\n config: this.config,\n target: propsConfig.target,\n customValue: propsConfig.customValue,\n propTarget: propsConfig.propTarget,\n onChange: propsConfig.onChange\n }).render().el;\n el.innerHTML = this.template(model);\n el.className = className;\n this.getPropertiesWrapper().appendChild(properties);\n this.updateVisibility();\n this.updatePreview();\n return this;\n }\n});\n","var Backbone = require('backbone');\nvar LayerView = require('./LayerView');\n\nmodule.exports = Backbone.View.extend({\n initialize(o) {\n this.config = o.config || {};\n this.stackModel = o.stackModel;\n this.preview = o.preview;\n this.pfx = this.config.stylePrefix || '';\n this.ppfx = this.config.pStylePrefix || '';\n this.propsConfig = o.propsConfig;\n let pfx = this.pfx;\n let ppfx = this.ppfx;\n let collection = this.collection;\n this.className = `${pfx}layers ${ppfx}field`;\n this.listenTo(collection, 'add', this.addTo);\n this.listenTo(collection, 'deselectAll', this.deselectAll);\n this.listenTo(collection, 'reset', this.render);\n\n var em = this.config.em || '';\n var utils = em ? em.get('Utils') : '';\n\n this.sorter = utils\n ? new utils.Sorter({\n container: this.el,\n ignoreViewChildren: 1,\n containerSel: `.${pfx}layers`,\n itemSel: `.${pfx}layer`,\n pfx: this.config.pStylePrefix\n })\n : '';\n\n // For the Sorter\n collection.view = this;\n this.$el.data('model', collection);\n this.$el.data('collection', collection);\n },\n\n /**\n * Add to collection\n * @param Object Model\n *\n * @return Object\n * */\n addTo(model) {\n var i = this.collection.indexOf(model);\n this.addToCollection(model, null, i);\n },\n\n /**\n * Add new object to collection\n * @param Object Model\n * @param Object Fragment collection\n * @param {number} index Index of append\n *\n * @return Object Object created\n * */\n addToCollection(model, fragmentEl, index) {\n var fragment = fragmentEl || null;\n const stackModel = this.stackModel;\n const config = this.config;\n const sorter = this.sorter;\n const propsConfig = this.propsConfig;\n\n if (typeof this.preview !== 'undefined') {\n model.set('preview', this.preview);\n }\n\n var view = new LayerView({\n model,\n config,\n sorter,\n stackModel,\n propsConfig\n });\n var rendered = view.render().el;\n\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n if (typeof index != 'undefined') {\n var method = 'before';\n // If the added model is the last of collection\n // need to change the logic of append\n if (this.$el.children().length == index) {\n index--;\n method = 'after';\n }\n // In case the added is new in the collection index will be -1\n if (index < 0) {\n this.$el.append(rendered);\n } else\n this.$el\n .children()\n .eq(index)\n [method](rendered);\n } else this.$el.append(rendered);\n }\n\n return rendered;\n },\n\n /**\n * Deselect all\n *\n * @return void\n * */\n deselectAll() {\n this.$el.find('.' + this.pfx + 'layer').removeClass(this.pfx + 'active');\n },\n\n render() {\n var fragment = document.createDocumentFragment();\n this.$el.empty();\n\n this.collection.each(function(model) {\n this.addToCollection(model, fragment);\n }, this);\n\n this.$el.append(fragment);\n this.$el.attr('class', this.className);\n\n if (this.sorter) this.sorter.plh = null;\n\n return this;\n }\n});\n","// Without jquery I have to update few stuff\n//\n// Spectrum Colorpicker v1.8.0\n// https://github.com/bgrins/spectrum\n// Author: Brian Grinstead\n// License: MIT\n\nexport default function($, undefined) {\n 'use strict';\n\n var defaultOpts = {\n // Callbacks\n beforeShow: noop,\n move: noop,\n change: noop,\n show: noop,\n hide: noop,\n\n // Options\n color: false,\n flat: false,\n showInput: false,\n allowEmpty: false,\n showButtons: true,\n clickoutFiresChange: true,\n showInitial: false,\n showPalette: false,\n showPaletteOnly: false,\n hideAfterPaletteSelect: false,\n togglePaletteOnly: false,\n showSelectionPalette: true,\n localStorageKey: false,\n appendTo: 'body',\n maxSelectionSize: 7,\n cancelText: 'cancel',\n chooseText: 'choose',\n togglePaletteMoreText: 'more',\n togglePaletteLessText: 'less',\n clearText: 'Clear Color Selection',\n noColorSelectedText: 'No Color Selected',\n preferredFormat: false,\n className: '', // Deprecated - use containerClassName and replacerClassName instead.\n containerClassName: '',\n replacerClassName: '',\n showAlpha: false,\n theme: 'sp-light',\n palette: [\n [\n '#ffffff',\n '#000000',\n '#ff0000',\n '#ff8000',\n '#ffff00',\n '#008000',\n '#0000ff',\n '#4b0082',\n '#9400d3'\n ]\n ],\n selectionPalette: [],\n disabled: false,\n offset: null\n },\n spectrums = [],\n IE = !!/msie/i.exec(window.navigator.userAgent),\n rgbaSupport = (function() {\n function contains(str, substr) {\n return !!~('' + str).indexOf(substr);\n }\n\n var elem = document.createElement('div');\n var style = elem.style;\n style.cssText = 'background-color:rgba(0,0,0,.5)';\n return (\n contains(style.backgroundColor, 'rgba') ||\n contains(style.backgroundColor, 'hsla')\n );\n })(),\n replaceInput = [\n \"
\",\n \"
\",\n \"
\",\n '
'\n ].join(''),\n markup = (function() {\n // IE does not support gradients with multiple stops, so we need to simulate\n // that for the rainbow slider with 8 divs that each have a single gradient\n var gradientFix = '';\n if (IE) {\n for (var i = 1; i <= 6; i++) {\n gradientFix += \"
\";\n }\n }\n\n return [\n \"
\",\n \"
\",\n \"
\",\n \"
\",\n \"\",\n '
',\n '
',\n \"
\",\n \"
\",\n \"
\",\n \"
\",\n \"
\",\n \"
\",\n \"
\",\n \"
\",\n '
',\n '
',\n '
',\n \"
\",\n '
',\n \"
\",\n \"
\",\n gradientFix,\n '
',\n '
',\n \"
\",\n '
',\n \"
\",\n \"\",\n '
',\n \"
\",\n \"
\",\n \"\",\n \"\",\n '
',\n '
',\n '
'\n ].join('');\n })();\n\n function paletteTemplate(p, color, className, opts) {\n var html = [];\n for (var i = 0; i < p.length; i++) {\n var current = p[i];\n if (current) {\n var tiny = tinycolor(current);\n var c =\n tiny.toHsl().l < 0.5\n ? 'sp-thumb-el sp-thumb-dark'\n : 'sp-thumb-el sp-thumb-light';\n c += tinycolor.equals(color, current) ? ' sp-thumb-active' : '';\n var formattedString = tiny.toString(opts.preferredFormat || 'rgb');\n var swatchStyle = rgbaSupport\n ? 'background-color:' + tiny.toRgbString()\n : 'filter:' + tiny.toFilter();\n html.push(\n ''\n );\n } else {\n var cls = 'sp-clear-display';\n html.push(\n $('
')\n .append(\n $(\n ''\n ).attr('title', opts.noColorSelectedText)\n )\n .html()\n );\n }\n }\n return \"
\" + html.join('') + '
';\n }\n\n function hideAll() {\n for (var i = 0; i < spectrums.length; i++) {\n if (spectrums[i]) {\n spectrums[i].hide();\n }\n }\n }\n\n function instanceOptions(o, callbackContext) {\n var opts = $.extend({}, defaultOpts, o);\n opts.callbacks = {\n move: bind(opts.move, callbackContext),\n change: bind(opts.change, callbackContext),\n show: bind(opts.show, callbackContext),\n hide: bind(opts.hide, callbackContext),\n beforeShow: bind(opts.beforeShow, callbackContext)\n };\n return opts;\n }\n\n function spectrum(element, o) {\n var opts = instanceOptions(o, element),\n flat = opts.flat,\n showSelectionPalette = opts.showSelectionPalette,\n localStorageKey = opts.localStorageKey,\n theme = opts.theme,\n callbacks = opts.callbacks,\n resize = throttle(reflow, 10),\n visible = false,\n isDragging = false,\n dragWidth = 0,\n dragHeight = 0,\n dragHelperHeight = 0,\n slideHeight = 0,\n slideWidth = 0,\n alphaWidth = 0,\n alphaSlideHelperWidth = 0,\n slideHelperHeight = 0,\n currentHue = 0,\n currentSaturation = 0,\n currentValue = 0,\n currentAlpha = 1,\n palette = [],\n paletteArray = [],\n paletteLookup = {},\n selectionPalette = opts.selectionPalette.slice(0),\n maxSelectionSize = opts.maxSelectionSize,\n draggingClass = 'sp-dragging',\n shiftMovementDirection = null;\n\n var doc = element.ownerDocument,\n body = doc.body,\n boundElement = $(element),\n disabled = false,\n container = $(markup, doc).addClass(theme),\n pickerContainer = container.find('.sp-picker-container'),\n dragger = container.find('.sp-color'),\n dragHelper = container.find('.sp-dragger'),\n slider = container.find('.sp-hue'),\n slideHelper = container.find('.sp-slider'),\n alphaSliderInner = container.find('.sp-alpha-inner'),\n alphaSlider = container.find('.sp-alpha'),\n alphaSlideHelper = container.find('.sp-alpha-handle'),\n textInput = container.find('.sp-input'),\n paletteContainer = container.find('.sp-palette'),\n initialColorContainer = container.find('.sp-initial'),\n cancelButton = container.find('.sp-cancel'),\n clearButton = container.find('.sp-clear'),\n chooseButton = container.find('.sp-choose'),\n toggleButton = container.find('.sp-palette-toggle'),\n isInput = boundElement.is('input'),\n isInputTypeColor =\n isInput &&\n boundElement.attr('type') === 'color' &&\n inputTypeColorSupport(),\n shouldReplace = isInput && !flat,\n replacer = shouldReplace\n ? $(replaceInput)\n .addClass(theme)\n .addClass(opts.className)\n .addClass(opts.replacerClassName)\n : $([]),\n offsetElement = shouldReplace ? replacer : boundElement,\n previewElement = replacer.find('.sp-preview-inner'),\n initialColor = opts.color || (isInput && boundElement.val()),\n colorOnShow = false,\n currentPreferredFormat = opts.preferredFormat,\n clickoutFiresChange = !opts.showButtons || opts.clickoutFiresChange,\n isEmpty = !initialColor,\n allowEmpty = opts.allowEmpty && !isInputTypeColor;\n\n function applyOptions() {\n if (opts.showPaletteOnly) {\n opts.showPalette = true;\n }\n\n toggleButton.text(\n opts.showPaletteOnly\n ? opts.togglePaletteMoreText\n : opts.togglePaletteLessText\n );\n\n if (opts.palette) {\n palette = opts.palette.slice(0);\n paletteArray = $.isArray(palette[0]) ? palette : [palette];\n paletteLookup = {};\n for (var i = 0; i < paletteArray.length; i++) {\n for (var j = 0; j < paletteArray[i].length; j++) {\n var rgb = tinycolor(paletteArray[i][j]).toRgbString();\n paletteLookup[rgb] = true;\n }\n }\n }\n\n container.toggleClass('sp-flat', flat);\n container.toggleClass('sp-input-disabled', !opts.showInput);\n container.toggleClass('sp-alpha-enabled', opts.showAlpha);\n container.toggleClass('sp-clear-enabled', allowEmpty);\n container.toggleClass('sp-buttons-disabled', !opts.showButtons);\n container.toggleClass(\n 'sp-palette-buttons-disabled',\n !opts.togglePaletteOnly\n );\n container.toggleClass('sp-palette-disabled', !opts.showPalette);\n container.toggleClass('sp-palette-only', opts.showPaletteOnly);\n container.toggleClass('sp-initial-disabled', !opts.showInitial);\n container.addClass(opts.className).addClass(opts.containerClassName);\n\n reflow();\n }\n\n function initialize() {\n if (IE) {\n container.find('*:not(input)').attr('unselectable', 'on');\n }\n\n applyOptions();\n\n if (shouldReplace) {\n boundElement.after(replacer).hide();\n }\n\n if (!allowEmpty) {\n clearButton.hide();\n }\n\n if (flat) {\n boundElement.after(container).hide();\n } else {\n var appendTo =\n opts.appendTo === 'parent' ? boundElement.parent() : $(opts.appendTo);\n if (appendTo.length !== 1) {\n appendTo = $('body');\n }\n\n appendTo.append(container);\n }\n\n updateSelectionPaletteFromStorage();\n\n offsetElement.bind('click.spectrum touchstart.spectrum', function(e) {\n if (!disabled) {\n toggle();\n }\n\n e.stopPropagation();\n\n if (!$(e.target).is('input')) {\n e.preventDefault();\n }\n });\n\n if (boundElement.is(':disabled') || opts.disabled === true) {\n disable();\n }\n\n // Prevent clicks from bubbling up to document. This would cause it to be hidden.\n container.click(stopPropagation);\n\n // Handle user typed input\n textInput.change(setFromTextInput);\n textInput.bind('paste', function() {\n setTimeout(setFromTextInput, 1);\n });\n textInput.keydown(function(e) {\n if (e.keyCode == 13) {\n setFromTextInput();\n }\n });\n\n cancelButton.text(opts.cancelText);\n cancelButton.bind('click.spectrum', function(e) {\n e.stopPropagation();\n e.preventDefault();\n revert();\n hide();\n });\n\n clearButton.attr('title', opts.clearText);\n clearButton.bind('click.spectrum', function(e) {\n e.stopPropagation();\n e.preventDefault();\n isEmpty = true;\n move();\n\n if (flat) {\n //for the flat style, this is a change event\n updateOriginalInput(true);\n }\n });\n\n chooseButton.text(opts.chooseText);\n chooseButton.bind('click.spectrum', function(e) {\n e.stopPropagation();\n e.preventDefault();\n\n if (IE && textInput.is(':focus')) {\n textInput.trigger('change');\n }\n\n if (isValid()) {\n updateOriginalInput(true);\n hide();\n }\n });\n\n toggleButton.text(\n opts.showPaletteOnly\n ? opts.togglePaletteMoreText\n : opts.togglePaletteLessText\n );\n toggleButton.bind('click.spectrum', function(e) {\n e.stopPropagation();\n e.preventDefault();\n\n opts.showPaletteOnly = !opts.showPaletteOnly;\n\n // To make sure the Picker area is drawn on the right, next to the\n // Palette area (and not below the palette), first move the Palette\n // to the left to make space for the picker, plus 5px extra.\n // The 'applyOptions' function puts the whole container back into place\n // and takes care of the button-text and the sp-palette-only CSS class.\n if (!opts.showPaletteOnly && !flat) {\n container.css('left', '-=' + (pickerContainer.outerWidth(true) + 5));\n }\n applyOptions();\n });\n\n draggable(\n alphaSlider,\n function(dragX, dragY, e) {\n currentAlpha = dragX / alphaWidth;\n isEmpty = false;\n if (e.shiftKey) {\n currentAlpha = Math.round(currentAlpha * 10) / 10;\n }\n\n move();\n },\n dragStart,\n dragStop\n );\n\n draggable(\n slider,\n function(dragX, dragY) {\n currentHue = parseFloat(dragY / slideHeight);\n isEmpty = false;\n if (!opts.showAlpha) {\n currentAlpha = 1;\n }\n move();\n },\n dragStart,\n dragStop\n );\n\n draggable(\n dragger,\n function(dragX, dragY, e) {\n // shift+drag should snap the movement to either the x or y axis.\n if (!e.shiftKey) {\n shiftMovementDirection = null;\n } else if (!shiftMovementDirection) {\n var oldDragX = currentSaturation * dragWidth;\n var oldDragY = dragHeight - currentValue * dragHeight;\n var furtherFromX =\n Math.abs(dragX - oldDragX) > Math.abs(dragY - oldDragY);\n\n shiftMovementDirection = furtherFromX ? 'x' : 'y';\n }\n\n var setSaturation =\n !shiftMovementDirection || shiftMovementDirection === 'x';\n var setValue =\n !shiftMovementDirection || shiftMovementDirection === 'y';\n\n if (setSaturation) {\n currentSaturation = parseFloat(dragX / dragWidth);\n }\n if (setValue) {\n currentValue = parseFloat((dragHeight - dragY) / dragHeight);\n }\n\n isEmpty = false;\n if (!opts.showAlpha) {\n currentAlpha = 1;\n }\n\n move();\n },\n dragStart,\n dragStop\n );\n\n if (!!initialColor) {\n set(initialColor);\n\n // In case color was black - update the preview UI and set the format\n // since the set function will not run (default color is black).\n updateUI();\n currentPreferredFormat =\n opts.preferredFormat || tinycolor(initialColor).format;\n\n addColorToSelectionPalette(initialColor);\n } else {\n updateUI();\n }\n\n if (flat) {\n show();\n }\n\n function paletteElementClick(e) {\n if (e.data && e.data.ignore) {\n set(\n $(e.target)\n .closest('.sp-thumb-el')\n .data('color')\n );\n move();\n } else {\n set(\n $(e.target)\n .closest('.sp-thumb-el')\n .data('color')\n );\n move();\n updateOriginalInput(true);\n if (opts.hideAfterPaletteSelect) {\n hide();\n }\n }\n\n return false;\n }\n\n var paletteEvent = IE\n ? 'mousedown.spectrum'\n : 'click.spectrum touchstart.spectrum';\n paletteContainer.delegate(\n '.sp-thumb-el',\n paletteEvent,\n paletteElementClick\n );\n initialColorContainer.delegate(\n '.sp-thumb-el:nth-child(1)',\n paletteEvent,\n { ignore: true },\n paletteElementClick\n );\n }\n\n function updateSelectionPaletteFromStorage() {\n if (localStorageKey && window.localStorage) {\n // Migrate old palettes over to new format. May want to remove this eventually.\n try {\n var oldPalette = window.localStorage[localStorageKey].split(',#');\n if (oldPalette.length > 1) {\n delete window.localStorage[localStorageKey];\n $.each(oldPalette, function(i, c) {\n addColorToSelectionPalette(c);\n });\n }\n } catch (e) {}\n\n try {\n selectionPalette = window.localStorage[localStorageKey].split(';');\n } catch (e) {}\n }\n }\n\n function addColorToSelectionPalette(color) {\n if (showSelectionPalette) {\n var rgb = tinycolor(color).toRgbString();\n if (!paletteLookup[rgb] && $.inArray(rgb, selectionPalette) === -1) {\n selectionPalette.push(rgb);\n while (selectionPalette.length > maxSelectionSize) {\n selectionPalette.shift();\n }\n }\n\n if (localStorageKey && window.localStorage) {\n try {\n window.localStorage[localStorageKey] = selectionPalette.join(';');\n } catch (e) {}\n }\n }\n }\n\n function getUniqueSelectionPalette() {\n var unique = [];\n if (opts.showPalette) {\n for (var i = 0; i < selectionPalette.length; i++) {\n var rgb = tinycolor(selectionPalette[i]).toRgbString();\n\n if (!paletteLookup[rgb]) {\n unique.push(selectionPalette[i]);\n }\n }\n }\n\n return unique.reverse().slice(0, opts.maxSelectionSize);\n }\n\n function drawPalette() {\n var currentColor = get();\n\n var html = $.map(paletteArray, function(palette, i) {\n return paletteTemplate(\n palette,\n currentColor,\n 'sp-palette-row sp-palette-row-' + i,\n opts\n );\n });\n\n updateSelectionPaletteFromStorage();\n\n if (selectionPalette) {\n html.push(\n paletteTemplate(\n getUniqueSelectionPalette(),\n currentColor,\n 'sp-palette-row sp-palette-row-selection',\n opts\n )\n );\n }\n\n paletteContainer.html(html.join(''));\n }\n\n function drawInitial() {\n if (opts.showInitial) {\n var initial = colorOnShow;\n var current = get();\n initialColorContainer.html(\n paletteTemplate(\n [initial, current],\n current,\n 'sp-palette-row-initial',\n opts\n )\n );\n }\n }\n\n function dragStart() {\n if (dragHeight <= 0 || dragWidth <= 0 || slideHeight <= 0) {\n reflow();\n }\n isDragging = true;\n container.addClass(draggingClass);\n shiftMovementDirection = null;\n boundElement.trigger('dragstart.spectrum', [get()]);\n }\n\n function dragStop() {\n isDragging = false;\n container.removeClass(draggingClass);\n boundElement.trigger('dragstop.spectrum', [get()]);\n }\n\n function setFromTextInput() {\n var value = textInput.val();\n\n if ((value === null || value === '') && allowEmpty) {\n set(null);\n updateOriginalInput(true);\n } else {\n var tiny = tinycolor(value);\n if (tiny.isValid()) {\n set(tiny);\n updateOriginalInput(true);\n } else {\n textInput.addClass('sp-validation-error');\n }\n }\n }\n\n function toggle() {\n if (visible) {\n hide();\n } else {\n show();\n }\n }\n\n function show() {\n var event = $.Event('beforeShow.spectrum');\n\n if (visible) {\n reflow();\n return;\n }\n\n boundElement.trigger(event, [get()]);\n\n if (callbacks.beforeShow(get()) === false || event.isDefaultPrevented()) {\n return;\n }\n\n hideAll();\n visible = true;\n\n var $doc = $(doc);\n $doc.bind('keydown.spectrum', onkeydown);\n $doc.bind('click.spectrum', clickout);\n $(window).bind('resize.spectrum', resize);\n replacer.addClass('sp-active');\n container.removeClass('sp-hidden');\n\n reflow();\n updateUI();\n\n colorOnShow = get();\n\n drawInitial();\n callbacks.show(colorOnShow);\n boundElement.trigger('show.spectrum', [colorOnShow]);\n }\n\n function onkeydown(e) {\n // Close on ESC\n if (e.keyCode === 27) {\n hide();\n }\n }\n\n function clickout(e) {\n // Return on right click.\n if (e.button == 2) {\n return;\n }\n\n // If a drag event was happening during the mouseup, don't hide\n // on click.\n if (isDragging) {\n return;\n }\n\n if (clickoutFiresChange) {\n updateOriginalInput(true);\n } else {\n revert();\n }\n hide();\n }\n\n function hide() {\n // Return if hiding is unnecessary\n if (!visible || flat) {\n return;\n }\n visible = false;\n\n $(doc).unbind('keydown.spectrum', onkeydown);\n $(doc).unbind('click.spectrum', clickout);\n $(window).unbind('resize.spectrum', resize);\n\n replacer.removeClass('sp-active');\n container.addClass('sp-hidden');\n\n callbacks.hide(get());\n boundElement.trigger('hide.spectrum', [get()]);\n }\n\n function revert() {\n set(colorOnShow, true);\n }\n\n function set(color, ignoreFormatChange) {\n if (tinycolor.equals(color, get())) {\n // Update UI just in case a validation error needs\n // to be cleared.\n updateUI();\n return;\n }\n\n var newColor, newHsv;\n if (!color && allowEmpty) {\n isEmpty = true;\n } else {\n isEmpty = false;\n newColor = tinycolor(color);\n newHsv = newColor.toHsv();\n\n currentHue = (newHsv.h % 360) / 360;\n currentSaturation = newHsv.s;\n currentValue = newHsv.v;\n currentAlpha = newHsv.a;\n }\n updateUI();\n\n if (newColor && newColor.isValid() && !ignoreFormatChange) {\n currentPreferredFormat = opts.preferredFormat || newColor.getFormat();\n }\n }\n\n function get(opts) {\n opts = opts || {};\n\n if (allowEmpty && isEmpty) {\n return null;\n }\n\n return tinycolor.fromRatio(\n {\n h: currentHue,\n s: currentSaturation,\n v: currentValue,\n a: Math.round(currentAlpha * 100) / 100\n },\n { format: opts.format || currentPreferredFormat }\n );\n }\n\n function isValid() {\n return !textInput.hasClass('sp-validation-error');\n }\n\n function move() {\n updateUI();\n\n callbacks.move(get());\n boundElement.trigger('move.spectrum', [get()]);\n }\n\n function updateUI() {\n textInput.removeClass('sp-validation-error');\n\n updateHelperLocations();\n\n // Update dragger background color (gradients take care of saturation and value).\n var flatColor = tinycolor.fromRatio({ h: currentHue, s: 1, v: 1 });\n dragger.css('background-color', flatColor.toHexString());\n\n // Get a format that alpha will be included in (hex and names ignore alpha)\n var format = currentPreferredFormat;\n if (currentAlpha < 1 && !(currentAlpha === 0 && format === 'name')) {\n if (\n format === 'hex' ||\n format === 'hex3' ||\n format === 'hex6' ||\n format === 'name'\n ) {\n format = 'rgb';\n }\n }\n\n var realColor = get({ format: format }),\n displayColor = '';\n\n //reset background info for preview element\n previewElement.removeClass('sp-clear-display');\n previewElement.css('background-color', 'transparent');\n\n if (!realColor && allowEmpty) {\n // Update the replaced elements background with icon indicating no color selection\n previewElement.addClass('sp-clear-display');\n } else {\n var realHex = realColor.toHexString(),\n realRgb = realColor.toRgbString();\n\n // Update the replaced elements background color (with actual selected color)\n if (rgbaSupport || realColor.alpha === 1) {\n previewElement.css('background-color', realRgb);\n } else {\n previewElement.css('background-color', 'transparent');\n previewElement.css('filter', realColor.toFilter());\n }\n\n if (opts.showAlpha) {\n var rgb = realColor.toRgb();\n rgb.a = 0;\n var realAlpha = tinycolor(rgb).toRgbString();\n var gradient =\n 'linear-gradient(left, ' + realAlpha + ', ' + realHex + ')';\n\n if (IE) {\n alphaSliderInner.css(\n 'filter',\n tinycolor(realAlpha).toFilter({ gradientType: 1 }, realHex)\n );\n } else {\n alphaSliderInner.css('background', '-webkit-' + gradient);\n alphaSliderInner.css('background', '-moz-' + gradient);\n alphaSliderInner.css('background', '-ms-' + gradient);\n // Use current syntax gradient on unprefixed property.\n alphaSliderInner.css(\n 'background',\n 'linear-gradient(to right, ' + realAlpha + ', ' + realHex + ')'\n );\n }\n }\n\n displayColor = realColor.toString(format);\n }\n\n // Update the text entry input as it changes happen\n if (opts.showInput) {\n textInput.val(displayColor);\n }\n\n if (opts.showPalette) {\n drawPalette();\n }\n\n drawInitial();\n }\n\n function updateHelperLocations() {\n var s = currentSaturation;\n var v = currentValue;\n\n if (allowEmpty && isEmpty) {\n //if selected color is empty, hide the helpers\n alphaSlideHelper.hide();\n slideHelper.hide();\n dragHelper.hide();\n } else {\n //make sure helpers are visible\n alphaSlideHelper.show();\n slideHelper.show();\n dragHelper.show();\n\n // Where to show the little circle in that displays your current selected color\n var dragX = s * dragWidth;\n var dragY = dragHeight - v * dragHeight;\n dragX = Math.max(\n -dragHelperHeight,\n Math.min(dragWidth - dragHelperHeight, dragX - dragHelperHeight)\n );\n dragY = Math.max(\n -dragHelperHeight,\n Math.min(dragHeight - dragHelperHeight, dragY - dragHelperHeight)\n );\n dragHelper.css({\n top: dragY + 'px',\n left: dragX + 'px'\n });\n\n var alphaX = currentAlpha * alphaWidth;\n alphaSlideHelper.css({\n left: alphaX - alphaSlideHelperWidth / 2 + 'px'\n });\n\n // Where to show the bar that displays your current selected hue\n var slideY = currentHue * slideHeight;\n slideHelper.css({\n top: slideY - slideHelperHeight + 'px'\n });\n }\n }\n\n function updateOriginalInput(fireCallback) {\n var color = get(),\n displayColor = '',\n hasChanged = !tinycolor.equals(color, colorOnShow);\n\n if (color) {\n displayColor = color.toString(currentPreferredFormat);\n // Update the selection palette with the current color\n addColorToSelectionPalette(color);\n }\n\n if (isInput) {\n boundElement.val(displayColor);\n }\n\n if (fireCallback && hasChanged) {\n callbacks.change(color);\n boundElement.trigger('change', [color]);\n }\n }\n\n function reflow() {\n if (!visible) {\n return; // Calculations would be useless and wouldn't be reliable anyways\n }\n dragWidth = dragger.width();\n dragHeight = dragger.height();\n dragHelperHeight = dragHelper.height();\n slideWidth = slider.width();\n slideHeight = slider.height();\n slideHelperHeight = slideHelper.height();\n alphaWidth = alphaSlider.width();\n alphaSlideHelperWidth = alphaSlideHelper.width();\n\n if (!flat) {\n container.css('position', 'absolute');\n if (opts.offset) {\n container.offset(opts.offset);\n } else {\n container.offset(getOffset(container, offsetElement));\n }\n }\n\n updateHelperLocations();\n\n if (opts.showPalette) {\n drawPalette();\n }\n\n boundElement.trigger('reflow.spectrum');\n }\n\n function destroy() {\n boundElement.show();\n offsetElement.unbind('click.spectrum touchstart.spectrum');\n container.remove();\n replacer.remove();\n spectrums[spect.id] = null;\n }\n\n function option(optionName, optionValue) {\n if (optionName === undefined) {\n return $.extend({}, opts);\n }\n if (optionValue === undefined) {\n return opts[optionName];\n }\n\n opts[optionName] = optionValue;\n\n if (optionName === 'preferredFormat') {\n currentPreferredFormat = opts.preferredFormat;\n }\n applyOptions();\n }\n\n function enable() {\n disabled = false;\n boundElement.attr('disabled', false);\n offsetElement.removeClass('sp-disabled');\n }\n\n function disable() {\n hide();\n disabled = true;\n boundElement.attr('disabled', true);\n offsetElement.addClass('sp-disabled');\n }\n\n function setOffset(coord) {\n opts.offset = coord;\n reflow();\n }\n\n initialize();\n\n var spect = {\n show: show,\n hide: hide,\n toggle: toggle,\n reflow: reflow,\n option: option,\n enable: enable,\n disable: disable,\n offset: setOffset,\n set: function(c) {\n set(c);\n updateOriginalInput();\n },\n get: get,\n destroy: destroy,\n container: container\n };\n\n spect.id = spectrums.push(spect) - 1;\n\n return spect;\n }\n\n /**\n * checkOffset - get the offset below/above and left/right element depending on screen position\n * Thanks https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js\n */\n function getOffset(picker, input) {\n var extraY = 0;\n var dpWidth = picker.outerWidth();\n var dpHeight = picker.outerHeight();\n var inputHeight = input.outerHeight();\n var doc = picker[0].ownerDocument;\n var docElem = doc.documentElement;\n var cW = docElem.clientWidth;\n var cH = docElem.clientHeight;\n var scL = $(doc).scrollLeft();\n var scT = $(doc).scrollTop();\n var viewWidth = cW + scL;\n var viewHeight = cH + scT;\n var offset = input.offset();\n\n offset.top += inputHeight;\n\n offset.left -= Math.min(\n offset.left,\n offset.left + dpWidth > viewWidth && viewWidth > dpWidth\n ? Math.abs(offset.left + dpWidth - viewWidth)\n : 0\n );\n\n offset.top -= Math.min(\n offset.top,\n offset.top + dpHeight > viewHeight && viewHeight > dpHeight\n ? Math.abs(dpHeight + inputHeight - extraY)\n : extraY\n );\n\n return offset;\n }\n\n /**\n * noop - do nothing\n */\n function noop() {}\n\n /**\n * stopPropagation - makes the code only doing this a little easier to read in line\n */\n function stopPropagation(e) {\n e.stopPropagation();\n }\n\n /**\n * Create a function bound to a given object\n * Thanks to underscore.js\n */\n function bind(func, obj) {\n var slice = Array.prototype.slice;\n var args = slice.call(arguments, 2);\n return function() {\n return func.apply(obj, args.concat(slice.call(arguments)));\n };\n }\n\n /**\n * Lightweight drag helper. Handles containment within the element, so that\n * when dragging, the x is within [0,element.width] and y is within [0,element.height]\n */\n function draggable(element, onmove, onstart, onstop) {\n onmove = onmove || function() {};\n onstart = onstart || function() {};\n onstop = onstop || function() {};\n var doc = document;\n var dragging = false;\n var offset = {};\n var maxHeight = 0;\n var maxWidth = 0;\n var hasTouch = 'ontouchstart' in window;\n\n var duringDragEvents = {};\n duringDragEvents['selectstart'] = prevent;\n duringDragEvents['dragstart'] = prevent;\n duringDragEvents['touchmove mousemove'] = move;\n duringDragEvents['touchend mouseup'] = stop;\n\n function prevent(e) {\n if (e.stopPropagation) {\n e.stopPropagation();\n }\n if (e.preventDefault) {\n e.preventDefault();\n }\n e.returnValue = false;\n }\n\n function move(e) {\n if (dragging) {\n // Mouseup happened outside of window\n if (IE && doc.documentMode < 9 && !e.button) {\n return stop();\n }\n\n var t0 =\n e.originalEvent &&\n e.originalEvent.touches &&\n e.originalEvent.touches[0];\n var pageX = (t0 && t0.pageX) || e.pageX;\n var pageY = (t0 && t0.pageY) || e.pageY;\n\n var dragX = Math.max(0, Math.min(pageX - offset.left, maxWidth));\n var dragY = Math.max(0, Math.min(pageY - offset.top, maxHeight));\n\n if (hasTouch) {\n // Stop scrolling in iOS\n prevent(e);\n }\n\n onmove.apply(element, [dragX, dragY, e]);\n }\n }\n\n function start(e) {\n var rightclick = e.which ? e.which == 3 : e.button == 2;\n\n if (!rightclick && !dragging) {\n if (onstart.apply(element, arguments) !== false) {\n dragging = true;\n maxHeight = $(element).height();\n maxWidth = $(element).width();\n offset = $(element).offset();\n\n $(doc).bind(duringDragEvents);\n $(doc.body).addClass('sp-dragging');\n\n move(e);\n\n prevent(e);\n }\n }\n }\n\n function stop() {\n if (dragging) {\n $(doc).unbind(duringDragEvents);\n $(doc.body).removeClass('sp-dragging');\n\n // Wait a tick before notifying observers to allow the click event\n // to fire in Chrome.\n setTimeout(function() {\n onstop.apply(element, arguments);\n }, 0);\n }\n dragging = false;\n }\n\n $(element).bind('touchstart mousedown', start);\n }\n\n function throttle(func, wait, debounce) {\n var timeout;\n return function() {\n var context = this,\n args = arguments;\n var throttler = function() {\n timeout = null;\n func.apply(context, args);\n };\n if (debounce) clearTimeout(timeout);\n if (debounce || !timeout) timeout = setTimeout(throttler, wait);\n };\n }\n\n function inputTypeColorSupport() {\n return $.fn.spectrum.inputTypeColorSupport();\n }\n\n /**\n * Define a jQuery plugin\n */\n var dataID = 'spectrum.id';\n $.fn.spectrum = function(opts, extra) {\n if (typeof opts == 'string') {\n var returnValue = this;\n var args = Array.prototype.slice.call(arguments, 1);\n\n this.each(function() {\n var spect = spectrums[$(this).data(dataID)];\n if (spect) {\n var method = spect[opts];\n if (!method) {\n throw new Error(\"Spectrum: no such method: '\" + opts + \"'\");\n }\n\n if (opts == 'get') {\n returnValue = spect.get();\n } else if (opts == 'container') {\n returnValue = spect.container;\n } else if (opts == 'option') {\n returnValue = spect.option.apply(spect, args);\n } else if (opts == 'destroy') {\n spect.destroy();\n $(this).removeData(dataID);\n } else {\n method.apply(spect, args);\n }\n }\n });\n\n return returnValue;\n }\n\n // Initializing a new instance of spectrum\n return this.spectrum('destroy').each(function() {\n var options = $.extend({}, opts, $(this).data());\n var spect = spectrum(this, options);\n $(this).data(dataID, spect.id);\n });\n };\n\n $.fn.spectrum.load = true;\n $.fn.spectrum.loadOpts = {};\n $.fn.spectrum.draggable = draggable;\n $.fn.spectrum.defaults = defaultOpts;\n $.fn.spectrum.inputTypeColorSupport = function inputTypeColorSupport() {\n if (typeof inputTypeColorSupport._cachedResult === 'undefined') {\n var colorInput = $(\"\")[0]; // if color element is supported, value will default to not null\n inputTypeColorSupport._cachedResult =\n colorInput.type === 'color' && colorInput.value !== '';\n }\n return inputTypeColorSupport._cachedResult;\n };\n\n $.spectrum = {};\n $.spectrum.localization = {};\n $.spectrum.palettes = {};\n\n $.fn.spectrum.processNativeColorInputs = function() {\n var colorInputs = $('input[type=color]');\n if (colorInputs.length && !inputTypeColorSupport()) {\n colorInputs.spectrum({\n preferredFormat: 'hex6'\n });\n }\n };\n\n // TinyColor v1.1.2\n // https://github.com/bgrins/TinyColor\n // Brian Grinstead, MIT License\n\n //(function() {\n\n var trimLeft = /^[\\s,#]+/,\n trimRight = /\\s+$/,\n tinyCounter = 0,\n math = Math,\n mathRound = math.round,\n mathMin = math.min,\n mathMax = math.max,\n mathRandom = math.random;\n\n var tinycolor = function(color, opts) {\n color = color ? color : '';\n opts = opts || {};\n\n // If input is already a tinycolor, return itself\n if (color instanceof tinycolor) {\n return color;\n }\n // If we are called as a function, call using new instead\n if (!(this instanceof tinycolor)) {\n return new tinycolor(color, opts);\n }\n\n var rgb = inputToRGB(color);\n (this._originalInput = color),\n (this._r = rgb.r),\n (this._g = rgb.g),\n (this._b = rgb.b),\n (this._a = rgb.a),\n (this._roundA = mathRound(100 * this._a) / 100),\n (this._format = opts.format || rgb.format);\n this._gradientType = opts.gradientType;\n\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1\n // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n if (this._r < 1) {\n this._r = mathRound(this._r);\n }\n if (this._g < 1) {\n this._g = mathRound(this._g);\n }\n if (this._b < 1) {\n this._b = mathRound(this._b);\n }\n\n this._ok = rgb.ok;\n this._tc_id = tinyCounter++;\n };\n\n tinycolor.prototype = {\n isDark: function() {\n return this.getBrightness() < 128;\n },\n isLight: function() {\n return !this.isDark();\n },\n isValid: function() {\n return this._ok;\n },\n getOriginalInput: function() {\n return this._originalInput;\n },\n getFormat: function() {\n return this._format;\n },\n getAlpha: function() {\n return this._a;\n },\n getBrightness: function() {\n var rgb = this.toRgb();\n return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n },\n setAlpha: function(value) {\n this._a = boundAlpha(value);\n this._roundA = mathRound(100 * this._a) / 100;\n return this;\n },\n toHsv: function() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };\n },\n toHsvString: function() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n var h = mathRound(hsv.h * 360),\n s = mathRound(hsv.s * 100),\n v = mathRound(hsv.v * 100);\n return this._a == 1\n ? 'hsv(' + h + ', ' + s + '%, ' + v + '%)'\n : 'hsva(' + h + ', ' + s + '%, ' + v + '%, ' + this._roundA + ')';\n },\n toHsl: function() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };\n },\n toHslString: function() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n var h = mathRound(hsl.h * 360),\n s = mathRound(hsl.s * 100),\n l = mathRound(hsl.l * 100);\n return this._a == 1\n ? 'hsl(' + h + ', ' + s + '%, ' + l + '%)'\n : 'hsla(' + h + ', ' + s + '%, ' + l + '%, ' + this._roundA + ')';\n },\n toHex: function(allow3Char) {\n return rgbToHex(this._r, this._g, this._b, allow3Char);\n },\n toHexString: function(allow3Char) {\n return '#' + this.toHex(allow3Char);\n },\n toHex8: function() {\n return rgbaToHex(this._r, this._g, this._b, this._a);\n },\n toHex8String: function() {\n return '#' + this.toHex8();\n },\n toRgb: function() {\n return {\n r: mathRound(this._r),\n g: mathRound(this._g),\n b: mathRound(this._b),\n a: this._a\n };\n },\n toRgbString: function() {\n return this._a == 1\n ? 'rgb(' +\n mathRound(this._r) +\n ', ' +\n mathRound(this._g) +\n ', ' +\n mathRound(this._b) +\n ')'\n : 'rgba(' +\n mathRound(this._r) +\n ', ' +\n mathRound(this._g) +\n ', ' +\n mathRound(this._b) +\n ', ' +\n this._roundA +\n ')';\n },\n toPercentageRgb: function() {\n return {\n r: mathRound(bound01(this._r, 255) * 100) + '%',\n g: mathRound(bound01(this._g, 255) * 100) + '%',\n b: mathRound(bound01(this._b, 255) * 100) + '%',\n a: this._a\n };\n },\n toPercentageRgbString: function() {\n return this._a == 1\n ? 'rgb(' +\n mathRound(bound01(this._r, 255) * 100) +\n '%, ' +\n mathRound(bound01(this._g, 255) * 100) +\n '%, ' +\n mathRound(bound01(this._b, 255) * 100) +\n '%)'\n : 'rgba(' +\n mathRound(bound01(this._r, 255) * 100) +\n '%, ' +\n mathRound(bound01(this._g, 255) * 100) +\n '%, ' +\n mathRound(bound01(this._b, 255) * 100) +\n '%, ' +\n this._roundA +\n ')';\n },\n toName: function() {\n if (this._a === 0) {\n return 'transparent';\n }\n\n if (this._a < 1) {\n return false;\n }\n\n return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;\n },\n toFilter: function(secondColor) {\n var hex8String = '#' + rgbaToHex(this._r, this._g, this._b, this._a);\n var secondHex8String = hex8String;\n var gradientType = this._gradientType ? 'GradientType = 1, ' : '';\n\n if (secondColor) {\n var s = tinycolor(secondColor);\n secondHex8String = s.toHex8String();\n }\n\n return (\n 'progid:DXImageTransform.Microsoft.gradient(' +\n gradientType +\n 'startColorstr=' +\n hex8String +\n ',endColorstr=' +\n secondHex8String +\n ')'\n );\n },\n toString: function(format) {\n var formatSet = !!format;\n format = format || this._format;\n\n var formattedString = false;\n var hasAlpha = this._a < 1 && this._a >= 0;\n var needsAlphaFormat =\n !formatSet &&\n hasAlpha &&\n (format === 'hex' ||\n format === 'hex6' ||\n format === 'hex3' ||\n format === 'name');\n\n if (needsAlphaFormat) {\n // Special case for \"transparent\", all other non-alpha formats\n // will return rgba when there is transparency.\n if (format === 'name' && this._a === 0) {\n return this.toName();\n }\n return this.toRgbString();\n }\n if (format === 'rgb') {\n formattedString = this.toRgbString();\n }\n if (format === 'prgb') {\n formattedString = this.toPercentageRgbString();\n }\n if (format === 'hex' || format === 'hex6') {\n formattedString = this.toHexString();\n }\n if (format === 'hex3') {\n formattedString = this.toHexString(true);\n }\n if (format === 'hex8') {\n formattedString = this.toHex8String();\n }\n if (format === 'name') {\n formattedString = this.toName();\n }\n if (format === 'hsl') {\n formattedString = this.toHslString();\n }\n if (format === 'hsv') {\n formattedString = this.toHsvString();\n }\n\n return formattedString || this.toHexString();\n },\n\n _applyModification: function(fn, args) {\n var color = fn.apply(null, [this].concat([].slice.call(args)));\n this._r = color._r;\n this._g = color._g;\n this._b = color._b;\n this.setAlpha(color._a);\n return this;\n },\n lighten: function() {\n return this._applyModification(lighten, arguments);\n },\n brighten: function() {\n return this._applyModification(brighten, arguments);\n },\n darken: function() {\n return this._applyModification(darken, arguments);\n },\n desaturate: function() {\n return this._applyModification(desaturate, arguments);\n },\n saturate: function() {\n return this._applyModification(saturate, arguments);\n },\n greyscale: function() {\n return this._applyModification(greyscale, arguments);\n },\n spin: function() {\n return this._applyModification(spin, arguments);\n },\n\n _applyCombination: function(fn, args) {\n return fn.apply(null, [this].concat([].slice.call(args)));\n },\n analogous: function() {\n return this._applyCombination(analogous, arguments);\n },\n complement: function() {\n return this._applyCombination(complement, arguments);\n },\n monochromatic: function() {\n return this._applyCombination(monochromatic, arguments);\n },\n splitcomplement: function() {\n return this._applyCombination(splitcomplement, arguments);\n },\n triad: function() {\n return this._applyCombination(triad, arguments);\n },\n tetrad: function() {\n return this._applyCombination(tetrad, arguments);\n }\n };\n\n // If input is an object, force 1 into \"1.0\" to handle ratios properly\n // String input requires \"1.0\" as input, so 1 will be treated as 1\n tinycolor.fromRatio = function(color, opts) {\n if (typeof color == 'object') {\n var newColor = {};\n for (var i in color) {\n if (color.hasOwnProperty(i)) {\n if (i === 'a') {\n newColor[i] = color[i];\n } else {\n newColor[i] = convertToPercentage(color[i]);\n }\n }\n }\n color = newColor;\n }\n\n return tinycolor(color, opts);\n };\n\n // Given a string or object, convert that input to RGB\n // Possible string inputs:\n //\n // \"red\"\n // \"#f00\" or \"f00\"\n // \"#ff0000\" or \"ff0000\"\n // \"#ff000000\" or \"ff000000\"\n // \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n // \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n // \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n // \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n // \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n // \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n // \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n //\n function inputToRGB(color) {\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var ok = false;\n var format = false;\n\n if (typeof color == 'string') {\n color = stringInputToObject(color);\n }\n\n if (typeof color == 'object') {\n if (\n color.hasOwnProperty('r') &&\n color.hasOwnProperty('g') &&\n color.hasOwnProperty('b')\n ) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n } else if (\n color.hasOwnProperty('h') &&\n color.hasOwnProperty('s') &&\n color.hasOwnProperty('v')\n ) {\n color.s = convertToPercentage(color.s);\n color.v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, color.s, color.v);\n ok = true;\n format = 'hsv';\n } else if (\n color.hasOwnProperty('h') &&\n color.hasOwnProperty('s') &&\n color.hasOwnProperty('l')\n ) {\n color.s = convertToPercentage(color.s);\n color.l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, color.s, color.l);\n ok = true;\n format = 'hsl';\n }\n\n if (color.hasOwnProperty('a')) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n }\n\n // Conversion Functions\n // --------------------\n\n // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n // \n\n // `rgbToRgb`\n // Handle bounds / percentage checking to conform to CSS color spec\n // \n // *Assumes:* r, g, b in [0, 255] or [0, 1]\n // *Returns:* { r, g, b } in [0, 255]\n function rgbToRgb(r, g, b) {\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255\n };\n }\n\n // `rgbToHsl`\n // Converts an RGB color value to HSL.\n // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n // *Returns:* { h, s, l } in [0,1]\n function rgbToHsl(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = mathMax(r, g, b),\n min = mathMin(r, g, b);\n var h,\n s,\n l = (max + min) / 2;\n\n if (max == min) {\n h = s = 0; // achromatic\n } else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n\n h /= 6;\n }\n\n return { h: h, s: s, l: l };\n }\n\n // `hslToRgb`\n // Converts an HSL color value to RGB.\n // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n // *Returns:* { r, g, b } in the set [0, 255]\n function hslToRgb(h, s, l) {\n var r, g, b;\n\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n\n function hue2rgb(p, q, t) {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1 / 6) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n }\n\n if (s === 0) {\n r = g = b = l; // achromatic\n } else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n\n return { r: r * 255, g: g * 255, b: b * 255 };\n }\n\n // `rgbToHsv`\n // Converts an RGB color value to HSV\n // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n // *Returns:* { h, s, v } in [0,1]\n function rgbToHsv(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = mathMax(r, g, b),\n min = mathMin(r, g, b);\n var h,\n s,\n v = max;\n\n var d = max - min;\n s = max === 0 ? 0 : d / max;\n\n if (max == min) {\n h = 0; // achromatic\n } else {\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n return { h: h, s: s, v: v };\n }\n\n // `hsvToRgb`\n // Converts an HSV color value to RGB.\n // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n // *Returns:* { r, g, b } in the set [0, 255]\n function hsvToRgb(h, s, v) {\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n\n var i = math.floor(h),\n f = h - i,\n p = v * (1 - s),\n q = v * (1 - f * s),\n t = v * (1 - (1 - f) * s),\n mod = i % 6,\n r = [v, q, p, p, t, v][mod],\n g = [t, v, v, q, p, p][mod],\n b = [p, p, t, v, v, q][mod];\n\n return { r: r * 255, g: g * 255, b: b * 255 };\n }\n\n // `rgbToHex`\n // Converts an RGB color to hex\n // Assumes r, g, and b are contained in the set [0, 255]\n // Returns a 3 or 6 character hex\n function rgbToHex(r, g, b, allow3Char) {\n var hex = [\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n // Return a 3 character hex if possible\n if (\n allow3Char &&\n hex[0].charAt(0) == hex[0].charAt(1) &&\n hex[1].charAt(0) == hex[1].charAt(1) &&\n hex[2].charAt(0) == hex[2].charAt(1)\n ) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n\n return hex.join('');\n }\n // `rgbaToHex`\n // Converts an RGBA color plus alpha transparency to hex\n // Assumes r, g, b and a are contained in the set [0, 255]\n // Returns an 8 character hex\n function rgbaToHex(r, g, b, a) {\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join('');\n }\n\n // `equals`\n // Can be called with any tinycolor input\n tinycolor.equals = function(color1, color2) {\n if (!color1 || !color2) {\n return false;\n }\n return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();\n };\n tinycolor.random = function() {\n return tinycolor.fromRatio({\n r: mathRandom(),\n g: mathRandom(),\n b: mathRandom()\n });\n };\n\n // Modification Functions\n // ----------------------\n // Thanks to less.js for some of the basics here\n // \n\n function desaturate(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.s -= amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n }\n\n function saturate(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.s += amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n }\n\n function greyscale(color) {\n return tinycolor(color).desaturate(100);\n }\n\n function lighten(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.l += amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n }\n\n function brighten(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var rgb = tinycolor(color).toRgb();\n rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * -(amount / 100))));\n rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * -(amount / 100))));\n rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * -(amount / 100))));\n return tinycolor(rgb);\n }\n\n function darken(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.l -= amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n }\n\n // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n // Values outside of this range will be wrapped into this range.\n function spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (mathRound(hsl.h) + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n }\n\n // Combination Functions\n // ---------------------\n // Thanks to jQuery xColor for some of the ideas behind these\n // \n\n function complement(color) {\n var hsl = tinycolor(color).toHsl();\n hsl.h = (hsl.h + 180) % 360;\n return tinycolor(hsl);\n }\n\n function triad(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })\n ];\n }\n\n function tetrad(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })\n ];\n }\n\n function splitcomplement(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l })\n ];\n }\n\n function analogous(color, results, slices) {\n results = results || 6;\n slices = slices || 30;\n\n var hsl = tinycolor(color).toHsl();\n var part = 360 / slices;\n var ret = [tinycolor(color)];\n\n for (hsl.h = (hsl.h - ((part * results) >> 1) + 720) % 360; --results; ) {\n hsl.h = (hsl.h + part) % 360;\n ret.push(tinycolor(hsl));\n }\n return ret;\n }\n\n function monochromatic(color, results) {\n results = results || 6;\n var hsv = tinycolor(color).toHsv();\n var h = hsv.h,\n s = hsv.s,\n v = hsv.v;\n var ret = [];\n var modification = 1 / results;\n\n while (results--) {\n ret.push(tinycolor({ h: h, s: s, v: v }));\n v = (v + modification) % 1;\n }\n\n return ret;\n }\n\n // Utility Functions\n // ---------------------\n\n tinycolor.mix = function(color1, color2, amount) {\n amount = amount === 0 ? 0 : amount || 50;\n\n var rgb1 = tinycolor(color1).toRgb();\n var rgb2 = tinycolor(color2).toRgb();\n\n var p = amount / 100;\n var w = p * 2 - 1;\n var a = rgb2.a - rgb1.a;\n\n var w1;\n\n if (w * a == -1) {\n w1 = w;\n } else {\n w1 = (w + a) / (1 + w * a);\n }\n\n w1 = (w1 + 1) / 2;\n\n var w2 = 1 - w1;\n\n var rgba = {\n r: rgb2.r * w1 + rgb1.r * w2,\n g: rgb2.g * w1 + rgb1.g * w2,\n b: rgb2.b * w1 + rgb1.b * w2,\n a: rgb2.a * p + rgb1.a * (1 - p)\n };\n\n return tinycolor(rgba);\n };\n\n // Readability Functions\n // ---------------------\n // \n\n // `readability`\n // Analyze the 2 colors and returns an object with the following properties:\n // `brightness`: difference in brightness between the two colors\n // `color`: difference in color/hue between the two colors\n tinycolor.readability = function(color1, color2) {\n var c1 = tinycolor(color1);\n var c2 = tinycolor(color2);\n var rgb1 = c1.toRgb();\n var rgb2 = c2.toRgb();\n var brightnessA = c1.getBrightness();\n var brightnessB = c2.getBrightness();\n var colorDiff =\n Math.max(rgb1.r, rgb2.r) -\n Math.min(rgb1.r, rgb2.r) +\n Math.max(rgb1.g, rgb2.g) -\n Math.min(rgb1.g, rgb2.g) +\n Math.max(rgb1.b, rgb2.b) -\n Math.min(rgb1.b, rgb2.b);\n\n return {\n brightness: Math.abs(brightnessA - brightnessB),\n color: colorDiff\n };\n };\n\n // `readable`\n // http://www.w3.org/TR/AERT#color-contrast\n // Ensure that foreground and background color combinations provide sufficient contrast.\n // *Example*\n // tinycolor.isReadable(\"#000\", \"#111\") => false\n tinycolor.isReadable = function(color1, color2) {\n var readability = tinycolor.readability(color1, color2);\n return readability.brightness > 125 && readability.color > 500;\n };\n\n // `mostReadable`\n // Given a base color and a list of possible foreground or background\n // colors for that base, returns the most readable color.\n // *Example*\n // tinycolor.mostReadable(\"#123\", [\"#fff\", \"#000\"]) => \"#000\"\n tinycolor.mostReadable = function(baseColor, colorList) {\n var bestColor = null;\n var bestScore = 0;\n var bestIsReadable = false;\n for (var i = 0; i < colorList.length; i++) {\n // We normalize both around the \"acceptable\" breaking point,\n // but rank brightness constrast higher than hue.\n\n var readability = tinycolor.readability(baseColor, colorList[i]);\n var readable = readability.brightness > 125 && readability.color > 500;\n var score = 3 * (readability.brightness / 125) + readability.color / 500;\n\n if (\n (readable && !bestIsReadable) ||\n (readable && bestIsReadable && score > bestScore) ||\n (!readable && !bestIsReadable && score > bestScore)\n ) {\n bestIsReadable = readable;\n bestScore = score;\n bestColor = tinycolor(colorList[i]);\n }\n }\n return bestColor;\n };\n\n // Big List of Colors\n // ------------------\n // \n var names = (tinycolor.names = {\n aliceblue: 'f0f8ff',\n antiquewhite: 'faebd7',\n aqua: '0ff',\n aquamarine: '7fffd4',\n azure: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '000',\n blanchedalmond: 'ffebcd',\n blue: '00f',\n blueviolet: '8a2be2',\n brown: 'a52a2a',\n burlywood: 'deb887',\n burntsienna: 'ea7e5d',\n cadetblue: '5f9ea0',\n chartreuse: '7fff00',\n chocolate: 'd2691e',\n coral: 'ff7f50',\n cornflowerblue: '6495ed',\n cornsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: '0ff',\n darkblue: '00008b',\n darkcyan: '008b8b',\n darkgoldenrod: 'b8860b',\n darkgray: 'a9a9a9',\n darkgreen: '006400',\n darkgrey: 'a9a9a9',\n darkkhaki: 'bdb76b',\n darkmagenta: '8b008b',\n darkolivegreen: '556b2f',\n darkorange: 'ff8c00',\n darkorchid: '9932cc',\n darkred: '8b0000',\n darksalmon: 'e9967a',\n darkseagreen: '8fbc8f',\n darkslateblue: '483d8b',\n darkslategray: '2f4f4f',\n darkslategrey: '2f4f4f',\n darkturquoise: '00ced1',\n darkviolet: '9400d3',\n deeppink: 'ff1493',\n deepskyblue: '00bfff',\n dimgray: '696969',\n dimgrey: '696969',\n dodgerblue: '1e90ff',\n firebrick: 'b22222',\n floralwhite: 'fffaf0',\n forestgreen: '228b22',\n fuchsia: 'f0f',\n gainsboro: 'dcdcdc',\n ghostwhite: 'f8f8ff',\n gold: 'ffd700',\n goldenrod: 'daa520',\n gray: '808080',\n green: '008000',\n greenyellow: 'adff2f',\n grey: '808080',\n honeydew: 'f0fff0',\n hotpink: 'ff69b4',\n indianred: 'cd5c5c',\n indigo: '4b0082',\n ivory: 'fffff0',\n khaki: 'f0e68c',\n lavender: 'e6e6fa',\n lavenderblush: 'fff0f5',\n lawngreen: '7cfc00',\n lemonchiffon: 'fffacd',\n lightblue: 'add8e6',\n lightcoral: 'f08080',\n lightcyan: 'e0ffff',\n lightgoldenrodyellow: 'fafad2',\n lightgray: 'd3d3d3',\n lightgreen: '90ee90',\n lightgrey: 'd3d3d3',\n lightpink: 'ffb6c1',\n lightsalmon: 'ffa07a',\n lightseagreen: '20b2aa',\n lightskyblue: '87cefa',\n lightslategray: '789',\n lightslategrey: '789',\n lightsteelblue: 'b0c4de',\n lightyellow: 'ffffe0',\n lime: '0f0',\n limegreen: '32cd32',\n linen: 'faf0e6',\n magenta: 'f0f',\n maroon: '800000',\n mediumaquamarine: '66cdaa',\n mediumblue: '0000cd',\n mediumorchid: 'ba55d3',\n mediumpurple: '9370db',\n mediumseagreen: '3cb371',\n mediumslateblue: '7b68ee',\n mediumspringgreen: '00fa9a',\n mediumturquoise: '48d1cc',\n mediumvioletred: 'c71585',\n midnightblue: '191970',\n mintcream: 'f5fffa',\n mistyrose: 'ffe4e1',\n moccasin: 'ffe4b5',\n navajowhite: 'ffdead',\n navy: '000080',\n oldlace: 'fdf5e6',\n olive: '808000',\n olivedrab: '6b8e23',\n orange: 'ffa500',\n orangered: 'ff4500',\n orchid: 'da70d6',\n palegoldenrod: 'eee8aa',\n palegreen: '98fb98',\n paleturquoise: 'afeeee',\n palevioletred: 'db7093',\n papayawhip: 'ffefd5',\n peachpuff: 'ffdab9',\n peru: 'cd853f',\n pink: 'ffc0cb',\n plum: 'dda0dd',\n powderblue: 'b0e0e6',\n purple: '800080',\n rebeccapurple: '663399',\n red: 'f00',\n rosybrown: 'bc8f8f',\n royalblue: '4169e1',\n saddlebrown: '8b4513',\n salmon: 'fa8072',\n sandybrown: 'f4a460',\n seagreen: '2e8b57',\n seashell: 'fff5ee',\n sienna: 'a0522d',\n silver: 'c0c0c0',\n skyblue: '87ceeb',\n slateblue: '6a5acd',\n slategray: '708090',\n slategrey: '708090',\n snow: 'fffafa',\n springgreen: '00ff7f',\n steelblue: '4682b4',\n tan: 'd2b48c',\n teal: '008080',\n thistle: 'd8bfd8',\n tomato: 'ff6347',\n turquoise: '40e0d0',\n violet: 'ee82ee',\n wheat: 'f5deb3',\n white: 'fff',\n whitesmoke: 'f5f5f5',\n yellow: 'ff0',\n yellowgreen: '9acd32'\n });\n\n // Make it easy to access colors via `hexNames[hex]`\n var hexNames = (tinycolor.hexNames = flip(names));\n\n // Utilities\n // ---------\n\n // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`\n function flip(o) {\n var flipped = {};\n for (var i in o) {\n if (o.hasOwnProperty(i)) {\n flipped[o[i]] = i;\n }\n }\n return flipped;\n }\n\n // Return a valid alpha value [0,1] with all invalid values being set to 1\n function boundAlpha(a) {\n a = parseFloat(a);\n\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return a;\n }\n\n // Take input from [0, n] and return it as [0, 1]\n function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n\n var processPercent = isPercentage(n);\n n = mathMin(max, mathMax(0, parseFloat(n)));\n\n // Automatically convert percentage into number\n if (processPercent) {\n n = parseInt(n * max, 10) / 100;\n }\n\n // Handle floating point rounding errors\n if (math.abs(n - max) < 0.000001) {\n return 1;\n }\n\n // Convert into [0, 1] range if it isn't already\n return (n % max) / parseFloat(max);\n }\n\n // Force a number between 0 and 1\n function clamp01(val) {\n return mathMin(1, mathMax(0, val));\n }\n\n // Parse a base-16 hex value into a base-10 integer\n function parseIntFromHex(val) {\n return parseInt(val, 16);\n }\n\n // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n // \n function isOnePointZero(n) {\n return typeof n == 'string' && n.indexOf('.') != -1 && parseFloat(n) === 1;\n }\n\n // Check to see if string passed in is a percentage\n function isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') != -1;\n }\n\n // Force a hex value to have 2 characters\n function pad2(c) {\n return c.length == 1 ? '0' + c : '' + c;\n }\n\n // Replace a decimal with it's percentage value\n function convertToPercentage(n) {\n if (n <= 1) {\n n = n * 100 + '%';\n }\n\n return n;\n }\n\n // Converts a decimal to a hex value\n function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }\n // Converts a hex value to a decimal\n function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n }\n\n var matchers = (function() {\n // \n var CSS_INTEGER = '[-\\\\+]?\\\\d+%?';\n\n // \n var CSS_NUMBER = '[-\\\\+]?\\\\d*\\\\.\\\\d+%?';\n\n // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\n var CSS_UNIT = '(?:' + CSS_NUMBER + ')|(?:' + CSS_INTEGER + ')';\n\n // Actual matching.\n // Parentheses and commas are optional, but not required.\n // Whitespace can take the place of commas or opening paren\n var PERMISSIVE_MATCH3 =\n '[\\\\s|\\\\(]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')\\\\s*\\\\)?';\n var PERMISSIVE_MATCH4 =\n '[\\\\s|\\\\(]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')\\\\s*\\\\)?';\n\n return {\n rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),\n rgba: new RegExp('rgba' + PERMISSIVE_MATCH4),\n hsl: new RegExp('hsl' + PERMISSIVE_MATCH3),\n hsla: new RegExp('hsla' + PERMISSIVE_MATCH4),\n hsv: new RegExp('hsv' + PERMISSIVE_MATCH3),\n hsva: new RegExp('hsva' + PERMISSIVE_MATCH4),\n hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex8: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/\n };\n })();\n\n // `stringInputToObject`\n // Permissive string parsing. Take in a number of formats, and output an object\n // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\n function stringInputToObject(color) {\n color = color\n .replace(trimLeft, '')\n .replace(trimRight, '')\n .toLowerCase();\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n } else if (color == 'transparent') {\n return { r: 0, g: 0, b: 0, a: 0, format: 'name' };\n }\n\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match;\n if ((match = matchers.rgb.exec(color))) {\n return { r: match[1], g: match[2], b: match[3] };\n }\n if ((match = matchers.rgba.exec(color))) {\n return { r: match[1], g: match[2], b: match[3], a: match[4] };\n }\n if ((match = matchers.hsl.exec(color))) {\n return { h: match[1], s: match[2], l: match[3] };\n }\n if ((match = matchers.hsla.exec(color))) {\n return { h: match[1], s: match[2], l: match[3], a: match[4] };\n }\n if ((match = matchers.hsv.exec(color))) {\n return { h: match[1], s: match[2], v: match[3] };\n }\n if ((match = matchers.hsva.exec(color))) {\n return { h: match[1], s: match[2], v: match[3], a: match[4] };\n }\n if ((match = matchers.hex8.exec(color))) {\n return {\n a: convertHexToDecimal(match[1]),\n r: parseIntFromHex(match[2]),\n g: parseIntFromHex(match[3]),\n b: parseIntFromHex(match[4]),\n format: named ? 'name' : 'hex8'\n };\n }\n if ((match = matchers.hex6.exec(color))) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? 'name' : 'hex'\n };\n }\n if ((match = matchers.hex3.exec(color))) {\n return {\n r: parseIntFromHex(match[1] + '' + match[1]),\n g: parseIntFromHex(match[2] + '' + match[2]),\n b: parseIntFromHex(match[3] + '' + match[3]),\n format: named ? 'name' : 'hex'\n };\n }\n\n return false;\n }\n\n window.tinycolor = tinycolor;\n //})();\n\n $(function() {\n if ($.fn.spectrum.load) {\n $.fn.spectrum.processNativeColorInputs();\n }\n });\n}\n","import Backbone from 'backbone';\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n index: '',\n value: '',\n values: {},\n active: false,\n preview: false,\n properties: []\n },\n\n initialize() {\n const Properties = require('./Properties');\n const properties = this.get('properties');\n var value = this.get('value');\n this.set(\n 'properties',\n properties instanceof Properties ? properties : new Properties(properties)\n );\n\n // If there is no value I'll try to get it from values\n // I need value setted to make preview working\n if (!value) {\n var val = '';\n var values = this.get('values');\n\n for (var prop in values) {\n val += ' ' + values[prop];\n }\n\n this.set('value', val.trim());\n }\n },\n\n getPropertyValue(property) {\n let result = '';\n this.get('properties').each(prop => {\n if (prop.get('property') == property) {\n result = prop.getFullValue();\n }\n });\n return result;\n },\n\n getFullValue() {\n let result = [];\n this.get('properties').each(prop => result.push(prop.getFullValue()));\n return result.join(' ');\n }\n});\n","import Backbone from 'backbone';\nconst Layer = require('./Layer');\n\nmodule.exports = Backbone.Collection.extend({\n model: Layer,\n\n initialize() {\n this.idx = 1;\n this.on('add', this.onAdd);\n this.on('reset', this.onReset);\n },\n\n onAdd(model, c, opts) {\n if (!opts.noIncrement) model.set('index', this.idx++);\n },\n\n onReset() {\n this.idx = 1;\n },\n\n /**\n * Get layers from a value string (for not detached properties),\n * example of input:\n * `layer1Value, layer2Value, layer3Value, ...`\n * @param {string} value\n * @return {Array}\n * @private\n */\n getLayersFromValue(value) {\n const layers = [];\n // Remove spaces inside functions, eg:\n // From: 1px 1px rgba(2px, 2px, 2px), 2px 2px rgba(3px, 3px, 3px)\n // To: 1px 1px rgba(2px,2px,2px), 2px 2px rgba(3px,3px,3px)\n value.replace(/\\(([\\w\\s,.]*)\\)/g, match => {\n var cleaned = match.replace(/,\\s*/g, ',');\n value = value.replace(match, cleaned);\n });\n const layerValues = value ? value.split(', ') : [];\n layerValues.forEach(layerValue => {\n layers.push({ properties: this.properties.parseValue(layerValue) });\n });\n return layers;\n },\n\n /**\n * Get layers from a style object (for detached properties),\n * example of input:\n * {\n * subPropname1: sub-propvalue11, sub-propvalue12, sub-propvalue13, ...\n * subPropname2: sub-propvalue21, sub-propvalue22, sub-propvalue23, ...\n * subPropname3: sub-propvalue31, sub-propvalue32, sub-propvalue33, ...\n * }\n * @param {Object} styleObj\n * @return {Array}\n * @private\n */\n getLayersFromStyle(styleObj) {\n const layers = [];\n const properties = this.properties;\n const propNames = properties.pluck('property');\n\n properties.each(propModel => {\n const style = styleObj[propModel.get('property')];\n const values = style ? style.split(', ') : [];\n values.forEach((value, i) => {\n value = propModel.parseValue(value.trim()).value;\n const layer = layers[i];\n const propertyObj = { ...propModel.attributes, ...{ value } };\n\n if (layer) {\n layer.properties.push(propertyObj);\n } else {\n layers[i] = {\n properties: [propertyObj]\n };\n }\n });\n });\n\n // Now whit all layers in, will check missing properties\n layers.forEach(layer => {\n const layerProprs = layer.properties.map(prop => prop.property);\n properties.each(propModel => {\n const propertyName = propModel.get('property');\n\n if (layerProprs.indexOf(propertyName) < 0) {\n layer.properties.push({ ...propModel.attributes });\n }\n });\n });\n\n return layers;\n },\n\n active(index) {\n this.each(layer => layer.set('active', 0));\n const layer = this.at(index);\n layer && layer.set('active', 1);\n },\n\n getFullValue() {\n let result = [];\n this.each(layer => result.push(layer.getFullValue()));\n return result.join(', ');\n },\n\n getPropertyValues(property) {\n const result = [];\n this.each(layer => {\n const value = layer.getPropertyValue(property);\n value && result.push(value);\n });\n return result.join(', ');\n }\n});\n","const Property = require('./PropertyComposite');\nconst Layers = require('./Layers');\n\nmodule.exports = Property.extend({\n defaults: {\n ...Property.prototype.defaults,\n // Array of layers (which contain properties)\n layers: [],\n\n // Layer preview\n preview: 0\n },\n\n init() {\n Property.prototype.init.apply(this, arguments);\n const layers = this.get('layers');\n const layersColl = new Layers(layers);\n layersColl.properties = this.get('properties');\n this.set('layers', layersColl);\n },\n\n getFullValue() {\n return this.get('detached') ? '' : this.get('layers').getFullValue();\n }\n});\n","import { extend } from 'underscore';\n\nconst Backbone = require('backbone');\nconst Properties = require('./Properties');\nconst PropertyFactory = require('./PropertyFactory');\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n id: '',\n name: '',\n open: true,\n buildProps: '',\n extendBuilded: 1,\n properties: []\n },\n\n initialize(opts) {\n var o = opts || {};\n var props = [];\n var builded = this.buildProperties(o.buildProps);\n !this.get('id') && this.set('id', this.get('name'));\n\n if (!builded) props = this.get('properties');\n else props = this.extendProperties(builded);\n\n var propsModel = new Properties(props);\n propsModel.sector = this;\n this.set('properties', propsModel);\n },\n\n /**\n * Extend properties\n * @param {Array} props Start properties\n * @param {Array} moProps Model props\n * @param {Boolean} ex Returns the same amount of passed model props\n * @return {Array} Final props\n * @private\n */\n extendProperties(props, moProps, ex) {\n var pLen = props.length;\n var mProps = moProps || this.get('properties');\n var ext = this.get('extendBuilded');\n var isolated = [];\n\n for (var i = 0, len = mProps.length; i < len; i++) {\n var mProp = mProps[i];\n var found = 0;\n\n for (var j = 0; j < pLen; j++) {\n var prop = props[j];\n if (mProp.property == prop.property || mProp.id == prop.property) {\n // Check for nested properties\n var mPProps = mProp.properties;\n if (mPProps && mPProps.length) {\n mProp.properties = this.extendProperties(\n prop.properties,\n mPProps,\n 1\n );\n }\n props[j] = ext ? extend(prop, mProp) : mProp;\n isolated[j] = props[j];\n found = 1;\n continue;\n }\n }\n\n if (!found) {\n props.push(mProp);\n isolated.push(mProp);\n }\n }\n\n return ex ? isolated : props;\n },\n\n /**\n * Build properties\n * @param {Array} propr Array of props as sting\n * @return {Array}\n * @private\n */\n buildProperties(props) {\n var r;\n var buildP = props || [];\n\n if (!buildP.length) return;\n\n if (!this.propFactory) this.propFactory = new PropertyFactory();\n\n r = this.propFactory.build(buildP);\n\n return r;\n }\n});\n","const Sector = require('./Sector');\n\nmodule.exports = require('backbone').Collection.extend({\n model: Sector\n});\n","module.exports = {\n stylePrefix: 'sm-',\n\n sectors: [],\n\n // Specify the element to use as a container, string (query) or HTMLElement\n // With the empty value, nothing will be rendered\n appendTo: '',\n\n // Text to show in case no element selected\n textNoElement: 'Select an element before using Style Manager',\n\n // Hide the property in case it's not stylable for the\n // selected component (each component has 'stylable' property)\n hideNotStylable: true,\n\n // Highlight changed properties of the selected component\n highlightChanged: true,\n\n // Highlight computed properties of the selected component\n highlightComputed: true,\n\n // Show computed properties of the selected component, if this value\n // is set to false, highlightComputed will not take effect\n showComputed: true,\n\n // Adds the possibility to clear property value from the target style\n clearProperties: 0,\n\n // Properties not to take in account for computed styles\n avoidComputed: ['width', 'height']\n};\n","module.exports = {\n stylePrefix: 'rte-',\n\n // If true, moves the toolbar below the element when the top canvas\n // edge is reached\n adjustToolbar: 1,\n\n // Default RTE actions\n actions: ['bold', 'italic', 'underline', 'strikethrough', 'link']\n};\n","// The initial version of this RTE was borrowed from https://github.com/jaredreich/pell\n// and adapted to the GrapesJS's need\n\nimport { on, off } from 'utils/mixins';\n\nconst RTE_KEY = '_rte';\n\nconst defActions = {\n bold: {\n name: 'bold',\n icon: 'B',\n attributes: { title: 'Bold' },\n result: rte => rte.exec('bold')\n },\n italic: {\n name: 'italic',\n icon: 'I',\n attributes: { title: 'Italic' },\n result: rte => rte.exec('italic')\n },\n underline: {\n name: 'underline',\n icon: 'U',\n attributes: { title: 'Underline' },\n result: rte => rte.exec('underline')\n },\n strikethrough: {\n name: 'strikethrough',\n icon: 'S',\n attributes: { title: 'Strike-through' },\n result: rte => rte.exec('strikeThrough')\n },\n link: {\n icon: ``,\n name: 'link',\n attributes: {\n style: 'font-size:1.4rem;padding:0 4px 2px;',\n title: 'Link'\n },\n result: rte =>\n rte.insertHTML(`${rte.selection()}`)\n }\n};\n\nexport default class RichTextEditor {\n constructor(settings = {}) {\n const el = settings.el;\n\n if (el[RTE_KEY]) {\n return el[RTE_KEY];\n }\n\n el[RTE_KEY] = this;\n this.setEl(el);\n this.updateActiveActions = this.updateActiveActions.bind(this);\n\n const settAct = settings.actions || [];\n settAct.forEach((action, i) => {\n if (typeof action === 'string') {\n action = defActions[action];\n } else if (defActions[action.name]) {\n action = { ...defActions[action.name], ...action };\n }\n settAct[i] = action;\n });\n const actions = settAct.length\n ? settAct\n : Object.keys(defActions).map(action => defActions[action]);\n\n settings.classes = {\n ...{\n actionbar: 'actionbar',\n button: 'action',\n active: 'active'\n },\n ...settings.classes\n };\n\n const classes = settings.classes;\n let actionbar = settings.actionbar;\n this.actionbar = actionbar;\n this.settings = settings;\n this.classes = classes;\n this.actions = actions;\n\n if (!actionbar) {\n const actionbarCont = settings.actionbarContainer;\n actionbar = document.createElement('div');\n actionbar.className = classes.actionbar;\n actionbarCont.appendChild(actionbar);\n this.actionbar = actionbar;\n actions.forEach(action => this.addAction(action));\n }\n\n settings.styleWithCSS && this.exec('styleWithCSS');\n this.syncActions();\n\n return this;\n }\n\n setEl(el) {\n this.el = el;\n this.doc = el.ownerDocument;\n }\n\n updateActiveActions() {\n this.getActions().forEach(action => {\n const btn = action.btn;\n const update = action.update;\n const active = this.classes.active;\n const name = action.name;\n const doc = this.doc;\n btn.className = btn.className.replace(active, '').trim();\n\n // doc.queryCommandValue(name) != 'false'\n if (doc.queryCommandSupported(name) && doc.queryCommandState(name)) {\n btn.className += ` ${active}`;\n }\n\n update && update(this, action);\n });\n }\n\n enable() {\n if (this.enabled) {\n return this;\n }\n\n this.actionbarEl().style.display = '';\n this.el.contentEditable = true;\n on(this.el, 'mouseup keyup', this.updateActiveActions);\n this.syncActions();\n this.updateActiveActions();\n this.el.focus();\n this.enabled = 1;\n return this;\n }\n\n disable() {\n this.actionbarEl().style.display = 'none';\n this.el.contentEditable = false;\n off(this.el, 'mouseup keyup', this.updateActiveActions);\n this.enabled = 0;\n return this;\n }\n\n /**\n * Sync actions with the current RTE\n */\n syncActions() {\n this.getActions().forEach(action => {\n const event = action.event || 'click';\n action.btn[`on${event}`] = e => {\n action.result(this, action);\n this.updateActiveActions();\n };\n });\n }\n\n /**\n * Add new action to the actionbar\n * @param {Object} action\n * @param {Object} [opts={}]\n */\n addAction(action, opts = {}) {\n const sync = opts.sync;\n const btn = document.createElement('span');\n const icon = action.icon;\n const attr = action.attributes || {};\n btn.className = this.classes.button;\n action.btn = btn;\n\n for (let key in attr) {\n btn.setAttribute(key, attr[key]);\n }\n\n if (typeof icon == 'string') {\n btn.innerHTML = icon;\n } else {\n btn.appendChild(icon);\n }\n\n this.actionbarEl().appendChild(btn);\n\n if (sync) {\n this.actions.push(action);\n this.syncActions();\n }\n }\n\n /**\n * Get the array of current actions\n * @return {Array}\n */\n getActions() {\n return this.actions;\n }\n\n /**\n * Returns the Selection instance\n * @return {Selection}\n */\n selection() {\n return this.doc.getSelection();\n }\n\n /**\n * Execute the command\n * @param {string} command Command name\n * @param {any} [value=null Command's arguments\n */\n exec(command, value = null) {\n this.doc.execCommand(command, false, value);\n }\n\n /**\n * Get the actionbar element\n * @return {HTMLElement}\n */\n actionbarEl() {\n return this.actionbar;\n }\n\n /**\n * Set custom HTML to the selection, useful as the default 'insertHTML' command\n * doesn't work in the same way on all browsers\n * @param {string} value HTML string\n */\n insertHTML(value) {\n let lastNode;\n const doc = this.doc;\n const sel = doc.getSelection();\n\n if (sel && sel.rangeCount) {\n const node = doc.createElement('div');\n const range = sel.getRangeAt(0);\n range.deleteContents();\n node.innerHTML = value;\n Array.prototype.slice.call(node.childNodes).forEach(nd => {\n range.insertNode(nd);\n lastNode = nd;\n });\n\n sel.removeAllRanges();\n sel.addRange(range);\n this.el.focus();\n }\n }\n}\n","/**\n * This module allows to customize the built-in toolbar of the Rich Text Editor and use commands from the [HTML Editing APIs](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand).\n * It's highly recommended to keep this toolbar as small as possible, especially from styling commands (eg. 'fontSize') and leave this task to the Style Manager\n *\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/rich_text_editor/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * rte: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const rte = editor.RichTextEditor;\n * ```\n *\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getall)\n * * [remove](#remove)\n * * [getToolbarEl](#gettoolbarel)\n *\n * @module RichTextEditor\n */\n\nimport RichTextEditor from './model/RichTextEditor';\nimport { on, off } from 'utils/mixins';\n\nmodule.exports = () => {\n let config = {};\n const defaults = require('./config/config');\n let toolbar, actions, lastEl, globalRte;\n\n const hideToolbar = () => {\n const style = toolbar.style;\n const size = '-100px';\n style.top = size;\n style.left = size;\n style.display = 'none';\n };\n\n return {\n customRte: null,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'RichTextEditor',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} opts Options\n * @private\n */\n init(opts = {}) {\n config = opts;\n\n for (let name in defaults) {\n if (!(name in config)) {\n config[name] = defaults[name];\n }\n }\n\n const ppfx = config.pStylePrefix;\n\n if (ppfx) {\n config.stylePrefix = ppfx + config.stylePrefix;\n }\n\n this.pfx = config.stylePrefix;\n actions = config.actions || [];\n toolbar = document.createElement('div');\n toolbar.className = `${ppfx}rte-toolbar ${ppfx}one-bg`;\n globalRte = this.initRte(document.createElement('div'));\n\n //Avoid closing on toolbar clicking\n on(toolbar, 'mousedown', e => e.stopPropagation());\n return this;\n },\n\n /**\n * Post render callback\n * @param {View} ev\n * @private\n */\n postRender(ev) {\n const canvas = ev.model.get('Canvas');\n toolbar.style.pointerEvents = 'all';\n hideToolbar();\n canvas.getToolsEl().appendChild(toolbar);\n },\n\n /**\n * Init the built-in RTE\n * @param {HTMLElement} el\n * @return {RichTextEditor}\n * @private\n */\n initRte(el) {\n const pfx = this.pfx;\n const actionbarContainer = toolbar;\n const actionbar = this.actionbar;\n const actions = this.actions || config.actions;\n const classes = {\n actionbar: `${pfx}actionbar`,\n button: `${pfx}action`,\n active: `${pfx}active`\n };\n const rte = new RichTextEditor({\n el,\n classes,\n actions,\n actionbar,\n actionbarContainer\n });\n globalRte && globalRte.setEl(el);\n\n if (rte.actionbar) {\n this.actionbar = rte.actionbar;\n }\n\n if (rte.actions) {\n this.actions = rte.actions;\n }\n\n return rte;\n },\n\n /**\n * Add a new action to the built-in RTE toolbar\n * @param {string} name Action name\n * @param {Object} action Action options\n * @example\n * rte.add('bold', {\n * icon: 'B',\n * attributes: {title: 'Bold',}\n * result: rte => rte.exec('bold')\n * });\n * rte.add('link', {\n * icon: document.getElementById('t'),\n * attributes: {title: 'Link',}\n * // Example on it's easy to wrap a selected content\n * result: rte => rte.insertHTML(`${rte.selection()}`)\n * });\n * // An example with fontSize\n * rte.add('fontSize', {\n * icon: ``,\n * // Bind the 'result' on 'change' listener\n * event: 'change',\n * result: (rte, action) => rte.exec('fontSize', action.btn.firstChild.value),\n * // Callback on any input change (mousedown, keydown, etc..)\n * update: (rte, action) => {\n * const value = rte.doc.queryCommandValue(action.name);\n * if (value != 'false') { // value is a string\n * action.btn.firstChild.value = value;\n * }\n * }\n * })\n */\n add(name, action = {}) {\n action.name = name;\n globalRte.addAction(action, { sync: 1 });\n },\n\n /**\n * Get the action by its name\n * @param {string} name Action name\n * @return {Object}\n * @example\n * const action = rte.get('bold');\n * // {name: 'bold', ...}\n */\n get(name) {\n let result;\n globalRte.getActions().forEach(action => {\n if (action.name == name) {\n result = action;\n }\n });\n return result;\n },\n\n /**\n * Get all actions\n * @return {Array}\n */\n getAll() {\n return globalRte.getActions();\n },\n\n /**\n * Remove the action from the toolbar\n * @param {string} name\n * @return {Object} Removed action\n * @example\n * const action = rte.remove('bold');\n * // {name: 'bold', ...}\n */\n remove(name) {\n const actions = this.getAll();\n const action = this.get(name);\n\n if (action) {\n const btn = action.btn;\n const index = actions.indexOf(action);\n btn.parentNode.removeChild(btn);\n actions.splice(index, 1);\n }\n\n return action;\n },\n\n /**\n * Get the toolbar element\n * @return {HTMLElement}\n */\n getToolbarEl() {\n return toolbar;\n },\n\n /**\n * Triggered when the offset of the editor is changed\n * @private\n */\n udpatePosition() {\n const un = 'px';\n const canvas = config.em.get('Canvas');\n const pos = canvas.getTargetToElementDim(toolbar, lastEl, {\n event: 'rteToolbarPosUpdate'\n });\n\n if (pos) {\n if (config.adjustToolbar) {\n // Move the toolbar down when the top canvas edge is reached\n if (pos.top <= pos.canvasTop) {\n pos.top = pos.elementTop + pos.elementHeight;\n }\n }\n\n const toolbarStyle = toolbar.style;\n toolbarStyle.top = pos.top + un;\n toolbarStyle.left = pos.left + un;\n }\n },\n\n /**\n * Enable rich text editor on the element\n * @param {View} view Component view\n * @param {Object} rte The instance of already defined RTE\n * @private\n * */\n enable(view, rte) {\n lastEl = view.el;\n const em = config.em;\n const el = view.getChildrenContainer();\n const customRte = this.customRte;\n\n toolbar.style.display = '';\n rte = customRte ? customRte.enable(el, rte) : this.initRte(el).enable();\n\n if (em) {\n setTimeout(this.udpatePosition.bind(this), 0);\n const event = 'change:canvasOffset canvasScroll';\n em.off(event, this.udpatePosition, this);\n em.on(event, this.udpatePosition, this);\n em.trigger('rte:enable', view, rte);\n }\n\n return rte;\n },\n\n /**\n * Unbind rich text editor from the element\n * @param {View} view\n * @param {Object} rte The instance of already defined RTE\n * @private\n * */\n disable(view, rte) {\n const em = config.em;\n const customRte = this.customRte;\n var el = view.getChildrenContainer();\n\n if (customRte) {\n customRte.disable(el, rte);\n } else {\n rte && rte.disable();\n }\n\n hideToolbar();\n em && em.trigger('rte:disable', view, rte);\n }\n };\n};\n","var Backbone = require('backbone');\nvar PanelView = require('./PanelView');\n\nmodule.exports = Backbone.View.extend({\n initialize(o) {\n this.opt = o || {};\n this.config = this.opt.config || {};\n this.pfx = this.config.stylePrefix || '';\n const items = this.collection;\n this.listenTo(items, 'add', this.addTo);\n this.listenTo(items, 'reset', this.render);\n this.listenTo(items, 'remove', this.onRemove);\n this.className = this.pfx + 'panels';\n },\n\n onRemove(model) {\n const view = model.view;\n view && view.remove();\n },\n\n /**\n * Add to collection\n * @param Object Model\n *\n * @return Object\n * @private\n * */\n addTo(model) {\n this.addToCollection(model);\n },\n\n /**\n * Add new object to collection\n * @param Object Model\n * @param Object Fragment collection\n * @param integer Index of append\n *\n * @return Object Object created\n * @private\n * */\n addToCollection(model, fragmentEl) {\n const fragment = fragmentEl || null;\n const config = this.config;\n const el = model.get('el');\n const view = new PanelView({\n el,\n model,\n config\n });\n const rendered = view.render().el;\n const appendTo = model.get('appendTo');\n\n // Do nothing if the panel was requested to be another element\n if (el) {\n } else if (appendTo) {\n var appendEl = document.querySelector(appendTo);\n appendEl.appendChild(rendered);\n } else {\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n this.$el.append(rendered);\n }\n }\n\n view.initResize();\n return rendered;\n },\n\n render() {\n const $el = this.$el;\n const frag = document.createDocumentFragment();\n $el.empty();\n this.collection.each(model => this.addToCollection(model, frag));\n $el.append(frag);\n $el.attr('class', this.className);\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport { isString, isObject, isFunction } from 'underscore';\nconst $ = Backbone.$;\n\nmodule.exports = Backbone.View.extend({\n tagName: 'span',\n\n events: {\n click: 'clicked'\n },\n\n initialize(o) {\n var cls = this.model.get('className');\n this.config = o.config || {};\n this.em = this.config.em || {};\n const pfx = this.config.stylePrefix || '';\n const ppfx = this.config.pStylePrefix || '';\n this.pfx = pfx;\n this.ppfx = this.config.pStylePrefix || '';\n this.id = pfx + this.model.get('id');\n this.activeCls = `${pfx}active ${ppfx}four-color`;\n this.disableCls = pfx + 'active';\n this.btnsVisCls = pfx + 'visible';\n this.className = pfx + 'btn' + (cls ? ' ' + cls : '');\n this.listenTo(this.model, 'change:active updateActive', this.updateActive);\n this.listenTo(this.model, 'checkActive', this.checkActive);\n this.listenTo(this.model, 'change:bntsVis', this.updateBtnsVis);\n this.listenTo(this.model, 'change:attributes', this.updateAttributes);\n this.listenTo(this.model, 'change:className', this.updateClassName);\n this.listenTo(this.model, 'change:disable', this.updateDisable);\n\n if (this.em && this.em.get) this.commands = this.em.get('Commands');\n },\n\n /**\n * Updates class name of the button\n *\n * @return void\n * */\n updateClassName() {\n var cls = this.model.get('className');\n this.$el.attr('class', this.pfx + 'btn' + (cls ? ' ' + cls : ''));\n },\n\n /**\n * Updates attributes of the button\n *\n * @return void\n * */\n updateAttributes() {\n this.$el.attr(this.model.get('attributes'));\n },\n\n /**\n * Updates visibility of children buttons\n *\n * @return void\n * */\n updateBtnsVis() {\n if (!this.$buttons) return;\n\n if (this.model.get('bntsVis')) this.$buttons.addClass(this.btnsVisCls);\n else this.$buttons.removeClass(this.btnsVisCls);\n },\n\n /**\n * Update active status of the button\n *\n * @return void\n * */\n updateActive() {\n const { model, commands, em } = this;\n const context = model.get('context');\n const options = model.get('options');\n let command = {};\n var editor = em && em.get ? em.get('Editor') : null;\n var commandName = model.get('command');\n var cmdIsFunc = isFunction(commandName);\n\n if (commands && isString(commandName)) {\n command = commands.get(commandName) || {};\n } else if (cmdIsFunc) {\n command = commands.create({ run: commandName });\n } else if (commandName !== null && isObject(commandName)) {\n command = commands.create(commandName);\n }\n\n if (model.get('active')) {\n model.collection.deactivateAll(context);\n model.set('active', true, { silent: true }).trigger('checkActive');\n\n if (command.run) {\n command.callRun(editor, { ...options, sender: model });\n }\n\n // Disable button if the command was just a function\n cmdIsFunc && model.set('active', false);\n } else {\n this.$el.removeClass(this.activeCls);\n model.collection.deactivateAll(context);\n\n if (command.stop) {\n command.callStop(editor, { ...options, sender: model });\n }\n }\n },\n\n updateDisable() {\n if (this.model.get('disable')) {\n this.$el.addClass(this.disableCls);\n } else {\n this.$el.removeClass(this.disableCls);\n }\n },\n\n /**\n * Update active style status\n *\n * @return void\n * */\n checkActive() {\n if (this.model.get('active')) this.$el.addClass(this.activeCls);\n else this.$el.removeClass(this.activeCls);\n },\n\n /**\n * Triggered when button is clicked\n * @param {Object} e Event\n *\n * @return void\n * */\n clicked(e) {\n if (this.model.get('bntsVis')) return;\n\n if (this.model.get('disable')) return;\n\n this.toogleActive();\n },\n\n toogleActive() {\n const { model } = this;\n const { active, togglable } = model.attributes;\n\n if (active && !togglable) return;\n\n model.set('active', !active);\n\n // If the stop is requested\n var command = this.em.get('Commands').get('select-comp');\n\n if (active) {\n if (model.get('runDefaultCommand')) this.em.runDefault();\n } else {\n if (model.get('stopDefaultCommand')) this.em.stopDefault();\n }\n },\n\n render() {\n const label = this.model.get('label');\n const $el = this.$el;\n this.updateAttributes();\n $el.attr('class', this.className);\n label && $el.append(label);\n\n return this;\n }\n});\n","var Backbone = require('backbone');\nvar ButtonView = require('./ButtonView');\n\nmodule.exports = Backbone.View.extend({\n initialize(o) {\n this.opt = o || {};\n this.config = this.opt.config || {};\n this.pfx = this.config.stylePrefix || '';\n this.parentM = this.opt.parentM || null;\n this.listenTo(this.collection, 'add', this.addTo);\n this.listenTo(this.collection, 'reset remove', this.render);\n this.className = this.pfx + 'buttons';\n },\n\n /**\n * Add to collection\n * @param Object Model\n *\n * @return Object\n * */\n addTo(model) {\n this.addToCollection(model);\n },\n\n /**\n * Add new object to collection\n * @param Object Model\n * @param Object Fragment collection\n *\n * @return Object Object created\n * */\n addToCollection(model, fragmentEl) {\n var fragment = fragmentEl || null;\n var viewObject = ButtonView;\n\n var view = new viewObject({\n model,\n config: this.config,\n parentM: this.parentM\n });\n var rendered = view.render().el;\n\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n this.$el.append(rendered);\n }\n\n return rendered;\n },\n\n render() {\n var fragment = document.createDocumentFragment();\n this.$el.empty();\n\n this.collection.each(function(model) {\n this.addToCollection(model, fragment);\n }, this);\n\n this.$el.append(fragment);\n this.$el.attr('class', _.result(this, 'className'));\n return this;\n }\n});\n","var Backbone = require('backbone');\nvar Panel = require('./Panel');\n\nmodule.exports = Backbone.Collection.extend({\n model: Panel\n});\n","var Backbone = require('backbone');\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n id: '',\n label: '',\n className: '',\n command: '',\n context: '',\n buttons: [],\n attributes: {},\n options: {},\n active: false,\n dragDrop: false,\n togglable: true,\n runDefaultCommand: true,\n stopDefaultCommand: false,\n disable: false\n },\n\n initialize(options) {\n if (this.get('buttons').length) {\n var Buttons = require('./Buttons');\n this.set('buttons', new Buttons(this.get('buttons')));\n }\n }\n});\n","var crc = 'create-comp';\nvar mvc = 'move-comp';\nvar swv = 'sw-visibility';\nvar expt = 'export-template';\nvar osm = 'open-sm';\nvar otm = 'open-tm';\nvar ola = 'open-layers';\nvar obl = 'open-blocks';\nvar ful = 'fullscreen';\nvar prv = 'preview';\n\nmodule.exports = {\n stylePrefix: 'pn-',\n\n // Default panels fa-sliders for features\n defaults: [\n {\n id: 'commands',\n buttons: [{}]\n },\n {\n id: 'options',\n buttons: [\n {\n active: true,\n id: swv,\n className: 'fa fa-square-o',\n command: swv,\n context: swv,\n attributes: { title: 'View components' }\n },\n {\n id: prv,\n className: 'fa fa-eye',\n command: prv,\n context: prv,\n attributes: { title: 'Preview' }\n },\n {\n id: ful,\n className: 'fa fa-arrows-alt',\n command: ful,\n context: ful,\n attributes: { title: 'Fullscreen' }\n },\n {\n id: expt,\n className: 'fa fa-code',\n command: expt,\n attributes: { title: 'View code' }\n }\n ]\n },\n {\n id: 'views',\n buttons: [\n {\n id: osm,\n className: 'fa fa-paint-brush',\n command: osm,\n active: true,\n attributes: { title: 'Open Style Manager' }\n },\n {\n id: otm,\n className: 'fa fa-cog',\n command: otm,\n attributes: { title: 'Settings' }\n },\n {\n id: ola,\n className: 'fa fa-bars',\n command: ola,\n attributes: { title: 'Open Layer Manager' }\n },\n {\n id: obl,\n className: 'fa fa-th-large',\n command: obl,\n attributes: { title: 'Open Blocks' }\n }\n ]\n }\n ],\n\n // Editor model\n em: null,\n\n // Delay before show children buttons (in milliseconds)\n delayBtnsShow: 300\n};\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/panels/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * panels: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const panelManager = editor.Panels;\n * ```\n *\n * * [addPanel](#addpanel)\n * * [addButton](#addbutton)\n * * [removeButton](#removebutton)\n * * [getButton](#getbutton)\n * * [getPanel](#getpanel)\n * * [getPanels](#getpanels)\n * * [getPanelsEl](#getpanelsel)\n * * [removePanel](#removepanel)\n * * [removeButton](#removeButton)\n *\n * @module Panels\n */\n\nmodule.exports = () => {\n var c = {},\n defaults = require('./config/config'),\n Panel = require('./model/Panel'),\n Panels = require('./model/Panels'),\n PanelView = require('./view/PanelView'),\n PanelsView = require('./view/PanelsView');\n var panels, PanelsViewObj;\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Panels',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n panels = new Panels(c.defaults);\n PanelsViewObj = new PanelsView({\n collection: panels,\n config: c\n });\n return this;\n },\n\n /**\n * Returns the collection of panels\n * @return {Collection} Collection of panel\n */\n getPanels() {\n return panels;\n },\n\n /**\n * Returns panels element\n * @return {HTMLElement}\n */\n getPanelsEl() {\n return PanelsViewObj.el;\n },\n\n /**\n * Add new panel to the collection\n * @param {Object|Panel} panel Object with right properties or an instance of Panel\n * @return {Panel} Added panel. Useful in case passed argument was an Object\n * @example\n * var newPanel = panelManager.addPanel({\n * id: 'myNewPanel',\n * visible : true,\n * buttons : [...],\n * });\n */\n addPanel(panel) {\n return panels.add(panel);\n },\n\n /**\n * Remove a panel from the collection\n * @param {Object|Panel|String} panel Object with right properties or an instance of Panel or Painel id\n * @return {Panel} Removed panel. Useful in case passed argument was an Object\n * @example\n * const newPanel = panelManager.removePanel({\n * id: 'myNewPanel',\n * visible : true,\n * buttons : [...],\n * });\n *\n * const newPanel = panelManager.removePanel('myNewPanel');\n *\n */\n removePanel(panel) {\n return panels.remove(panel);\n },\n\n /**\n * Get panel by ID\n * @param {string} id Id string\n * @return {Panel|null}\n * @example\n * var myPanel = panelManager.getPanel('myNewPanel');\n */\n getPanel(id) {\n var res = panels.where({ id });\n return res.length ? res[0] : null;\n },\n\n /**\n * Add button to the panel\n * @param {string} panelId Panel's ID\n * @param {Object|Button} button Button object or instance of Button\n * @return {Button|null} Added button. Useful in case passed button was an Object\n * @example\n * var newButton = panelManager.addButton('myNewPanel',{\n * id: 'myNewButton',\n * className: 'someClass',\n * command: 'someCommand',\n * attributes: { title: 'Some title'},\n * active: false,\n * });\n * // It's also possible to pass the command as an object\n * // with .run and .stop methods\n * ...\n * command: {\n * run: function(editor) {\n * ...\n * },\n * stop: function(editor) {\n * ...\n * }\n * },\n * // Or simply like a function which will be evaluated as a single .run command\n * ...\n * command: function(editor) {\n * ...\n * }\n */\n addButton(panelId, button) {\n var pn = this.getPanel(panelId);\n return pn ? pn.get('buttons').add(button) : null;\n },\n\n /**\n * Remove button from the panel\n * @param {string} panelId Panel's ID\n * @param {Object|Button|String} button Button object or instance of Button or button id\n * @return {Button|null} Removed button.\n * @example\n * const removedButton = panelManager.removeButton('myNewPanel',{\n * id: 'myNewButton',\n * className: 'someClass',\n * command: 'someCommand',\n * attributes: { title: 'Some title'},\n * active: false,\n * });\n *\n * // It's also possible to use the button id\n * const removedButton = panelManager.removeButton('myNewPanel','myNewButton');\n *\n */\n removeButton(panelId, button) {\n var pn = this.getPanel(panelId);\n return pn && pn.get('buttons').remove(button);\n },\n\n /**\n * Get button from the panel\n * @param {string} panelId Panel's ID\n * @param {string} id Button's ID\n * @return {Button|null}\n * @example\n * var button = panelManager.getButton('myPanel','myButton');\n */\n getButton(panelId, id) {\n var pn = this.getPanel(panelId);\n if (pn) {\n var res = pn.get('buttons').where({ id });\n return res.length ? res[0] : null;\n }\n return null;\n },\n\n /**\n * Render panels and buttons\n * @return {HTMLElement}\n * @private\n */\n render() {\n return PanelsViewObj.render().el;\n },\n\n /**\n * Active activable buttons\n * @private\n */\n active() {\n this.getPanels().each(p => {\n p.get('buttons').each(btn => {\n if (btn.get('active')) btn.trigger('updateActive');\n });\n });\n },\n\n /**\n * Disable buttons flagged as disabled\n * @private\n */\n disableButtons() {\n this.getPanels().each(p => {\n p.get('buttons').each(btn => {\n if (btn.get('disable')) btn.trigger('change:disable');\n });\n });\n },\n\n Panel\n };\n};\n","import { template } from 'underscore';\nimport Backbone from 'backbone';\n\nmodule.exports = Backbone.View.extend({\n template: template(`\n
editor\" id=\"<%= pfx %><%= codeName %>\">\n \t
title\"><%= label %>
\n \t
code\">
\n
`),\n\n initialize(o) {\n this.config = o.config || {};\n this.pfx = this.config.stylePrefix;\n },\n\n render() {\n var obj = this.model.toJSON();\n obj.pfx = this.pfx;\n this.$el.html(this.template(obj));\n this.$el.attr('class', this.pfx + 'editor-c');\n this.$el.find('#' + this.pfx + 'code').append(this.model.get('input'));\n return this;\n }\n});\n","(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"codemirror/lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"codemirror/lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\n CodeMirror.extendMode(\"css\", {\n commentStart: \"/*\",\n commentEnd: \"*/\",\n newlineAfterToken: function(_type, content) {\n return /^[;{}]$/.test(content);\n }\n });\n\n CodeMirror.extendMode(\"javascript\", {\n commentStart: \"/*\",\n commentEnd: \"*/\",\n // FIXME semicolons inside of for\n newlineAfterToken: function(_type, content, textAfter, state) {\n if (this.jsonMode) {\n return /^[\\[,{]$/.test(content) || /^}/.test(textAfter);\n } else {\n if (content == \";\" && state.lexical && state.lexical.type == \")\") return false;\n return /^[;{}]$/.test(content) && !/^;/.test(textAfter);\n }\n }\n });\n\n var inlineElements = /^(a|abbr|acronym|area|base|bdo|big|br|button|caption|cite|code|col|colgroup|dd|del|dfn|em|frame|hr|iframe|img|input|ins|kbd|label|legend|link|map|object|optgroup|option|param|q|samp|script|select|small|span|strong|sub|sup|textarea|tt|var)$/;\n\n CodeMirror.extendMode(\"xml\", {\n commentStart: \"\",\n newlineAfterToken: function(type, content, textAfter, state) {\n var inline = false;\n if (this.configuration == \"html\")\n inline = state.context ? inlineElements.test(state.context.tagName) : false;\n return !inline && ((type == \"tag\" && />$/.test(content) && state.context) ||\n /^ -1 && endIndex > -1 && endIndex > startIndex) {\n // Take string till comment start\n selText = selText.substr(0, startIndex) +\n // From comment start till comment end\n selText.substring(startIndex + curMode.commentStart.length, endIndex) +\n // From comment end till string end\n selText.substr(endIndex + curMode.commentEnd.length);\n }\n cm.replaceRange(selText, from, to);\n }\n });\n });\n\n // Applies automatic mode-aware indentation to the specified range\n CodeMirror.defineExtension(\"autoIndentRange\", function (from, to) {\n var cmInstance = this;\n this.operation(function () {\n for (var i = from.line; i <= to.line; i++) {\n cmInstance.indentLine(i, \"smart\");\n }\n });\n });\n\n // Applies automatic formatting to the specified range\n CodeMirror.defineExtension(\"autoFormatRange\", function (from, to) {\n var cm = this;\n var outer = cm.getMode(), text = cm.getRange(from, to).split(\"\\n\");\n var state = CodeMirror.copyState(outer, cm.getTokenAt(from).state);\n var tabSize = cm.getOption(\"tabSize\");\n\n var out = \"\", lines = 0, atSol = from.ch === 0;\n function newline() {\n out += \"\\n\";\n atSol = true;\n ++lines;\n }\n\n for (var i = 0; i < text.length; ++i) {\n var stream = new CodeMirror.StringStream(text[i], tabSize);\n while (!stream.eol()) {\n var inner = CodeMirror.innerMode(outer, state);\n var style = outer.token(stream, state), cur = stream.current();\n stream.start = stream.pos;\n if (!atSol || /\\S/.test(cur)) {\n out += cur;\n atSol = false;\n }\n if (!atSol && inner.mode.newlineAfterToken &&\n inner.mode.newlineAfterToken(style, cur, stream.string.slice(stream.pos) || text[i+1] || \"\", inner.state))\n newline();\n }\n if (!stream.pos && outer.blankLine) outer.blankLine(state);\n if (!atSol && i < text.length - 1) newline();\n }\n\n cm.operation(function () {\n cm.replaceRange(out, from, to);\n for (var cur = from.line + 1, end = from.line + lines; cur <= end; ++cur)\n cm.indentLine(cur, \"smart\");\n cm.setSelection(from, cm.getCursor(false));\n });\n });\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"javascript\", function(config, parserConfig) {\n var indentUnit = config.indentUnit;\n var statementIndent = parserConfig.statementIndent;\n var jsonldMode = parserConfig.jsonld;\n var jsonMode = parserConfig.json || jsonldMode;\n var isTS = parserConfig.typescript;\n var wordRE = parserConfig.wordCharacters || /[\\w$\\xa1-\\uffff]/;\n\n // Tokenizer\n\n var keywords = function(){\n function kw(type) {return {type: type, style: \"keyword\"};}\n var A = kw(\"keyword a\"), B = kw(\"keyword b\"), C = kw(\"keyword c\"), D = kw(\"keyword d\");\n var operator = kw(\"operator\"), atom = {type: \"atom\", style: \"atom\"};\n\n return {\n \"if\": kw(\"if\"), \"while\": A, \"with\": A, \"else\": B, \"do\": B, \"try\": B, \"finally\": B,\n \"return\": D, \"break\": D, \"continue\": D, \"new\": kw(\"new\"), \"delete\": C, \"void\": C, \"throw\": C,\n \"debugger\": kw(\"debugger\"), \"var\": kw(\"var\"), \"const\": kw(\"var\"), \"let\": kw(\"var\"),\n \"function\": kw(\"function\"), \"catch\": kw(\"catch\"),\n \"for\": kw(\"for\"), \"switch\": kw(\"switch\"), \"case\": kw(\"case\"), \"default\": kw(\"default\"),\n \"in\": operator, \"typeof\": operator, \"instanceof\": operator,\n \"true\": atom, \"false\": atom, \"null\": atom, \"undefined\": atom, \"NaN\": atom, \"Infinity\": atom,\n \"this\": kw(\"this\"), \"class\": kw(\"class\"), \"super\": kw(\"atom\"),\n \"yield\": C, \"export\": kw(\"export\"), \"import\": kw(\"import\"), \"extends\": C,\n \"await\": C\n };\n }();\n\n var isOperatorChar = /[+\\-*&%=<>!?|~^@]/;\n var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)\"/;\n\n function readRegexp(stream) {\n var escaped = false, next, inSet = false;\n while ((next = stream.next()) != null) {\n if (!escaped) {\n if (next == \"/\" && !inSet) return;\n if (next == \"[\") inSet = true;\n else if (inSet && next == \"]\") inSet = false;\n }\n escaped = !escaped && next == \"\\\\\";\n }\n }\n\n // Used as scratch variables to communicate multiple values without\n // consing up tons of objects.\n var type, content;\n function ret(tp, style, cont) {\n type = tp; content = cont;\n return style;\n }\n function tokenBase(stream, state) {\n var ch = stream.next();\n if (ch == '\"' || ch == \"'\") {\n state.tokenize = tokenString(ch);\n return state.tokenize(stream, state);\n } else if (ch == \".\" && stream.match(/^\\d+(?:[eE][+\\-]?\\d+)?/)) {\n return ret(\"number\", \"number\");\n } else if (ch == \".\" && stream.match(\"..\")) {\n return ret(\"spread\", \"meta\");\n } else if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\n return ret(ch);\n } else if (ch == \"=\" && stream.eat(\">\")) {\n return ret(\"=>\", \"operator\");\n } else if (ch == \"0\" && stream.match(/^(?:x[\\da-f]+|o[0-7]+|b[01]+)n?/i)) {\n return ret(\"number\", \"number\");\n } else if (/\\d/.test(ch)) {\n stream.match(/^\\d*(?:n|(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)?/);\n return ret(\"number\", \"number\");\n } else if (ch == \"/\") {\n if (stream.eat(\"*\")) {\n state.tokenize = tokenComment;\n return tokenComment(stream, state);\n } else if (stream.eat(\"/\")) {\n stream.skipToEnd();\n return ret(\"comment\", \"comment\");\n } else if (expressionAllowed(stream, state, 1)) {\n readRegexp(stream);\n stream.match(/^\\b(([gimyus])(?![gimyus]*\\2))+\\b/);\n return ret(\"regexp\", \"string-2\");\n } else {\n stream.eat(\"=\");\n return ret(\"operator\", \"operator\", stream.current());\n }\n } else if (ch == \"`\") {\n state.tokenize = tokenQuasi;\n return tokenQuasi(stream, state);\n } else if (ch == \"#\") {\n stream.skipToEnd();\n return ret(\"error\", \"error\");\n } else if (isOperatorChar.test(ch)) {\n if (ch != \">\" || !state.lexical || state.lexical.type != \">\") {\n if (stream.eat(\"=\")) {\n if (ch == \"!\" || ch == \"=\") stream.eat(\"=\")\n } else if (/[<>*+\\-]/.test(ch)) {\n stream.eat(ch)\n if (ch == \">\") stream.eat(ch)\n }\n }\n return ret(\"operator\", \"operator\", stream.current());\n } else if (wordRE.test(ch)) {\n stream.eatWhile(wordRE);\n var word = stream.current()\n if (state.lastType != \".\") {\n if (keywords.propertyIsEnumerable(word)) {\n var kw = keywords[word]\n return ret(kw.type, kw.style, word)\n }\n if (word == \"async\" && stream.match(/^(\\s|\\/\\*.*?\\*\\/)*[\\[\\(\\w]/, false))\n return ret(\"async\", \"keyword\", word)\n }\n return ret(\"variable\", \"variable\", word)\n }\n }\n\n function tokenString(quote) {\n return function(stream, state) {\n var escaped = false, next;\n if (jsonldMode && stream.peek() == \"@\" && stream.match(isJsonldKeyword)){\n state.tokenize = tokenBase;\n return ret(\"jsonld-keyword\", \"meta\");\n }\n while ((next = stream.next()) != null) {\n if (next == quote && !escaped) break;\n escaped = !escaped && next == \"\\\\\";\n }\n if (!escaped) state.tokenize = tokenBase;\n return ret(\"string\", \"string\");\n };\n }\n\n function tokenComment(stream, state) {\n var maybeEnd = false, ch;\n while (ch = stream.next()) {\n if (ch == \"/\" && maybeEnd) {\n state.tokenize = tokenBase;\n break;\n }\n maybeEnd = (ch == \"*\");\n }\n return ret(\"comment\", \"comment\");\n }\n\n function tokenQuasi(stream, state) {\n var escaped = false, next;\n while ((next = stream.next()) != null) {\n if (!escaped && (next == \"`\" || next == \"$\" && stream.eat(\"{\"))) {\n state.tokenize = tokenBase;\n break;\n }\n escaped = !escaped && next == \"\\\\\";\n }\n return ret(\"quasi\", \"string-2\", stream.current());\n }\n\n var brackets = \"([{}])\";\n // This is a crude lookahead trick to try and notice that we're\n // parsing the argument patterns for a fat-arrow function before we\n // actually hit the arrow token. It only works if the arrow is on\n // the same line as the arguments and there's no strange noise\n // (comments) in between. Fallback is to only notice when we hit the\n // arrow, and not declare the arguments as locals for the arrow\n // body.\n function findFatArrow(stream, state) {\n if (state.fatArrowAt) state.fatArrowAt = null;\n var arrow = stream.string.indexOf(\"=>\", stream.start);\n if (arrow < 0) return;\n\n if (isTS) { // Try to skip TypeScript return type declarations after the arguments\n var m = /:\\s*(?:\\w+(?:<[^>]*>|\\[\\])?|\\{[^}]*\\})\\s*$/.exec(stream.string.slice(stream.start, arrow))\n if (m) arrow = m.index\n }\n\n var depth = 0, sawSomething = false;\n for (var pos = arrow - 1; pos >= 0; --pos) {\n var ch = stream.string.charAt(pos);\n var bracket = brackets.indexOf(ch);\n if (bracket >= 0 && bracket < 3) {\n if (!depth) { ++pos; break; }\n if (--depth == 0) { if (ch == \"(\") sawSomething = true; break; }\n } else if (bracket >= 3 && bracket < 6) {\n ++depth;\n } else if (wordRE.test(ch)) {\n sawSomething = true;\n } else if (/[\"'\\/]/.test(ch)) {\n return;\n } else if (sawSomething && !depth) {\n ++pos;\n break;\n }\n }\n if (sawSomething && !depth) state.fatArrowAt = pos;\n }\n\n // Parser\n\n var atomicTypes = {\"atom\": true, \"number\": true, \"variable\": true, \"string\": true, \"regexp\": true, \"this\": true, \"jsonld-keyword\": true};\n\n function JSLexical(indented, column, type, align, prev, info) {\n this.indented = indented;\n this.column = column;\n this.type = type;\n this.prev = prev;\n this.info = info;\n if (align != null) this.align = align;\n }\n\n function inScope(state, varname) {\n for (var v = state.localVars; v; v = v.next)\n if (v.name == varname) return true;\n for (var cx = state.context; cx; cx = cx.prev) {\n for (var v = cx.vars; v; v = v.next)\n if (v.name == varname) return true;\n }\n }\n\n function parseJS(state, style, type, content, stream) {\n var cc = state.cc;\n // Communicate our context to the combinators.\n // (Less wasteful than consing up a hundred closures on every call.)\n cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style;\n\n if (!state.lexical.hasOwnProperty(\"align\"))\n state.lexical.align = true;\n\n while(true) {\n var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;\n if (combinator(type, content)) {\n while(cc.length && cc[cc.length - 1].lex)\n cc.pop()();\n if (cx.marked) return cx.marked;\n if (type == \"variable\" && inScope(state, content)) return \"variable-2\";\n return style;\n }\n }\n }\n\n // Combinator utils\n\n var cx = {state: null, column: null, marked: null, cc: null};\n function pass() {\n for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);\n }\n function cont() {\n pass.apply(null, arguments);\n return true;\n }\n function inList(name, list) {\n for (var v = list; v; v = v.next) if (v.name == name) return true\n return false;\n }\n function register(varname) {\n var state = cx.state;\n cx.marked = \"def\";\n if (state.context) {\n if (state.lexical.info == \"var\" && state.context && state.context.block) {\n // FIXME function decls are also not block scoped\n var newContext = registerVarScoped(varname, state.context)\n if (newContext != null) {\n state.context = newContext\n return\n }\n } else if (!inList(varname, state.localVars)) {\n state.localVars = new Var(varname, state.localVars)\n return\n }\n }\n // Fall through means this is global\n if (parserConfig.globalVars && !inList(varname, state.globalVars))\n state.globalVars = new Var(varname, state.globalVars)\n }\n function registerVarScoped(varname, context) {\n if (!context) {\n return null\n } else if (context.block) {\n var inner = registerVarScoped(varname, context.prev)\n if (!inner) return null\n if (inner == context.prev) return context\n return new Context(inner, context.vars, true)\n } else if (inList(varname, context.vars)) {\n return context\n } else {\n return new Context(context.prev, new Var(varname, context.vars), false)\n }\n }\n\n function isModifier(name) {\n return name == \"public\" || name == \"private\" || name == \"protected\" || name == \"abstract\" || name == \"readonly\"\n }\n\n // Combinators\n\n function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block }\n function Var(name, next) { this.name = name; this.next = next }\n\n var defaultVars = new Var(\"this\", new Var(\"arguments\", null))\n function pushcontext() {\n cx.state.context = new Context(cx.state.context, cx.state.localVars, false)\n cx.state.localVars = defaultVars\n }\n function pushblockcontext() {\n cx.state.context = new Context(cx.state.context, cx.state.localVars, true)\n cx.state.localVars = null\n }\n function popcontext() {\n cx.state.localVars = cx.state.context.vars\n cx.state.context = cx.state.context.prev\n }\n popcontext.lex = true\n function pushlex(type, info) {\n var result = function() {\n var state = cx.state, indent = state.indented;\n if (state.lexical.type == \"stat\") indent = state.lexical.indented;\n else for (var outer = state.lexical; outer && outer.type == \")\" && outer.align; outer = outer.prev)\n indent = outer.indented;\n state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);\n };\n result.lex = true;\n return result;\n }\n function poplex() {\n var state = cx.state;\n if (state.lexical.prev) {\n if (state.lexical.type == \")\")\n state.indented = state.lexical.indented;\n state.lexical = state.lexical.prev;\n }\n }\n poplex.lex = true;\n\n function expect(wanted) {\n function exp(type) {\n if (type == wanted) return cont();\n else if (wanted == \";\" || type == \"}\" || type == \")\" || type == \"]\") return pass();\n else return cont(exp);\n };\n return exp;\n }\n\n function statement(type, value) {\n if (type == \"var\") return cont(pushlex(\"vardef\", value), vardef, expect(\";\"), poplex);\n if (type == \"keyword a\") return cont(pushlex(\"form\"), parenExpr, statement, poplex);\n if (type == \"keyword b\") return cont(pushlex(\"form\"), statement, poplex);\n if (type == \"keyword d\") return cx.stream.match(/^\\s*$/, false) ? cont() : cont(pushlex(\"stat\"), maybeexpression, expect(\";\"), poplex);\n if (type == \"debugger\") return cont(expect(\";\"));\n if (type == \"{\") return cont(pushlex(\"}\"), pushblockcontext, block, poplex, popcontext);\n if (type == \";\") return cont();\n if (type == \"if\") {\n if (cx.state.lexical.info == \"else\" && cx.state.cc[cx.state.cc.length - 1] == poplex)\n cx.state.cc.pop()();\n return cont(pushlex(\"form\"), parenExpr, statement, poplex, maybeelse);\n }\n if (type == \"function\") return cont(functiondef);\n if (type == \"for\") return cont(pushlex(\"form\"), forspec, statement, poplex);\n if (type == \"class\" || (isTS && value == \"interface\")) { cx.marked = \"keyword\"; return cont(pushlex(\"form\"), className, poplex); }\n if (type == \"variable\") {\n if (isTS && value == \"declare\") {\n cx.marked = \"keyword\"\n return cont(statement)\n } else if (isTS && (value == \"module\" || value == \"enum\" || value == \"type\") && cx.stream.match(/^\\s*\\w/, false)) {\n cx.marked = \"keyword\"\n if (value == \"enum\") return cont(enumdef);\n else if (value == \"type\") return cont(typeexpr, expect(\"operator\"), typeexpr, expect(\";\"));\n else return cont(pushlex(\"form\"), pattern, expect(\"{\"), pushlex(\"}\"), block, poplex, poplex)\n } else if (isTS && value == \"namespace\") {\n cx.marked = \"keyword\"\n return cont(pushlex(\"form\"), expression, block, poplex)\n } else if (isTS && value == \"abstract\") {\n cx.marked = \"keyword\"\n return cont(statement)\n } else {\n return cont(pushlex(\"stat\"), maybelabel);\n }\n }\n if (type == \"switch\") return cont(pushlex(\"form\"), parenExpr, expect(\"{\"), pushlex(\"}\", \"switch\"), pushblockcontext,\n block, poplex, poplex, popcontext);\n if (type == \"case\") return cont(expression, expect(\":\"));\n if (type == \"default\") return cont(expect(\":\"));\n if (type == \"catch\") return cont(pushlex(\"form\"), pushcontext, maybeCatchBinding, statement, poplex, popcontext);\n if (type == \"export\") return cont(pushlex(\"stat\"), afterExport, poplex);\n if (type == \"import\") return cont(pushlex(\"stat\"), afterImport, poplex);\n if (type == \"async\") return cont(statement)\n if (value == \"@\") return cont(expression, statement)\n return pass(pushlex(\"stat\"), expression, expect(\";\"), poplex);\n }\n function maybeCatchBinding(type) {\n if (type == \"(\") return cont(funarg, expect(\")\"))\n }\n function expression(type, value) {\n return expressionInner(type, value, false);\n }\n function expressionNoComma(type, value) {\n return expressionInner(type, value, true);\n }\n function parenExpr(type) {\n if (type != \"(\") return pass()\n return cont(pushlex(\")\"), expression, expect(\")\"), poplex)\n }\n function expressionInner(type, value, noComma) {\n if (cx.state.fatArrowAt == cx.stream.start) {\n var body = noComma ? arrowBodyNoComma : arrowBody;\n if (type == \"(\") return cont(pushcontext, pushlex(\")\"), commasep(funarg, \")\"), poplex, expect(\"=>\"), body, popcontext);\n else if (type == \"variable\") return pass(pushcontext, pattern, expect(\"=>\"), body, popcontext);\n }\n\n var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;\n if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);\n if (type == \"function\") return cont(functiondef, maybeop);\n if (type == \"class\" || (isTS && value == \"interface\")) { cx.marked = \"keyword\"; return cont(pushlex(\"form\"), classExpression, poplex); }\n if (type == \"keyword c\" || type == \"async\") return cont(noComma ? expressionNoComma : expression);\n if (type == \"(\") return cont(pushlex(\")\"), maybeexpression, expect(\")\"), poplex, maybeop);\n if (type == \"operator\" || type == \"spread\") return cont(noComma ? expressionNoComma : expression);\n if (type == \"[\") return cont(pushlex(\"]\"), arrayLiteral, poplex, maybeop);\n if (type == \"{\") return contCommasep(objprop, \"}\", null, maybeop);\n if (type == \"quasi\") return pass(quasi, maybeop);\n if (type == \"new\") return cont(maybeTarget(noComma));\n if (type == \"import\") return cont(expression);\n return cont();\n }\n function maybeexpression(type) {\n if (type.match(/[;\\}\\)\\],]/)) return pass();\n return pass(expression);\n }\n\n function maybeoperatorComma(type, value) {\n if (type == \",\") return cont(expression);\n return maybeoperatorNoComma(type, value, false);\n }\n function maybeoperatorNoComma(type, value, noComma) {\n var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;\n var expr = noComma == false ? expression : expressionNoComma;\n if (type == \"=>\") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);\n if (type == \"operator\") {\n if (/\\+\\+|--/.test(value) || isTS && value == \"!\") return cont(me);\n if (isTS && value == \"<\" && cx.stream.match(/^([^>]|<.*?>)*>\\s*\\(/, false))\n return cont(pushlex(\">\"), commasep(typeexpr, \">\"), poplex, me);\n if (value == \"?\") return cont(expression, expect(\":\"), expr);\n return cont(expr);\n }\n if (type == \"quasi\") { return pass(quasi, me); }\n if (type == \";\") return;\n if (type == \"(\") return contCommasep(expressionNoComma, \")\", \"call\", me);\n if (type == \".\") return cont(property, me);\n if (type == \"[\") return cont(pushlex(\"]\"), maybeexpression, expect(\"]\"), poplex, me);\n if (isTS && value == \"as\") { cx.marked = \"keyword\"; return cont(typeexpr, me) }\n if (type == \"regexp\") {\n cx.state.lastType = cx.marked = \"operator\"\n cx.stream.backUp(cx.stream.pos - cx.stream.start - 1)\n return cont(expr)\n }\n }\n function quasi(type, value) {\n if (type != \"quasi\") return pass();\n if (value.slice(value.length - 2) != \"${\") return cont(quasi);\n return cont(expression, continueQuasi);\n }\n function continueQuasi(type) {\n if (type == \"}\") {\n cx.marked = \"string-2\";\n cx.state.tokenize = tokenQuasi;\n return cont(quasi);\n }\n }\n function arrowBody(type) {\n findFatArrow(cx.stream, cx.state);\n return pass(type == \"{\" ? statement : expression);\n }\n function arrowBodyNoComma(type) {\n findFatArrow(cx.stream, cx.state);\n return pass(type == \"{\" ? statement : expressionNoComma);\n }\n function maybeTarget(noComma) {\n return function(type) {\n if (type == \".\") return cont(noComma ? targetNoComma : target);\n else if (type == \"variable\" && isTS) return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma)\n else return pass(noComma ? expressionNoComma : expression);\n };\n }\n function target(_, value) {\n if (value == \"target\") { cx.marked = \"keyword\"; return cont(maybeoperatorComma); }\n }\n function targetNoComma(_, value) {\n if (value == \"target\") { cx.marked = \"keyword\"; return cont(maybeoperatorNoComma); }\n }\n function maybelabel(type) {\n if (type == \":\") return cont(poplex, statement);\n return pass(maybeoperatorComma, expect(\";\"), poplex);\n }\n function property(type) {\n if (type == \"variable\") {cx.marked = \"property\"; return cont();}\n }\n function objprop(type, value) {\n if (type == \"async\") {\n cx.marked = \"property\";\n return cont(objprop);\n } else if (type == \"variable\" || cx.style == \"keyword\") {\n cx.marked = \"property\";\n if (value == \"get\" || value == \"set\") return cont(getterSetter);\n var m // Work around fat-arrow-detection complication for detecting typescript typed arrow params\n if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\\s*:\\s*/, false)))\n cx.state.fatArrowAt = cx.stream.pos + m[0].length\n return cont(afterprop);\n } else if (type == \"number\" || type == \"string\") {\n cx.marked = jsonldMode ? \"property\" : (cx.style + \" property\");\n return cont(afterprop);\n } else if (type == \"jsonld-keyword\") {\n return cont(afterprop);\n } else if (isTS && isModifier(value)) {\n cx.marked = \"keyword\"\n return cont(objprop)\n } else if (type == \"[\") {\n return cont(expression, maybetype, expect(\"]\"), afterprop);\n } else if (type == \"spread\") {\n return cont(expressionNoComma, afterprop);\n } else if (value == \"*\") {\n cx.marked = \"keyword\";\n return cont(objprop);\n } else if (type == \":\") {\n return pass(afterprop)\n }\n }\n function getterSetter(type) {\n if (type != \"variable\") return pass(afterprop);\n cx.marked = \"property\";\n return cont(functiondef);\n }\n function afterprop(type) {\n if (type == \":\") return cont(expressionNoComma);\n if (type == \"(\") return pass(functiondef);\n }\n function commasep(what, end, sep) {\n function proceed(type, value) {\n if (sep ? sep.indexOf(type) > -1 : type == \",\") {\n var lex = cx.state.lexical;\n if (lex.info == \"call\") lex.pos = (lex.pos || 0) + 1;\n return cont(function(type, value) {\n if (type == end || value == end) return pass()\n return pass(what)\n }, proceed);\n }\n if (type == end || value == end) return cont();\n return cont(expect(end));\n }\n return function(type, value) {\n if (type == end || value == end) return cont();\n return pass(what, proceed);\n };\n }\n function contCommasep(what, end, info) {\n for (var i = 3; i < arguments.length; i++)\n cx.cc.push(arguments[i]);\n return cont(pushlex(end, info), commasep(what, end), poplex);\n }\n function block(type) {\n if (type == \"}\") return cont();\n return pass(statement, block);\n }\n function maybetype(type, value) {\n if (isTS) {\n if (type == \":\") return cont(typeexpr);\n if (value == \"?\") return cont(maybetype);\n }\n }\n function mayberettype(type) {\n if (isTS && type == \":\") {\n if (cx.stream.match(/^\\s*\\w+\\s+is\\b/, false)) return cont(expression, isKW, typeexpr)\n else return cont(typeexpr)\n }\n }\n function isKW(_, value) {\n if (value == \"is\") {\n cx.marked = \"keyword\"\n return cont()\n }\n }\n function typeexpr(type, value) {\n if (value == \"keyof\" || value == \"typeof\") {\n cx.marked = \"keyword\"\n return cont(value == \"keyof\" ? typeexpr : expressionNoComma)\n }\n if (type == \"variable\" || value == \"void\") {\n cx.marked = \"type\"\n return cont(afterType)\n }\n if (type == \"string\" || type == \"number\" || type == \"atom\") return cont(afterType);\n if (type == \"[\") return cont(pushlex(\"]\"), commasep(typeexpr, \"]\", \",\"), poplex, afterType)\n if (type == \"{\") return cont(pushlex(\"}\"), commasep(typeprop, \"}\", \",;\"), poplex, afterType)\n if (type == \"(\") return cont(commasep(typearg, \")\"), maybeReturnType)\n if (type == \"<\") return cont(commasep(typeexpr, \">\"), typeexpr)\n }\n function maybeReturnType(type) {\n if (type == \"=>\") return cont(typeexpr)\n }\n function typeprop(type, value) {\n if (type == \"variable\" || cx.style == \"keyword\") {\n cx.marked = \"property\"\n return cont(typeprop)\n } else if (value == \"?\") {\n return cont(typeprop)\n } else if (type == \":\") {\n return cont(typeexpr)\n } else if (type == \"[\") {\n return cont(expression, maybetype, expect(\"]\"), typeprop)\n }\n }\n function typearg(type, value) {\n if (type == \"variable\" && cx.stream.match(/^\\s*[?:]/, false) || value == \"?\") return cont(typearg)\n if (type == \":\") return cont(typeexpr)\n return pass(typeexpr)\n }\n function afterType(type, value) {\n if (value == \"<\") return cont(pushlex(\">\"), commasep(typeexpr, \">\"), poplex, afterType)\n if (value == \"|\" || type == \".\" || value == \"&\") return cont(typeexpr)\n if (type == \"[\") return cont(expect(\"]\"), afterType)\n if (value == \"extends\" || value == \"implements\") { cx.marked = \"keyword\"; return cont(typeexpr) }\n }\n function maybeTypeArgs(_, value) {\n if (value == \"<\") return cont(pushlex(\">\"), commasep(typeexpr, \">\"), poplex, afterType)\n }\n function typeparam() {\n return pass(typeexpr, maybeTypeDefault)\n }\n function maybeTypeDefault(_, value) {\n if (value == \"=\") return cont(typeexpr)\n }\n function vardef(_, value) {\n if (value == \"enum\") {cx.marked = \"keyword\"; return cont(enumdef)}\n return pass(pattern, maybetype, maybeAssign, vardefCont);\n }\n function pattern(type, value) {\n if (isTS && isModifier(value)) { cx.marked = \"keyword\"; return cont(pattern) }\n if (type == \"variable\") { register(value); return cont(); }\n if (type == \"spread\") return cont(pattern);\n if (type == \"[\") return contCommasep(pattern, \"]\");\n if (type == \"{\") return contCommasep(proppattern, \"}\");\n }\n function proppattern(type, value) {\n if (type == \"variable\" && !cx.stream.match(/^\\s*:/, false)) {\n register(value);\n return cont(maybeAssign);\n }\n if (type == \"variable\") cx.marked = \"property\";\n if (type == \"spread\") return cont(pattern);\n if (type == \"}\") return pass();\n return cont(expect(\":\"), pattern, maybeAssign);\n }\n function maybeAssign(_type, value) {\n if (value == \"=\") return cont(expressionNoComma);\n }\n function vardefCont(type) {\n if (type == \",\") return cont(vardef);\n }\n function maybeelse(type, value) {\n if (type == \"keyword b\" && value == \"else\") return cont(pushlex(\"form\", \"else\"), statement, poplex);\n }\n function forspec(type, value) {\n if (value == \"await\") return cont(forspec);\n if (type == \"(\") return cont(pushlex(\")\"), forspec1, expect(\")\"), poplex);\n }\n function forspec1(type) {\n if (type == \"var\") return cont(vardef, expect(\";\"), forspec2);\n if (type == \";\") return cont(forspec2);\n if (type == \"variable\") return cont(formaybeinof);\n return pass(expression, expect(\";\"), forspec2);\n }\n function formaybeinof(_type, value) {\n if (value == \"in\" || value == \"of\") { cx.marked = \"keyword\"; return cont(expression); }\n return cont(maybeoperatorComma, forspec2);\n }\n function forspec2(type, value) {\n if (type == \";\") return cont(forspec3);\n if (value == \"in\" || value == \"of\") { cx.marked = \"keyword\"; return cont(expression); }\n return pass(expression, expect(\";\"), forspec3);\n }\n function forspec3(type) {\n if (type != \")\") cont(expression);\n }\n function functiondef(type, value) {\n if (value == \"*\") {cx.marked = \"keyword\"; return cont(functiondef);}\n if (type == \"variable\") {register(value); return cont(functiondef);}\n if (type == \"(\") return cont(pushcontext, pushlex(\")\"), commasep(funarg, \")\"), poplex, mayberettype, statement, popcontext);\n if (isTS && value == \"<\") return cont(pushlex(\">\"), commasep(typeparam, \">\"), poplex, functiondef)\n }\n function funarg(type, value) {\n if (value == \"@\") cont(expression, funarg)\n if (type == \"spread\") return cont(funarg);\n if (isTS && isModifier(value)) { cx.marked = \"keyword\"; return cont(funarg); }\n return pass(pattern, maybetype, maybeAssign);\n }\n function classExpression(type, value) {\n // Class expressions may have an optional name.\n if (type == \"variable\") return className(type, value);\n return classNameAfter(type, value);\n }\n function className(type, value) {\n if (type == \"variable\") {register(value); return cont(classNameAfter);}\n }\n function classNameAfter(type, value) {\n if (value == \"<\") return cont(pushlex(\">\"), commasep(typeparam, \">\"), poplex, classNameAfter)\n if (value == \"extends\" || value == \"implements\" || (isTS && type == \",\")) {\n if (value == \"implements\") cx.marked = \"keyword\";\n return cont(isTS ? typeexpr : expression, classNameAfter);\n }\n if (type == \"{\") return cont(pushlex(\"}\"), classBody, poplex);\n }\n function classBody(type, value) {\n if (type == \"async\" ||\n (type == \"variable\" &&\n (value == \"static\" || value == \"get\" || value == \"set\" || (isTS && isModifier(value))) &&\n cx.stream.match(/^\\s+[\\w$\\xa1-\\uffff]/, false))) {\n cx.marked = \"keyword\";\n return cont(classBody);\n }\n if (type == \"variable\" || cx.style == \"keyword\") {\n cx.marked = \"property\";\n return cont(isTS ? classfield : functiondef, classBody);\n }\n if (type == \"[\")\n return cont(expression, maybetype, expect(\"]\"), isTS ? classfield : functiondef, classBody)\n if (value == \"*\") {\n cx.marked = \"keyword\";\n return cont(classBody);\n }\n if (type == \";\") return cont(classBody);\n if (type == \"}\") return cont();\n if (value == \"@\") return cont(expression, classBody)\n }\n function classfield(type, value) {\n if (value == \"?\") return cont(classfield)\n if (type == \":\") return cont(typeexpr, maybeAssign)\n if (value == \"=\") return cont(expressionNoComma)\n return pass(functiondef)\n }\n function afterExport(type, value) {\n if (value == \"*\") { cx.marked = \"keyword\"; return cont(maybeFrom, expect(\";\")); }\n if (value == \"default\") { cx.marked = \"keyword\"; return cont(expression, expect(\";\")); }\n if (type == \"{\") return cont(commasep(exportField, \"}\"), maybeFrom, expect(\";\"));\n return pass(statement);\n }\n function exportField(type, value) {\n if (value == \"as\") { cx.marked = \"keyword\"; return cont(expect(\"variable\")); }\n if (type == \"variable\") return pass(expressionNoComma, exportField);\n }\n function afterImport(type) {\n if (type == \"string\") return cont();\n if (type == \"(\") return pass(expression);\n return pass(importSpec, maybeMoreImports, maybeFrom);\n }\n function importSpec(type, value) {\n if (type == \"{\") return contCommasep(importSpec, \"}\");\n if (type == \"variable\") register(value);\n if (value == \"*\") cx.marked = \"keyword\";\n return cont(maybeAs);\n }\n function maybeMoreImports(type) {\n if (type == \",\") return cont(importSpec, maybeMoreImports)\n }\n function maybeAs(_type, value) {\n if (value == \"as\") { cx.marked = \"keyword\"; return cont(importSpec); }\n }\n function maybeFrom(_type, value) {\n if (value == \"from\") { cx.marked = \"keyword\"; return cont(expression); }\n }\n function arrayLiteral(type) {\n if (type == \"]\") return cont();\n return pass(commasep(expressionNoComma, \"]\"));\n }\n function enumdef() {\n return pass(pushlex(\"form\"), pattern, expect(\"{\"), pushlex(\"}\"), commasep(enummember, \"}\"), poplex, poplex)\n }\n function enummember() {\n return pass(pattern, maybeAssign);\n }\n\n function isContinuedStatement(state, textAfter) {\n return state.lastType == \"operator\" || state.lastType == \",\" ||\n isOperatorChar.test(textAfter.charAt(0)) ||\n /[,.]/.test(textAfter.charAt(0));\n }\n\n function expressionAllowed(stream, state, backUp) {\n return state.tokenize == tokenBase &&\n /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\\[{}\\(,;:]|=>)$/.test(state.lastType) ||\n (state.lastType == \"quasi\" && /\\{\\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0))))\n }\n\n // Interface\n\n return {\n startState: function(basecolumn) {\n var state = {\n tokenize: tokenBase,\n lastType: \"sof\",\n cc: [],\n lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, \"block\", false),\n localVars: parserConfig.localVars,\n context: parserConfig.localVars && new Context(null, null, false),\n indented: basecolumn || 0\n };\n if (parserConfig.globalVars && typeof parserConfig.globalVars == \"object\")\n state.globalVars = parserConfig.globalVars;\n return state;\n },\n\n token: function(stream, state) {\n if (stream.sol()) {\n if (!state.lexical.hasOwnProperty(\"align\"))\n state.lexical.align = false;\n state.indented = stream.indentation();\n findFatArrow(stream, state);\n }\n if (state.tokenize != tokenComment && stream.eatSpace()) return null;\n var style = state.tokenize(stream, state);\n if (type == \"comment\") return style;\n state.lastType = type == \"operator\" && (content == \"++\" || content == \"--\") ? \"incdec\" : type;\n return parseJS(state, style, type, content, stream);\n },\n\n indent: function(state, textAfter) {\n if (state.tokenize == tokenComment) return CodeMirror.Pass;\n if (state.tokenize != tokenBase) return 0;\n var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top\n // Kludge to prevent 'maybelse' from blocking lexical scope pops\n if (!/^\\s*else\\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {\n var c = state.cc[i];\n if (c == poplex) lexical = lexical.prev;\n else if (c != maybeelse) break;\n }\n while ((lexical.type == \"stat\" || lexical.type == \"form\") &&\n (firstChar == \"}\" || ((top = state.cc[state.cc.length - 1]) &&\n (top == maybeoperatorComma || top == maybeoperatorNoComma) &&\n !/^[,\\.=+\\-*:?[\\(]/.test(textAfter))))\n lexical = lexical.prev;\n if (statementIndent && lexical.type == \")\" && lexical.prev.type == \"stat\")\n lexical = lexical.prev;\n var type = lexical.type, closing = firstChar == type;\n\n if (type == \"vardef\") return lexical.indented + (state.lastType == \"operator\" || state.lastType == \",\" ? lexical.info.length + 1 : 0);\n else if (type == \"form\" && firstChar == \"{\") return lexical.indented;\n else if (type == \"form\") return lexical.indented + indentUnit;\n else if (type == \"stat\")\n return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);\n else if (lexical.info == \"switch\" && !closing && parserConfig.doubleIndentSwitch != false)\n return lexical.indented + (/^(?:case|default)\\b/.test(textAfter) ? indentUnit : 2 * indentUnit);\n else if (lexical.align) return lexical.column + (closing ? 0 : 1);\n else return lexical.indented + (closing ? 0 : indentUnit);\n },\n\n electricInput: /^\\s*(?:case .*?:|default:|\\{|\\})$/,\n blockCommentStart: jsonMode ? null : \"/*\",\n blockCommentEnd: jsonMode ? null : \"*/\",\n blockCommentContinue: jsonMode ? null : \" * \",\n lineComment: jsonMode ? null : \"//\",\n fold: \"brace\",\n closeBrackets: \"()[]{}''\\\"\\\"``\",\n\n helperType: jsonMode ? \"json\" : \"javascript\",\n jsonldMode: jsonldMode,\n jsonMode: jsonMode,\n\n expressionAllowed: expressionAllowed,\n\n skipExpression: function(state) {\n var top = state.cc[state.cc.length - 1]\n if (top == expression || top == expressionNoComma) state.cc.pop()\n }\n };\n});\n\nCodeMirror.registerHelper(\"wordChars\", \"javascript\", /[\\w$]/);\n\nCodeMirror.defineMIME(\"text/javascript\", \"javascript\");\nCodeMirror.defineMIME(\"text/ecmascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/javascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/x-javascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/ecmascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/json\", {name: \"javascript\", json: true});\nCodeMirror.defineMIME(\"application/x-json\", {name: \"javascript\", json: true});\nCodeMirror.defineMIME(\"application/ld+json\", {name: \"javascript\", jsonld: true});\nCodeMirror.defineMIME(\"text/typescript\", { name: \"javascript\", typescript: true });\nCodeMirror.defineMIME(\"application/typescript\", { name: \"javascript\", typescript: true });\n\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nvar htmlConfig = {\n autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,\n 'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,\n 'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,\n 'track': true, 'wbr': true, 'menuitem': true},\n implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,\n 'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,\n 'th': true, 'tr': true},\n contextGrabbers: {\n 'dd': {'dd': true, 'dt': true},\n 'dt': {'dd': true, 'dt': true},\n 'li': {'li': true},\n 'option': {'option': true, 'optgroup': true},\n 'optgroup': {'optgroup': true},\n 'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,\n 'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,\n 'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,\n 'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,\n 'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},\n 'rp': {'rp': true, 'rt': true},\n 'rt': {'rp': true, 'rt': true},\n 'tbody': {'tbody': true, 'tfoot': true},\n 'td': {'td': true, 'th': true},\n 'tfoot': {'tbody': true},\n 'th': {'td': true, 'th': true},\n 'thead': {'tbody': true, 'tfoot': true},\n 'tr': {'tr': true}\n },\n doNotIndent: {\"pre\": true},\n allowUnquoted: true,\n allowMissing: true,\n caseFold: true\n}\n\nvar xmlConfig = {\n autoSelfClosers: {},\n implicitlyClosed: {},\n contextGrabbers: {},\n doNotIndent: {},\n allowUnquoted: false,\n allowMissing: false,\n allowMissingTagName: false,\n caseFold: false\n}\n\nCodeMirror.defineMode(\"xml\", function(editorConf, config_) {\n var indentUnit = editorConf.indentUnit\n var config = {}\n var defaults = config_.htmlMode ? htmlConfig : xmlConfig\n for (var prop in defaults) config[prop] = defaults[prop]\n for (var prop in config_) config[prop] = config_[prop]\n\n // Return variables for tokenizers\n var type, setStyle;\n\n function inText(stream, state) {\n function chain(parser) {\n state.tokenize = parser;\n return parser(stream, state);\n }\n\n var ch = stream.next();\n if (ch == \"<\") {\n if (stream.eat(\"!\")) {\n if (stream.eat(\"[\")) {\n if (stream.match(\"CDATA[\")) return chain(inBlock(\"atom\", \"]]>\"));\n else return null;\n } else if (stream.match(\"--\")) {\n return chain(inBlock(\"comment\", \"-->\"));\n } else if (stream.match(\"DOCTYPE\", true, true)) {\n stream.eatWhile(/[\\w\\._\\-]/);\n return chain(doctype(1));\n } else {\n return null;\n }\n } else if (stream.eat(\"?\")) {\n stream.eatWhile(/[\\w\\._\\-]/);\n state.tokenize = inBlock(\"meta\", \"?>\");\n return \"meta\";\n } else {\n type = stream.eat(\"/\") ? \"closeTag\" : \"openTag\";\n state.tokenize = inTag;\n return \"tag bracket\";\n }\n } else if (ch == \"&\") {\n var ok;\n if (stream.eat(\"#\")) {\n if (stream.eat(\"x\")) {\n ok = stream.eatWhile(/[a-fA-F\\d]/) && stream.eat(\";\");\n } else {\n ok = stream.eatWhile(/[\\d]/) && stream.eat(\";\");\n }\n } else {\n ok = stream.eatWhile(/[\\w\\.\\-:]/) && stream.eat(\";\");\n }\n return ok ? \"atom\" : \"error\";\n } else {\n stream.eatWhile(/[^&<]/);\n return null;\n }\n }\n inText.isInText = true;\n\n function inTag(stream, state) {\n var ch = stream.next();\n if (ch == \">\" || (ch == \"/\" && stream.eat(\">\"))) {\n state.tokenize = inText;\n type = ch == \">\" ? \"endTag\" : \"selfcloseTag\";\n return \"tag bracket\";\n } else if (ch == \"=\") {\n type = \"equals\";\n return null;\n } else if (ch == \"<\") {\n state.tokenize = inText;\n state.state = baseState;\n state.tagName = state.tagStart = null;\n var next = state.tokenize(stream, state);\n return next ? next + \" tag error\" : \"tag error\";\n } else if (/[\\'\\\"]/.test(ch)) {\n state.tokenize = inAttribute(ch);\n state.stringStartCol = stream.column();\n return state.tokenize(stream, state);\n } else {\n stream.match(/^[^\\s\\u00a0=<>\\\"\\']*[^\\s\\u00a0=<>\\\"\\'\\/]/);\n return \"word\";\n }\n }\n\n function inAttribute(quote) {\n var closure = function(stream, state) {\n while (!stream.eol()) {\n if (stream.next() == quote) {\n state.tokenize = inTag;\n break;\n }\n }\n return \"string\";\n };\n closure.isInAttribute = true;\n return closure;\n }\n\n function inBlock(style, terminator) {\n return function(stream, state) {\n while (!stream.eol()) {\n if (stream.match(terminator)) {\n state.tokenize = inText;\n break;\n }\n stream.next();\n }\n return style;\n }\n }\n\n function doctype(depth) {\n return function(stream, state) {\n var ch;\n while ((ch = stream.next()) != null) {\n if (ch == \"<\") {\n state.tokenize = doctype(depth + 1);\n return state.tokenize(stream, state);\n } else if (ch == \">\") {\n if (depth == 1) {\n state.tokenize = inText;\n break;\n } else {\n state.tokenize = doctype(depth - 1);\n return state.tokenize(stream, state);\n }\n }\n }\n return \"meta\";\n };\n }\n\n function Context(state, tagName, startOfLine) {\n this.prev = state.context;\n this.tagName = tagName;\n this.indent = state.indented;\n this.startOfLine = startOfLine;\n if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))\n this.noIndent = true;\n }\n function popContext(state) {\n if (state.context) state.context = state.context.prev;\n }\n function maybePopContext(state, nextTagName) {\n var parentTagName;\n while (true) {\n if (!state.context) {\n return;\n }\n parentTagName = state.context.tagName;\n if (!config.contextGrabbers.hasOwnProperty(parentTagName) ||\n !config.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {\n return;\n }\n popContext(state);\n }\n }\n\n function baseState(type, stream, state) {\n if (type == \"openTag\") {\n state.tagStart = stream.column();\n return tagNameState;\n } else if (type == \"closeTag\") {\n return closeTagNameState;\n } else {\n return baseState;\n }\n }\n function tagNameState(type, stream, state) {\n if (type == \"word\") {\n state.tagName = stream.current();\n setStyle = \"tag\";\n return attrState;\n } else if (config.allowMissingTagName && type == \"endTag\") {\n setStyle = \"tag bracket\";\n return attrState(type, stream, state);\n } else {\n setStyle = \"error\";\n return tagNameState;\n }\n }\n function closeTagNameState(type, stream, state) {\n if (type == \"word\") {\n var tagName = stream.current();\n if (state.context && state.context.tagName != tagName &&\n config.implicitlyClosed.hasOwnProperty(state.context.tagName))\n popContext(state);\n if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {\n setStyle = \"tag\";\n return closeState;\n } else {\n setStyle = \"tag error\";\n return closeStateErr;\n }\n } else if (config.allowMissingTagName && type == \"endTag\") {\n setStyle = \"tag bracket\";\n return closeState(type, stream, state);\n } else {\n setStyle = \"error\";\n return closeStateErr;\n }\n }\n\n function closeState(type, _stream, state) {\n if (type != \"endTag\") {\n setStyle = \"error\";\n return closeState;\n }\n popContext(state);\n return baseState;\n }\n function closeStateErr(type, stream, state) {\n setStyle = \"error\";\n return closeState(type, stream, state);\n }\n\n function attrState(type, _stream, state) {\n if (type == \"word\") {\n setStyle = \"attribute\";\n return attrEqState;\n } else if (type == \"endTag\" || type == \"selfcloseTag\") {\n var tagName = state.tagName, tagStart = state.tagStart;\n state.tagName = state.tagStart = null;\n if (type == \"selfcloseTag\" ||\n config.autoSelfClosers.hasOwnProperty(tagName)) {\n maybePopContext(state, tagName);\n } else {\n maybePopContext(state, tagName);\n state.context = new Context(state, tagName, tagStart == state.indented);\n }\n return baseState;\n }\n setStyle = \"error\";\n return attrState;\n }\n function attrEqState(type, stream, state) {\n if (type == \"equals\") return attrValueState;\n if (!config.allowMissing) setStyle = \"error\";\n return attrState(type, stream, state);\n }\n function attrValueState(type, stream, state) {\n if (type == \"string\") return attrContinuedState;\n if (type == \"word\" && config.allowUnquoted) {setStyle = \"string\"; return attrState;}\n setStyle = \"error\";\n return attrState(type, stream, state);\n }\n function attrContinuedState(type, stream, state) {\n if (type == \"string\") return attrContinuedState;\n return attrState(type, stream, state);\n }\n\n return {\n startState: function(baseIndent) {\n var state = {tokenize: inText,\n state: baseState,\n indented: baseIndent || 0,\n tagName: null, tagStart: null,\n context: null}\n if (baseIndent != null) state.baseIndent = baseIndent\n return state\n },\n\n token: function(stream, state) {\n if (!state.tagName && stream.sol())\n state.indented = stream.indentation();\n\n if (stream.eatSpace()) return null;\n type = null;\n var style = state.tokenize(stream, state);\n if ((style || type) && style != \"comment\") {\n setStyle = null;\n state.state = state.state(type || style, stream, state);\n if (setStyle)\n style = setStyle == \"error\" ? style + \" error\" : setStyle;\n }\n return style;\n },\n\n indent: function(state, textAfter, fullLine) {\n var context = state.context;\n // Indent multi-line strings (e.g. css).\n if (state.tokenize.isInAttribute) {\n if (state.tagStart == state.indented)\n return state.stringStartCol + 1;\n else\n return state.indented + indentUnit;\n }\n if (context && context.noIndent) return CodeMirror.Pass;\n if (state.tokenize != inTag && state.tokenize != inText)\n return fullLine ? fullLine.match(/^(\\s*)/)[0].length : 0;\n // Indent the starts of attribute names.\n if (state.tagName) {\n if (config.multilineTagIndentPastTag !== false)\n return state.tagStart + state.tagName.length + 2;\n else\n return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1);\n }\n if (config.alignCDATA && /$/,\n blockCommentStart: \"\",\n\n configuration: config.htmlMode ? \"html\" : \"xml\",\n helperType: config.htmlMode ? \"html\" : \"xml\",\n\n skipAttribute: function(state) {\n if (state.state == attrValueState)\n state.state = attrState\n }\n };\n});\n\nCodeMirror.defineMIME(\"text/xml\", \"xml\");\nCodeMirror.defineMIME(\"application/xml\", \"xml\");\nif (!CodeMirror.mimeModes.hasOwnProperty(\"text/html\"))\n CodeMirror.defineMIME(\"text/html\", {name: \"xml\", htmlMode: true});\n\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"), require(\"../xml/xml\"), require(\"../javascript/javascript\"), require(\"../css/css\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\", \"../xml/xml\", \"../javascript/javascript\", \"../css/css\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n\n var defaultTags = {\n script: [\n [\"lang\", /(javascript|babel)/i, \"javascript\"],\n [\"type\", /^(?:text|application)\\/(?:x-)?(?:java|ecma)script$|^module$|^$/i, \"javascript\"],\n [\"type\", /./, \"text/plain\"],\n [null, null, \"javascript\"]\n ],\n style: [\n [\"lang\", /^css$/i, \"css\"],\n [\"type\", /^(text\\/)?(x-)?(stylesheet|css)$/i, \"css\"],\n [\"type\", /./, \"text/plain\"],\n [null, null, \"css\"]\n ]\n };\n\n function maybeBackup(stream, pat, style) {\n var cur = stream.current(), close = cur.search(pat);\n if (close > -1) {\n stream.backUp(cur.length - close);\n } else if (cur.match(/<\\/?$/)) {\n stream.backUp(cur.length);\n if (!stream.match(pat, false)) stream.match(cur);\n }\n return style;\n }\n\n var attrRegexpCache = {};\n function getAttrRegexp(attr) {\n var regexp = attrRegexpCache[attr];\n if (regexp) return regexp;\n return attrRegexpCache[attr] = new RegExp(\"\\\\s+\" + attr + \"\\\\s*=\\\\s*('|\\\")?([^'\\\"]+)('|\\\")?\\\\s*\");\n }\n\n function getAttrValue(text, attr) {\n var match = text.match(getAttrRegexp(attr))\n return match ? /^\\s*(.*?)\\s*$/.exec(match[2])[1] : \"\"\n }\n\n function getTagRegexp(tagName, anchored) {\n return new RegExp((anchored ? \"^\" : \"\") + \"<\\/\\s*\" + tagName + \"\\s*>\", \"i\");\n }\n\n function addTags(from, to) {\n for (var tag in from) {\n var dest = to[tag] || (to[tag] = []);\n var source = from[tag];\n for (var i = source.length - 1; i >= 0; i--)\n dest.unshift(source[i])\n }\n }\n\n function findMatchingMode(tagInfo, tagText) {\n for (var i = 0; i < tagInfo.length; i++) {\n var spec = tagInfo[i];\n if (!spec[0] || spec[1].test(getAttrValue(tagText, spec[0]))) return spec[2];\n }\n }\n\n CodeMirror.defineMode(\"htmlmixed\", function (config, parserConfig) {\n var htmlMode = CodeMirror.getMode(config, {\n name: \"xml\",\n htmlMode: true,\n multilineTagIndentFactor: parserConfig.multilineTagIndentFactor,\n multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag\n });\n\n var tags = {};\n var configTags = parserConfig && parserConfig.tags, configScript = parserConfig && parserConfig.scriptTypes;\n addTags(defaultTags, tags);\n if (configTags) addTags(configTags, tags);\n if (configScript) for (var i = configScript.length - 1; i >= 0; i--)\n tags.script.unshift([\"type\", configScript[i].matches, configScript[i].mode])\n\n function html(stream, state) {\n var style = htmlMode.token(stream, state.htmlState), tag = /\\btag\\b/.test(style), tagName\n if (tag && !/[<>\\s\\/]/.test(stream.current()) &&\n (tagName = state.htmlState.tagName && state.htmlState.tagName.toLowerCase()) &&\n tags.hasOwnProperty(tagName)) {\n state.inTag = tagName + \" \"\n } else if (state.inTag && tag && />$/.test(stream.current())) {\n var inTag = /^([\\S]+) (.*)/.exec(state.inTag)\n state.inTag = null\n var modeSpec = stream.current() == \">\" && findMatchingMode(tags[inTag[1]], inTag[2])\n var mode = CodeMirror.getMode(config, modeSpec)\n var endTagA = getTagRegexp(inTag[1], true), endTag = getTagRegexp(inTag[1], false);\n state.token = function (stream, state) {\n if (stream.match(endTagA, false)) {\n state.token = html;\n state.localState = state.localMode = null;\n return null;\n }\n return maybeBackup(stream, endTag, state.localMode.token(stream, state.localState));\n };\n state.localMode = mode;\n state.localState = CodeMirror.startState(mode, htmlMode.indent(state.htmlState, \"\"));\n } else if (state.inTag) {\n state.inTag += stream.current()\n if (stream.eol()) state.inTag += \" \"\n }\n return style;\n };\n\n return {\n startState: function () {\n var state = CodeMirror.startState(htmlMode);\n return {token: html, inTag: null, localMode: null, localState: null, htmlState: state};\n },\n\n copyState: function (state) {\n var local;\n if (state.localState) {\n local = CodeMirror.copyState(state.localMode, state.localState);\n }\n return {token: state.token, inTag: state.inTag,\n localMode: state.localMode, localState: local,\n htmlState: CodeMirror.copyState(htmlMode, state.htmlState)};\n },\n\n token: function (stream, state) {\n return state.token(stream, state);\n },\n\n indent: function (state, textAfter, line) {\n if (!state.localMode || /^\\s*<\\//.test(textAfter))\n return htmlMode.indent(state.htmlState, textAfter);\n else if (state.localMode.indent)\n return state.localMode.indent(state.localState, textAfter, line);\n else\n return CodeMirror.Pass;\n },\n\n innerMode: function (state) {\n return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode};\n }\n };\n }, \"xml\", \"javascript\", \"css\");\n\n CodeMirror.defineMIME(\"text/html\", \"htmlmixed\");\n});\n","import Backbone from 'backbone';\nvar CodeMirror = require('codemirror/lib/codemirror');\nvar htmlMode = require('codemirror/mode/htmlmixed/htmlmixed');\nvar cssMode = require('codemirror/mode/css/css');\nvar formatting = require('codemirror-formatting');\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n input: '',\n label: '',\n codeName: '',\n theme: '',\n readOnly: true,\n lineNumbers: true\n },\n\n /** @inheritdoc */\n init(el) {\n this.editor = CodeMirror.fromTextArea(el, {\n dragDrop: false,\n lineWrapping: true,\n mode: this.get('codeName'),\n ...this.attributes\n });\n this.element = el;\n\n return this;\n },\n\n getEditor() {\n return this.editor;\n },\n\n /**\n * The element where the viewer is attached\n * @return {HTMLElement}\n */\n getElement() {\n return this.element;\n },\n\n /**\n * Set the element which contains the viewer attached.\n * Generally, it should be just a textarea, but some editor might require\n * a container for it some in that case this method can be used\n * @param {HTMLElement} el\n * @return {self}\n */\n setElement(el) {\n this.element = el;\n return this;\n },\n\n /**\n * Refresh the viewer\n * @return {self}\n */\n refresh() {\n this.getEditor().refresh();\n return this;\n },\n\n /**\n * Focus the viewer\n * @return {self}\n */\n focus() {\n this.getEditor().focus();\n return this;\n },\n\n getContent() {\n const ed = this.getEditor();\n return ed && ed.getValue();\n },\n\n /** @inheritdoc */\n setContent(v) {\n if (!this.editor) return;\n this.editor.setValue(v);\n if (this.editor.autoFormatRange) {\n CodeMirror.commands.selectAll(this.editor);\n this.editor.autoFormatRange(\n this.editor.getCursor(true),\n this.editor.getCursor(false)\n );\n CodeMirror.commands.goDocStart(this.editor);\n }\n }\n});\n","import { extend } from 'underscore';\nimport Backbone from 'backbone';\n\nmodule.exports = Backbone.Model.extend({\n mapModel(model) {\n var code = '';\n var script = model.get('script');\n var type = model.get('type');\n var comps = model.get('components');\n var id = model.getId();\n\n if (script) {\n // If the component has scripts we need to expose his ID\n var attr = model.get('attributes');\n attr = extend({}, attr, { id });\n model.set('attributes', attr);\n var scrStr = model.getScriptString();\n\n // If the script was updated, I'll put its code in a separate container\n if (model.get('scriptUpdated')) {\n this.mapJs[type + '-' + id] = { ids: [id], code: scrStr };\n } else {\n var mapType = this.mapJs[type];\n\n if (mapType) {\n mapType.ids.push(id);\n } else {\n this.mapJs[type] = { ids: [id], code: scrStr };\n }\n }\n }\n\n comps.each(function(model) {\n code += this.mapModel(model);\n }, this);\n\n return code;\n },\n\n build(model) {\n this.mapJs = {};\n this.mapModel(model);\n\n var code = '';\n\n for (var type in this.mapJs) {\n var mapType = this.mapJs[type];\n var ids = '#' + mapType.ids.join(', #');\n code += `\n var items = document.querySelectorAll('${ids}');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){${mapType.code}}.bind(items[i]))();\n }`;\n }\n\n return code;\n }\n});\n","import { each } from 'underscore';\nimport Backbone from 'backbone';\n\nmodule.exports = Backbone.Model.extend({\n /** @inheritdoc */\n build(model) {\n var json = model.toJSON();\n this.beforeEach(json);\n\n each(\n json,\n function(v, attr) {\n var obj = json[attr];\n if (obj instanceof Backbone.Model) {\n json[attr] = this.build(obj);\n } else if (obj instanceof Backbone.Collection) {\n var coll = obj;\n json[attr] = [];\n if (coll.length) {\n coll.each(function(el, index) {\n json[attr][index] = this.build(el);\n }, this);\n }\n }\n },\n this\n );\n\n return json;\n },\n\n /**\n * Execute on each object\n * @param {Object} obj\n */\n beforeEach(obj) {\n delete obj.status;\n }\n});\n","import { isUndefined } from 'underscore';\n\nmodule.exports = require('backbone').Model.extend({\n initialize() {\n this.compCls = [];\n this.ids = [];\n },\n\n /**\n * Get CSS from a component\n * @param {Model} model\n * @return {String}\n */\n buildFromModel(model, opts = {}) {\n let code = '';\n const em = this.em;\n const avoidInline = em && em.getConfig('avoidInlineStyle');\n const style = model.styleToString();\n const classes = model.get('classes');\n const wrappesIsBody = opts.wrappesIsBody;\n const isWrapper = model.get('wrapper');\n this.ids.push(`#${model.getId()}`);\n\n // Let's know what classes I've found\n classes.each(model => this.compCls.push(model.getFullName()));\n\n if ((!avoidInline || isWrapper) && style) {\n let selector = `#${model.getId()}`;\n selector = wrappesIsBody && isWrapper ? 'body' : selector;\n code = `${selector}{${style}}`;\n }\n\n const components = model.components();\n components.each(model => (code += this.buildFromModel(model, opts)));\n return code;\n },\n\n build(model, opts = {}) {\n const cssc = opts.cssc;\n const em = opts.em || '';\n this.em = em;\n this.compCls = [];\n this.ids = [];\n var code = this.buildFromModel(model, opts);\n const clearStyles =\n isUndefined(opts.clearStyles) && em\n ? em.getConfig('clearStyles')\n : opts.clearStyles;\n\n if (cssc) {\n const rules = cssc.getAll();\n const atRules = {};\n const dump = [];\n\n rules.each(rule => {\n const atRule = rule.getAtRule();\n\n if (atRule) {\n const mRules = atRules[atRule];\n if (mRules) {\n mRules.push(rule);\n } else {\n atRules[atRule] = [rule];\n }\n return;\n }\n\n code += this.buildFromRule(rule, dump, opts);\n });\n\n // Get at-rules\n for (let atRule in atRules) {\n let rulesStr = '';\n const mRules = atRules[atRule];\n mRules.forEach(\n rule => (rulesStr += this.buildFromRule(rule, dump, opts))\n );\n\n if (rulesStr) {\n code += `${atRule}{${rulesStr}}`;\n }\n }\n\n em && clearStyles && rules.remove(dump);\n }\n\n return code;\n },\n\n /**\n * Get CSS from the rule model\n * @param {Model} rule\n * @return {string} CSS string\n */\n buildFromRule(rule, dump, opts = {}) {\n let result = '';\n const selectorStrNoAdd = rule.selectorsToString({ skipAdd: 1 });\n const selectorsAdd = rule.get('selectorsAdd');\n const singleAtRule = rule.get('singleAtRule');\n let found;\n\n // This will not render a rule if there is no its component\n rule.get('selectors').each(selector => {\n const name = selector.getFullName();\n if (\n this.compCls.indexOf(name) >= 0 ||\n this.ids.indexOf(name) >= 0 ||\n opts.keepUnusedStyles\n ) {\n found = 1;\n }\n });\n\n if ((selectorStrNoAdd && found) || selectorsAdd || singleAtRule) {\n const block = rule.getDeclaration();\n block && (result += block);\n } else {\n dump.push(rule);\n }\n\n return result;\n }\n});\n","import Backbone from 'backbone';\n\nmodule.exports = Backbone.Model.extend({\n build(model, opts = {}) {\n const models = model.get('components');\n\n if (opts.exportWrapper) {\n return opts.wrappesIsBody\n ? `${this.buildModels(models)}`\n : model.toHTML();\n }\n\n return this.buildModels(models);\n },\n\n buildModels(models) {\n let code = '';\n models.each(model => {\n code += model.toHTML();\n });\n return code;\n }\n});\n","module.exports = {\n // Style prefix\n stylePrefix: 'cm-',\n\n inlineCss: false\n};\n","/**\n * - [addGenerator](#addgenerator)\n * - [getGenerator](#getgenerator)\n * - [getGenerators](#getgenerators)\n * - [addViewer](#addviewer)\n * - [getViewer](#getviewer)\n * - [getViewers](#getviewers)\n * - [updateViewer](#updateviewer)\n * - [getCode](#getcode)\n *\n *\n * Before using methods you should get first the module from the editor instance, in this way:\n *\n * ```js\n * var codeManager = editor.CodeManager;\n * ```\n *\n * @module CodeManager\n */\nimport { isUndefined } from 'underscore';\n\nmodule.exports = () => {\n var c = {},\n defaults = require('./config/config'),\n gHtml = require('./model/HtmlGenerator'),\n gCss = require('./model/CssGenerator'),\n gJson = require('./model/JsonGenerator'),\n gJs = require('./model/JsGenerator'),\n eCM = require('./model/CodeMirrorEditor'),\n editorView = require('./view/EditorView');\n\n var generators = {},\n defGenerators = {},\n viewers = {},\n defViewers = {};\n\n const defaultViewer = 'CodeMirror';\n\n return {\n getConfig() {\n return c;\n },\n\n config: c,\n\n EditorView: editorView,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'CodeManager',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n defGenerators.html = new gHtml();\n defGenerators.css = new gCss();\n defGenerators.json = new gJson();\n defGenerators.js = new gJs();\n defViewers.CodeMirror = new eCM();\n this.loadDefaultGenerators().loadDefaultViewers();\n\n return this;\n },\n\n /**\n * Add new code generator to the collection\n * @param {string} id Code generator ID\n * @param {Object} generator Code generator wrapper\n * @param {Function} generator.build Function that builds the code\n * @return {this}\n * @example\n * codeManager.addGenerator('html7',{\n * build: function(model){\n * return 'myCode';\n * }\n * });\n * */\n addGenerator(id, generator) {\n generators[id] = generator;\n return this;\n },\n\n /**\n * Get code generator by id\n * @param {string} id Code generator ID\n * @return {Object|null}\n * @example\n * var generator = codeManager.getGenerator('html7');\n * generator.build = function(model){\n * //extend\n * };\n * */\n getGenerator(id) {\n return generators[id] || null;\n },\n\n /**\n * Returns all code generators\n * @return {Array}\n * */\n getGenerators() {\n return generators;\n },\n\n /**\n * Add new code viewer\n * @param {string} id Code viewer ID\n * @param {Object} viewer Code viewer wrapper\n * @param {Function} viewer.init Set element on which viewer will be displayed\n * @param {Function} viewer.setContent Set content to the viewer\n * @return {this}\n * @example\n * codeManager.addViewer('ace',{\n * init: function(el){\n * var ace = require('ace-editor');\n * this.editor = ace.edit(el.id);\n * },\n * setContent: function(code){\n * this.editor.setValue(code);\n * }\n * });\n * */\n addViewer(id, viewer) {\n viewers[id] = viewer;\n return this;\n },\n\n /**\n * Get code viewer by id\n * @param {string} id Code viewer ID\n * @return {Object|null}\n * @example\n * var viewer = codeManager.getViewer('ace');\n * */\n getViewer(id) {\n return viewers[id] || null;\n },\n\n /**\n * Returns all code viewers\n * @return {Array}\n * */\n getViewers() {\n return viewers;\n },\n\n createViewer(opts = {}) {\n const type = !isUndefined(opts.type) ? opts.type : defaultViewer;\n const viewer = this.getViewer(type) && this.getViewer(type).clone();\n const cont = document.createElement('div');\n const txtarea = document.createElement('textarea');\n cont.appendChild(txtarea);\n viewer.set(opts);\n viewer.init(txtarea);\n viewer.setElement(cont);\n\n return viewer;\n },\n\n /**\n * Update code viewer content\n * @param {Object} viewer Viewer instance\n * @param {string} code Code string\n * @example\n * var AceViewer = codeManager.getViewer('ace');\n * // ...\n * var viewer = AceViewer.init(el);\n * // ...\n * codeManager.updateViewer(AceViewer, 'code');\n * */\n updateViewer(viewer, code) {\n viewer.setContent(code);\n },\n\n /**\n * Get code from model\n * @param {Object} model Any kind of model that will be passed to the build method of generator\n * @param {string} genId Code generator id\n * @param {Object} [opt] Options\n * @return {string}\n * @example\n * var codeStr = codeManager.getCode(model, 'html');\n * */\n getCode(model, genId, opt = {}) {\n opt.em = c.em;\n var generator = this.getGenerator(genId);\n return generator ? generator.build(model, opt) : '';\n },\n\n /**\n * Load default code generators\n * @return {this}\n * @private\n * */\n loadDefaultGenerators() {\n for (var id in defGenerators) this.addGenerator(id, defGenerators[id]);\n\n return this;\n },\n\n /**\n * Load default code viewers\n * @return {this}\n * @private\n * */\n loadDefaultViewers() {\n for (var id in defViewers) this.addViewer(id, defViewers[id]);\n\n return this;\n }\n };\n};\n","module.exports = require('backbone').View.extend({\n template({ pfx, ppfx, content, title }) {\n return `
\n
\n
${title}
\n
\n
\n
\n
${content}
\n
\n
\n
\n
`;\n },\n\n events: {\n click: 'onClick',\n 'click [data-close-modal]': 'hide'\n },\n\n initialize(o) {\n const model = this.model;\n const config = o.config || {};\n const pfx = config.stylePrefix || '';\n this.config = config;\n this.pfx = pfx;\n this.ppfx = config.pStylePrefix || '';\n this.listenTo(model, 'change:open', this.updateOpen);\n this.listenTo(model, 'change:title', this.updateTitle);\n this.listenTo(model, 'change:content', this.updateContent);\n },\n\n onClick(e) {\n const bkd = this.config.backdrop;\n bkd && e.target === this.el && this.hide();\n },\n\n /**\n * Returns collector element\n * @return {HTMLElement}\n * @private\n */\n getCollector() {\n if (!this.$collector)\n this.$collector = this.$el.find('.' + this.pfx + 'collector');\n return this.$collector;\n },\n\n /**\n * Returns content element\n * @return {HTMLElement}\n * @private\n */\n getContent() {\n const pfx = this.pfx;\n\n if (!this.$content) {\n this.$content = this.$el.find(`.${pfx}content #${pfx}c`);\n }\n\n return this.$content;\n },\n\n /**\n * Returns title element\n * @return {HTMLElement}\n * @private\n */\n getTitle() {\n if (!this.$title) this.$title = this.$el.find('.' + this.pfx + 'title');\n return this.$title.get(0);\n },\n\n /**\n * Update content\n * @private\n * */\n updateContent() {\n var content = this.getContent();\n const children = content.children();\n const coll = this.getCollector();\n const body = this.model.get('content');\n children.length && coll.append(children);\n content.empty().append(body);\n },\n\n /**\n * Update title\n * @private\n * */\n updateTitle() {\n var title = this.getTitle();\n if (title) title.innerHTML = this.model.get('title');\n },\n\n /**\n * Update open\n * @private\n * */\n updateOpen() {\n this.el.style.display = this.model.get('open') ? '' : 'none';\n },\n\n /**\n * Hide modal\n * @private\n * */\n hide() {\n this.model.set('open', 0);\n },\n\n /**\n * Show modal\n * @private\n * */\n show() {\n this.model.set('open', 1);\n },\n\n render() {\n const el = this.$el;\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const obj = this.model.toJSON();\n obj.pfx = this.pfx;\n obj.ppfx = this.ppfx;\n el.html(this.template(obj));\n el.attr('class', `${pfx}container`);\n this.updateOpen();\n return this;\n }\n});\n","var Backbone = require('backbone');\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n title: '',\n content: '',\n open: false\n }\n});\n","module.exports = {\n stylePrefix: 'mdl-',\n\n title: '',\n\n content: '',\n\n backdrop: true\n};\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/modal_dialog/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * modal: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const modal = editor.Modal;\n * ```\n *\n * * [open](#open)\n * * [close](#close)\n * * [isOpen](#isopen)\n * * [setTitle](#settitle)\n * * [getTitle](#gettitle)\n * * [setContent](#setcontent)\n * * [getContent](#getcontent)\n *\n * @module Modal\n */\n\nmodule.exports = () => {\n var c = {},\n defaults = require('./config/config'),\n ModalM = require('./model/Modal'),\n ModalView = require('./view/ModalView');\n var model, modal;\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Modal',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n model = new ModalM(c);\n modal = new ModalView({\n model,\n config: c\n });\n\n return this;\n },\n\n postRender(view) {\n const el = view.model.getConfig().el || view.el;\n this.render().appendTo(el);\n },\n\n /**\n * Open the modal window\n * @param {Object} [opts={}] Options\n * @param {String|HTMLElement} [opts.title] Title to set for the modal\n * @param {String|HTMLElement} [opts.content] Content to set for the modal\n * @return {this}\n */\n open(opts = {}) {\n opts.title && this.setTitle(opts.title);\n opts.content && this.setContent(opts.content);\n modal.show();\n return this;\n },\n\n /**\n * Close the modal window\n * @return {this}\n */\n close() {\n modal.hide();\n return this;\n },\n\n /**\n * Checks if the modal window is open\n * @return {Boolean}\n */\n isOpen() {\n return !!model.get('open');\n },\n\n /**\n * Set the title to the modal window\n * @param {string} title Title\n * @return {this}\n * @example\n * modal.setTitle('New title');\n */\n setTitle(title) {\n model.set('title', title);\n return this;\n },\n\n /**\n * Returns the title of the modal window\n * @return {string}\n */\n getTitle() {\n return model.get('title');\n },\n\n /**\n * Set the content of the modal window\n * @param {string|HTMLElement} content Content\n * @return {this}\n * @example\n * modal.setContent('
Some HTML content
');\n */\n setContent(content) {\n model.set('content', ' ');\n model.set('content', content);\n return this;\n },\n\n /**\n * Get the content of the modal window\n * @return {string}\n */\n getContent() {\n return model.get('content');\n },\n\n /**\n * Returns content element\n * @return {HTMLElement}\n * @private\n */\n getContentEl() {\n return modal.getContent().get(0);\n },\n\n /**\n * Returns modal model\n * @return {Model}\n * @private\n */\n getModel() {\n return model;\n },\n\n /**\n * Render the modal window\n * @return {HTMLElement}\n * @private\n */\n render() {\n return modal.render().$el;\n }\n };\n};\n","const Selector = require('./../model/Selector');\nconst inputProp = 'contentEditable';\n\nmodule.exports = require('backbone').View.extend({\n template() {\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const label = this.model.get('label') || '';\n return `\n \n ${label}\n \n ⨯\n \n `;\n },\n\n events: {\n 'click [data-tag-remove]': 'removeTag',\n 'click [data-tag-status]': 'changeStatus',\n 'dblclick [data-tag-name]': 'startEditTag',\n 'focusout [data-tag-name]': 'endEditTag'\n },\n\n initialize(o) {\n this.config = o.config || {};\n this.coll = o.coll || null;\n this.pfx = this.config.stylePrefix || '';\n this.ppfx = this.config.pStylePrefix || '';\n this.target = this.config.em;\n this.listenTo(this.model, 'change:active', this.updateStatus);\n },\n\n /**\n * Returns the element which containes the anme of the tag\n * @return {HTMLElement}\n */\n getInputEl() {\n if (!this.inputEl) {\n this.inputEl = this.el.querySelector('[data-tag-name]');\n }\n\n return this.inputEl;\n },\n\n /**\n * Start editing tag\n * @private\n */\n startEditTag() {\n const inputEl = this.getInputEl();\n inputEl[inputProp] = true;\n inputEl.focus();\n },\n\n /**\n * End editing tag. If the class typed already exists the\n * old one will be restored otherwise will be changed\n * @private\n */\n endEditTag() {\n const model = this.model;\n const inputEl = this.getInputEl();\n const label = inputEl.textContent;\n const name = Selector.escapeName(label);\n const em = this.target;\n const sm = em && em.get('SelectorManager');\n inputEl[inputProp] = false;\n\n if (sm) {\n if (sm.get(name)) {\n inputEl.innerText = model.get('label');\n } else {\n model.set({ name, label });\n }\n }\n },\n\n /**\n * Update status of the tag\n * @private\n */\n changeStatus() {\n this.model.set('active', !this.model.get('active'));\n },\n\n /**\n * Remove tag from the selected component\n * @param {Object} e\n * @private\n */\n removeTag(e) {\n const em = this.target;\n const model = this.model;\n const coll = this.coll;\n const el = this.el;\n const sel = em && em.getSelected();\n sel && sel.get & sel.get('classes').remove(model);\n coll && coll.remove(model);\n setTimeout(() => this.remove(), 0);\n },\n\n /**\n * Update status of the checkbox\n * @private\n */\n updateStatus() {\n var chkOn = 'fa-check-square-o';\n var chkOff = 'fa-square-o';\n\n if (!this.$chk) this.$chk = this.$el.find('#' + this.pfx + 'checkbox');\n\n if (this.model.get('active')) {\n this.$chk.removeClass(chkOff).addClass(chkOn);\n this.$el.removeClass('opac50');\n } else {\n this.$chk.removeClass(chkOn).addClass(chkOff);\n this.$el.addClass('opac50');\n }\n },\n\n render() {\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n this.$el.html(this.template());\n this.$el.attr('class', `${pfx}tag ${ppfx}three-bg`);\n this.updateStatus();\n return this;\n }\n});\n","import _ from 'underscore';\nimport Backbone from 'backbone';\nvar ClassTagView = require('./ClassTagView');\n\nmodule.exports = Backbone.View.extend({\n template: _.template(`\n
up\">\n
label\"><%= label %>
\n
status-c\">\n input-c\">\n
field <%= ppfx %>select\">\n input-holder\">\n \n \n
sel-arrow\">\n
d-s-arrow\">
\n
\n
\n
\n
\n
\n
tags-field\" class=\"<%= ppfx %>field\">\n
tags-c\">
\n new\" />\n add-tag\" class=\"fa fa-plus\">\n
\n
sel-help\">\n
label\"><%= selectedLabel %>
\n
sel\">
\n
\n
`),\n\n events: {},\n\n initialize(o = {}) {\n this.config = o.config || {};\n this.pfx = this.config.stylePrefix || '';\n this.ppfx = this.config.pStylePrefix || '';\n this.className = this.pfx + 'tags';\n this.addBtnId = this.pfx + 'add-tag';\n this.newInputId = this.pfx + 'new';\n this.stateInputId = this.pfx + 'states';\n this.stateInputC = this.pfx + 'input-c';\n this.states = this.config.states || [];\n this.events['click #' + this.addBtnId] = 'startNewTag';\n this.events['blur #' + this.newInputId] = 'endNewTag';\n this.events['keyup #' + this.newInputId] = 'onInputKeyUp';\n this.events['change #' + this.stateInputId] = 'stateChanged';\n\n this.target = this.config.em;\n this.em = this.target;\n\n this.listenTo(this.target, 'component:toggled', this.componentChanged);\n this.listenTo(this.target, 'component:update:classes', this.updateSelector);\n\n this.listenTo(this.collection, 'add', this.addNew);\n this.listenTo(this.collection, 'reset', this.renderClasses);\n this.listenTo(this.collection, 'remove', this.tagRemoved);\n\n this.delegateEvents();\n },\n\n /**\n * Triggered when a tag is removed from collection\n * @param {Object} model Removed model\n * @private\n */\n tagRemoved(model) {\n this.updateStateVis();\n },\n\n /**\n * Create select input with states\n * @return {string} String of options\n * @private\n */\n getStateOptions() {\n var strInput = '';\n for (var i = 0; i < this.states.length; i++) {\n strInput +=\n '';\n }\n return strInput;\n },\n\n /**\n * Add new model\n * @param {Object} model\n * @private\n */\n addNew(model) {\n this.addToClasses(model);\n },\n\n /**\n * Start tag creation\n * @param {Object} e\n * @private\n */\n startNewTag(e) {\n this.$addBtn.get(0).style.display = 'none';\n this.$input.show().focus();\n },\n\n /**\n * End tag creation\n * @param {Object} e\n * @private\n */\n endNewTag(e) {\n this.$addBtn.get(0).style.display = '';\n this.$input.hide().val('');\n },\n\n /**\n * Checks what to do on keyup event\n * @param {Object} e\n * @private\n */\n onInputKeyUp(e) {\n if (e.keyCode === 13) this.addNewTag(this.$input.val());\n else if (e.keyCode === 27) this.endNewTag();\n },\n\n /**\n * Triggered when component is changed\n * @param {Object} e\n * @private\n */\n componentChanged(e) {\n this.compTarget = this.target.getSelected();\n const target = this.compTarget;\n let validSelectors = [];\n\n if (target) {\n this.getStates().val(target.get('state'));\n validSelectors = target.get('classes').getValid();\n }\n\n this.collection.reset(validSelectors);\n this.updateStateVis();\n },\n\n /**\n * Update states visibility. Hides states in case there is no tags\n * inside collection\n * @private\n */\n updateStateVis() {\n const em = this.em;\n const avoidInline = em && em.getConfig('avoidInlineStyle');\n\n if (this.collection.length || avoidInline)\n this.getStatesC().css('display', 'block');\n else this.getStatesC().css('display', 'none');\n this.updateSelector();\n },\n\n /**\n * Udpate selector helper\n * @return {this}\n * @private\n */\n updateSelector() {\n const selected = this.target.getSelected();\n this.compTarget = selected;\n\n if (!selected || !selected.get) {\n return;\n }\n\n const state = selected.get('state');\n const coll = this.collection;\n let result = coll.getFullString(coll.getStyleable());\n result = result || `#${selected.getId()}`;\n result += state ? `:${state}` : '';\n const el = this.el.querySelector('#' + this.pfx + 'sel');\n el && (el.innerHTML = result);\n },\n\n /**\n * Triggered when the select with states is changed\n * @param {Object} e\n * @private\n */\n stateChanged(e) {\n if (this.compTarget) {\n this.compTarget.set('state', this.$states.val());\n this.updateSelector();\n }\n },\n\n /**\n * Add new tag to collection, if possible, and to the component\n * @param {Object} e\n * @private\n */\n addNewTag(label) {\n const target = this.target;\n const component = this.compTarget;\n\n if (!label.trim()) {\n return;\n }\n\n if (target) {\n const sm = target.get('SelectorManager');\n var model = sm.add({ label });\n\n if (component) {\n var compCls = component.get('classes');\n var lenB = compCls.length;\n compCls.add(model);\n var lenA = compCls.length;\n this.collection.add(model);\n this.updateStateVis();\n }\n }\n this.endNewTag();\n },\n\n /**\n * Add new object to collection\n * @param {Object} model Model\n * @param {Object} fragmentEl Fragment collection\n * @return {Object} Object created\n * @private\n * */\n addToClasses(model, fragmentEl) {\n var fragment = fragmentEl || null;\n\n var view = new ClassTagView({\n model,\n config: this.config,\n coll: this.collection\n });\n var rendered = view.render().el;\n\n if (fragment) fragment.appendChild(rendered);\n else this.getClasses().append(rendered);\n\n return rendered;\n },\n\n /**\n * Render the collection of classes\n * @return {this}\n * @private\n */\n renderClasses() {\n var fragment = document.createDocumentFragment();\n\n this.collection.each(function(model) {\n this.addToClasses(model, fragment);\n }, this);\n\n if (this.getClasses())\n this.getClasses()\n .empty()\n .append(fragment);\n\n return this;\n },\n\n /**\n * Return classes element\n * @return {HTMLElement}\n * @private\n */\n getClasses() {\n if (!this.$classes)\n this.$classes = this.$el.find('#' + this.pfx + 'tags-c');\n return this.$classes;\n },\n\n /**\n * Return states element\n * @return {HTMLElement}\n * @private\n */\n getStates() {\n if (!this.$states) this.$states = this.$el.find('#' + this.stateInputId);\n return this.$states;\n },\n\n /**\n * Return states container element\n * @return {HTMLElement}\n * @private\n */\n getStatesC() {\n if (!this.$statesC) this.$statesC = this.$el.find('#' + this.stateInputC);\n return this.$statesC;\n },\n\n render() {\n const ppfx = this.ppfx;\n const config = this.config;\n const $el = this.$el;\n $el.html(\n this.template({\n selectedLabel: config.selectedLabel,\n statesLabel: config.statesLabel,\n label: config.label,\n pfx: this.pfx,\n ppfx: this.ppfx\n })\n );\n this.$input = $el.find('input#' + this.newInputId);\n this.$addBtn = $el.find('#' + this.addBtnId);\n this.$classes = $el.find('#' + this.pfx + 'tags-c');\n this.$states = $el.find('#' + this.stateInputId);\n this.$statesC = $el.find('#' + this.stateInputC);\n this.$states.append(this.getStateOptions());\n this.renderClasses();\n $el.attr('class', `${this.className} ${ppfx}one-bg ${ppfx}two-color`);\n return this;\n }\n});\n","module.exports = {\n // Style prefix\n stylePrefix: 'clm-',\n\n // Specify the element to use as a container, string (query) or HTMLElement\n // With the empty value, nothing will be rendered\n appendTo: '',\n\n // Default selectors\n selectors: [],\n\n // Label for selectors\n label: 'Classes',\n\n // Label for states\n statesLabel: '- State -',\n\n selectedLabel: 'Selected',\n\n // States\n states: [\n { name: 'hover', label: 'Hover' },\n { name: 'active', label: 'Click' },\n { name: 'nth-of-type(2n)', label: 'Even/Odd' }\n ]\n};\n","/**\n * Selectors in GrapesJS are used in CSS Composer inside Rules and in Components as classes. To get better this concept let's take\n * a look at this code:\n *\n * ```css\n * span > #send-btn.btn{\n * ...\n * }\n * ```\n * ```html\n * \n * \n * \n * ```\n *\n * In this scenario we get:\n * * span -> selector of type `tag`\n * * send-btn -> selector of type `id`\n * * btn -> selector of type `class`\n *\n * So, for example, being `btn` the same class entity it'll be easier to refactor and track things.\n *\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/selector_manager/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * selectorManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const selectorManager = editor.SelectorManager;\n * ```\n *\n * * [getConfig](#getconfig)\n * * [add](#add)\n * * [addClass](#addclass)\n * * [get](#get)\n * * [getAll](#getAll)\n *\n * @module SelectorManager\n */\n\nimport { isString, isElement, isObject } from 'underscore';\n\nconst isId = str => isString(str) && str[0] == '#';\nconst isClass = str => isString(str) && str[0] == '.';\n\nmodule.exports = config => {\n var c = config || {},\n defaults = require('./config/config'),\n Selector = require('./model/Selector'),\n Selectors = require('./model/Selectors'),\n ClassTagsView = require('./view/ClassTagsView');\n var selectors, selectorTags;\n\n return {\n Selector,\n\n Selectors,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'SelectorManager',\n\n /**\n * Get configuration object\n * @return {Object}\n */\n getConfig() {\n return c;\n },\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @return {this}\n * @private\n */\n init(conf) {\n c = conf || {};\n\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n const em = c.em;\n const ppfx = c.pStylePrefix;\n\n if (ppfx) {\n c.stylePrefix = ppfx + c.stylePrefix;\n }\n\n selectorTags = new ClassTagsView({\n collection: new Selectors([], { em, config: c }),\n config: c\n });\n\n // Global selectors container\n selectors = new Selectors(c.selectors);\n selectors.on('add', model => em.trigger('selector:add', model));\n\n return this;\n },\n\n postRender() {\n const elTo = this.getConfig().appendTo;\n\n if (elTo) {\n const el = isElement(elTo) ? elTo : document.querySelector(elTo);\n el.appendChild(this.render([]));\n }\n },\n\n /**\n * Add a new selector to collection if it's not already exists. Class type is a default one\n * @param {String} name Selector name\n * @param {Object} opts Selector options\n * @param {String} [opts.label=''] Label for the selector, if it's not provided the label will be the same as the name\n * @param {String} [opts.type=1] Type of the selector. At the moment, only 'class' (1) is available\n * @return {Model}\n * @example\n * var selector = selectorManager.add('selectorName');\n * // Same as\n * var selector = selectorManager.add('selectorName', {\n * type: 1,\n * label: 'selectorName'\n * });\n * */\n add(name, opts = {}) {\n if (isObject(name)) {\n opts = name;\n } else {\n opts.name = name;\n }\n\n if (isId(opts.name)) {\n opts.name = opts.name.substr(1);\n opts.type = Selector.TYPE_ID;\n }\n\n if (opts.label && !opts.name) {\n opts.name = Selector.escapeName(opts.label);\n }\n\n const cname = opts.name;\n const selector = cname\n ? this.get(cname, opts.type)\n : selectors.where(opts)[0];\n\n if (!selector) {\n return selectors.add(opts);\n }\n\n return selector;\n },\n\n /**\n * Add class selectors\n * @param {Array|string} classes Array or string of classes\n * @return {Array} Array of added selectors\n * @example\n * sm.addClass('class1');\n * sm.addClass('class1 class2');\n * sm.addClass(['class1', 'class2']);\n * // -> [SelectorObject, ...]\n */\n addClass(classes) {\n const added = [];\n\n if (isString(classes)) {\n classes = classes.trim().split(' ');\n }\n\n classes.forEach(name => added.push(selectors.add({ name })));\n return added;\n },\n\n /**\n * Get the selector by its name\n * @param {String} name Selector name\n * @param {String} tyoe Selector type\n * @return {Model|null}\n * @example\n * var selector = selectorManager.get('selectorName');\n * */\n get(name, type = Selector.TYPE_CLASS) {\n if (isId(name)) {\n name = name.substr(1);\n type = Selector.TYPE_ID;\n }\n return selectors.where({ name, type })[0];\n },\n\n /**\n * Get all selectors\n * @return {Collection}\n * */\n getAll() {\n return selectors;\n },\n\n /**\n * Render class selectors. If an array of selectors is provided a new instance of the collection will be rendered\n * @param {Array} selectors\n * @return {HTMLElement}\n * @private\n */\n render(selectors) {\n if (selectors) {\n var view = new ClassTagsView({\n collection: new Selectors(selectors),\n config: c\n });\n return view.render().el;\n } else return selectorTags.render().el;\n }\n };\n};\n","import { keys } from 'underscore';\n\n// At-rules\n// https://developer.mozilla.org/it/docs/Web/API/CSSRule#Type_constants\nconst atRules = {\n 4: 'media',\n 5: 'font-face',\n 6: 'page',\n 7: 'keyframes',\n 11: 'counter-style',\n 12: 'supports',\n 13: 'document',\n 14: 'font-feature-values',\n 15: 'viewport'\n};\nconst atRuleKeys = keys(atRules);\nconst singleAtRules = ['5', '6', '11', '15'];\n\nmodule.exports = config => ({\n /**\n * Parse selector string to array.\n * Only classe based are valid as CSS rules inside editor, not valid\n * selectors will be dropped as additional\n * It's ok with the last part of the string as state (:hover, :active)\n * @param {string} str Selectors string\n * @return {Object}\n * @example\n * var res = ParserCss.parseSelector('.test1, .test1.test2, .test2 .test3');\n * console.log(res);\n * // {\n * //result: [['test1'], ['test1', 'test2']],\n * //add: ['.test2 .test3']\n * //}\n */\n parseSelector(str = '') {\n const add = [];\n const result = [];\n const sels = str.split(',');\n\n for (var i = 0, len = sels.length; i < len; i++) {\n var sel = sels[i].trim();\n\n // Will accept only concatenated classes and last\n // class might be with state (eg. :hover), nothing else.\n // Can also accept SINGLE ID selectors, eg. `#myid`, `#myid:hover`\n // Composed are not valid: `#myid.some-class`, `#myid.some-class:hover`\n if (\n /^(\\.{1}[\\w\\-]+)+(:{1,2}[\\w\\-()]+)?$/gi.test(sel) ||\n /^(#{1}[\\w\\-]+){1}(:{1,2}[\\w\\-()]+)?$/gi.test(sel)\n ) {\n var cls = sel.split('.').filter(Boolean);\n result.push(cls);\n } else {\n add.push(sel);\n }\n }\n\n return {\n result,\n add\n };\n },\n\n /**\n * Parse style declarations of the node\n * @param {CSSRule} node\n * @return {Object}\n */\n parseStyle(node) {\n const stl = node.style;\n const style = {};\n\n for (var i = 0, len = stl.length; i < len; i++) {\n const propName = stl[i];\n const propValue = stl.getPropertyValue(propName);\n const important = stl.getPropertyPriority(propName);\n style[propName] = `${propValue}${important ? ` !${important}` : ''}`;\n }\n\n return style;\n },\n\n /**\n * Get the condition when possible\n * @param {CSSRule} node\n * @return {string}\n */\n parseCondition(node) {\n const condition =\n node.conditionText ||\n (node.media && node.media.mediaText) ||\n node.name ||\n node.selectorText ||\n '';\n return condition.trim();\n },\n\n /**\n * Fetch data from node\n * @param {StyleSheet|CSSRule} el\n * @return {Array}\n */\n parseNode(el) {\n var result = [];\n var nodes = el.cssRules || [];\n\n for (var i = 0, len = nodes.length; i < len; i++) {\n const node = nodes[i];\n const type = node.type.toString();\n let singleAtRule = 0;\n let atRuleType = '';\n let condition = '';\n // keyText is for CSSKeyframeRule\n let sels = node.selectorText || node.keyText;\n const isSingleAtRule = singleAtRules.indexOf(type) >= 0;\n\n // Check if the node is an at-rule\n if (isSingleAtRule) {\n singleAtRule = 1;\n atRuleType = atRules[type];\n condition = this.parseCondition(node);\n } else if (atRuleKeys.indexOf(type) >= 0) {\n var subRules = this.parseNode(node);\n condition = this.parseCondition(node);\n\n for (var s = 0, lens = subRules.length; s < lens; s++) {\n var subRule = subRules[s];\n condition && (subRule.mediaText = condition);\n subRule.atRuleType = atRules[type];\n }\n result = result.concat(subRules);\n }\n\n if (!sels && !isSingleAtRule) continue;\n const style = this.parseStyle(node);\n const selsParsed = this.parseSelector(sels);\n const selsAdd = selsParsed.add;\n sels = selsParsed.result;\n\n let lastRule;\n // For each group of selectors\n for (var k = 0, len3 = sels.length; k < len3; k++) {\n var selArr = sels[k];\n var model = {};\n singleAtRule && (model.singleAtRule = singleAtRule);\n atRuleType && (model.atRuleType = atRuleType);\n\n //Isolate state from selector\n var stateArr = selArr[selArr.length - 1].split(/:(.+)/);\n if (stateArr[1]) {\n selArr[selArr.length - 1] = stateArr[0];\n model.state = stateArr[1];\n stateArr.splice(stateArr.length - 1, 1);\n }\n\n model.selectors = selArr;\n model.style = style;\n lastRule = model;\n result.push(model);\n }\n\n // Need to push somewhere not class-based selectors, if some rule was\n // created will push them there, otherwise will create a new rule\n if (selsAdd.length) {\n var selsAddStr = selsAdd.join(', ');\n if (lastRule) {\n lastRule.selectorsAdd = selsAddStr;\n } else {\n const model = {\n selectors: [],\n selectorsAdd: selsAddStr,\n style\n };\n singleAtRule && (model.singleAtRule = singleAtRule);\n atRuleType && (model.atRuleType = atRuleType);\n condition && (model.mediaText = condition);\n result.push(model);\n }\n }\n // console.log('LAST PUSH', result[result.length - 1]);\n }\n\n return result;\n },\n\n /**\n * Parse CSS string to a desired model object\n * @param {string} str HTML string\n * @return {Object|Array}\n */\n parse(str) {\n const el = document.createElement('style');\n el.innerHTML = str;\n\n // There is no .sheet before adding it to the \n document.head.appendChild(el);\n const sheet = el.sheet;\n document.head.removeChild(el);\n const result = this.parseNode(sheet);\n\n return result.length == 1 ? result[0] : result;\n }\n});\n","module.exports = {\n textTags: ['br', 'b', 'i', 'u', 'a', 'ul', 'ol']\n};\n","module.exports = () => {\n var c = {},\n defaults = require('./config/config'),\n parserCss = require('./model/ParserCss'),\n parserHtml = require('./model/ParserHtml');\n var pHtml, pCss;\n\n return {\n compTypes: '',\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Parser',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @param {Array} [config.blocks=[]] Default blocks\n * @return {this}\n * @example\n * ...\n * {\n * blocks: [\n * {id:'h1-block' label: 'Heading', content:'

...

'},\n * ...\n * ],\n * }\n * ...\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n pHtml = new parserHtml(c);\n pCss = new parserCss(c);\n return this;\n },\n\n /**\n * Parse HTML string and return valid model\n * @param {string} str HTML string\n * @return {Object}\n */\n parseHtml(str) {\n pHtml.compTypes = this.compTypes;\n return pHtml.parse(str, pCss);\n },\n\n parseCss(str) {\n return pCss.parse(str);\n }\n };\n};\n","import _ from 'underscore';\nimport Backbone from 'backbone';\n\nmodule.exports = Backbone.View.extend({\n template: _.template(`\n
device-label\"><%= deviceLabel %>
\n
field <%= ppfx %>select\">\n input-holder\">\n \n \n
sel-arrow\">\n
d-s-arrow\">
\n
\n
\n `),\n\n events: {\n change: 'updateDevice'\n },\n\n initialize(o) {\n this.config = o.config || {};\n this.em = this.config.em;\n this.ppfx = this.config.pStylePrefix || '';\n this.events['click .' + this.ppfx + 'add-trasp'] = this.startAdd;\n this.listenTo(this.em, 'change:device', this.updateSelect);\n this.delegateEvents();\n },\n\n /**\n * Start adding new device\n * @return {[type]} [description]\n * @private\n */\n startAdd() {},\n\n /**\n * Update device of the editor\n * @private\n */\n updateDevice() {\n var em = this.em;\n if (em) {\n var devEl = this.devicesEl;\n var val = devEl ? devEl.val() : '';\n em.set('device', val);\n }\n },\n\n /**\n * Update select value on device update\n * @private\n */\n updateSelect() {\n var em = this.em;\n var devEl = this.devicesEl;\n if (em && em.getDeviceModel && devEl) {\n var device = em.getDeviceModel();\n var name = device ? device.get('name') : '';\n devEl.val(name);\n }\n },\n\n /**\n * Return devices options\n * @return {string} String of options\n * @private\n */\n getOptions() {\n var result = '';\n this.collection.each(device => {\n var name = device.get('name');\n result += '';\n });\n return result;\n },\n\n render() {\n var pfx = this.ppfx;\n this.$el.html(\n this.template({\n ppfx: pfx,\n deviceLabel: this.config.deviceLabel\n })\n );\n this.devicesEl = this.$el.find('.' + pfx + 'devices');\n this.devicesEl.append(this.getOptions());\n this.el.className = pfx + 'devices-c';\n return this;\n }\n});\n","import Backbone from 'backbone';\n\nmodule.exports = Backbone.Model.extend({\n idAttribute: 'name',\n\n defaults: {\n name: '',\n\n // Width to set for the editor iframe\n width: '',\n\n // Height to set for the editor iframe\n height: '',\n\n // The width which will be used in media queries,\n // If empty the width will be used\n widthMedia: null\n },\n\n initialize() {\n if (this.get('widthMedia') == null) {\n this.set('widthMedia', this.get('width'));\n }\n }\n});\n","import Backbone from 'backbone';\nvar Device = require('./Device');\n\nmodule.exports = Backbone.Collection.extend({\n model: Device\n});\n","module.exports = {\n devices: [],\n\n deviceLabel: 'Device'\n};\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/device_manager/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * deviceManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const deviceManager = editor.DeviceManager;\n * ```\n *\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getAll)\n *\n * @module DeviceManager\n */\n\nmodule.exports = () => {\n var c = {},\n defaults = require('./config/config'),\n Devices = require('./model/Devices'),\n DevicesView = require('./view/DevicesView');\n var devices, view;\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'DeviceManager',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @param {Array} [config.devices=[]] Default devices\n * @example\n * ...\n * {\n * devices: [\n * {name: 'Desktop', width: ''}\n * {name: 'Tablet', width: '991px'}\n * ],\n * }\n * ...\n * @return {this}\n * @private\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n devices = new Devices(c.devices);\n view = new DevicesView({\n collection: devices,\n config: c\n });\n return this;\n },\n\n /**\n * Add new device to the collection. URLs are supposed to be unique\n * @param {string} name Device name\n * @param {string} width Width of the device\n * @param {Object} opts Custom options\n * @return {Device} Added device\n * @example\n * deviceManager.add('Tablet', '900px');\n * deviceManager.add('Tablet2', '900px', {\n * height: '300px',\n * widthMedia: '810px', // the width that will be used for the CSS media\n * });\n */\n add(name, width, opts) {\n var obj = opts || {};\n obj.name = name;\n obj.width = width;\n return devices.add(obj);\n },\n\n /**\n * Return device by name\n * @param {string} name Name of the device\n * @example\n * var device = deviceManager.get('Tablet');\n * console.log(JSON.stringify(device));\n * // {name: 'Tablet', width: '900px'}\n */\n get(name) {\n return devices.get(name);\n },\n\n /**\n * Return all devices\n * @return {Collection}\n * @example\n * var devices = deviceManager.getAll();\n * console.log(JSON.stringify(devices));\n * // [{name: 'Desktop', width: ''}, ...]\n */\n getAll() {\n return devices;\n },\n\n /**\n * Render devices\n * @return {string} HTML string\n * @private\n */\n render() {\n return view.render().el;\n }\n };\n};\n","export default function(callback) {\n var constructor = this.constructor;\n return this.then(\n function(value) {\n return constructor.resolve(callback()).then(function() {\n return value;\n });\n },\n function(reason) {\n return constructor.resolve(callback()).then(function() {\n return constructor.reject(reason);\n });\n }\n );\n}\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a ` : '';\n return html;\n },\n\n /**\n * Returns CSS built inside canvas\n * @param {Object} [opts={}] Options\n * @return {string} CSS string\n * @private\n */\n getCss(opts = {}) {\n const config = this.config;\n const wrappesIsBody = config.wrappesIsBody;\n const avoidProt = opts.avoidProtected;\n const keepUnusedStyles = !isUndefined(opts.keepUnusedStyles)\n ? opts.keepUnusedStyles\n : config.keepUnusedStyles;\n const cssc = this.get('CssComposer');\n const wrp = this.get('DomComponents').getComponent();\n const protCss = !avoidProt ? config.protectedCss : '';\n\n return (\n protCss +\n this.get('CodeManager').getCode(wrp, 'css', {\n cssc,\n wrappesIsBody,\n keepUnusedStyles\n })\n );\n },\n\n /**\n * Returns JS of all components\n * @return {string} JS string\n * @private\n */\n getJs() {\n var wrp = this.get('DomComponents').getWrapper();\n return this.get('CodeManager')\n .getCode(wrp, 'js')\n .trim();\n },\n\n /**\n * Store data to the current storage\n * @param {Function} clb Callback function\n * @return {Object} Stored data\n * @private\n */\n store(clb) {\n var sm = this.get('StorageManager');\n var store = {};\n if (!sm) return;\n\n // Fetch what to store\n this.get('storables').forEach(m => {\n var obj = m.store(1);\n for (var el in obj) store[el] = obj[el];\n });\n\n sm.store(store, res => {\n clb && clb(res);\n this.set('changesCount', 0);\n this.trigger('storage:store', store);\n });\n\n return store;\n },\n\n /**\n * Load data from the current storage\n * @param {Function} clb Callback function\n * @private\n */\n load(clb = null) {\n this.getCacheLoad(1, res => {\n this.get('storables').forEach(module => module.load(res));\n clb && clb(res);\n });\n },\n\n /**\n * Returns cached load\n * @param {Boolean} force Force to reload\n * @param {Function} clb Callback function\n * @return {Object}\n * @private\n */\n getCacheLoad(force, clb) {\n var f = force ? 1 : 0;\n if (this.cacheLoad && !f) return this.cacheLoad;\n var sm = this.get('StorageManager');\n var load = [];\n\n if (!sm) return {};\n\n this.get('storables').forEach(m => {\n var key = m.storageKey;\n key = typeof key === 'function' ? key() : key;\n var keys = key instanceof Array ? key : [key];\n keys.forEach(k => {\n load.push(k);\n });\n });\n\n sm.load(load, res => {\n this.cacheLoad = res;\n clb && clb(res);\n setTimeout(() => this.trigger('storage:load', res), 0);\n });\n },\n\n /**\n * Returns device model by name\n * @return {Device|null}\n * @private\n */\n getDeviceModel() {\n var name = this.get('device');\n return this.get('DeviceManager').get(name);\n },\n\n /**\n * Run default command if setted\n * @param {Object} [opts={}] Options\n * @private\n */\n runDefault(opts = {}) {\n var command = this.get('Commands').get(this.config.defaultCommand);\n if (!command || this.defaultRunning) return;\n command.stop(this, this, opts);\n command.run(this, this, opts);\n this.defaultRunning = 1;\n },\n\n /**\n * Stop default command\n * @param {Object} [opts={}] Options\n * @private\n */\n stopDefault(opts = {}) {\n var command = this.get('Commands').get(this.config.defaultCommand);\n if (!command) return;\n command.stop(this, this, opts);\n this.defaultRunning = 0;\n },\n\n /**\n * Update canvas dimensions and refresh data useful for tools positioning\n * @private\n */\n refreshCanvas() {\n this.set('canvasOffset', this.get('Canvas').getOffset());\n },\n\n /**\n * Clear all selected stuf inside the window, sometimes is useful to call before\n * doing some dragging opearation\n * @param {Window} win If not passed the current one will be used\n * @private\n */\n clearSelection(win) {\n var w = win || window;\n w.getSelection().removeAllRanges();\n },\n\n /**\n * Get the current media text\n * @return {string}\n */\n getCurrentMedia() {\n const config = this.config;\n const device = this.getDeviceModel();\n const condition = config.mediaCondition;\n const preview = config.devicePreviewMode;\n const width = device && device.get('widthMedia');\n return device && width && !preview ? `(${condition}: ${width})` : '';\n },\n\n /**\n * Return the component wrapper\n * @return {Component}\n */\n getWrapper() {\n return this.get('DomComponents').getWrapper();\n },\n\n /**\n * Return the count of changes made to the content and not yet stored.\n * This count resets at any `store()`\n * @return {number}\n */\n getDirtyCount() {\n return this.get('changesCount');\n },\n\n /**\n * Destroy editor\n */\n destroyAll() {\n const {\n DomComponents,\n CssComposer,\n UndoManager,\n Panels,\n Canvas\n } = this.attributes;\n DomComponents.clear();\n CssComposer.clear();\n UndoManager.clear().removeAll();\n Panels.getPanels().reset();\n Canvas.getCanvasView().remove();\n this.view.remove();\n this.stopListening();\n $(this.config.el)\n .empty()\n .attr(this.attrsOrig);\n },\n\n setEditing(value) {\n this.set('editing', value);\n return this;\n },\n\n isEditing() {\n return !!this.get('editing');\n },\n\n /**\n * Set/get data from the HTMLElement\n * @param {HTMLElement} el\n * @param {string} name Data name\n * @param {any} value Date value\n * @return {any}\n * @private\n */\n data(el, name, value) {\n const varName = '_gjs-data';\n\n if (!el[varName]) {\n el[varName] = {};\n }\n\n if (isUndefined(value)) {\n return el[varName][name];\n } else {\n el[varName][name] = value;\n }\n }\n});\n","module.exports = {\n // Style prefix\n stylePrefix: 'gjs-',\n\n // HTML string or object of components\n components: '',\n\n // CSS string or object of rules\n style: '',\n\n // If true, will fetch HTML and CSS from selected container\n fromElement: 0,\n\n // Show an alert before unload the page with unsaved changes\n noticeOnUnload: true,\n\n // Show paddings and margins\n showOffsets: false,\n\n // Show paddings and margins on selected component\n showOffsetsSelected: false,\n\n // On creation of a new Component (via object), if the 'style' attribute is not\n // empty, all those roles will be moved in its new class\n forceClass: true,\n\n // Height for the editor container\n height: '900px',\n\n // Width for the editor container\n width: '100%',\n\n // By default Grapes injects base CSS into the canvas. For example, it sets body margin to 0\n // and sets a default background color of white. This CSS is desired in most cases.\n // use this property if you wish to overwrite the base CSS to your own CSS. This is most\n // useful if for example your template is not based off a document with 0 as body margin.\n baseCss: `\n * {\n box-sizing: border-box;\n }\n html, body, #wrapper {\n min-height: 100%;\n }\n body {\n margin: 0;\n height: 100%;\n background-color: #fff\n }\n #wrapper {\n overflow: auto;\n overflow-x: hidden;\n }\n\n * ::-webkit-scrollbar-track {\n background: rgba(0, 0, 0, 0.1)\n }\n\n * ::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2)\n }\n\n * ::-webkit-scrollbar {\n width: 10px\n }\n `,\n\n // CSS that could only be seen (for instance, inside the code viewer)\n protectedCss: '* { box-sizing: border-box; } body {margin: 0;}',\n\n // CSS for the iframe which containing the canvas, useful if you need to custom something inside\n // (eg. the style of the selected component)\n canvasCss: '',\n\n // Default command\n defaultCommand: 'select-comp',\n\n // Show a toolbar when the component is selected\n showToolbar: 1,\n\n // Allow script tag importing\n allowScripts: 0,\n\n // If true render a select of available devices\n showDevices: 1,\n\n // When enabled, on device change media rules won't be created\n devicePreviewMode: 0,\n\n // THe condition to use for media queries, eg. 'max-width'\n // Comes handy for mobile-first cases\n mediaCondition: 'max-width',\n\n // Starting tag for variable inside scripts in Components\n tagVarStart: '{[ ',\n\n // Ending tag for variable inside scripts in Components\n tagVarEnd: ' ]}',\n\n // When false, removes empty text nodes when parsed, unless they contain a space\n keepEmptyTextNodes: 0,\n\n // Return JS of components inside HTML from 'editor.getHtml()'\n jsInHtml: true,\n\n // Enable native HTML5 drag and drop\n nativeDnD: 1,\n\n // Enable multiple selection\n multipleSelection: 1,\n\n // Show the wrapper component in the final code, eg. in editor.getHtml()\n exportWrapper: 0,\n\n // The wrapper, if visible, will be shown as a ``\n wrappesIsBody: 1,\n\n // Usually when you update the `style` of the component this changes the\n // element's `style` attribute. Unfortunately, inline styling doesn't allow\n // use of media queries (@media) or even pseudo selectors (eg. :hover).\n // When `avoidInlineStyle` is true all styles are inserted inside the css rule\n avoidInlineStyle: 0,\n\n // Avoid default properties from storable JSON data, like `components` and `styles`.\n // With this option enabled your data will be smaller (usefull if need to\n // save some storage space)\n avoidDefaults: 0,\n\n // (experimental)\n // The structure of components is always on the screen but it's not the same\n // for style rules. When you delete a component you might leave a lot of styles\n // which will never be used again, therefore they might be removed.\n // With this option set to true, styles not used from the CSS generator (so in\n // any case where `CssGenerator.build` is used) will be removed automatically.\n // But be careful, not always leaving the style not used mean you wouldn't\n // use it later, but this option comes really handy when deal with big templates.\n clearStyles: 0,\n\n // Dom element\n el: '',\n\n // Configurations for Undo Manager\n undoManager: {},\n\n //Configurations for Asset Manager\n assetManager: {},\n\n //Configurations for Canvas\n canvas: {},\n\n //Configurations for Layers\n layers: {},\n\n //Configurations for Storage Manager\n storageManager: {},\n\n //Configurations for Rich Text Editor\n rte: {},\n\n //Configurations for DomComponents\n domComponents: {},\n\n //Configurations for Modal Dialog\n modal: {},\n\n //Configurations for Code Manager\n codeManager: {},\n\n //Configurations for Panels\n panels: {},\n\n //Configurations for Commands\n commands: {},\n\n //Configurations for Css Composer\n cssComposer: {},\n\n //Configurations for Selector Manager\n selectorManager: {},\n\n //Configurations for Device Manager\n deviceManager: {\n devices: [\n {\n name: 'Desktop',\n width: ''\n },\n {\n name: 'Tablet',\n width: '768px',\n widthMedia: '992px'\n },\n {\n name: 'Mobile landscape',\n width: '568px',\n widthMedia: '768px'\n },\n {\n name: 'Mobile portrait',\n width: '320px',\n widthMedia: '480px'\n }\n ]\n },\n\n //Configurations for Style Manager\n styleManager: {\n sectors: [\n {\n name: 'General',\n open: false,\n buildProps: [\n 'float',\n 'display',\n 'position',\n 'top',\n 'right',\n 'left',\n 'bottom'\n ]\n },\n {\n name: 'Dimension',\n open: false,\n buildProps: [\n 'width',\n 'height',\n 'max-width',\n 'min-height',\n 'margin',\n 'padding'\n ]\n },\n {\n name: 'Typography',\n open: false,\n buildProps: [\n 'font-family',\n 'font-size',\n 'font-weight',\n 'letter-spacing',\n 'color',\n 'line-height',\n 'text-align',\n 'text-shadow'\n ],\n properties: [\n {\n property: 'text-align',\n list: [\n { value: 'left', className: 'fa fa-align-left' },\n { value: 'center', className: 'fa fa-align-center' },\n { value: 'right', className: 'fa fa-align-right' },\n { value: 'justify', className: 'fa fa-align-justify' }\n ]\n }\n ]\n },\n {\n name: 'Decorations',\n open: false,\n buildProps: [\n 'border-radius-c',\n 'background-color',\n 'border-radius',\n 'border',\n 'box-shadow',\n 'background'\n ]\n },\n {\n name: 'Extra',\n open: false,\n buildProps: ['transition', 'perspective', 'transform']\n }\n ]\n },\n\n // Configurations for Block Manager\n blockManager: {},\n\n // Configurations for Trait Manager\n traitManager: {},\n\n // Texts\n textViewCode: 'Code',\n\n // Keep unused styles within the editor\n keepUnusedStyles: 0\n};\n","/**\n * Editor contains the top level API which you'll probably use to customize the editor or extend it with plugins.\n * You get the Editor instance on init method and you can pass options via its [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/editor/config/config.js)\n *\n * ```js\n * const editor = grapesjs.init({\n * // options\n * });\n * ```\n *\n * ## Available Events\n *\n * You can make use of available events in this way\n * ```js\n * editor.on('EVENT-NAME', (some, argument) => {\n * // do something\n * })\n * ```\n *\n * ### Components\n * * `component:add` - Triggered when a new component is added to the editor, the model is passed as an argument to the callback\n * * `component:remove` - Triggered when a component is removed, the model is passed as an argument to the callback\n * * `component:clone` - Triggered when a new component is added by a clone command, the model is passed as an argument to the callback\n * * `component:update` - Triggered when a component is updated (moved, styled, etc.), the model is passed as an argument to the callback\n * * `component:update:{propertyName}` - Listen any property change, the model is passed as an argument to the callback\n * * `component:styleUpdate` - Triggered when the style of the component is updated, the model is passed as an argument to the callback\n * * `component:styleUpdate:{propertyName}` - Listen for a specific style property change, the model is passed as an argument to the callback\n * * `component:selected` - New component selected, the selected model is passed as an argument to the callback\n * * `component:deselected` - Component deselected, the deselected model is passed as an argument to the callback\n * * `component:toggled` - Component selection changed, toggled model is passed as an argument to the callback\n * ### Blocks\n * * `block:add` - New block added\n * * `block:remove` - Block removed\n * * `block:drag:start` - Started dragging block, model of the block is passed as an argument\n * * `block:drag` - Dragging block, the block's model and the drag event are passed as arguments\n * * `block:drag:stop` - Dragging of the block is stopped. As agruments for the callback you get, the dropped component model (if dropped successfully) and the model of the block\n * ### Assets\n * * `asset:add` - New asset added\n * * `asset:remove` - Asset removed\n * * `asset:upload:start` - Before the upload is started\n * * `asset:upload:end` - After the upload is ended\n * * `asset:upload:error` - On any error in upload, passes the error as an argument\n * * `asset:upload:response` - On upload response, passes the result as an argument\n * ### Keymaps\n * * `keymap:add` - New keymap added. The new keyamp object is passed as an argument\n * * `keymap:remove` - Keymap removed. The removed keyamp object is passed as an argument\n * * `keymap:emit` - Some keymap emitted, in arguments you get keymapId, shortcutUsed, Event\n * * `keymap:emit:{keymapId}` - `keymapId` emitted, in arguments you get keymapId, shortcutUsed, Event\n * ### Style Manager\n * * `styleManager:change` - Triggered on style property change from new selected component, the view of the property is passed as an argument to the callback\n * * `styleManager:change:{propertyName}` - As above but for a specific style property\n * ### Storages\n * * `storage:start` - Before the storage request is started\n * * `storage:start:store` - Before the store request. The object to store is passed as an argumnet (which you can edit)\n * * `storage:start:load` - Before the load request. Items to load are passed as an argumnet (which you can edit)\n * * `storage:load` - Triggered when something was loaded from the storage, loaded object passed as an argumnet\n * * `storage:store` - Triggered when something is stored to the storage, stored object passed as an argumnet\n * * `storage:end` - After the storage request is ended\n * * `storage:end:store` - After the store request\n * * `storage:end:load` - After the load request\n * * `storage:error` - On any error on storage request, passes the error as an argument\n * * `storage:error:store` - Error on store request, passes the error as an argument\n * * `storage:error:load` - Error on load request, passes the error as an argument\n * ### Canvas\n * * `canvas:dragenter` - When something is dragged inside the canvas, `DataTransfer` instance passed as an argument\n * * `canvas:dragover` - When something is dragging on canvas, `DataTransfer` instance passed as an argument\n * * `canvas:drop` - Something is dropped in canvas, `DataTransfer` instance and the dropped model are passed as arguments\n * * `canvas:dragend` - When a drag operation is ended, `DataTransfer` instance passed as an argument\n * * `canvas:dragdata` - On any dataTransfer parse, `DataTransfer` instance and the `result` are passed as arguments.\n * By changing `result.content` you're able to customize what is dropped\n * ### Selectors\n * * `selector:add` - Triggers when a new selector/class is created\n * ### RTE\n * * `rte:enable` - RTE enabled. The view, on which RTE is enabled, is passed as an argument\n * * `rte:disable` - RTE disabled. The view, on which RTE is disabled, is passed as an argument\n * ### Commands\n * * `run:{commandName}` - Triggered when some command is called to run (eg. editor.runCommand('preview'))\n * * `stop:{commandName}` - Triggered when some command is called to stop (eg. editor.stopCommand('preview'))\n * * `run:{commandName}:before` - Triggered before the command is called\n * * `stop:{commandName}:before` - Triggered before the command is called to stop\n * * `abort:{commandName}` - Triggered when the command execution is aborted (`editor.on(`run:preview:before`, opts => opts.abort = 1);`)\n * ### General\n * * `canvasScroll` - Triggered when the canvas is scrolle\n * * `undo` - Undo executed\n * * `redo` - Redo executed\n * * `load` - When the editor is loaded\n *\n * @module Editor\n */\nimport $ from 'cash-dom';\n\nmodule.exports = config => {\n var c = config || {},\n defaults = require('./config/config'),\n EditorModel = require('./model/Editor'),\n EditorView = require('./view/EditorView');\n\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n c.pStylePrefix = c.stylePrefix;\n var em = new EditorModel(c);\n var editorView = new EditorView({\n model: em,\n config: c\n });\n\n return {\n $,\n\n /**\n * @property {EditorModel}\n * @private\n */\n editor: em,\n\n /**\n * @property {DomComponents}\n * @private\n */\n DomComponents: em.get('DomComponents'),\n\n /**\n * @property {LayerManager}\n * @private\n */\n LayerManager: em.get('LayerManager'),\n\n /**\n * @property {CssComposer}\n * @private\n */\n CssComposer: em.get('CssComposer'),\n\n /**\n * @property {StorageManager}\n * @private\n */\n StorageManager: em.get('StorageManager'),\n\n /**\n * @property {AssetManager}\n * @private\n */\n AssetManager: em.get('AssetManager'),\n\n /**\n * @property {BlockManager}\n * @private\n */\n BlockManager: em.get('BlockManager'),\n\n /**\n * @property {TraitManager}\n * @private\n */\n TraitManager: em.get('TraitManager'),\n\n /**\n * @property {SelectorManager}\n * @private\n */\n SelectorManager: em.get('SelectorManager'),\n\n /**\n * @property {CodeManager}\n * @private\n */\n CodeManager: em.get('CodeManager'),\n\n /**\n * @property {Commands}\n * @private\n */\n Commands: em.get('Commands'),\n\n /**\n * @property {Keymaps}\n * @private\n */\n Keymaps: em.get('Keymaps'),\n\n /**\n * @property {Modal}\n * @private\n */\n Modal: em.get('Modal'),\n\n /**\n * @property {Panels}\n * @private\n */\n Panels: em.get('Panels'),\n\n /**\n * @property {StyleManager}\n * @private\n */\n StyleManager: em.get('StyleManager'),\n\n /**\n * @property {Canvas}\n * @private\n */\n Canvas: em.get('Canvas'),\n\n /**\n * @property {UndoManager}\n * @private\n */\n UndoManager: em.get('UndoManager'),\n\n /**\n * @property {DeviceManager}\n * @private\n */\n DeviceManager: em.get('DeviceManager'),\n\n /**\n * @property {RichTextEditor}\n * @private\n */\n RichTextEditor: em.get('RichTextEditor'),\n\n /**\n * @property {Utils}\n * @private\n */\n Utils: em.get('Utils'),\n\n /**\n * @property {Utils}\n * @private\n */\n Config: em.get('Config'),\n\n /**\n * Initialize editor model\n * @return {this}\n * @private\n */\n init() {\n em.init(this);\n return this;\n },\n\n /**\n * Returns configuration object\n * @param {string} [prop] Property name\n * @return {any} Returns the configuration object or\n * the value of the specified property\n */\n getConfig(prop) {\n return em.getConfig(prop);\n },\n\n /**\n * Returns HTML built inside canvas\n * @return {string} HTML string\n */\n getHtml(opts) {\n return em.getHtml(opts);\n },\n\n /**\n * Returns CSS built inside canvas\n * @param {Object} [opts={}] Options\n * @return {string} CSS string\n */\n getCss(opts) {\n return em.getCss(opts);\n },\n\n /**\n * Returns JS of all components\n * @return {string} JS string\n */\n getJs() {\n return em.getJs();\n },\n\n /**\n * Returns components in JSON format object\n * @return {Object}\n */\n getComponents() {\n return em.get('DomComponents').getComponents();\n },\n\n /**\n * Set components inside editor's canvas. This method overrides actual components\n * @param {Array|Object|string} components HTML string or components model\n * @return {this}\n * @example\n * editor.setComponents('
New component
');\n * // or\n * editor.setComponents({\n * type: 'text',\n * classes:['cls'],\n * content: 'New component'\n * });\n */\n setComponents(components) {\n em.setComponents(components);\n return this;\n },\n\n /**\n * Add components\n * @param {Array|Object|string} components HTML string or components model\n * @param {Object} opts Options\n * @param {Boolean} [opts.avoidUpdateStyle=false] If the HTML string contains styles,\n * by default, they will be created and, if already exist, updated. When this option\n * is true, styles already created will not be updated.\n * @return {Model|Array}\n * @example\n * editor.addComponents('
New component
');\n * // or\n * editor.addComponents({\n * type: 'text',\n * classes:['cls'],\n * content: 'New component'\n * });\n */\n addComponents(components, opts) {\n return this.getComponents().add(components, opts);\n },\n\n /**\n * Returns style in JSON format object\n * @return {Object}\n */\n getStyle() {\n return em.get('CssComposer').getAll();\n },\n\n /**\n * Set style inside editor's canvas. This method overrides actual style\n * @param {Array|Object|string} style CSS string or style model\n * @return {this}\n * @example\n * editor.setStyle('.cls{color: red}');\n * //or\n * editor.setStyle({\n * selectors: ['cls']\n * style: { color: 'red' }\n * });\n */\n setStyle(style) {\n em.setStyle(style);\n return this;\n },\n\n /**\n * Returns the last selected component, if there is one\n * @return {Model}\n */\n getSelected() {\n return em.getSelected();\n },\n\n /**\n * Returns an array of all selected components\n * @return {Array}\n */\n getSelectedAll() {\n return em.getSelectedAll();\n },\n\n /**\n * Get a stylable entity from the selected component.\n * If you select a component without classes the entity is the Component\n * itself and all changes will go inside its 'style' attribute. Otherwise,\n * if the selected component has one or more classes, the function will\n * return the corresponding CSS Rule\n * @return {Model}\n */\n getSelectedToStyle() {\n let selected = em.getSelected();\n\n if (selected) {\n return this.StyleManager.getModelToStyle(selected);\n }\n },\n\n /**\n * Select a component\n * @param {Component|HTMLElement} el Component to select\n * @return {this}\n * @example\n * // Select dropped block\n * editor.on('block:drag:stop', function(model) {\n * editor.select(model);\n * });\n */\n select(el) {\n em.setSelected(el);\n return this;\n },\n\n /**\n * Add component to selection\n * @param {Component|HTMLElement|Array} el Component to select\n * @return {this}\n * @example\n * editor.selectAdd(model);\n */\n selectAdd(el) {\n em.addSelected(el);\n return this;\n },\n\n /**\n * Remove component from selection\n * @param {Component|HTMLElement|Array} el Component to select\n * @return {this}\n * @example\n * editor.selectRemove(model);\n */\n selectRemove(el) {\n em.removeSelected(el);\n return this;\n },\n\n /**\n * Toggle component selection\n * @param {Component|HTMLElement|Array} el Component to select\n * @return {this}\n * @example\n * editor.selectToggle(model);\n */\n selectToggle(el) {\n em.toggleSelected(el);\n return this;\n },\n\n /**\n * Set device to the editor. If the device exists it will\n * change the canvas to the proper width\n * @param {string} name Name of the device\n * @return {this}\n * @example\n * editor.setDevice('Tablet');\n */\n setDevice(name) {\n em.set('device', name);\n return this;\n },\n\n /**\n * Return the actual active device\n * @return {string} Device name\n * @example\n * var device = editor.getDevice();\n * console.log(device);\n * // 'Tablet'\n */\n getDevice() {\n return em.get('device');\n },\n\n /**\n * Execute command\n * @param {string} id Command ID\n * @param {Object} options Custom options\n * @return {*} The return is defined by the command\n * @example\n * editor.runCommand('myCommand', {someValue: 1});\n */\n runCommand(id, options = {}) {\n let result;\n const command = em.get('Commands').get(id);\n if (command) result = command.callRun(this, options);\n\n return result;\n },\n\n /**\n * Stop the command if stop method was provided\n * @param {string} id Command ID\n * @param {Object} options Custom options\n * @return {*} The return is defined by the command\n * @example\n * editor.stopCommand('myCommand', {someValue: 1});\n */\n stopCommand(id, options = {}) {\n let result;\n const command = em.get('Commands').get(id);\n if (command) result = command.callStop(this, options);\n\n return result;\n },\n\n /**\n * Store data to the current storage\n * @param {Function} clb Callback function\n * @return {Object} Stored data\n */\n store(clb) {\n return em.store(clb);\n },\n\n /**\n * Load data from the current storage\n * @param {Function} clb Callback function\n * @return {Object} Stored data\n */\n load(clb) {\n return em.load(clb);\n },\n\n /**\n * Returns container element. The one which was indicated as 'container'\n * on init method\n * @return {HTMLElement}\n */\n getContainer() {\n return c.el;\n },\n\n /**\n * Return the count of changes made to the content and not yet stored.\n * This count resets at any `store()`\n * @return {number}\n */\n getDirtyCount() {\n return em.getDirtyCount();\n },\n\n /**\n * Update editor dimensions and refresh data useful for positioning of tools\n *\n * This method could be useful when you update, for example, some position\n * of the editor element (eg. canvas, panels, etc.) with CSS, where without\n * refresh you'll get misleading position of tools (eg. rich text editor,\n * component highlighter, etc.)\n *\n * @private\n */\n refresh() {\n em.refreshCanvas();\n },\n\n /**\n * Replace the built-in Rich Text Editor with a custom one.\n * @param {Object} obj Custom RTE Interface\n * @example\n * editor.setCustomRte({\n * // Function for enabling custom RTE\n * // el is the HTMLElement of the double clicked Text Component\n * // rte is the same instance you have returned the first time you call\n * // enable(). This is useful if need to check if the RTE is already enabled so\n * // ion this case you'll need to return the RTE and the end of the function\n * enable: function(el, rte) {\n * rte = new MyCustomRte(el, {}); // this depends on the Custom RTE API\n * ...\n * return rte; // return the RTE instance\n * },\n *\n * // Disable the editor, called for example when you unfocus the Text Component\n * disable: function(el, rte) {\n * rte.blur(); // this depends on the Custom RTE API\n * }\n *\n * // Called when the Text Component is focused again. If you returned the RTE instance\n * // from the enable function, the enable won't be called again instead will call focus,\n * // in this case to avoid double binding of the editor\n * focus: function (el, rte) {\n * rte.focus(); // this depends on the Custom RTE API\n * }\n * });\n */\n setCustomRte(obj) {\n this.RichTextEditor.customRte = obj;\n },\n\n /**\n * Attach event\n * @param {string} event Event name\n * @param {Function} callback Callback function\n * @return {this}\n */\n on(event, callback) {\n return em.on(event, callback);\n },\n\n /**\n * Detach event\n * @param {string} event Event name\n * @param {Function} callback Callback function\n * @return {this}\n */\n off(event, callback) {\n return em.off(event, callback);\n },\n\n /**\n * Trigger event\n * @param {string} event Event to trigger\n * @return {this}\n */\n trigger(event) {\n return em.trigger.apply(em, arguments);\n },\n\n /**\n * Destroy the editor\n */\n destroy() {\n return em.destroyAll();\n },\n\n /**\n * Returns editor element\n * @return {HTMLElement}\n * @private\n */\n getEl() {\n return editorView.el;\n },\n\n /**\n * Returns editor model\n * @return {Model}\n * @private\n */\n getModel() {\n return em;\n },\n\n /**\n * Render editor\n * @return {HTMLElement}\n */\n render() {\n // Do post render stuff after the iframe is loaded otherwise it'll\n // be empty during tests\n em.on('loaded', () => {\n this.UndoManager.clear();\n em.get('modules').forEach(module => {\n module.postRender && module.postRender(editorView);\n });\n });\n\n editorView.render();\n return editorView.el;\n }\n };\n};\n","import $ from 'cash-dom';\nimport Editor from './editor';\nimport { isElement } from 'underscore';\nimport polyfills from 'utils/polyfills';\nimport PluginManager from './plugin_manager';\n\npolyfills();\n\nmodule.exports = (() => {\n const plugins = new PluginManager();\n const editors = [];\n const defaultConfig = {\n // If true renders editor on init\n autorender: 1,\n\n // Array of plugins to init\n plugins: [],\n\n // Custom options for plugins\n pluginsOpts: {}\n };\n\n return {\n $,\n\n editors,\n\n plugins,\n\n // Will be replaced on build\n version: '<# VERSION #>',\n\n /**\n * Initializes an editor based on passed options\n * @param {Object} config Configuration object\n * @param {string|HTMLElement} config.container Selector which indicates where render the editor\n * @param {Boolean} [config.autorender=true] If true, auto-render the content\n * @param {Array} [config.plugins=[]] Array of plugins to execute on start\n * @param {Object} [config.pluginsOpts={}] Custom options for plugins\n * @return {Editor} Editor instance\n * @example\n * var editor = grapesjs.init({\n * container: '#myeditor',\n * components: '
Hello world
',\n * style: '.hello{color: red}',\n * })\n */\n init(config = {}) {\n const els = config.container;\n if (!els) throw new Error(\"'container' is required\");\n config = { ...defaultConfig, ...config };\n config.el = isElement(els) ? els : document.querySelector(els);\n const editor = new Editor(config).init();\n\n // Load plugins\n config.plugins.forEach(pluginId => {\n const plugin = plugins.get(pluginId);\n\n if (plugin) {\n plugin(editor, config.pluginsOpts[pluginId] || {});\n } else {\n console.warn(`Plugin ${pluginId} not found`);\n }\n });\n\n // Execute `onLoad` on modules once all plugins are initialized.\n // A plugin might have extended/added some custom type so this\n // is a good point to load stuff like components, css rules, etc.\n editor.getModel().loadOnStart();\n config.autorender && editor.render();\n editors.push(editor);\n\n return editor;\n }\n };\n})();\n"],"sourceRoot":""} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index fe9e168ce7..89f1e9e00a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "grapesjs", - "version": "0.14.23", + "version": "0.14.25", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5be689a6a2..1036d8f615 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grapesjs", "description": "Free and Open Source Web Builder Framework", - "version": "0.14.23", + "version": "0.14.25", "author": "Artur Arseniev", "license": "BSD-3-Clause", "homepage": "http://grapesjs.com",